summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/configure-localhost.yml
AgeCommit message (Collapse)AuthorFilesLines
2018-03-21Clean up opnfv ansible vars and switch to lowercaseFatih Degirmenci1-29/+29
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-16xci: Copy XCI environment to deployment hostsMarkos Chandras1-0/+5
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-12Combine vars setting installer type in INSTALLER_TYPEFatih Degirmenci1-6/+6
Change-Id: I330bc036f901d4ba61bc94ee6e085cadf54b4d8b Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-01-31deploy kubernetes in XCIwutianwei1-0/+100
This commit introduces kubespray into XCI. k8s install currently assumes k8s install and OpenStack install cannot coexist. If XCI_INSTALLER is set to "kubespray" and DEPLOY_SCENARIO is set to "k8-nosdn-nofeature" the xci-deploy.sh would install kubernetes instead of OpenStack. The version of kubernetes is beta release v1.9.0 currently according to the master of kubespray it only support the ubuntu now. Opensuse and centos still need to develop and test. This patch create the directory xci/installer/kubespray, the related files of kubespray would be placed to it. The xci/installer/$installer/playbooks/configure-localhost.yml was moved to xci/playbooks/configure-localhost.yml as a common yaml file. You can modify some parameters according your need in xci/installer/kubespray/files/k8s-cluster.yml to deploy cluster. When deploying kubernetes, it would download the kubespray to releng-xci/.cache/repos/kubespray. If your flavor is Ha, it will download haproxy_server and keepalived to xci/playbook/roles, which setup haproxy service for kubernetes. Change-Id: I24d521a735d7ee85fbe5af8c4def65f37586b843 Signed-off-by: wutianwei <wutianwei1@huawei.com>
2017-12-21xci: OSA: Move all the OSA specific playbooks to the NFVI directoryMarkos Chandras1-72/+0
Move all the playbooks that only make sense for OpenStack-Ansible deployments to the NFVI/OSA directory where they belong. This further disassociates XCI from OSA. Change-Id: Iab8b6dc81d9025a1d85608a98fb1eee0f1c6a69f Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2017-12-13xci: Fix checkout location for OpenStack-AnsibleMarkos Chandras1-11/+25
The OPENSTACK_OSA_PATH only makes sense on localhost. As such, when we use it on playbooks that operate on remote hosts, the result is not predictable. However, we rsync the entire releng-xci repository to the opfnv host so we can make everything predictable by simply clone everything in advance in the .cache directory. That directory is then rsync'd to the opnfv host. As such, we can repurpose the OPENSTACK_OSA_PATH to point to the path into the OPNFV host. Moreover, all external repositories are being cloned to .cache/repos so we can eliminate some variables in order to simplify the code. Finally, we bring back the ability to use an external OSA repository for development purposes. Change-Id: Ieef3e22ae2085f6735185634d555cfc0d4b69b39 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-11xci: Use local playbooks for XCI deploymentsMarkos Chandras1-57/+16
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-29xci: Drop OPNFV_RELENG_DEV_PATH variableMarkos Chandras1-3/+1
The OPNFV_RELENG_DEV_PATH variable was used to point to a releng-xci development repository. However, people normally set the current directory as the development one and they almost always want to test the current code in XCI. Using an secondary releng-xci tree as development repo is a very obscure case and it normally complicates things. As such, let drop this option and always use the current repository for development purposes. Change-Id: If111bf29a32a5f6ea28694f191645af0c6a87abc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-29Check if /etc/ssl/certs exists before creating itTapio Tallgren1-1/+6
In CentOS and Suse, /etc/ssl/certs is a symbolic link to /etc/ssl/pki/tls/certs. The Ansible module "file" will fail if it is asked to create a directory which is already a symbolic link. This patch will check if /etc/ssl/certs exists before trying to create it. The same check is done both on the host and the opnfv guest VM. Also, /etc/certs is only writable by root, so we need a "become: true" clause to be able to modify it in localhost (but not in opnvf VM). Change-Id: Iab6c3c162548f84ad6082829e4a7c2ab63d2cfa0 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2017-09-21xci: configure-localhost: Do not check /etc/ssl/certs on SUSEMarkos Chandras1-0/+1
/etc/ssl/certs is a symlink so skip this task on SUSE. Change-Id: Ibc188b76f47c4f7d1c5aa452a21e838420d65e6a Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-21xci: playbooks: Include distribution var files dynamicallyMarkos Chandras1-2/+0
This is a continuation of I0a49e2ed8d811bb40a99612462752f8691133e0f We need to convert these two plays to include the variable files dynamically similar to the rest of the playbook. Change-Id: I43203651ccafb03e015bfe4d1b075a7ee96b5adc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-21xci: Gain elevated privileges to remove the XCI_DEVEL_ROOT directoryMarkos Chandras1-0/+11
This is similar to 0927671781f6875926dac2e5f4bb10816e67070c. We need elevated privileges to remove the XCI_DEVEL_ROOT directory so move this role to its own play. Change-Id: Ice4f030eeb28cd24a6166f11a5a792ab3df8880c Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-15xci: playbooks: Add task for loading distribution variablesMarkos Chandras1-4/+13
vars_files doesn't support loading files with variables in their names. As such we add a new task to include these files before running any of the roles. This fixes warnings like this: Info: Starting provisining VM nodes using openstack/bifrost ------------------------------------------------------------------------- No config file found; using defaults skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable Change-Id: I0a49e2ed8d811bb40a99612462752f8691133e0f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-14Generate and use certificates for OSAYolanda Robla1-1/+19
Instead of making OSA to generate self signed certs, bring our own and pass them. By this way we will be able to trust in that certs, and start consuming OpenStack easily. It will also generate proper openrc file to source it and start consuming the cloud properly. Change-Id: Ic72a8b05e6efb222926fc5fa0800e033b2dbd22f Closes-Bug: RELENG-266 Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
2017-08-16Refactor releng/prototypes/xci to releng-xci/xci in the codeDave Urschatz1-5/+5
These changes are needed as part of migrating xci from releng repo to the releng-xci repo. They cover: - README updates - Re-point configuration from releng/prototypes to releng-xci The changes have been tested as follows: - XCI_FLAVOR=aio - OPENSTACK_OSA_VERSION=adfaa66d6108f87599e0595591b39cad2c8fb658 xci: aio has been installed real 107m5.310s user 11m50.180s sys 4m11.152s ubuntu@rack-IRA2-SymKloudBlade4:~/releng-xci/xci$ Change-Id: I8fd86c2442ee3a7c6996eedb6510dbc6eebd30b0 Signed-off-by: Dave Urschatz <dave.urschatz@cengn.ca>
2017-08-11prototypes: xci: Add ability to use local repositories for testingMarkos Chandras1-0/+22
When developing XCI features it's useful to be able to use the local repositories rather than cloning them from git since that makes it harder to test local modifications against XCI. As such, we add three new variables which can be used to hold local paths to the bifrost, releng and openstack-ansible repositories. We are still cloning the repositories but we then use the 'synchronize' Ansible module to copy modified files from the local repositories. Change-Id: I6d593ea48d8b9c51415d9d0848f77a498ef2f486 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: xci: configure-localhost: Use 'connection: local'Markos Chandras1-1/+1
Since we are operating on localhost, there is no need to do that via ssh so we use 'connection: local' instead. Moreover, we do not need to execute everything as root so we drop the remote user directive. Change-Id: Ib2127edad29e2da1cd1beebf42cb8f0d278ce3ad Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11xci: Merge configure-targethosts.yml playbooks into oneFatih Degirmenci1-6/+0
They are exactly same now after moving nfs to compute00. Change-Id: I9d9d2f037aa3684ba130ae0a4f9aef2e733f2d2e Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Ensure using flavor inventoryFatih Degirmenci1-0/+4
This is needed in order to configure target hosts that are in the flavor inventory file rather than what is there by default, which is aio. Change-Id: Iab27ed71a3d7c03f8fbbec8ceb7af92259320412
2017-08-11xci: Add common and OS family ansible var filesFatih Degirmenci1-0/+1
OS family vars_files are currently empty and put there to show the intend. (kind of TODO) opnfv.yml holds non-distro and non-flavor specific variables. Change-Id: I65aff2650257f2df00fd1f0a0638fd1aff596ac4 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Add main playbooks and filesFatih Degirmenci1-0/+38
This patch adds the main/common playbooks, files, and templates to be used for all flavors. The provisioning and OpenStack installation process will be as below - provision VMs for flavor using bifrost - once the VMs are provisioned, configure-localhost.yml playbook will be run, preparing the localhost in order to ensure the right playbooks (configure-opnfvhost.yml and configure-targethosts.yml), inventory files and var files are in place before we proceed with configuring opnfv host. - after getting the right files for the flavor, opnfv host will be configured using configure-opnfvhost.yml playbook. - finally, the target hosts will be configured. - once the above process is completed, openstack-ansible playbooks will be run, setting up hosts, infrastructure and OpenStack. Change-Id: I6e08b2cfdab9627f765e6fc414917b09f953cab2 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Yet another try to find how best to structure stuffFatih Degirmenci1-0/+0
Summary of changes are - flavors directory has been removed and the flavor config files are moved into config and renamed to <flavor>-vars - common files are put under file - files specific to flavors are put under file/<flavor> 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 <fatih.degirmenci@ericsson.com>