4 - 'apex-verify-{stream1}'
5 - 'apex-verify-{stream2}'
6 - 'apex-runner-{platform}-{scenario}-{stream}'
7 - 'apex-build-{stream}'
8 - 'apex-deploy-virtual-{scenario}-{stream}'
9 - 'apex-deploy-baremetal-{scenario}-{stream}'
10 - 'apex-daily-{stream1}'
11 - 'apex-daily-{stream2}'
13 # stream: branch with - in place of / (eg. stable-arno)
14 # branch: branch (eg. stable/arno)
19 block-stream: 'brahmaputra'
22 branch: 'stable/brahmaputra'
23 gs-pathname: '/brahmaputra'
24 block-stream: 'master'
32 block-stream: 'brahmaputra'
37 branch: 'stable/brahmaputra'
38 gs-pathname: '/brahmaputra'
39 block-stream: 'master'
46 - 'os-nosdn-nofeature-ha'
47 - 'os-odl_l2-nofeature-ha'
48 - 'os-odl_l2-sfc-noha'
49 - 'os-odl_l3-nofeature-ha'
50 - 'os-onos-nofeature-ha'
51 - 'os-opencontrail-nofeature-ha'
59 name: 'apex-verify-{stream2}'
65 gs-pathname: '{gs-pathname}'
72 default: https://gerrit.opnfv.org/gerrit/$PROJECT
73 description: "Used for overriding the GIT URL coming from parameters macro."
77 credentials-id: '{ssh-credentials}'
78 refspec: '$GERRIT_REFSPEC'
79 choosing-strategy: 'gerrit'
84 - patchset-created-event:
85 exclude-drafts: 'false'
86 exclude-trivial-rebase: 'false'
87 exclude-no-code-change: 'true'
88 - draft-published-event
89 - comment-added-contains-event:
90 comment-contains-value: 'recheck'
91 - comment-added-contains-event:
92 comment-contains-value: 'reverify'
94 - project-compare-type: 'ANT'
95 project-pattern: 'apex'
97 - branch-compare-type: 'ANT'
98 branch-pattern: '**/{branch}'
111 use-build-blocker: true
113 - 'apex-daily.*{stream2}'
114 - 'apex-deploy.*{stream2}'
115 - 'apex-build.*{stream2}'
116 - 'apex-runner.*{stream2}'
117 - 'apex-verify-{stream2}'
122 - project: 'apex-deploy-virtual-os-odl_l2-nofeature-ha-{stream2}'
123 predefined-parameters: |
124 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
129 - project: 'apex-deploy-virtual-os-onos-nofeature-ha-{stream2}'
130 predefined-parameters: |
131 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
136 - project: 'apex-deploy-virtual-os-odl_l3-nofeature-ha-{stream2}'
137 predefined-parameters: |
138 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
143 - project: 'apex-deploy-virtual-os-odl_l2-sfc-noha-{stream2}'
144 predefined-parameters: |
145 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
149 - 'apex-workspace-cleanup'
153 name: 'apex-verify-{stream1}'
159 gs-pathname: '{gs-pathname}'
166 default: https://gerrit.opnfv.org/gerrit/$PROJECT
167 description: "Used for overriding the GIT URL coming from parameters macro."
170 - gerrit-trigger-scm:
171 credentials-id: '{ssh-credentials}'
172 refspec: '$GERRIT_REFSPEC'
173 choosing-strategy: 'gerrit'
178 - patchset-created-event:
179 exclude-drafts: 'false'
180 exclude-trivial-rebase: 'false'
181 exclude-no-code-change: 'true'
182 - draft-published-event
183 - comment-added-contains-event:
184 comment-contains-value: 'recheck'
185 - comment-added-contains-event:
186 comment-contains-value: 'reverify'
188 - project-compare-type: 'ANT'
189 project-pattern: 'apex'
191 - branch-compare-type: 'ANT'
192 branch-pattern: '**/{branch}'
205 use-build-blocker: true
207 - 'apex-daily.*{stream1}'
208 - 'apex-deploy.*{stream1}'
209 - 'apex-build.*{stream1}'
210 - 'apex-runner.*{stream1}'
211 - 'apex-verify-{stream1}'
216 - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream1}'
217 predefined-parameters: |
218 BUILD_DIRECTORY=apex-verify-{stream1}/build_output
222 - 'apex-workspace-cleanup'
225 name: 'apex-runner-{platform}-{scenario}-{stream}'
227 # runner jobs for deploying manually
235 gs-pathname: '{gs-pathname}'
242 default: https://gerrit.opnfv.org/gerrit/$PROJECT
243 description: "Used for overriding the GIT URL coming from parameters macro."
246 - gerrit-trigger-scm:
247 credentials-id: '{ssh-credentials}'
249 choosing-strategy: 'default'
253 use-build-blocker: true
255 - 'apex-daily.*{stream}'
256 - 'apex-verify.*{stream}'
260 - project: 'apex-deploy-{platform}-{scenario}-{stream}'
261 predefined-parameters:
266 - project: 'yardstick-apex-{slave}-daily-{stream}'
267 predefined-parameters:
268 DEPLOY_SCENARIO={scenario}
271 build-step-failure-threshold: 'never'
272 failure-threshold: 'never'
273 unstable-threshold: 'FAILURE'
275 - project: 'functest-apex-{slave}-daily-{stream}'
276 predefined-parameters:
277 DEPLOY_SCENARIO={scenario}
280 build-step-failure-threshold: 'never'
281 failure-threshold: 'never'
282 unstable-threshold: 'FAILURE'
285 name: 'apex-build-{stream}'
287 # Job template for builds
289 # Required Variables:
290 # stream: branch with - in place of / (eg. stable)
291 # branch: branch (eg. stable)
300 gs-pathname: '{gs-pathname}'
305 default: https://gerrit.opnfv.org/gerrit/$PROJECT
306 description: "Used for overriding the GIT URL coming from parameters macro."
310 credentials-id: '{ssh-credentials}'
316 use-build-blocker: true
318 - 'apex-deploy.*{stream}'
323 - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream}'
324 predefined-parameters: |
325 BUILD_DIRECTORY=apex-build-{stream}/build_output
329 - 'apex-upload-artifact'
332 name: 'apex-deploy-virtual-{scenario}-{stream}'
334 # Job template for virtual deployment
336 # Required Variables:
337 # stream: branch with - in place of / (eg. stable)
338 # branch: branch (eg. stable)
345 credentials-id: '{ssh-credentials}'
353 gs-pathname: '{gs-pathname}'
355 name: DEPLOY_SCENARIO
356 default: '{scenario}'
357 description: "Scenario to deploy with."
361 description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
365 use-build-blocker: true
367 - 'apex-deploy.*{stream}'
370 - 'apex-deploy-virtual'
371 - 'apex-workspace-cleanup'
374 name: 'apex-deploy-baremetal-{scenario}-{stream}'
376 # Job template for baremetal deployment
378 # Required Variables:
379 # stream: branch with - in place of / (eg. stable)
380 # branch: branch (eg. stable)
387 credentials-id: '{ssh-credentials}'
395 gs-pathname: '{gs-pathname}'
397 name: DEPLOY_SCENARIO
398 default: '{scenario}'
399 description: "Scenario to deploy with."
403 use-build-blocker: true
405 - 'apex-verify.*{stream}'
406 - 'apex-deploy.*{stream}'
407 - 'apex-build.*{stream}'
411 - 'apex-deploy-baremetal'
412 - 'apex-workspace-cleanup'
416 name: 'apex-daily-{stream2}'
418 # Job template for daily build
420 # Required Variables:
421 # stream: branch with - in place of / (eg. stable)
422 # branch: branch (eg. stable)
429 credentials-id: '{ssh-credentials}'
437 gs-pathname: '{gs-pathname}'
441 use-build-blocker: true
443 - 'apex-verify.*{stream2}'
444 - 'apex-deploy.*{stream2}'
445 - 'apex-build.*{stream2}'
446 - 'apex-runner.*{stream2}'
453 - project: 'apex-build-{stream2}'
455 current-parameters: true
458 - project: 'apex-deploy-baremetal-os-odl_l2-nofeature-ha-{stream2}'
459 predefined-parameters: |
460 BUILD_DIRECTORY=apex-build-{stream2}/build_output
465 - project: 'functest-apex-{slave}-daily-{stream2}'
466 predefined-parameters:
467 DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
470 build-step-failure-threshold: 'never'
471 failure-threshold: 'never'
472 unstable-threshold: 'FAILURE'
474 - project: 'yardstick-apex-{slave}-daily-{stream2}'
475 predefined-parameters:
476 DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
479 build-step-failure-threshold: 'never'
480 failure-threshold: 'never'
481 unstable-threshold: 'FAILURE'
483 - project: 'apex-deploy-baremetal-os-onos-nofeature-ha-{stream2}'
484 predefined-parameters:
485 BUILD_DIRECTORY=apex-build-{stream2}/build_output
489 - project: 'functest-apex-{slave}-daily-{stream2}'
490 predefined-parameters:
491 DEPLOY_SCENARIO=os-onos-nofeature-ha
494 build-step-failure-threshold: 'never'
495 failure-threshold: 'never'
496 unstable-threshold: 'FAILURE'
498 - project: 'yardstick-apex-{slave}-daily-{stream2}'
499 predefined-parameters:
500 DEPLOY_SCENARIO=os-onos-nofeature-ha
503 build-step-failure-threshold: 'never'
504 failure-threshold: 'never'
505 unstable-threshold: 'FAILURE'
507 - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-ha-{stream2}'
508 predefined-parameters:
509 BUILD_DIRECTORY=apex-build-{stream2}/build_output
513 - project: 'functest-apex-{slave}-daily-{stream2}'
514 predefined-parameters:
515 DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
518 build-step-failure-threshold: 'never'
519 failure-threshold: 'never'
520 unstable-threshold: 'FAILURE'
522 - project: 'yardstick-apex-{slave}-daily-{stream2}'
523 predefined-parameters:
524 DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
527 build-step-failure-threshold: 'never'
528 failure-threshold: 'never'
529 unstable-threshold: 'FAILURE'
533 name: 'apex-daily-{stream1}'
535 # Job template for daily build
537 # Required Variables:
538 # stream: branch with - in place of / (eg. stable)
539 # branch: branch (eg. stable)
546 credentials-id: '{ssh-credentials}'
554 gs-pathname: '{gs-pathname}'
558 use-build-blocker: true
560 - 'apex-verify.*{stream1}'
561 - 'apex-deploy.*{stream1}'
562 - 'apex-build.*{stream1}'
563 - 'apex-runner.*{stream1}'
570 - project: 'apex-build-{stream1}'
572 current-parameters: true
575 - project: 'apex-deploy-virtual-nosdn-nofeature-ha-{stream1}'
576 predefined-parameters: |
577 BUILD_DIRECTORY=apex-build-{stream1}/build_output
582 - project: 'functest-apex-{slave}-daily-{stream1}'
583 predefined-parameters:
584 DEPLOY_SCENARIO=os-nosdn-nofeature-ha
587 build-step-failure-threshold: 'never'
588 failure-threshold: 'never'
589 unstable-threshold: 'FAILURE'
591 - project: 'yardstick-apex-{slave}-daily-{stream1}'
592 predefined-parameters:
593 DEPLOY_SCENARIO=os-nosdn-nofeature-ha
596 build-step-failure-threshold: 'never'
597 failure-threshold: 'never'
598 unstable-threshold: 'FAILURE'
600 ########################
602 ########################
609 description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
611 name: ARTIFACT_VERSION
613 description: "Artifact version type"
615 name: BUILD_DIRECTORY
616 default: $WORKSPACE/build_output
617 description: "Directory where the build artifact will be located upon the completion of the build."
619 name: CACHE_DIRECTORY
620 default: $HOME/opnfv/cache{gs-pathname}
621 description: "Directory where the cache to be used during the build is located."
624 default: https://gerrit.opnfv.org/gerrit/$PROJECT
625 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
628 default: artifacts.opnfv.org/$PROJECT{gs-pathname}
629 description: "URL to Google Storage."
631 ########################
633 ########################
642 # log info to console
643 echo "Starting the build of Apex using OpenStack Master packages. This will take some time..."
644 echo "---------------------------------------------------------------------------------------"
646 # create the cache directory if it doesn't exist
647 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
648 # set OPNFV_ARTIFACT_VERSION
649 if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then
650 if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
651 export OPNFV_ARTIFACT_VERSION=brahmaputra-dev${BUILD_NUMBER}
652 export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
654 export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER}
655 export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY"
657 elif [ "$ARTIFACT_VERSION" == "daily" ]; then
658 if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
659 export OPNFV_ARTIFACT_VERSION=brahmaputra-$(date -u +"%Y-%m-%d")
660 export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
662 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d")
663 export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY --iso"
666 export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION}
668 # clean for stable but doesn't matter for master
669 sudo opnfv-clean || echo ""
672 ./build.sh $BUILD_ARGS
673 RPM_VERSION=$(grep Version $BUILD_DIRECTORY/../build/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-')
674 # list the contents of BUILD_OUTPUT directory
675 ls -al $BUILD_DIRECTORY
676 # save information regarding artifact into file
678 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
679 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
680 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
681 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
682 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
683 echo "OPNFV_SRPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.src.rpm"
684 echo "OPNFV_RPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.noarch.rpm"
685 echo "OPNFV_RPM_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)"
686 echo "OPNFV_BUILD_URL=$BUILD_URL"
687 ) > $WORKSPACE/opnfv.properties
688 echo "--------------------------------------------------------"
692 name: 'apex-workspace-cleanup'
700 # delete everything that is in $WORKSPACE
701 /bin/rm -rf $WORKSPACE
704 name: 'apex-upload-artifact'
712 # log info to console
713 echo "Uploading the Apex artifact. This could take some time..."
714 echo "--------------------------------------------------------"
717 # source the opnfv.properties to get ARTIFACT_VERSION
718 source $WORKSPACE/opnfv.properties
720 # upload artifact and additional files to google storage
721 gsutil cp $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
722 RPM_INSTALL_PATH=$BUILD_DIRECTORY/$(basename $OPNFV_RPM_URL)
723 RPM_LIST=$RPM_INSTALL_PATH
724 for pkg in common undercloud opendaylight-sfc; do
725 RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
727 SRPM_INSTALL_PATH=$BUILD_DIRECTORY/$(basename $OPNFV_SRPM_URL)
728 SRPM_LIST=$SRPM_INSTALL_PATH
729 for pkg in common undercloud opendaylight-sfc; do
730 SRPM_LIST+=" ${SRPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
732 for artifact in $RPM_LIST $SRPM_LIST; do
733 gsutil cp $artifact gs://$GS_URL/$(basename $artifact) > gsutil.iso.log 2>&1
735 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
736 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
739 echo "--------------------------------------------------------"
741 echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
742 echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"
745 name: 'apex-deploy-virtual'
753 # log info to console
754 echo "Starting the Apex virtual deployment."
755 echo "--------------------------------------------------------"
758 if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
759 cd $WORKSPACE/../${BUILD_DIRECTORY/build_output/}
761 echo "WORKSPACE modified to $WORKSPACE"
763 elif [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
764 # if artifact name is passed the pull a
765 # specific artifact from artifacts.opnfv.org
766 RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME
768 if [[ $BUILD_DIRECTORY == *verify* ]]; then
769 BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
770 echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
771 elif [[ $BUILD_DIRECTORY == *apex-build* ]]; then
772 BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
773 echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
776 if [[ -f ${BUILD_DIRECTORY}/../opnfv.properties ]]; then
777 # if opnfv.properties exists then use the
778 # local build. Source the file so we get local OPNFV vars
779 source ${BUILD_DIRECTORY}/../opnfv.properties
780 RPM_INSTALL_PATH=${BUILD_DIRECTORY}/$(basename $OPNFV_RPM_URL)
782 if [[ $BUILD_DIRECTORY == *verify* ]]; then
783 echo "BUILD_DIRECTORY is from a verify job, so will not use latest from URL"
784 echo "Check that the slave has opnfv.properties in $BUILD_DIRECTORY"
786 elif [[ $BUILD_DIRECTORY == *apex-build* ]]; then
787 echo "BUILD_DIRECTORY is from a daily job, so will not use latest from URL"
788 echo "Check that the slave has opnfv.properties in $BUILD_DIRECTORY"
791 # no opnfv.properties means use the latest from artifacts.opnfv.org
792 # get the latest.properties to get the link to the latest artifact
793 curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties
794 [[ -f opnfv.properties ]] || exit 1
795 # source the file so we get OPNFV vars
796 source opnfv.properties
797 RPM_INSTALL_PATH=$OPNFV_RPM_URL
801 if [ -z "$DEPLOY_SCENARIO" ]; then
802 echo "Deploy scenario not set!"
806 # use local build for verify
807 if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
808 if [ ! -e "${WORKSPACE}/build/lib" ]; then ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib; fi
809 DEPLOY_CMD="./deploy.sh -c ${WORKSPACE}/build -r ${WORKSPACE}/build/images/"
810 DEPLOY_FILE="${WORKSPACE}/config/deploy/${DEPLOY_SCENARIO}.yaml"
811 NETWORK_FILE="${WORKSPACE}/config/network/network_settings.yaml"
813 RPM_LIST=$RPM_INSTALL_PATH
814 for pkg in common undercloud opendaylight-sfc; do
815 RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
818 # update / install the new rpm
819 if rpm -q opnfv-apex > /dev/null; then
820 if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
821 echo "RPM is already installed"
822 elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
823 if ! sudo yum downgrade -y $RPM_LIST; then
824 sudo yum remove -y opnfv-undercloud opnfv-common
825 sudo yum downgrade -y $RPM_INSTALL_PATH
829 sudo yum install -y $RPM_LIST;
831 DEPLOY_CMD=opnfv-deploy
832 DEPLOY_FILE="/etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
833 NETWORK_FILE="/etc/opnfv-apex/network_settings.yaml"
836 if [ "$OPNFV_CLEAN" == 'yes' ]; then
837 if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
843 # initiate virtual deployment
844 echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"
845 if [ -e $DEPLOY_FILE ]; then
846 sudo $DEPLOY_CMD -v -d ${DEPLOY_FILE} -n $NETWORK_FILE --debug
848 echo "File does not exist /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
852 echo "--------------------------------------------------------"
856 name: 'apex-deploy-baremetal'
864 # log info to console
865 echo "Starting the Apex baremetal deployment."
866 echo "--------------------------------------------------------"
869 if [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
870 # if artifact name is passed the pull a
871 # specific artifact from artifacts.opnfv.org
872 RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME
874 if [[ $BUILD_DIRECTORY == *apex-build* ]]; then
875 BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
876 echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
878 if [[ -f ${BUILD_DIRECTORY}/../opnfv.properties ]]; then
879 # if opnfv.properties exists then use the
880 # local build. Source the file so we get local OPNFV vars
881 source ${BUILD_DIRECTORY}/../opnfv.properties
882 RPM_INSTALL_PATH=${BUILD_DIRECTORY}/$(basename $OPNFV_RPM_URL)
884 # no opnfv.properties means use the latest from artifacts.opnfv.org
885 # get the latest.properties to get the link to the latest artifact
886 curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties
887 [[ -f opnfv.properties ]] || exit 1
888 # source the file so we get OPNFV vars
889 source opnfv.properties
890 RPM_INSTALL_PATH=$OPNFV_RPM_URL
894 if [ ! -e "$RPM_INSTALL_PATH" ]; then
895 RPM_INSTALL_PATH=http://${OPNFV_RPM_URL}
898 RPM_LIST=$RPM_INSTALL_PATH
899 for pkg in common undercloud; do
900 RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
903 # update / install the new rpm
904 if rpm -q opnfv-apex > /dev/null; then
905 if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
906 echo "RPM is already installed"
907 elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
908 if ! sudo yum downgrade -y $RPM_LIST; then
909 sudo yum remove -y opnfv-undercloud opnfv-common
910 sudo yum downgrade -y $RPM_INSTALL_PATH
914 sudo yum install -y $RPM_LIST;
917 # cleanup environment before we start
919 # initiate baremetal deployment
920 if [ -e /etc/opnfv-apex/network_settings.yaml ]; then
921 if [ -n "$DEPLOY_SCENARIO" ]; then
922 echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"
923 if [ -e /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml ]; then
924 sudo opnfv-deploy -i /root/inventory/pod_settings.yaml \
925 -d /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml \
926 -n /root/network/network_settings.yaml --debug
928 echo "File does not exist /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
932 echo "Deploy scenario not set!"
936 echo "File /etc/opnfv-apex/network_settings.yaml does not exist!"
941 echo "--------------------------------------------------------"
944 #######################
946 ########################
952 name: 'apex-brahmaputra'