From c580e947a59bc00996c6057c363f13e0398682a6 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Tue, 28 Mar 2017 01:04:27 +0200 Subject: xci: Yet another try to find how best to structure stuff Summary of changes are - flavors directory has been removed and the flavor config files are moved into config and renamed to -vars - common files are put under file - files specific to flavors are put under file/ directories - templates and var files are stored in template and var directories respectively - 3 playbooks are created Change-Id: I8a93e0947ccb02f93a6c8f00da27e0cc6b4dc21e Signed-off-by: Fatih Degirmenci --- .gitignore | 2 +- prototypes/xci/config/aio-vars | 18 ++++++++++++++++++ prototypes/xci/config/ha-vars | 18 ++++++++++++++++++ prototypes/xci/config/mini-vars | 18 ++++++++++++++++++ prototypes/xci/config/noha-vars | 18 ++++++++++++++++++ prototypes/xci/file/aio/flavor-vars.yml | 0 prototypes/xci/file/aio/inventory | 0 prototypes/xci/file/aio/openstack_user_config.yml | 0 .../xci/file/aio/playbooks/configure-xcihost.yml | 0 prototypes/xci/file/aio/playbooks/inventory | 2 -- prototypes/xci/file/aio/var/ubuntu.yml | 7 ------- prototypes/xci/file/cinder.yml | 0 prototypes/xci/file/exports | 0 prototypes/xci/file/ha/configure-targethosts.yml | 0 prototypes/xci/file/ha/flavor-vars.yml | 0 prototypes/xci/file/ha/inventory | 0 prototypes/xci/file/ha/openstack_user_config.yml | 0 prototypes/xci/file/ha/playbooks/configure-xcihost.yml | 0 prototypes/xci/file/ha/playbooks/inventory | 0 prototypes/xci/file/ha/var/ubuntu.yml | 0 prototypes/xci/file/mini/configure-targethosts.yml | 0 prototypes/xci/file/mini/flavor-vars.yml | 0 prototypes/xci/file/mini/inventory | 0 prototypes/xci/file/mini/openstack_user_config.yml | 0 .../xci/file/mini/playbooks/configure-xcihost.yml | 0 prototypes/xci/file/mini/playbooks/inventory | 0 prototypes/xci/file/mini/var/ubuntu.yml | 0 prototypes/xci/file/modules | 0 prototypes/xci/file/noha/configure-targethosts.yml | 0 prototypes/xci/file/noha/flavor-vars.yml | 0 prototypes/xci/file/noha/inventory | 0 prototypes/xci/file/noha/openstack_user_config.yml | 0 .../xci/file/noha/playbooks/configure-xcihost.yml | 0 prototypes/xci/file/noha/playbooks/inventory | 0 prototypes/xci/file/noha/var/ubuntu.yml | 0 prototypes/xci/file/setup-openstack.yml | 0 prototypes/xci/file/user_variables.yml | 0 prototypes/xci/flavors/aio | 18 ------------------ prototypes/xci/flavors/ha | 18 ------------------ prototypes/xci/flavors/mini | 18 ------------------ prototypes/xci/flavors/noha | 18 ------------------ prototypes/xci/playbooks/configure-localhost.yml | 0 prototypes/xci/playbooks/inventory | 0 prototypes/xci/template/compute.interface.j2 | 0 prototypes/xci/template/controller.interface.j2 | 0 prototypes/xci/template/xci.interface.j2 | 0 prototypes/xci/var/ubuntu.yml | 0 prototypes/xci/xci-deploy.sh | 2 +- 48 files changed, 74 insertions(+), 83 deletions(-) create mode 100755 prototypes/xci/config/aio-vars create mode 100755 prototypes/xci/config/ha-vars create mode 100755 prototypes/xci/config/mini-vars create mode 100755 prototypes/xci/config/noha-vars create mode 100644 prototypes/xci/file/aio/flavor-vars.yml create mode 100644 prototypes/xci/file/aio/inventory create mode 100644 prototypes/xci/file/aio/openstack_user_config.yml delete mode 100644 prototypes/xci/file/aio/playbooks/configure-xcihost.yml delete mode 100644 prototypes/xci/file/aio/playbooks/inventory delete mode 100644 prototypes/xci/file/aio/var/ubuntu.yml create mode 100644 prototypes/xci/file/cinder.yml create mode 100644 prototypes/xci/file/exports delete mode 100644 prototypes/xci/file/ha/configure-targethosts.yml create mode 100644 prototypes/xci/file/ha/flavor-vars.yml create mode 100644 prototypes/xci/file/ha/inventory create mode 100644 prototypes/xci/file/ha/openstack_user_config.yml delete mode 100644 prototypes/xci/file/ha/playbooks/configure-xcihost.yml delete mode 100644 prototypes/xci/file/ha/playbooks/inventory delete mode 100644 prototypes/xci/file/ha/var/ubuntu.yml delete mode 100644 prototypes/xci/file/mini/configure-targethosts.yml create mode 100644 prototypes/xci/file/mini/flavor-vars.yml create mode 100644 prototypes/xci/file/mini/inventory create mode 100644 prototypes/xci/file/mini/openstack_user_config.yml delete mode 100644 prototypes/xci/file/mini/playbooks/configure-xcihost.yml delete mode 100644 prototypes/xci/file/mini/playbooks/inventory delete mode 100644 prototypes/xci/file/mini/var/ubuntu.yml create mode 100644 prototypes/xci/file/modules delete mode 100644 prototypes/xci/file/noha/configure-targethosts.yml create mode 100644 prototypes/xci/file/noha/flavor-vars.yml create mode 100644 prototypes/xci/file/noha/inventory create mode 100644 prototypes/xci/file/noha/openstack_user_config.yml delete mode 100644 prototypes/xci/file/noha/playbooks/configure-xcihost.yml delete mode 100644 prototypes/xci/file/noha/playbooks/inventory delete mode 100644 prototypes/xci/file/noha/var/ubuntu.yml create mode 100644 prototypes/xci/file/setup-openstack.yml create mode 100644 prototypes/xci/file/user_variables.yml delete mode 100644 prototypes/xci/flavors/aio delete mode 100644 prototypes/xci/flavors/ha delete mode 100644 prototypes/xci/flavors/mini delete mode 100644 prototypes/xci/flavors/noha create mode 100644 prototypes/xci/playbooks/configure-localhost.yml create mode 100644 prototypes/xci/playbooks/inventory create mode 100644 prototypes/xci/template/compute.interface.j2 create mode 100644 prototypes/xci/template/controller.interface.j2 create mode 100644 prototypes/xci/template/xci.interface.j2 create mode 100644 prototypes/xci/var/ubuntu.yml diff --git a/.gitignore b/.gitignore index 0aa7b8c09..431e52139 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ lib/ lib64/ parts/ sdist/ -var/ wheels/ *.egg-info/ .installed.cfg @@ -35,3 +34,4 @@ nosetests.xml testapi_venv/ .cache .tox +*.retry diff --git a/prototypes/xci/config/aio-vars b/prototypes/xci/config/aio-vars new file mode 100755 index 000000000..48754e507 --- /dev/null +++ b/prototypes/xci/config/aio-vars @@ -0,0 +1,18 @@ +#------------------------------------------------------------------------------- +# XCI Flavor Configuration +#------------------------------------------------------------------------------- +# You are free to modify parts of the configuration to fit into your environment. +# But before doing that, please ensure you checked other flavors to see if one +# them can be used instead, saving you some time. +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Configure VM Nodes +#------------------------------------------------------------------------------- +export TEST_VM_NUM_NODES=1 +export TEST_VM_NODE_NAMES=xci +export VM_DOMAIN_TYPE=kvm +export VM_CPU=8 +export VM_DISK=80 +export VM_MEMORY_SIZE=8192 +export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/ha-vars b/prototypes/xci/config/ha-vars new file mode 100755 index 000000000..8a045a3dd --- /dev/null +++ b/prototypes/xci/config/ha-vars @@ -0,0 +1,18 @@ +#------------------------------------------------------------------------------- +# XCI Flavor Configuration +#------------------------------------------------------------------------------- +# You are free to modify parts of the configuration to fit into your environment. +# But before doing that, please ensure you checked other flavors to see if one +# them can be used instead, saving you some time. +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Configure VM Nodes +#------------------------------------------------------------------------------- +export TEST_VM_NUM_NODES=6 +export TEST_VM_NODE_NAMES="xci controller00 controller01 controller02 compute00 compute01" +export VM_DOMAIN_TYPE=kvm +export VM_CPU=8 +export VM_DISK=80 +export VM_MEMORY_SIZE=16384 +export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/mini-vars b/prototypes/xci/config/mini-vars new file mode 100755 index 000000000..44b015d9f --- /dev/null +++ b/prototypes/xci/config/mini-vars @@ -0,0 +1,18 @@ +#------------------------------------------------------------------------------- +# XCI Flavor Configuration +#------------------------------------------------------------------------------- +# You are free to modify parts of the configuration to fit into your environment. +# But before doing that, please ensure you checked other flavors to see if one +# them can be used instead, saving you some time. +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Configure VM Nodes +#------------------------------------------------------------------------------- +export TEST_VM_NUM_NODES=3 +export TEST_VM_NODE_NAMES="xci controller00 compute00" +export VM_DOMAIN_TYPE=kvm +export VM_CPU=8 +export VM_DISK=80 +export VM_MEMORY_SIZE=8192 +export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/noha-vars b/prototypes/xci/config/noha-vars new file mode 100755 index 000000000..7f686e5e5 --- /dev/null +++ b/prototypes/xci/config/noha-vars @@ -0,0 +1,18 @@ +#------------------------------------------------------------------------------- +# XCI Flavor Configuration +#------------------------------------------------------------------------------- +# You are free to modify parts of the configuration to fit into your environment. +# But before doing that, please ensure you checked other flavors to see if one +# them can be used instead, saving you some time. +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# Configure VM Nodes +#------------------------------------------------------------------------------- +export TEST_VM_NUM_NODES=4 +export TEST_VM_NODE_NAMES="xci controller00 compute00 compute01" +export VM_DOMAIN_TYPE=kvm +export VM_CPU=8 +export VM_DISK=80 +export VM_MEMORY_SIZE=8192 +export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/file/aio/flavor-vars.yml b/prototypes/xci/file/aio/flavor-vars.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/aio/inventory b/prototypes/xci/file/aio/inventory new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/aio/openstack_user_config.yml b/prototypes/xci/file/aio/openstack_user_config.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/aio/playbooks/configure-xcihost.yml b/prototypes/xci/file/aio/playbooks/configure-xcihost.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/aio/playbooks/inventory b/prototypes/xci/file/aio/playbooks/inventory deleted file mode 100644 index 9283e516d..000000000 --- a/prototypes/xci/file/aio/playbooks/inventory +++ /dev/null @@ -1,2 +0,0 @@ -[xciaio] -xciaio ansible_ssh_host=192.168.122.2 diff --git a/prototypes/xci/file/aio/var/ubuntu.yml b/prototypes/xci/file/aio/var/ubuntu.yml deleted file mode 100644 index 3a041b1cb..000000000 --- a/prototypes/xci/file/aio/var/ubuntu.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -OPENSTACK_OSA_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_GIT_URL') }}" -OPENSTACK_OSA_PATH: "{{ lookup('env','OPENSTACK_OSA_PATH') }}" -OPENSTACK_OSA_VERSION: "{{ lookup('env','OPENSTACK_OSA_VERSION') }}" -OPENSTACK_OSA_ETC_PATH: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}" -XCI_IP: "{{ lookup('env','XCI_IP') }}" -multi_host: "False" diff --git a/prototypes/xci/file/cinder.yml b/prototypes/xci/file/cinder.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/exports b/prototypes/xci/file/exports new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/ha/configure-targethosts.yml b/prototypes/xci/file/ha/configure-targethosts.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/ha/flavor-vars.yml b/prototypes/xci/file/ha/flavor-vars.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/ha/inventory b/prototypes/xci/file/ha/inventory new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/ha/openstack_user_config.yml b/prototypes/xci/file/ha/openstack_user_config.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/ha/playbooks/configure-xcihost.yml b/prototypes/xci/file/ha/playbooks/configure-xcihost.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/ha/playbooks/inventory b/prototypes/xci/file/ha/playbooks/inventory deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/ha/var/ubuntu.yml b/prototypes/xci/file/ha/var/ubuntu.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/mini/configure-targethosts.yml b/prototypes/xci/file/mini/configure-targethosts.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/mini/flavor-vars.yml b/prototypes/xci/file/mini/flavor-vars.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/mini/inventory b/prototypes/xci/file/mini/inventory new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/mini/openstack_user_config.yml b/prototypes/xci/file/mini/openstack_user_config.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/mini/playbooks/configure-xcihost.yml b/prototypes/xci/file/mini/playbooks/configure-xcihost.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/mini/playbooks/inventory b/prototypes/xci/file/mini/playbooks/inventory deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/mini/var/ubuntu.yml b/prototypes/xci/file/mini/var/ubuntu.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/modules b/prototypes/xci/file/modules new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/noha/configure-targethosts.yml b/prototypes/xci/file/noha/configure-targethosts.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/noha/flavor-vars.yml b/prototypes/xci/file/noha/flavor-vars.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/noha/inventory b/prototypes/xci/file/noha/inventory new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/noha/openstack_user_config.yml b/prototypes/xci/file/noha/openstack_user_config.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/noha/playbooks/configure-xcihost.yml b/prototypes/xci/file/noha/playbooks/configure-xcihost.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/noha/playbooks/inventory b/prototypes/xci/file/noha/playbooks/inventory deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/noha/var/ubuntu.yml b/prototypes/xci/file/noha/var/ubuntu.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/prototypes/xci/file/setup-openstack.yml b/prototypes/xci/file/setup-openstack.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/file/user_variables.yml b/prototypes/xci/file/user_variables.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/flavors/aio b/prototypes/xci/flavors/aio deleted file mode 100644 index 48754e507..000000000 --- a/prototypes/xci/flavors/aio +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=1 -export TEST_VM_NODE_NAMES=xci -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=8192 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/flavors/ha b/prototypes/xci/flavors/ha deleted file mode 100644 index 8a045a3dd..000000000 --- a/prototypes/xci/flavors/ha +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=6 -export TEST_VM_NODE_NAMES="xci controller00 controller01 controller02 compute00 compute01" -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=16384 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/flavors/mini b/prototypes/xci/flavors/mini deleted file mode 100644 index 44b015d9f..000000000 --- a/prototypes/xci/flavors/mini +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=3 -export TEST_VM_NODE_NAMES="xci controller00 compute00" -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=8192 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/flavors/noha b/prototypes/xci/flavors/noha deleted file mode 100644 index 7f686e5e5..000000000 --- a/prototypes/xci/flavors/noha +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=4 -export TEST_VM_NODE_NAMES="xci controller00 compute00 compute01" -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=8192 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/playbooks/configure-localhost.yml b/prototypes/xci/playbooks/configure-localhost.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/playbooks/inventory b/prototypes/xci/playbooks/inventory new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/template/compute.interface.j2 b/prototypes/xci/template/compute.interface.j2 new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/template/controller.interface.j2 b/prototypes/xci/template/controller.interface.j2 new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/template/xci.interface.j2 b/prototypes/xci/template/xci.interface.j2 new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/var/ubuntu.yml b/prototypes/xci/var/ubuntu.yml new file mode 100644 index 000000000..e69de29bb diff --git a/prototypes/xci/xci-deploy.sh b/prototypes/xci/xci-deploy.sh index 401c098c6..eb1e9d78e 100755 --- a/prototypes/xci/xci-deploy.sh +++ b/prototypes/xci/xci-deploy.sh @@ -20,7 +20,7 @@ source $XCI_PATH/config/pinned-versions source $XCI_PATH/config/user-vars # source flavor configuration -source $XCI_PATH/flavors/$XCI_FLAVOR +source "$XCI_PATH/flavors/${XCI_FLAVOR}-vars" # source xci configuration source $XCI_PATH/config/env-vars -- cgit 1.2.3-korg