diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | docs/how-to-use-docs/documentation-example.rst | 4 | ||||
-rw-r--r-- | jjb/apex/apex.yml | 66 | ||||
-rw-r--r-- | jjb/bottlenecks/bottlenecks.yml | 47 | ||||
-rw-r--r-- | jjb/compass4nfv/compass4nfv.yml | 60 | ||||
-rwxr-xr-x | jjb/fuel/fuel-deploy-virtual.sh | 14 | ||||
-rw-r--r-- | jjb/opnfv/installer-params.yml | 16 | ||||
-rw-r--r-- | jjb/opnfv/slave-params.yml | 6 | ||||
-rw-r--r-- | jjb/opnfvdocs/opnfvdocs.yml | 2 | ||||
-rw-r--r-- | jjb/releng-macros.yaml | 8 | ||||
-rw-r--r-- | jjb/yardstick/yardstick-ci-jobs.yml | 2 | ||||
-rwxr-xr-x | utils/docs-build.sh | 45 |
12 files changed, 194 insertions, 80 deletions
diff --git a/.gitignore b/.gitignore index 2884629e6..33a0451bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *~ .*.sw? -/build/ -/output/ +/docs_build/ +/docs_output/ /releng/ diff --git a/docs/how-to-use-docs/documentation-example.rst b/docs/how-to-use-docs/documentation-example.rst index f9b8da2f1..bab2ee157 100644 --- a/docs/how-to-use-docs/documentation-example.rst +++ b/docs/how-to-use-docs/documentation-example.rst @@ -134,8 +134,8 @@ built files. .. code-block:: bash - /build/ - /output/ + /docs_build/ + /docs_output/ /releng/ Jenkins Jobs diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index e499f2987..ec88031b1 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -197,7 +197,7 @@ # branch: branch (eg. stable) node: opnfv-jump-1 - disabled: true + disabled: false scm: - git-scm: @@ -212,6 +212,7 @@ gs-pathname: '{gs-pathname}' builders: + - 'apex-deploy-baremetal' - 'apex-workspace-cleanup' - job-template: @@ -434,6 +435,69 @@ echo "--------------------------------------------------------" echo "Done!" +- builder: + name: 'apex-deploy-baremetal' + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + + # log info to console + echo "Starting the Apex baremetal deployment." + echo "--------------------------------------------------------" + echo + + if [[ ! "$ARTIFACT_NAME" == "latest" ]]; then + # if artifact name is passed the pull a + # specific artifact from artifacts.opnfv.org + RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME + else + if [[ -f opnfv.properties ]]; then + # if opnfv.properties exists then use the + # local build. Source the file so we get local OPNFV vars + source opnfv.properties + RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL) + else + # no opnfv.properties means use the latest from artifacts.opnfv.org + # get the latest.properties to get the link to the latest artifact + curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties + [[ -f opnfv.properties ]] || exit 1 + # source the file so we get OPNFV vars + source opnfv.properties + RPM_INSTALL_PATH=$OPNFV_RPM_URL + fi + fi + + source opnfv.properties + RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL) + if [ ! -e "$RPM_INSTALL_PATH" ]; then + RPM_INSTALL_PATH=http://${OPNFV_RPM_URL} + fi + + # update / install the new rpm + if rpm -q opnfv-apex > /dev/null; then + if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then + echo "RPM is already installed" + elif sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then + sudo yum downgrade -y $RPM_INSTALL_PATH; + fi + else + sudo yum install -y $RPM_INSTALL_PATH; + fi + + # cleanup environment before we start + sudo opnfv-clean + # initiate baremetal deployment + sudo opnfv-deploy -i /root/inventory/pod_settings.yaml \ + -d /usr/share/doc/opnfv/deploy_settings.yaml.example \ + -n /root/network/network_settings.yaml + + echo + echo "--------------------------------------------------------" + echo "Done!" + ####################### # trigger macros ######################## diff --git a/jjb/bottlenecks/bottlenecks.yml b/jjb/bottlenecks/bottlenecks.yml index 2ca87b0b2..ddaaba6af 100644 --- a/jjb/bottlenecks/bottlenecks.yml +++ b/jjb/bottlenecks/bottlenecks.yml @@ -5,8 +5,8 @@ name: bottlenecks jobs: - 'bottlenecks-verify-{stream}' - - 'bottlenecks-daily-{installer}-{pod}-{stream}' - - 'bottlenecks-upload-artifacts-{stream}' + - 'bottlenecks-daily-{installer}-{suite}-{pod}-{stream}' + - 'bottlenecks-{suite}-upload-artifacts-{stream}' pod: - lf: node: 'opnfv-jump-2' @@ -14,16 +14,20 @@ installer_ip: '10.20.0.2' installer: - -fuel + - 'fuel' + + suite: + - 'rubbos' + - 'vstf' # only master branch is enabled at the moment to keep no of jobs sane stream: - master: - branch: 'master' + branch: '{stream}' gs-pathname: '' # - brahmaputra: -# branch: 'stable/brahmaputra' -# gs-pathname: '/brahmaputra' +# branch: 'stable/{stream}' +# gs-pathname: '/{stream}' project: 'bottlenecks' ############################### @@ -72,7 +76,7 @@ echo "Nothing to verify!" - job-template: - name: 'bottlenecks-upload-artifacts-{stream}' + name: 'bottlenecks-{suite}-upload-artifacts-{stream}' node: ericsson-build @@ -90,6 +94,7 @@ - 'ericsson-ca-build-1-defaults' - bottlenecks-parameter: gs-pathname: '{gs-pathname}' + suite: '{suite}' scm: - git-scm: @@ -102,7 +107,7 @@ - 'bottlenecks-workspace-cleanup' - job-template: - name: 'bottlenecks-daily-{installer}-{pod}-{stream}' + name: 'bottlenecks-daily-{installer}-{suite}-{pod}-{stream}' disabled: false @@ -140,11 +145,11 @@ builders: - 'bottlenecks-fetch-os-creds' - - 'bottlenecks-run-rubbos' + - 'bottlenecks-run-{suite}' publishers: - email: - recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com + recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com liyiting@huawei.com #################### # parameter macros @@ -154,15 +159,15 @@ parameters: - string: name: CACHE_DIR - default: $WORKSPACE/cache + default: $WORKSPACE/cache/{suite} description: "the cache to store packages downloaded from public IP" - string: - name: RUBBOS_URL - default: gs://artifacts.opnfv.org/bottlenecks/rubbos{gs-pathname} + name: SUITE_URL + default: gs://artifacts.opnfv.org/bottlenecks/{suite}{gs-pathname} description: "LF artifacts url for storage of bottlenecks packages" - string: name: PACKAGE_URL - default: http://205.177.226.235:9999/bottlenecks/rubbos/ + default: http://205.177.226.237:9999/bottlenecks/{suite}/ description: "the url where we store the packages used for bottlenecks rubbos" ################################### @@ -186,6 +191,16 @@ ./ci/run.sh $GERRIT_REFSPEC_DEBUG - builder: + name: bottlenecks-run-vstf + builders: + - shell: | + #!/bin/bash + set -o errexit + + echo "Bottlenecks: vstf running now..." + cd $WORKSPACE + ./ci/vstf_run.sh $GERRIT_REFSPEC_DEBUG +- builder: name: bottlenecks-builder-upload-artifact builders: - shell: | @@ -202,7 +217,7 @@ sed 's/".*//' | grep '^[a-zA-Z].*'); do curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file - gsutil cp $CACHE_DIR/$file $RUBBOS_URL + gsutil cp $CACHE_DIR/$file $SUITE_URL done - builder: @@ -214,7 +229,7 @@ echo "Bottlenecks: cleanup cache used for storage downloaded packages" - /bin/rm -rf $WORKSPACE + /bin/rm -rf $CACHE_DIR ####################### #trigger macros diff --git a/jjb/compass4nfv/compass4nfv.yml b/jjb/compass4nfv/compass4nfv.yml index 262cb5c4c..018145e4e 100644 --- a/jjb/compass4nfv/compass4nfv.yml +++ b/jjb/compass4nfv/compass4nfv.yml @@ -9,7 +9,7 @@ - 'compass-daily-{stream}' - 'compass-build-iso-{stream}' - 'compass-build-ppa-{stream}' - - 'compass-deploy-virtual-{flavor}-{stream}' + - 'compass-deploy-virtual-{sdn-controller}-{stream}' - 'compass-deploy-bare-huawei-us-{stream}' # only master branch is enabled at the moment to keep no of jobs sane @@ -21,16 +21,19 @@ # branch: 'stable/{stream}' # gs-pathname: '/{stream}' - flavor: - - cluster-odl: - conf: 'virtual_cluster_odl' - node: 'huawei-deploy-vm' - - cluster-onos: - conf: 'virtual_cluster_onos' - node: 'huawei-deploy-vm' - - cluster: - conf: 'virtual_cluster' - node: 'huawei-deploy-vm' + sdn-controller: + - 'nosdn': + disabled: false + node: huawei-deploy-vm + - 'odl': + disabled: false + node: huawei-deploy-vm + - 'onos': + disabled: false + node: huawei-deploy-vm + - 'opencontrail': + disabled: true + node: huawei-deploy-vm project: 'compass4nfv' @@ -61,9 +64,8 @@ installer: '{installer}' gs-pathname: '{gs-pathname}' - string: - name: FLAVOR_CONF - default: 'virtual_cluster' - description: "" + name: SDN_CONTROLLER + default: 'nosdn' scm: - gerrit-trigger-scm: credentials-id: '{ssh-credentials}' @@ -94,7 +96,7 @@ builders: - 'builder-compass-build-iso' - - 'builder-compass-deploy-virtual-flavor' + - 'builder-compass-deploy-virtual' publishers: - archive: artifacts: 'ansible.log' @@ -136,15 +138,15 @@ git-revision: true block: true - trigger-builds: - - project: 'compass-deploy-virtual-cluster-{stream}' + - project: 'compass-deploy-virtual-nosdn-{stream}' git-revision: true block: false - trigger-builds: - - project: 'compass-deploy-virtual-cluster-odl-{stream}' + - project: 'compass-deploy-virtual-odl-{stream}' git-revision: true block: false - trigger-builds: - - project: 'compass-deploy-virtual-cluster-onos-{stream}' + - project: 'compass-deploy-virtual-onos-{stream}' git-revision: true block: false - trigger-builds: @@ -219,7 +221,7 @@ - 'builder-compass-make-ppa' - job-template: - name: 'compass-deploy-virtual-{flavor}-{stream}' + name: 'compass-deploy-virtual-{sdn-controller}-{stream}' disabled: false @@ -240,14 +242,13 @@ installer: '{installer}' gs-pathname: '{gs-pathname}' - string: - name: FLAVOR_CONF - default: '{conf}' - description: "" + name: SDN_CONTROLLER + default: '{sdn-controller}' builders: - 'builder-compass-ci-preclean-workspace' - 'builder-compass-download-artifact' - - 'builder-compass-deploy-virtual-flavor' + - 'builder-compass-deploy-virtual' publishers: - archive: artifacts: 'ansible.log' @@ -275,6 +276,9 @@ - compass-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' + - string: + name: SDN_CONTROLLER + default: '{sdn-controller}' builders: - 'builder-compass-ci-preclean-workspace' @@ -409,7 +413,7 @@ echo "Done!" - builder: - name: 'builder-compass-deploy-virtual-flavor' + name: 'builder-compass-deploy-virtual' builders: - shell: | #!/bin/bash @@ -421,14 +425,10 @@ echo export ISO_URL=file://$BUILD_DIRECTORY/compass.iso - sudo brctl addbr vnic_ci - sudo ifconfig vnic_ci up - export EXTERNAL_NIC=vnic_ci - cd $WORKSPACE - export OS_VERSION=${COMPASS_OS_VERSION} export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION} - ./deploy.sh $FLAVOR_CONF + export CONFDIR=$WORKSPACE/deploy/conf/vm_environment + ./deploy.sh --dha $CONFDIR/$SDN_CONTROLLER.yml --network $CONFDIR/$NODE_NAME/network.yml if [ $? -ne 0 ]; then echo "depolyment failed!" deploy_ret=1 diff --git a/jjb/fuel/fuel-deploy-virtual.sh b/jjb/fuel/fuel-deploy-virtual.sh index 1b644354b..7c25812ec 100755 --- a/jjb/fuel/fuel-deploy-virtual.sh +++ b/jjb/fuel/fuel-deploy-virtual.sh @@ -11,14 +11,24 @@ echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment" # create TMPDIR if it doesn't exist export TMPDIR=$HOME/tmpdir -[[ -d $TMPDIR ]] || mkdir -p $TMPDIR +mkdir -p $TMPDIR # change permissions down to TMPDIR chmod a+x $HOME chmod a+x $TMPDIR +# get the lab name from SLAVE_NAME +# we currently support ericsson and intel labs +LAB_NAME=${{SLAVE_NAME%%-*}} +if [[ ! "$LAB_NAME" =~ (ericsson|intel) ]]; then + echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!" + exit 1 +else + echo "Using configuration for $LAB_NAME" +fi + # set CONFDIR, BRIDGE -CONFDIR=$WORKSPACE/deploy/templates/virtual_environment_noha/conf +CONFDIR=$WORKSPACE/deploy/templates/$LAB_NAME/virtual_environment/noha/conf BRIDGE=pxebr # log info to console diff --git a/jjb/opnfv/installer-params.yml b/jjb/opnfv/installer-params.yml index dc170f79a..8a189ece8 100644 --- a/jjb/opnfv/installer-params.yml +++ b/jjb/opnfv/installer-params.yml @@ -17,6 +17,10 @@ name: OPNFV_FEATURE default: 'none' description: 'OPNFV Feature to activate' + - string: + name: EXTERNAL_NETWORK + default: 'net04_ext' + description: 'external network for test' - parameter: name: 'compass-defaults' @@ -37,6 +41,10 @@ name: OPNFV_FEATURE default: 'none' description: 'OPNFV Feature to activate' + - string: + name: EXTERNAL_NETWORK + default: 'ext-net' + description: 'external network for test' - parameter: name: 'fuel-defaults' @@ -61,6 +69,10 @@ name: DEPLOY_SCENARIO default: 'test' description: 'OPNFV Deployment Scenario' + - string: + name: EXTERNAL_NETWORK + default: 'net04_ext' + description: 'external network for test' - parameter: name: 'joid-defaults' @@ -89,3 +101,7 @@ name: OS_RELEASE default: 'liberty' description: 'OpenStack release (kilo|liberty)' + - string: + name: EXTERNAL_NETWORK + default: 'net04_ext' + description: 'external network for test' diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml index 576f605d8..43edcc2ca 100644 --- a/jjb/opnfv/slave-params.yml +++ b/jjb/opnfv/slave-params.yml @@ -336,12 +336,10 @@ description: 'Slave name on Jenkins' allowed-slaves: - intel-us-deploy-virtual-1 -# ericsson slave has been excluded until the issues are identified and solved -# - ericsson-ca-deploy-virtual-1 + - ericsson-ca-deploy-virtual-1 default-slaves: - intel-us-deploy-virtual-1 -# ericsson slave has been excluded until the issues are identified and solved -# - ericsson-ca-deploy-virtual-1 + - ericsson-ca-deploy-virtual-1 - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index 6b8650e8c..de48aafb7 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -169,7 +169,7 @@ echo echo "--------------------------------------------------------" for repo in $(grep -v '^#' $WORKSPACE/releng/jjb/opnfvdocs/project.cfg | sort); do - cd $WORKSPACE + cd $WORKSPACE/docs echo " $repo" git clone $GIT_CLONE_BASE/$repo --branch $GERRIT_BRANCH --depth 1 --quiet done diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index 9d6a54260..5a1568e23 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -173,7 +173,7 @@ export PATH=$PATH:/usr/local/bin/ [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - [[ -d output ]] + [[ -d docs_output ]] || exit 0 echo echo "###########################" @@ -186,7 +186,7 @@ local_path="upload/$GERRIT_CHANGE_NUMBER" mkdir -p upload - mv output "$local_path" + mv docs_output "$local_path" gsutil -m cp -r "$local_path" "gs://$gs_base" if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then @@ -208,7 +208,7 @@ set -o pipefail export PATH=$PATH:/usr/local/bin/ - [[ -d output ]] + [[ -d docs_output ]] || exit 0 echo echo "########################" @@ -220,7 +220,7 @@ local_path="upload/docs" mkdir -p upload - mv output "$local_path" + mv docs_output "$local_path" gsutil -m cp -r "$local_path" "gs://$GS_URL" if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 0ef6c9b3f..484f1a20b 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -131,7 +131,7 @@ -e "INSTALLER_TYPE=${INSTALLER_TYPE}" \ -e "INSTALLER_IP=${INSTALLER_IP}" \ -e "POD_NAME=${NODE_NAME}" \ - -e "EXTERNAL_NETWORK=net04_ext" \ + -e "EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" \ opnfv/yardstick \ run_tests.sh $YARDSTICK_DB_BACKEND \ $YARDSTICK_SUITE_NAME diff --git a/utils/docs-build.sh b/utils/docs-build.sh index af31d7a39..914eaf207 100755 --- a/utils/docs-build.sh +++ b/utils/docs-build.sh @@ -3,10 +3,11 @@ export PATH=$PATH:/usr/local/bin/ -SRC_DIR=${SRC_DIR:-docs} +DOCS_DIR=${DOCS_DIR:-docs} INDEX_RST=${INDEX_RST:-index.rst} -BUILD_DIR=${BUILD_DIR:-build} -OUTPUT_DIR=${OUTPUT_DIR:-output} +BUILD_DIR=${BUILD_DIR:-docs_build} +OUTPUT_DIR=${OUTPUT_DIR:-docs_output} +SRC_DIR=${SRC_DIR:-$BUILD_DIR/_src} RELENG_DIR=${RELENG_DIR:-releng} GERRIT_COMMENT=${GERRIT_COMMENT:-} @@ -76,10 +77,11 @@ function add_html_notes() { } function prepare_src_files() { - mkdir -p "$BUILD_DIR" - [[ -e "$BUILD_DIR/src" ]] && rm -rf "$BUILD_DIR/src" - cp -r "$SRC_DIR" "$BUILD_DIR/src" - add_html_notes "$BUILD_DIR/src" + mkdir -p "$(dirname $SRC_DIR)" + + [[ -e "$SRC_DIR" ]] && rm -rf "$SRC_DIR" + cp -r "$DOCS_DIR" "$SRC_DIR" + add_html_notes "$SRC_DIR" } function add_config() { @@ -94,19 +96,19 @@ function add_config() { } function is_top_dir() { - [[ "$1" == "$SRC_DIR" ]] + [[ "$1" == "$DOCS_DIR" ]] } function generate_name_for_top_dir() { for suffix in '' '.top' '.all' '.master' '_' '__' '___' do - _name="$(basename $SRC_DIR)$suffix" - [[ -e "$SRC_DIR/$_name" ]] && continue + _name="$(basename $DOCS_DIR)$suffix" + [[ -e "$DOCS_DIR/$_name" ]] && continue echo "$_name" return done - echo "Error: cannot find name for top directory [$SRC_DIR]" + echo "Error: cannot find name for top directory [$DOCS_DIR]" exit 1 } @@ -114,16 +116,16 @@ function generate_name() { _dir=$1 if is_top_dir "$_dir" ; then - _name=$(generate_name_for_top_dir $SRC_DIR) + _name=$(generate_name_for_top_dir $DOCS_DIR) else - _name="${_dir#$SRC_DIR/}" + _name="${_dir#$DOCS_DIR/}" fi # Replace '/' by '_' echo "${_name////_}" } -check_rst_doc $SRC_DIR +check_rst_doc $DOCS_DIR if [[ ! -d "$RELENG_DIR" ]] ; then echo "Error: $RELENG_DIR dir not found. See https://wiki.opnfv.org/documentation/tools ." @@ -132,10 +134,10 @@ fi prepare_src_files -find $SRC_DIR -name $INDEX_RST -printf '%h\n' | while read dir +find $DOCS_DIR -name $INDEX_RST -printf '%h\n' | while read dir do name=$(generate_name $dir) - src="$BUILD_DIR/src${dir#$SRC_DIR}" + src="$SRC_DIR/${dir#$DOCS_DIR/}" build="$BUILD_DIR/$name" output="$OUTPUT_DIR/$name" conf="$src/conf.py" @@ -178,7 +180,16 @@ do } if is_top_dir "$dir" ; then - mv "$output"/* "$OUTPUT_DIR"/ + # NOTE: Having top level document (docs/index.rst) is not recommended. + # It may cause conflicts with other docs (mostly with HTML + # folders for contents in top level docs and other document + # folders). But, let's try merge of those contents into the top + # docs directory. + ( + cd $output + find . -type d -print | xargs -I d mkdir -p ../d + find . -type f -print | xargs -I f mv -b f ../f + ) rm -rf "$output" fi |