summaryrefslogtreecommitdiffstats
path: root/xci/playbooks
AgeCommit message (Collapse)AuthorFilesLines
2018-04-25Merge "Move configuration network templates"Markos Chandras11-5/+5
2018-04-17Merge "xci: Add k8-nosdn-nofeature role"Markos Chandras1-0/+4
2018-04-16xci: Add k8-nosdn-nofeature rolewutianwei1-0/+4
Move default k8s-cluster.yml from kubespray/files/ to role/k8-nosdn-nofeature/files/k8s-cluster.yml since it's scenario specific. Moreover, we set 'cloud' as kube_network_plugin, which would use kubnet as network plugin. The kubenet network plugin requires routing between to be setup by the administrator so we need to add static routes on every host since they are connected using a bridge instead of a router. installer-type:kubespray deploy-scenario:k8-nosdn-nofeature Change-Id: I6ab7288c966d7f17e9d61279056f7673be37bebe Signed-off-by: wutianwei <wutianwei1@huawei.com> Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-04-14Download only the needed images for OpenStack Functest HealthcheckFatih Degirmenci1-1/+9
Some of the files needed by Functest are pretty big and it takes time to download them all so this change ensures that the files are needed by healthcheck is downloaded and the rest is not. Further changes are needed to make the list even smaller for smoke test but we need Functest guidance to identify which of them are needed for what testing. It could be done by having suite specific download_images.sh like download_images_healthcheck.sh, download_images_smoke.sh and so on. deploy-scenario:os-nosdn-nofeature installer-type:osa Change-Id: Ib2c5867adfad8097d1a084c39ad08cc4df2e4549 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-04-13Integrate the k8-flannel-nofeature scenarioTaseer Ahmed1-0/+4
installer-type:kubespray deploy-scenario:k8-flannel-nofeature Change-Id: Ie47efe4759b2cf52421cd2edf5e7817442b0026f Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
2018-04-13Create the k8-calico-nofeature scenariowutianwei1-0/+4
installer-type:kubespray deploy-scenario:k8-calico-nofeature Change-Id: Ief8557149fd47faab43f8f4bedcf6466dac2275f Signed-off-by: wutianwei <wutianwei1@huawei.com>
2018-04-12Create the k8-canal-nofeature scenariowutianwei1-0/+4
add the k8-nosdn-noeature and k8-canal-nofeature roles under scenarios directory run different roles to configure the k8s-cluster according to the deploy scenario installer-type:kubespray deploy-scenario:k8-canal-nofeature Change-Id: Ia96b01f79fb058e045c5b7d9d9aecb7f15a21e63 Signed-off-by: wutianwei <wutianwei1@huawei.com>
2018-04-12Update prepare-functest role for k8s and fix fetching xci.envFatih Degirmenci3-25/+61
This change updates prepare-functest role for testing k8s scenarios using functest healthcheck. The changes include - update tasks to skip checking/creation of public gateway which is needed for OpenStack based scenarios - update run-functest.sh.j2 template and set the used docker image name based on FUNCTEST_SUITE_NAME that is going to be used - update run-functest.sh.j2 template and add commands needed to run tests using functest-kubernetes-${FUNCTEST_SUITE_NAME} docker image - update env.j2 to exclude setting the var EXTERNAL_NETWORK which is needed for OpenStack based scenarios Apart from updating the the prepare-functest role, a bug has also been fixed by adding the fetching of xci.env for installer kubespray. installer-type:kubespray deploy-scenario:k8-nosdn-nofeature Change-Id: Ia701db9748ea9509a2dc165341285fb189aa7266 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-04-11Set additional variables for functestFatih Degirmenci1-1/+1
CI_LOOP, NODE_NAME, and BUILD_TAG are needed for logging info to console. FUNCTEST_MODE and FUNCTEST_SUITE_NAME are important for stating what level of testing we do for verify and merge jobs. Change-Id: Iaa5499155b4b94a1cfc6b5c70fe6f8f7417502a6 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-04-10Merge "Revert "display the correct deploy scenario for the functest run""Fatih Degirmenci1-1/+1
2018-04-10Merge "xci: osa: Move SSL certification tasks to a new file"Manuel Buil1-0/+32
2018-04-09Revert "display the correct deploy scenario for the functest run"Manuel Buil1-1/+1
This reverts commit 5dc7b76e38019c059cea159769cdb2c37af98ded. OPENSTACK_OSA_VERSION was removed by this patch and that variable is needed. By looking at the patch, it seems theat variable was removed by mistake Change-Id: I73dc7a7ec393231717f847ff303f9b2f99a00cc0
2018-04-08[XCI] Fix ansible synchronize module parameterwutianwei1-1/+1
synchronize module unsupported parameter "recurse", it would be failed, when trying to synchronize the directory. we need change it to "recursive", more information please refer to http://docs.ansible.com/ansible/devel/modules/synchronize_module.html Change-Id: If18ce8a3411ba9425dd573f090c5f4e0c41858e0 Signed-off-by: wutianwei <wutianwei1@huawei.com>
2018-04-06xci: osa: Move SSL certification tasks to a new fileMarkos Chandras1-0/+32
The tasks for creating and managing the XCI SSL certificates can be shared between installers so move them to a common file. Change-Id: I9df82517e737681420429a992aa8d68e78528fd4 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-04-06Move configuration network templatesVictor Morales11-5/+5
The jinja templates that are used for networking setup are based on the openstack-ansible needs, those needs can differ for another installers. This change propose to make the network configuration depending on the installer. Signed-off-by: Victor Morales <victor.morales@intel.com> Change-Id: Ie805c3c7716393377d4dfcb32ed794cc1039d515
2018-04-04xci: osa: Use Ansible modules to create ssl certificatesMarkos Chandras1-27/+9
Ansible already provides modules to create ssl certificates so we can use these instead of running the openssl commands directly. Moreover, we can drop all the tasks which create the ssl directories since there are being created by the openssl package which also creates the appropriate symlinks. Finally, there is no need to generate the certificate on localhost if only the OPNFV host consumes it, so move these steps to the appropriate playbook. Change-Id: I0045945c502013be3d76440876e894a44a092690 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-04-03xci: osa: Move tasks for managing SSH keys to a new fileMarkos Chandras1-0/+47
The tasks that manage the SSH keys are common across hosts and also common across different installers. As such, lets move them to a new file so we can share them more easily. Change-Id: If235877394f224a47a2f2b8de748a2330eabcec1 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-28xci: bootstrap-host: Make active network interface consistentMarkos Chandras2-21/+50
When we run XCI for the first time, Ansible picks the first active interface as the default one. However, after we configure all the XCI bridges etc, and we try to run this role again, Ansible may have changed its mind about what interface is active and it could default to one of the bridges. This forces the role to redo the network configuration but this time the bridges are being attached to bridges so everything goes terribly wrong after that. The way to solve this would be to add a local fact about what interface should be considered as the 'real' default one so subsequent calls to this role to not destroy the network. This also drops the task which removed the network configuration files on SUSE platforms since Ansible is smart enough to not touch them if they are configured properly. Change-Id: Ic0525e934b1934a40d69e6cf977615ab9b3dac6d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-28xci: Use proper Ansible modules to manage SSH keysMarkos Chandras1-0/+14
We can use the 'user', 'slurp' and 'authorized_key' modules to manage the various SSH configurations across the hosts instead of using command line tools. Change-Id: I2dde4d584fc336e267868607d5a58f5ee2c1feed Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-28Merge "xci: playbooks: Fixes various ansible-lint warnings"Markos Chandras6-7/+22
2018-03-26xci: get-opnfv-scenario-requirements: Use checksum for rsync updatesMarkos Chandras1-0/+8
Rsync will update modification times on transferred files so Ansible marks the task as 'changed' all the time even though the source and destination files are the same. This is confusing for XCI developers because they may think that there are local changes to the scenarios which is not always the case. As such, compare the 'checksums' of the actual files to determine if there are any changes that need to be copied over. This requires us to turn off the 'archive' option and use the individual options directly. This fixes the following problem where in a typical XCI job, all inbound scenarios appear to have changes which is not true. Mar 26 15:10:24 TASK [Synchronize local changes to scenarios' master branch] ******************* Mar 26 15:10:24 ok: [localhost] => (item=os-odl-sfc) Mar 26 15:10:25 changed: [localhost] => (item=os-nosdn-nofeature) Mar 26 15:10:25 changed: [localhost] => (item=os-odl-nofeature) Mar 26 15:10:25 changed: [localhost] => (item=k8-nosdn-nofeature) Mar 26 15:10:26 ok: [localhost] => (item=os-odl-bgpvpn) Change-Id: I14f446c341a675b286e971f0b5c0be14d04abb9d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-26xci: playbooks: Fixes various ansible-lint warningsMarkos Chandras6-7/+22
In preparation for adding support for the 'ansible-lint' tool we fix various problems in our playbooks to make the tool happy before we make it mandatory. Some of the problems that are fixed here are - [ANSIBLE0011] All tasks should be named - [ANSIBLE0012] Commands should not change things if nothing needs doing - [ANSIBLE0013] Use shell only when shell functionality is required - [ANSIBLE0010] Package installs should not use latest installer-type:osa deploy-scenario:os-nosdn-nofeature Change-Id: I66c759d3932a414b81b2846393d2d98ce80c0b6d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-26xci: get-opnfv-scenario-requirements: Fix local scenario syncMarkos Chandras1-4/+4
Commit 07747a53901e550280afb421b6fcbebc8994e93a ("xci: playbooks: Fix synchronization of external scenarios") fixed copying of external scenarios but broke internal ones because the regexp was wrong. The variable was not evaluated properly so nothing was replaced for internal scenarios. This also fixes a problem when the scenario and the role names differ so we make sure that the role with the correct name is created. Change-Id: Idd7590d972841b5c03286b34757d7325b863c6bf Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-24xci: playbooks: Fix synchronization of external scenariosMarkos Chandras1-1/+1
The code was supposed to copy everything from {{ xci_path }}/{{ scenario.role }} to the XCI roles directory but external scenarios have their 'role' attribute relative to their repository whereas internal one have it relative to the {{ xci_path }}. As such, changes to external scenarios were not copied successfully to the playbooks directory and their changes where never tested. This removes the 'xci/scenarios/$scenario' part of the inbound roles attribute to make all them relative to the xci/scenarios/$scenario directory. Change-Id: Id28671b30c8ee4aa6bc186444c0e5a3a3ea3d89b Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-22Merge "xci: playbooks: Fix message on fail task for deployed scenario"Fatih Degirmenci1-2/+2
2018-03-22Move bootstrap-scenarios.yml to common playbooks directorywutianwei1-0/+27
Move bootstrap-scenarios.yml from installer/osa/playbooks/bootstrap-scenarios.yml to playbooks/bootstrap-scenarios.yml as a common playbook. So we can use this file to bootstarap k8s-* scenarios, instead of creating a new file under installer/kubespray/playbooks/bootstrap-scenarios.yml Change-Id: Ic31ee00e1a0863f48fb86298d7c00fa8420fa28a Signed-off-by: wutianwei <wutianwei1@huawei.com>
2018-03-22xci: playbooks: Fix message on fail task for deployed scenarioMarkos Chandras1-2/+2
The fail message was a bit weird since it listed all the scenarion information as below: TASK [Fail if {'scm': u'git', 'src': u'https://git.opnfv.org/releng-xci', 'scenario': u'os-nosdn-nofeature', 'installers': [{'flavors': [u'ha', u'mini', u'noha'], 'installer': u'osa', 'distros': [u'opensuse', u'ubuntu', u'centos']}], 'version': u'master', 'role': u'xci/scenarios/os-nosdn-nofeature/role/os-nosdn-nofeature'} is not supported] *** skipping: [localhost] This looks awkward and we should only list the actual scenario name instead. Change-Id: I725793f91661f00606573906847336716fecd418 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-21Clean up opnfv ansible vars and switch to lowercaseFatih Degirmenci2-41/+41
This change removes the variables that are not used in any of the playbooks/roles from opnfv ansible vars. Apart from that, all caps ansible vars replaced with lowercase ones and impacted playbooks/roles are updated. installer-type:osa deploy-scenario:os-nosdn-nofeature Change-Id: I99ebdc155b3903176ac5940b64cef0c0f3aa0f0d Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-03-20Add proxy supportVictor Morales2-0/+8
In some cases the XCI development environment can be located behind a corporate proxy resulting in a additional layer to consider to configure. These changes pretend to include proxy support for all linux distros in all the posible flavors. Change-Id: Iab469268809ac471d09e244bb3ccd83de1a41b88 Signed-off-by: Victor Morales <victor.morales@intel.com>
2018-03-20Merge changes from topic 'allow-deployment-overrides'Markos Chandras1-42/+0
* changes: xci: infra: bifrost: Avoid installing Ansible twice Add initial support for multiple infra deployers
2018-03-20Add initial support for multiple infra deployersMarkos Chandras1-42/+0
bifrost is currently the only way to deploy the infrastructure but in the future other solutions will be added so we need to do some preparation for XCI integration. Change-Id: I961dd42157c924d88747074ddba6a318f8b537ac Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-20display the correct deploy scenario for the functest runPeriyasamy Palanisamy1-1/+9
Change-Id: I0b8a6d9409d95033839bdc5b3fbe9d1cbbdf4b7c Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-03-19Pass the OSA version to functest containerManuel Buil1-1/+1
OPNFV scenarios are forced to support at least two versions of OSA. If there are API changes between two supported versions of OpenStack, the testing code must have two versions. However, without knowing what OpenStack version is deployed, it is impossible to automate the decision of which testing code to use Change-Id: I3ca8c6f33c05826a5d69417da774b7218bbd59e2 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-03-19Merge "xci: playbooks: Drop .gitignore file"Markos Chandras1-7/+0
2018-03-16xci: Copy XCI environment to deployment hostsMarkos Chandras3-2/+21
The XCI hosts may need some of the XCI env variables to perform certain tasks so dump the XCI environment to /root/xci.env file and make that available to every host on the deployment. Change-Id: I286a01ca7da8ff206438c261798167f5e4daf7f2 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-16xci: playbooks: Drop .gitignore fileMarkos Chandras1-7/+0
There is probably no good reason anymore to be so strict with file inclusions in the roles directory so drop the .gitignore file. Change-Id: I84569c8c82c4aeb5da6c6e39e02ff514566e5213 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-13xci: Merge configure-network and syncronize-time rolesMarkos Chandras16-2/+27
Those roles were too small and only used as part of the host bootstrapping process. As such, we merge them into a common 'bootstrap-host' role which can be used to prepare the hosts after the initial deployment Change-Id: Ifc84cf40b98ced91b31aae699dc28e9642380550 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-12Combine vars setting installer type in INSTALLER_TYPEFatih Degirmenci2-8/+8
Change-Id: I330bc036f901d4ba61bc94ee6e085cadf54b4d8b Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-03-10xci: roles: configure-network: Avoid passing empty string to moduleMarkos Chandras1-1/+1
The package module gets upset if we pass it an empty string as a package name Mar 09 15:15:33 TASK [configure-network : Ensure networking packages are present] ************** Mar 09 15:15:49 fatal: [opnfv]: FAILED! => {"changed": false, "failed": true, "msg": "No package matching '' found available, installed or updated", "rc": 126, "results": ["iproute-3.10.0-87.el7.x86_64 providing iproute is already installed", "No package matching '' found available, installed or updated"]} As such, lets pass an existing package for non-Debian distros to make the module happy. Change-Id: Ib1128057097193278cfe50f79daf35332b54e781 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-10xci: OSA: Ensure proper constrains are applied to pip installationsMarkos Chandras2-0/+4
We need to make sure that the pip packages that we install are compatible with the OSA components. Change-Id: I87e80dc9b8fb862d9f9039d835b0908f752de3ca Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-10xci: Move functest required packages to the functest roleMarkos Chandras2-7/+32
The docker packages that we install in the OPNFV VM are needed by functest so add them to the related role. Change-Id: I6ebe76fd030859f757d41ecf20c30ab76888ee9c Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-09Merge "xci: roles: configure-network: Wait for connection when configuring ↵Fatih Degirmenci1-6/+35
the network"
2018-03-09xci: roles: configure-network: Wait for connection when configuring the networkMarkos Chandras1-6/+35
Ansible some times loses connection with the host after we configure its network interface. This shouldn't happen since the host is actually up and running. As a result of which, we need to fire-and-forget the restart of the network service and then try to reach the SSH port. We also need to make sure that all required packages are installed. Finally, we drop the 'ignore_errors' parameter since we really need to know when the networking configuration has failed. Change-Id: I366192737b5c4e01964eaf187396eababbdc808e Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-09xci: Rename provision-vm-nodes playbookMarkos Chandras1-0/+0
The provision-vm-nodes playbook doesn't do any VM provisioning. It basically just bootstraps the bifrost repository so rename it to make it clear what this is about. Change-Id: I1c10bc6135686c5197d553a885412a94312a41bc Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-28Be quiet while downloading imagesFatih Degirmenci1-1/+1
Change-Id: I8848d5bae22a408482d51a84636d230d25ca22be Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-02-28functest: Move run-functest.sh execution out of ansibleFatih Degirmenci6-6/+3
Ansible throws out the log at the end of task execution which makes it hard to read. This change renames the role to prepare-functest and then takes the script execution out which will be executed by releng/jjb/xci/xci-run-functest.sh. Change-Id: Icf399ce4f04357814ed7109cd11113a9decddc50 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-02-25Export CI_LOOP as expected by FunctestCédric Ollivier1-0/+1
CI_LOOP is hardcoded to daily (the common default value) [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/51981/ Change-Id: I15f5d41f7f10a5c8fddcc4a4d303552ef45c5fb2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-25Export an new var related to EnergyCédric Ollivier1-0/+1
It conforms with "Unlink Energy from functest utils and constants": https://gerrit.opnfv.org/gerrit/#/c/51943/ Depends-On: Iecd5d49b4d4c961c9dc51e43e54df1fcd4027266 Change-Id: I7c7125ac2fee9a2e8f24dcf060bdaab1b39ae552 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-22Update the .gitignore in rolesManuel Buil1-1/+1
THe prepare-functest role changed the name but .gitignore is still using the old name Change-Id: I67e962704a62756663abdc721fb8b9a9ac8648a2 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-02-21xci: roles: configure-network: Determine host NIC from Ansible factsMarkos Chandras6-60/+60
Hardcoding the interface as a variable is very fragile since it varies from host to host. We could use the Ansible facts to find out the interface name and then use that to configure all the VLANs and networking. Change-Id: Ie7e2409d638625b9bede23b6c1fe33dc36f81840 Signed-off-by: Markos Chandras <mchandras@suse.de>