diff options
Diffstat (limited to 'xci/installer')
-rwxr-xr-x | xci/installer/osa/deploy.sh | 11 | ||||
-rw-r--r-- | xci/installer/osa/files/aio/inventory | 2 | ||||
-rw-r--r-- | xci/installer/osa/files/ha/inventory | 6 | ||||
-rw-r--r-- | xci/installer/osa/files/mini/inventory | 6 | ||||
-rw-r--r-- | xci/installer/osa/files/noha/inventory | 6 | ||||
-rw-r--r-- | xci/installer/osa/playbooks/configure-opnfvhost.yml | 21 | ||||
-rw-r--r-- | xci/installer/osa/playbooks/configure-targethosts.yml | 48 |
7 files changed, 41 insertions, 59 deletions
diff --git a/xci/installer/osa/deploy.sh b/xci/installer/osa/deploy.sh index 6702b678..ce44626a 100755 --- a/xci/installer/osa/deploy.sh +++ b/xci/installer/osa/deploy.sh @@ -127,11 +127,6 @@ ssh root@$OPNFV_HOST_IP "set -o pipefail; openstack-ansible ${XCI_ANSIBLE_PARAMS releng-xci/.cache/repos/openstack-ansible/playbooks/setup-infrastructure.yml | tee setup-infrastructure.log" scp root@$OPNFV_HOST_IP:~/setup-infrastructure.log $LOG_PATH/setup-infrastructure.log echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/setup-infrastructure.log; then - echo "Error: OpenStack node setup failed!" - exit 1 -fi #------------------------------------------------------------------------------- # Verify database cluster @@ -161,11 +156,7 @@ ssh root@$OPNFV_HOST_IP "set -o pipefail; openstack-ansible ${XCI_ANSIBLE_PARAMS releng-xci/.cache/repos/openstack-ansible/playbooks/setup-openstack.yml | tee opnfv-setup-openstack.log" scp root@$OPNFV_HOST_IP:~/opnfv-setup-openstack.log $LOG_PATH/opnfv-setup-openstack.log echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/opnfv-setup-openstack.log; then - echo "Error: OpenStack installation failed!" - exit 1 -fi +echo echo "Info: OpenStack installation is successfully completed!" #------------------------------------------------------------------------------- diff --git a/xci/installer/osa/files/aio/inventory b/xci/installer/osa/files/aio/inventory index 9a3dd9ee..fa2a1009 100644 --- a/xci/installer/osa/files/aio/inventory +++ b/xci/installer/osa/files/aio/inventory @@ -1,2 +1,2 @@ -[opnfv] +[deployment] opnfv ansible_ssh_host=192.168.122.2 diff --git a/xci/installer/osa/files/ha/inventory b/xci/installer/osa/files/ha/inventory index 94b1d074..f5d882ef 100644 --- a/xci/installer/osa/files/ha/inventory +++ b/xci/installer/osa/files/ha/inventory @@ -1,4 +1,4 @@ -[opnfv] +[deployment] opnfv ansible_ssh_host=192.168.122.2 [controller] @@ -9,3 +9,7 @@ controller02 ansible_ssh_host=192.168.122.5 [compute] compute00 ansible_ssh_host=192.168.122.6 compute01 ansible_ssh_host=192.168.122.7 + +[openstack:children] +controller +compute diff --git a/xci/installer/osa/files/mini/inventory b/xci/installer/osa/files/mini/inventory index eb73e5e3..4224131f 100644 --- a/xci/installer/osa/files/mini/inventory +++ b/xci/installer/osa/files/mini/inventory @@ -1,4 +1,4 @@ -[opnfv] +[deployment] opnfv ansible_ssh_host=192.168.122.2 [controller] @@ -6,3 +6,7 @@ controller00 ansible_ssh_host=192.168.122.3 [compute] compute00 ansible_ssh_host=192.168.122.4 + +[openstack:children] +controller +compute diff --git a/xci/installer/osa/files/noha/inventory b/xci/installer/osa/files/noha/inventory index b4f9f6d0..0e3b8d84 100644 --- a/xci/installer/osa/files/noha/inventory +++ b/xci/installer/osa/files/noha/inventory @@ -1,4 +1,4 @@ -[opnfv] +[deployment] opnfv ansible_ssh_host=192.168.122.2 [controller] @@ -7,3 +7,7 @@ controller00 ansible_ssh_host=192.168.122.3 [compute] compute00 ansible_ssh_host=192.168.122.4 compute01 ansible_ssh_host=192.168.122.5 + +[openstack:children] +controller +compute diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml index a3b8894f..4c30f4d1 100644 --- a/xci/installer/osa/playbooks/configure-opnfvhost.yml +++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml @@ -27,10 +27,8 @@ remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks" roles: - - role: configure-network - when: XCI_FLAVOR != "aio" - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time + - role: bootstrap-host + configure_network: XCI_FLAVOR != 'aio' tasks: - name: generate SSH keys @@ -77,12 +75,6 @@ - name: copy user_variables_ceph.yml shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables_ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/user_variables_ceph.yml" when: XCI_CEPH_ENABLED == "true" - # TODO: We need to get rid of this as soon as the issue is fixed upstream - - name: change the haproxy state from disable to enable - replace: - dest: "{{OPENSTACK_OSA_PATH}}/playbooks/os-keystone-install.yml" - regexp: '(\s+)haproxy_state: disabled' - replace: '\1haproxy_state: enabled' - name: copy OPNFV OpenStack playbook shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks" - name: copy pinned versions of OSA Roles and global requirements @@ -138,6 +130,10 @@ content: "{{ xci_ssl_key }}" dest: "/etc/ssl/private/xci.key" become: true + - name: fetch xci environment + copy: + src: "{{ XCI_PATH }}/.cache/xci.env" + dest: /root/xci.env - hosts: localhost remote_user: root @@ -175,3 +171,8 @@ src: "{{ ansible_env.HOME }}/openrc" dest: "{{ XCI_PATH }}/.cache/openrc" flat: true + + - name: add public key to host + copy: + src: "{{ XCI_PATH }}/xci/files/authorized_keys" + dest: /root/.ssh/authorized_keys diff --git a/xci/installer/osa/playbooks/configure-targethosts.yml b/xci/installer/osa/playbooks/configure-targethosts.yml index fb43a920..31c3e02e 100644 --- a/xci/installer/osa/playbooks/configure-targethosts.yml +++ b/xci/installer/osa/playbooks/configure-targethosts.yml @@ -1,30 +1,5 @@ --- -- hosts: all - remote_user: root - tasks: - - name: add public key to host - copy: - src: "{{ XCI_PATH }}/xci/files/authorized_keys" - dest: /root/.ssh/authorized_keys - -- hosts: controller - remote_user: root - vars_files: - - "{{ XCI_PATH }}/xci/var/opnfv.yml" - - pre_tasks: - - name: Load distribution variables - include_vars: - file: "{{ item }}" - with_items: - - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml" - - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml" - roles: - - role: configure-network - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute +- hosts: openstack remote_user: root vars_files: - "{{ XCI_PATH }}/xci/var/opnfv.yml" @@ -37,13 +12,16 @@ - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml" - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml" roles: - - role: configure-network - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - - role: configure-ceph - when: XCI_CEPH_ENABLED == "true" - -- hosts: compute00 - remote_user: root - roles: + - role: bootstrap-host - role: configure-nfs + when: + - "'compute' in group_names" + - role: configure-ceph + when: + - XCI_CEPH_ENABLED == "true" + - "'compute' in group_names" + tasks: + - name: add public key to host + copy: + src: "{{ XCI_PATH }}/xci/files/authorized_keys" + dest: /root/.ssh/authorized_keys |