diff options
-rwxr-xr-x | xci/config/pinned-versions | 5 | ||||
-rw-r--r-- | xci/installer/kubespray/playbooks/configure-opnfvhost.yml | 1 | ||||
-rw-r--r-- | xci/opnfv-scenario-requirements.yml | 2 | ||||
-rw-r--r-- | xci/playbooks/get-opnfv-scenario-requirements.yml | 6 | ||||
-rwxr-xr-x | xci/xci-deploy.sh | 50 |
5 files changed, 37 insertions, 27 deletions
diff --git a/xci/config/pinned-versions b/xci/config/pinned-versions index 72a0ff61..ccfc2704 100755 --- a/xci/config/pinned-versions +++ b/xci/config/pinned-versions @@ -43,6 +43,5 @@ export KEEPALIVED_VERSION=$(grep -E '.*name: keepalived' -A 3 \ export HAPROXY_VERSION=$(grep -E '.*name: haproxy_server' -A 3 \ ${XCI_PATH}/xci/installer/osa/files/ansible-role-requirements.yml \ | tail -n1 | sed -n 's/\(^.*: \)\([0-9a-z].*$\)/\2/p') -# HEAD of kubspray "master" as of 27.02.2018 -# kubespray's bug Reference: https://github.com/kubernetes-incubator/kubespray/issues/2400 -export KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-"5d9bb300d716880610c34dd680c167d2d728984d"} +# HEAD of kubspray "master" as of 16.05.2018 +export KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-"38e727dbe1bdf5316fae8d645718cc8279fbda20"} diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml index 01904ba3..0b38060b 100644 --- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml +++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml @@ -74,6 +74,7 @@ with_items: - { name: 'ansible', version: "{{ xci_kube_ansible_pip_version }}" } - { name: 'netaddr' } + - { name: 'ansible-modules-hashivault' } - name: Configure SSL certificates include_tasks: "{{ xci_path }}/xci/playbooks/manage-ssl-certs.yml" diff --git a/xci/opnfv-scenario-requirements.yml b/xci/opnfv-scenario-requirements.yml index f61bc021..9aa16824 100644 --- a/xci/opnfv-scenario-requirements.yml +++ b/xci/opnfv-scenario-requirements.yml @@ -14,7 +14,7 @@ - scenario: os-odl-sfc scm: git src: https://gerrit.opnfv.org/gerrit/sfc - version: master + version: 6.0.1 role: scenarios/os-odl-sfc/role/os-odl-sfc installers: - installer: osa diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml index 945a7802..a9165709 100644 --- a/xci/playbooks/get-opnfv-scenario-requirements.yml +++ b/xci/playbooks/get-opnfv-scenario-requirements.yml @@ -86,8 +86,6 @@ state: directory become: true - # NOTE(hwoarang) We have to check all levels of the local fact before we add it - # otherwise Ansible will fail. - name: Record scenario information ini_file: create: yes @@ -97,10 +95,6 @@ value: "{{ xci_scenario.role | basename }}" path: "/etc/ansible/facts.d/xci.fact" become: true - when: ansible_local is not defined - or (ansible_local is defined and ansible_local.xci is not defined) - or (ansible_local is defined and ansible_local.xci is defined and ansible_local.xci.scenarios is not defined) - or (ansible_local is defined and ansible_local.xci is defined and ansible_local.xci.scenarios is defined and ansible_local.xci.scenarios.role is not defined) - name: Fail if {{ deploy_scenario }} is not supported fail: diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index c0c1a8ef..07f4d39d 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -29,6 +29,28 @@ submit_bug_report() { echo "-------------------------------------------------------------------------" } +log_xci_information() { + local scenario_version scenario_sha + + cd ${XCI_SCENARIOS_CACHE}/${DEPLOY_SCENARIO} + scenario_sha=$(git rev-parse HEAD) + scenario_version=$(git describe --exact 2>/dev/null || echo "master") + cd - + echo "Info: Starting XCI Deployment" + echo "Info: Deployment parameters" + echo "-------------------------------------------------------------------------" + echo "OPNFV scenario: $DEPLOY_SCENARIO" + echo "Scenario version: ${scenario_version} (sha: ${scenario_sha})" + echo "xci flavor: $XCI_FLAVOR" + echo "xci installer: $INSTALLER_TYPE" + echo "infra deployment: $INFRA_DEPLOYMENT" + echo "opnfv/releng-xci version: $(git rev-parse HEAD)" + [[ "$INFRA_DEPLOYMENT" == "bifrost" ]] && echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION" + [[ "$INSTALLER_TYPE" == "osa" ]] && echo "openstack/openstack-ansible version: $OPENSTACK_OSA_VERSION" + [[ "$INSTALLER_TYPE" == "kubespray" ]] && echo "kubespray version: $KUBESPRAY_VERSION" + echo "-------------------------------------------------------------------------" +} + exit_trap() { submit_bug_report collect_xci_logs @@ -98,20 +120,10 @@ trap exit_trap ERR # We are using sudo so we need to make sure that env_reset is not present sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers -#------------------------------------------------------------------------------- -# Log info to console -#------------------------------------------------------------------------------- -echo "Info: Starting XCI Deployment" -echo "Info: Deployment parameters" -echo "-------------------------------------------------------------------------" -echo "OPNFV scenario: $DEPLOY_SCENARIO" -echo "xci flavor: $XCI_FLAVOR" -echo "xci installer: $INSTALLER_TYPE" -echo "infra deployment: $INFRA_DEPLOYMENT" -echo "opnfv/releng-xci version: $(git rev-parse HEAD)" -[[ "$INFRA_DEPLOYMENT" == "bifrost" ]] && echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION" -[[ "$INSTALLER_TYPE" == "osa" ]] && echo "openstack/openstack-ansible version: $OPENSTACK_OSA_VERSION" -[[ "$INSTALLER_TYPE" == "kubespray" ]] && echo "kubespray version: $KUBESPRAY_VERSION" +# +# Bootstrap environment for XCI Deployment +# +echo "Info: Preparing host environment for the XCI deployment" echo "-------------------------------------------------------------------------" #------------------------------------------------------------------------------- @@ -150,11 +162,15 @@ echo "-------------------------------------------------------------------------" ansible_lint echo "-------------------------------------------------------------------------" -#------------------------------------------------------------------------------- # Get scenario variables overrides #------------------------------------------------------------------------------- -source $(find $XCI_PATH/xci/scenarios/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null || \ - source $(find $XCI_SCENARIOS_CACHE/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null || : +source $(find $XCI_SCENARIOS_CACHE/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null && + echo "Sourced ${DEPLOY_SCENARIO} overrides files successfully!" || : + +#------------------------------------------------------------------------------- +# Log info to console +#------------------------------------------------------------------------------- +log_xci_information # Deploy infrastructure based on the selected deloyment method echo "Info: Deploying hardware using '${INFRA_DEPLOYMENT}'" |