summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-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-26xci: playbooks: Fixes various ansible-lint warningsMarkos Chandras4-4/+15
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-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-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 Chandras2-2/+16
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-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 Chandras1-0/+1
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-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-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 Degirmenci5-4/+1
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>
2018-02-20xci: playbooks: run-functest: Collect functest resultsMarkos Chandras1-0/+2
Add a new volume to the docker container which will hold the results from the functest run. Change-Id: I70541a8337c9198a97304312adfab74d4dd06b70 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-13xci: Bump OpenStack Ansbile SHAsMarkos Chandras1-0/+8
* Bump up upstream SHAs * With these upstream SHAs, OSA installs neutron-agent container on controller node which would require eth12 interface on controller for establishing vlan provider networks. so adding eth12 interface and linking it with br-vlan over br-vlan-veth link. Change-Id: Iaf7cbe6e41dcfd15ec6527c5a50701f2d05eaad8 Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-02-02Rename Functest credsCédric Ollivier1-1/+1
It follows the change "Rename a common credential file for OS and K8S" which stops forcing OpenStack creds. [1] https://gerrit.opnfv.org/gerrit/#/c/51283/ Change-Id: Ic83a2e696c9ea8821e29e6b3f4e69db25c528a0d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-29Adapt to change in functestManuel Buil1-0/+1
Functest requires to read the variable TEST_DB_URL from the env. variables: https://gerrit.opnfv.org/gerrit/#/c/49757/ Change-Id: Idbfc2df989f5b2a8e6ddd2d9a9a70526dd9bf1f4 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-01-26xci: run-functest: Add required functest packagesMarkos Chandras1-0/+7
The package requirements are the same across distros so we simply hardcode them in the task. Fixes the following problem: fatal: [opnfv]: FAILED! => {"changed": true, "cmd": "/root/run-functest.sh", "delta": "0:00:09.150226", "end": "2018-01-26 14:01:18.758704", "failed": true, "rc": 125, "start": "2018-01-26 1 4:01:09.608478", "stderr": "/root/run-functest.sh: line 14: wget: command not found Change-Id: Ib07acac18f8ece1111ee0706766f32005d0ac1da Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-24xci: Integrate functestFatih Degirmenci4-9/+16
This change integrates functest in most easiest and messy way to get it up and running to bring functest into CI. The reason for this is that there are strange failures during functest healthcheck and it is important to look into those rather than beautifying how functest is integrated at this phase. Change-Id: I42e993be4aa15da022fa1e0069338447780f177e Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-01-15Create CentOS networking configurationTapio Tallgren3-0/+48
Change-Id: If8c0de44c313fdc22b1c7443b12d42769035c5b0 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2018-01-15Rename centos.yml to redhat.yml in configure-nfs/varsTapio Tallgren1-0/+0
'redhat' as a ansible_os_family covers both the RedHat distros and CentOS. Change-Id: I2ab56024d2c0f1f40a014a236cfd94ef38daad04 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2017-12-11xci: Use local playbooks for XCI deploymentsMarkos Chandras2-22/+1
Previously, we used to clone the releng-xci repository under a directory in /tmp, copy our changes to that repository and then run the xci-deploy.sh script from it. However, this made things far too complex for deployers and developers since some playbooks were used from the local repo whereas others were used from teh /tmp checkout. By running everything from our local repository simplifies things a lot since we can directly test our changes and also reduces the code we have in our playbooks. Change-Id: If16aa51b2846c170676df82d25cb90e26b1568b2 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-22Add br-vlan-veth to the br-vlan bridge in openSUSEManuel Buil1-0/+2
br-vlan-eth was created but not added to any bridge, therefore floating ips were not working as it was impossible for the OVS in the compute to get the ARP messages coming from the gateway of the public network Change-Id: Ia0828b7e96359dc10012ac52bf0e5d4f2c5419cb Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-11-22Remove the share flagManuel Buil1-1/+1
When creating the external network for functest testing purposes, it does not need to be shareable between tenants because functest uses routers and floating ips. Therefore, better remove it to avoid confusion Change-Id: I18a1fd34a52ddae2527ee3580a9d1a2b649e61b6 Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-11-14Merge "Fix permissions on SUSE network script"Fatih Degirmenci1-0/+1
2017-11-14Merge "Integrate ceph in XCI"Markos Chandras2-0/+65
2017-11-09Fix permissions on SUSE network scriptManuel Buil1-0/+1
We were not getting the eth12 interface in the computes because the network-config-suse file did not have executable rights: -rw-r--r-- 1 root root 300 Nov 9 14:40 network-config-suse Change-Id: Ia796123b331b67bc442d3506b944f0430f7a5f32 Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-10-26Integrate ceph in XCIwutianwei2-0/+65
Openstack ansible support to deploy ceph. The purpose of this patch is to configure the ceph, just like we configure other openstack components. The default is to not deploy ceph. If you want to deploy ceph you just need to export XCI_CEPH_ENABLED=true before running xci-deploy.sh. When deployed successfully, the openstack storage will use ceph. Change-Id: Ifd8d16fdce2914b6316842e72bbfd93228ea059d Signed-off-by: wutianwei <wutianwei1@huawei.com>
2017-10-19xci: Clone all XCI scenarios in advance similar to a-r-rMarkos Chandras1-0/+8
In order to plug the scenarios' roles properly, we need to have all roles physically present in advance. As such, add a opnfv-scenario-requirements.yml file which can be used to populate the roles directory with all the scenarios. Change-Id: I0cdadb63849e4565c31559817660d23217879053 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-05Remove the quotes from the external network nameManuel Buil1-1/+1
If we leave the quotes, functest will search for a neutron network with the name "ext-net" instead of ext-net and will fail Change-Id: I4ef62fa6ea69573f5872b864402ddb8644ce432d Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-10-02Add the name for CentOS NFS server packageTapio Tallgren1-0/+11
Change-Id: I5a8ff4c358ab9f1d548c9cc834faa2465ec63d41 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2017-09-28xci: playbooks: synchronize-time: Fix service name for openSUSEMarkos Chandras1-1/+1
In openSUSE, the chrony service is 'chronyd'. Change-Id: Ifb946b0ba49783108a84dd5b998d9d45f5c9df51 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27Remove the quotes from the IPManuel Buil1-1/+1
Functest complains that it cannot connect to the installer because it does not understand the ip or hostname. The cause for this is the quotes in the template Change-Id: I75c30b7f1bbcee3f968692b4347ceb13ab1131d2 Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-09-27Create a role which prepares xci for functestManuel Buil4-0/+62
Functest requires xci deployment to have: - A public neutron network - A subnet attached to the public neutron network - The gateway from the subnet attached to one interface The network and subnet creation are done via a script instead of using Ansible OpenStack module in order to get things working asap. These three tasks are implemented in a role This patch depends on a pending patch: https://gerrit.opnfv.org/gerrit/#/c/39517/2 Change-Id: I0635227153087fd9e25b76f0859f82bf48bfb930 Signed-off-by: Manuel Buil <mbuil@suse.com> Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-18Merge "Ensure XCI_DEVEL_ROOT is removed"Fatih Degirmenci1-0/+1
2017-09-18Ensure XCI_DEVEL_ROOT is removedFatih Degirmenci1-0/+1
It is important to start with a clean XCI_DEVEL_ROOT in order to ensure the leftovers from the previous deployment doesn't result in successful or failed deployments due to not having it in sync with the latest updates. Change-Id: I00d77e1fc62cccda7920af3469af9d44247780f4 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-17xci: synchronize-time: Install the chrony package and drop Xenial referenceMarkos Chandras1-13/+14
The roles should pull all the packages they need so we need to install the 'chrony' package everywhere and also drop the Xenial reference since there is nothing Ubuntu specific here. Change-Id: I51fb24573c0e884f8a96868e304b23140cc23b41 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-17xci: configure-nfs: Install the NFS server packageMarkos Chandras3-2/+8
We need to explicitly install the nfs server package instead of bundling it to the dib image since not every node needs it. Change-Id: I73f59f4ed582359df80ea08712b433537c087aea Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-17xci: configure-nfs: Add SUSE supportMarkos Chandras2-1/+12
Add ability to restart the NFS server on SUSE hosts. Change-Id: Id5f0edb399151c62302b2e36bb9451ed35501d3f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-17xci: configure-network: Add ability to configure network on SUSE hostsMarkos Chandras4-5/+77
Change-Id: I42c6f5f07ac87b5599758947fabe5fce36d44a2e Signed-off-by: Markos Chandras <mchandras@suse.de>