[XCI] move osa files into xci/nfvi/osa/files 57/49857/2
authorwutianwei <wutianwei1@huawei.com>
Tue, 2 Jan 2018 08:49:48 +0000 (16:49 +0800)
committerwutianwei <wutianwei1@huawei.com>
Wed, 3 Jan 2018 02:48:56 +0000 (10:48 +0800)
we maybe introduce other NFVI in the future in XCI.
it is necessary to put the nfvi files to corresponding directory xci/nfvi/$NFVI/files,
otherwise the files directory will be confused.

Change-Id: Iea98167ff0bc8d338a94fe1c064ac0ab396c53d3
Signed-off-by: wutianwei <wutianwei1@huawei.com>
30 files changed:
xci/config/env-vars
xci/files/install-ansible.sh [moved from xci/file/install-ansible.sh with 100% similarity]
xci/nfvi/osa/files/aio/flavor-vars.yml [moved from xci/file/aio/flavor-vars.yml with 100% similarity]
xci/nfvi/osa/files/aio/inventory [moved from xci/file/aio/inventory with 100% similarity]
xci/nfvi/osa/files/ha/ceph.yml [moved from xci/file/ha/ceph.yml with 100% similarity]
xci/nfvi/osa/files/ha/flavor-vars.yml [moved from xci/file/ha/flavor-vars.yml with 100% similarity]
xci/nfvi/osa/files/ha/inventory [moved from xci/file/ha/inventory with 100% similarity]
xci/nfvi/osa/files/ha/openstack_user_config.yml [moved from xci/file/ha/openstack_user_config.yml with 100% similarity]
xci/nfvi/osa/files/ha/user_ceph.yml [moved from xci/file/ha/user_ceph.yml with 100% similarity]
xci/nfvi/osa/files/ha/user_variables.yml [moved from xci/file/ha/user_variables.yml with 100% similarity]
xci/nfvi/osa/files/ha/user_variables_ceph.yml [moved from xci/file/ha/user_variables_ceph.yml with 100% similarity]
xci/nfvi/osa/files/mini/ceph.yml [moved from xci/file/mini/ceph.yml with 100% similarity]
xci/nfvi/osa/files/mini/flavor-vars.yml [moved from xci/file/mini/flavor-vars.yml with 100% similarity]
xci/nfvi/osa/files/mini/inventory [moved from xci/file/mini/inventory with 100% similarity]
xci/nfvi/osa/files/mini/openstack_user_config.yml [moved from xci/file/mini/openstack_user_config.yml with 100% similarity]
xci/nfvi/osa/files/mini/user_ceph.yml [moved from xci/file/mini/user_ceph.yml with 100% similarity]
xci/nfvi/osa/files/mini/user_variables.yml [moved from xci/file/mini/user_variables.yml with 100% similarity]
xci/nfvi/osa/files/mini/user_variables_ceph.yml [moved from xci/file/mini/user_variables_ceph.yml with 100% similarity]
xci/nfvi/osa/files/noha/ceph.yml [moved from xci/file/noha/ceph.yml with 100% similarity]
xci/nfvi/osa/files/noha/flavor-vars.yml [moved from xci/file/noha/flavor-vars.yml with 100% similarity]
xci/nfvi/osa/files/noha/inventory [moved from xci/file/noha/inventory with 100% similarity]
xci/nfvi/osa/files/noha/openstack_user_config.yml [moved from xci/file/noha/openstack_user_config.yml with 100% similarity]
xci/nfvi/osa/files/noha/user_ceph.yml [moved from xci/file/noha/user_ceph.yml with 100% similarity]
xci/nfvi/osa/files/noha/user_variables.yml [moved from xci/file/noha/user_variables.yml with 100% similarity]
xci/nfvi/osa/files/noha/user_variables_ceph.yml [moved from xci/file/noha/user_variables_ceph.yml with 100% similarity]
xci/nfvi/osa/nfvi-deploy.sh
xci/nfvi/osa/playbooks/configure-opnfvhost.yml
xci/nfvi/osa/playbooks/configure-targethosts.yml
xci/var/opnfv.yml
xci/xci-deploy.sh

index 8560c99..b4a4016 100755 (executable)
@@ -8,7 +8,7 @@ export OPENSTACK_OSA_GIT_URL=https://git.openstack.org/openstack/openstack-ansib
 export OPENSTACK_OSA_OPENRC_GIT_URL=https://git.openstack.org/openstack/openstack-ansible-openstack_openrc
 export OPENSTACK_OSA_ETC_PATH=/etc/openstack_deploy
 export OPNFV_HOST_IP=192.168.122.2
-export XCI_FLAVOR_ANSIBLE_FILE_PATH=$XCI_PATH/xci/file/$XCI_FLAVOR
+export XCI_FLAVOR_ANSIBLE_FILE_PATH=$XCI_PATH/xci/nfvi/$XCI_NFVI/files/$XCI_FLAVOR
 export CI_LOOP=${CI_LOOP:-daily}
 export JOB_NAME=${JOB_NAME:-false}
 # XCI_CACHE is a cache on localhost where repositories and scenarios are cloned.
index c4419de..14577dd 100755 (executable)
@@ -180,7 +180,7 @@ echo "Info: OpenStack installation is successfully completed!"
 #-------------------------------------------------------------------------------
 echo "Info: Openstack login details"
 echo "-----------------------------------------------------------------------"
-OS_USER_CONFIG=$XCI_PATH/xci/file/$XCI_FLAVOR/openstack_user_config.yml
+OS_USER_CONFIG=$XCI_FLAVOR_ANSIBLE_FILE_PATH/openstack_user_config.yml
 python -c \
 "import yaml
 if '$XCI_FLAVOR' is 'aio':
index 656f18e..7f0e43f 100644 (file)
         file: "{{ item }}"
       with_items:
         - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
-        - "{{ XCI_PATH }}/xci/file/{{ XCI_FLAVOR }}/flavor-vars.yml"
+        - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
     - name: Set facts for remote deployment
       set_fact:
         remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
-        remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/file/{{ XCI_FLAVOR }}"
+        remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/nfvi/{{XCI_NFVI}}/files/{{ XCI_FLAVOR }}"
         remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
 
   roles:
@@ -37,7 +37,7 @@
     - name: fetch public key
       fetch:
         src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
-        dest: "{{ XCI_PATH }}/xci/file/authorized_keys"
+        dest: "{{ XCI_PATH }}/xci/files/authorized_keys"
         flat: yes
     - name: Copy releng-xci to remote host
       synchronize:
 
   tasks:
     - name: Append public keys to authorized_keys
-      shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/file/authorized_keys"
+      shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/files/authorized_keys"
 
 - hosts: opnfv
   remote_user: root
       failed_when: false
       with_items:
         - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
-        - "{{ XCI_PATH }}/xci/file/{{ XCI_FLAVOR }}/flavor-vars.yml"
-        - "{{ XCI_PATH }}/xci/file/{{ XCI_FLAVOR }}/user_variables.yml"
+        - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
+        - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/user_variables.yml"
   roles:
     - role: "openstack-ansible-openstack_openrc"
 
index 14a9149..fb43a92 100644 (file)
@@ -4,7 +4,7 @@
   tasks:
     - name: add public key to host
       copy:
-        src: "{{ XCI_PATH }}/xci/file/authorized_keys"
+        src: "{{ XCI_PATH }}/xci/files/authorized_keys"
         dest: /root/.ssh/authorized_keys
 
 - hosts: controller
@@ -18,7 +18,7 @@
         file: "{{ item }}"
       with_items:
         - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
-        - "{{ XCI_PATH }}/xci/file/{{ XCI_FLAVOR }}/flavor-vars.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
@@ -35,7 +35,7 @@
         file: "{{ item }}"
       with_items:
         - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
-        - "{{ XCI_PATH }}/xci/file/{{ XCI_FLAVOR }}/flavor-vars.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
index 6d28833..d3f6bf3 100644 (file)
@@ -33,6 +33,7 @@ XCI_SSL_SUBJECT: "{{ lookup('env', 'XCI_SSL_SUBJECT') }}"
 XCI_CEPH_ENABLED: "{{ lookup('env', 'XCI_CEPH_ENABLED') }}"
 RUN_TEMPEST: "{{ lookup('env', 'RUN_TEMPEST') }}"
 DEPLOY_SCENARIO: "{{ lookup('env','DEPLOY_SCENARIO') }}"
+XCI_NFVI: "{{ lookup('env','XCI_NFVI') }}"
 
 # install docker on opnfv host only if we are running as part of CI
 opnfv_required_packages:
index 89fb455..fa03ef8 100755 (executable)
@@ -99,7 +99,7 @@ echo "-------------------------------------------------------------------------"
 #-------------------------------------------------------------------------------
 echo "Info: Installing Ansible from pip"
 echo "-------------------------------------------------------------------------"
-source file/install-ansible.sh
+source files/install-ansible.sh
 echo "-------------------------------------------------------------------------"
 
 # Make the VMs match the host. If we need to make this configurable
@@ -136,7 +136,7 @@ fi
 #-------------------------------------------------------------------------------
 # This playbook
 # - removes existing scenario roles
-# - clones OPNFV scenario roles based on the file/opnfv-scenario-requirements.yml file
+# - clones OPNFV scenario roles based on the xci/opnfv-scenario-requirements.yml file
 #-------------------------------------------------------------------------------
 echo "Info: Cloning OPNFV scenario repositories"
 echo "-------------------------------------------------------------------------"