Browse Source

Add lampstack tox environment

This commits adds ansible lampstack tox environment, as well as ansible
and shade to requirements.txt file.
:
Change-Id: I1028847971b9f336d5d7b411de92b2b08486c3e2
Daniel Mellado 2 years ago
parent
commit
d8237529d9
2 changed files with 27 additions and 19 deletions
  1. 2
    0
      requirements.txt
  2. 25
    19
      tox.ini

+ 2
- 0
requirements.txt View File

@@ -3,3 +3,5 @@
3 3
 # process, which may cause wedges in the gate later.
4 4
 
5 5
 pbr>=1.8 # Apache-2.0
6
+ansible>=2.0.0.0 # GNU LGPL 3.0
7
+shade==1.13.2 # Apache-2.0

+ 25
- 19
tox.ini View File

@@ -1,25 +1,42 @@
1 1
 [tox]
2 2
 minversion = 2.0
3
-envlist=pep8
3
+envlist = lampstack, docs, releasenotes
4
+skip_install = True
4 5
 skipsdist = True
5 6
 
6 7
 [testenv]
7 8
 usedevelop = True
9
+sitepackages = False
8 10
 install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
11
+whitelist_externals = *
9 12
 setenv =
10 13
    VIRTUAL_ENV={envdir}
11 14
    PYTHONWARNINGS=default::DeprecationWarning
12
-deps = -r{toxinidir}/test-requirements.txt
13
-commands = python setup.py test --slowest --testr-args='{posargs}'
14
-
15
-[testenv:pep8]
16
-commands = flake8 {posargs}
15
+passenv = HOME OS_USERNAME OS_PASSWORD OS_PROJECT_NAME http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
16
+deps =
17
+    -r{toxinidir}/requirements.txt
18
+    -r{toxinidir}/test-requirements.txt
17 19
 
18 20
 [testenv:venv]
19 21
 commands = {posargs}
20 22
 
21
-[testenv:cover]
22
-commands = python setup.py test --coverage --testr-args='{posargs}'
23
+[testenv:ansible]
24
+deps =
25
+    {[testenv]deps}
26
+setenv =
27
+    {[testenv]setenv}
28
+    ANSIBLE_HOST_KEY_CHECKING = False
29
+    ANSIBLE_SSH_CONTROL_PATH =  /tmp/%%h-%%r
30
+
31
+[testenv:lampstack]
32
+deps =
33
+    {[testenv:ansible]deps}
34
+setenv =
35
+    {[testenv:ansible]setenv}
36
+    LAMPSTACK_DIR = {toxinidir}/workloads/ansible/shade/lampstack
37
+    ANSIBLE_INVENTORY = {env:LAMPSTACK_DIR}/hosts
38
+    ANSIBLE_CONFIG = {env:LAMPSTACK_DIR}/ansible.cfg
39
+commands = ansible-playbook -e "action=apply {posargs}" {env:LAMPSTACK_DIR}/site.yml
23 40
 
24 41
 [testenv:docs]
25 42
 commands = python setup.py build_sphinx
@@ -27,14 +44,3 @@ commands = python setup.py build_sphinx
27 44
 [testenv:releasenotes]
28 45
 commands =
29 46
   sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
30
-
31
-[testenv:debug]
32
-commands = oslo_debug_helper {posargs}
33
-
34
-[flake8]
35
-# E123, E125 skipped as they are invalid PEP-8.
36
-
37
-show-source = True
38
-ignore = E123,E125
39
-builtins = _
40
-exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build

Loading…
Cancel
Save