Merge "add vIMS for dahsboard"
authorMorgan Richomme <morgan.richomme@orange.com>
Fri, 20 Nov 2015 08:02:38 +0000 (08:02 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 20 Nov 2015 08:02:38 +0000 (08:02 +0000)
docs/etc/conf.py
jjb/apex/apex.yml
jjb/fuel/fuel.yml
jjb/functest/functest-docker.sh
jjb/genesis/genesis-opensteak.yml [deleted file]
jjb/qtip/qtip.yml
jjb/yardstick/yardstick.yml
utils/docu-build-new.sh
utils/fetch_os_creds.sh

index 486983f..6719653 100644 (file)
@@ -2,16 +2,9 @@ import datetime
 import sys
 import os
 
-try:
-    __import__('imp').find_module('sphinx.ext.numfig')
-    extensions = ['sphinx.ext.numfig']
-except ImportError:
-    # 'pip install sphinx_numfig'
-    extensions = ['sphinx_numfig']
+needs_sphinx = '1.3'
 
-# numfig:
-number_figures = True
-figure_caption_prefix = "Fig."
+numfig = True
 
 source_suffix = '.rst'
 master_doc = 'index'
@@ -31,4 +24,4 @@ latex_elements = {
 project = u'Copper: Virtual Infrastructure Deployment Policies'
 copyright = u'%s, OPNFV' % datetime.date.today().year
 version = u'1.0.0'
-release = u'1.0.0'
\ No newline at end of file
+release = u'1.0.0'
index 30dfcda..376515b 100644 (file)
             fi
 
             # update / install the new rpm
-            if rpm -q opnfv-apex; then
-               sudo yum update -y $RPM_INSTALL_PATH;
+            if rpm -q opnfv-apex > /dev/null; then
+               if 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
index b99bcc0..1f53454 100644 (file)
                 failure-threshold: 'never'
                 unstable-threshold: 'FAILURE'
         - trigger-builds:
-          - project: 'yardstick-fuel-{stream}'
+          - project: 'yardstick-fuel-lf-{stream}'
             block: true
             block-thresholds:
                 build-step-failure-threshold: 'never'
index 883cb1b..c73bcf9 100644 (file)
@@ -10,8 +10,13 @@ echo
 
 DOCKER_IMAGE_NAME="opnfv/functest"
 
+
 # Get tag version
-DOCKER_TAG=$(../../utils/calculate_version.sh -t docker -n $DOCKER_IMAGE_NAME)
+cd $WORKSPACE
+git clone https://gerrit.opnfv.org/gerrit/releng
+
+DOCKER_TAG=$($WORKSPACE/releng/utils/calculate_version.sh -t docker \
+    -n $DOCKER_IMAGE_NAME)
 
 ret_val=$?
 if [ $ret_val -ne 0 ]; then
@@ -21,20 +26,33 @@ else
     echo "Tag version to be build and pushed: $DOCKER_TAG"
 fi
 
-# Remove previous running containers
-echo "Removing existing $DOCKER_IMAGE_NAME containers..."
-docker ps | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker stop &>/dev/null
-docker ps -a | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker rm &>/dev/null
 
-# Remove existing images
-echo "Removing existing $DOCKER_IMAGE_NAME images..."
-docker images | grep $DOCKER_IMAGE_NAME | awk '{{print $3}}' | xargs docker rmi &>/dev/null
+# Remove previous running containers if exist
+if [[ ! -z $(docker ps -a | grep $DOCKER_IMAGE_NAME) ]]; then
+    echo "Removing existing $DOCKER_IMAGE_NAME containers..."
+    docker ps | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker stop
+    docker ps -a | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker rm
+fi
+
+
+# Remove existing images if exist
+if [[ ! -z $(docker images | grep $DOCKER_IMAGE_NAME) ]]; then
+    echo "Docker images to remove:"
+    docker images | head -1 && docker images | grep $DOCKER_IMAGE_NAME
+    image_tags=($(docker images | grep $DOCKER_IMAGE_NAME | awk '{{print $2}}'))
+    for tag in "${{image_tags[@]}}"; do
+        echo "Removing docker image $DOCKER_IMAGE_NAME:$tag..."
+        docker rmi $DOCKER_IMAGE_NAME:$tag
+    done
+fi
 
 
 # Start the build
-echo "Starting image build of $DOCKER_IMAGE_NAME:$DOCKER_TAG..."
-cd $WORKSPACE/docker/
+echo "Building docker image: $DOCKER_IMAGE_NAME:$DOCKER_TAG..."
+cd $WORKSPACE/docker
 docker build -t $DOCKER_IMAGE_NAME:$DOCKER_TAG .
+echo "Creating tag 'latest'..."
+docker tag $DOCKER_IMAGE_NAME:$DOCKER_TAG $DOCKER_IMAGE_NAME:latest
 
 # list the images
 echo "Available images are:"
@@ -47,4 +65,7 @@ if [ "$PUSH_IMAGE" == "true" ]; then
     echo
     # Push to the Dockerhub repository
     docker push $DOCKER_IMAGE_NAME:$DOCKER_TAG
+
+    echo "Updating $DOCKER_IMAGE_NAME:latest to the docker registry..."
+    docker push $DOCKER_IMAGE_NAME:latest
 fi
diff --git a/jjb/genesis/genesis-opensteak.yml b/jjb/genesis/genesis-opensteak.yml
deleted file mode 100644 (file)
index f232235..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-# this is the job configuration for bgs
-- project:
-
-    name: genesis-opensteak
-
-    installer:
-        - opensteak
-    jobs:
-        - 'genesis-opensteak-verify'
-        - 'genesis-opensteak-merge'
-        - 'genesis-opensteak-daily-{stream}'
-
-    # stream:    branch with - in place of / (eg. stable-helium)
-    # branch:    branch (eg. stable/helium)
-    stream:
-        - master:
-            branch: 'master'
-
-    project: 'genesis'
-
-########################
-# job templates
-########################
-
-- job-template:
-    name: 'genesis-opensteak-verify'
-
-    project-type: freestyle
-
-    node: ericsson-build
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
-    parameters:
-        - string:
-            name: BUILD_DIRECTORY
-            default: $WORKSPACE/build_output
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/genesis
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: 'master'
-
-    scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
-
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
-
-    triggers:
-        - gerrit:
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'false'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'false'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'genesis'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/master'
-                file-paths:
-                  - compare-type: ANT
-                    pattern: 'common/**'
-                  - compare-type: ANT
-                    pattern: 'opensteak/**'
-
-
-    builders:
-        - 'opensteak-verify'
-
-- job-template:
-    name: 'genesis-opensteak-merge'
-
-    # builder-merge job to run JJB update
-    #
-    # This job's purpose is to update all the JJB
-
-    project-type: freestyle
-
-    node: ericsson-build
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
-
-    parameters:
-        - string:
-            name: BUILD_DIRECTORY
-            default: $WORKSPACE/build_output
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/genesis
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: 'master'
-
-    scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            choosing-strategy: 'default'
-
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
-
-    triggers:
-        - gerrit:
-            trigger-on:
-                - change-merged-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'remerge'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'genesis'
-                branches:
-                    - branch-compare-type: 'ANT'
-                      branch-pattern: '**/master'
-                file-paths:
-                  - compare-type: ANT
-                    pattern: 'common/**'
-                  - compare-type: ANT
-                    pattern: 'opensteak/**'
-
-    builders:
-        - 'opensteak-merge'
-
-- job-template:
-    name: 'genesis-opensteak-daily-{stream}'
-
-    project-type: freestyle
-
-    node: ericsson-build
-
-    parameters:
-        - string:
-            name: BUILD_DIRECTORY
-            default: $WORKSPACE/build_output
-            description: "Directory where the build artifact will be located upon the completion of the build."
-        - string:
-            name: GS_URL
-            default: 'artifacts.opnfv.org/genesis/opensteak'
-            description: "URL to Google Storage."
-        - string:
-            name: INSTALLER
-            default: 'opensteak'
-            description: "Installer to use."
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/genesis
-        - string:
-            name: GERRIT_BRANCH
-            default: origin/master
-            description: "Branch to build, deploy and test."
-        - string:
-            name: GERRIT_REFSPEC
-            default: refs/heads/master
-            description: "Refspec to retrieve."
-
-    scm:
-        - git:
-            skip-tag: true
-            url: $GIT_BASE
-            branches:
-                - $GERRIT_BRANCH
-            refspec: $GERRIT_REFSPEC
-
-    triggers:
-        - pollscm: '@midnight'
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
-    builders:
-        - 'opensteak-daily-master'
-
-- builder:
-    name: opensteak-verify
-    builders:
-        - shell: |
-            #!/bin/bash
-            echo "Hello World!"
-
-- builder:
-    name: opensteak-merge
-    builders:
-        - shell: |
-            #!/bin/bash
-            echo "Hello World!"
-
-- builder:
-    name: opensteak-daily-master
-    builders:
-        - shell: |
-            #!/bin/bash
-            echo "Hello World!"
index d777221..e874088 100644 (file)
@@ -5,8 +5,8 @@
         - 'qtip-daily-{stream}'
         - 'qtip-merge'
         - 'qtip-verify'
-        - 'qtip-dhrystone-VM_vs_Baremetal-{pod}'
-        - 'qtip_dhrystone-BM_vs_BM-{pod}'
+        - 'qtip-dhrystone-serial-{pod}'
+        - 'qtip-ssl-parallel-{pod}'
 
 
     # stream:    branch with - in place of / (eg. stable-helium)
@@ -15,9 +15,9 @@
 
     pod:
         - dell-build:
-           node: 'dell-build'
-           installer_type: 'foreman'
-           installer_ip: '172.18.0.12'
+           node: 'dell-us-testing-bm-1'
+           installer_type: 'fuel'
+           installer_ip: '10.20.0.2'
 
 
     stream:
             echo "merge logic goes here"
 
 - job-template:
-    name: 'qtip-dhrystone-VM_vs_Baremetal-{pod}'
+    name: 'qtip-dhrystone-serial-{pod}'
 
     project-type: freestyle
 
 
     builders:
         - 'qtip-fetch-os-cred'
-        - 'qtip-dhrystone-VM_vs_BM'
+        - 'qtip-dhrystone-serial'
 
     triggers:
-      - timed: '0 13 * * *'
+      - timed: '0 20 * * *'
 
 - job-template:
-    name: 'qtip_dhrystone-BM_vs_BM-{pod}'
+    name: 'qtip-ssl-parallel-{pod}'
 
 
     project-type: freestyle
 
     builders:
       - 'qtip-fetch-os-cred'
-      - 'qtip-dhrystone-BM_vs_BM'
+      - 'qtip-ssl-parallel'
 
     triggers:
       - timed: "@midnight"
 #biuilder macros
 ###########################
 - builder:
-    name: qtip-dhrystone-VM_vs_BM
+    name: qtip-dhrystone-serial
 
     builders:
         - shell: |
             #! /bin/bash
-
-
-            if [[ ! -f $HOME/opnfv-openrc.sh]]; then
+            if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
                echo "Unable to access file $HOME/opnfv-openrc.sh"
                exit 1
             fi
             source $HOME/opnfv-openrc.sh
             cd $WORKSPACE
-
-
             echo "Running QTIP dhrystone with First Test case"
-            ./QTIP.sh First dhrystone
+            python qtip.py -s compute -b dhrystone_serial.yaml
 
 
 - builder:
-    name: qtip-dhrystone-BM_vs_BM
+    name: qtip-ssl-parallel
 
     builders:
         - shell: |
             #!/bin/bash
-
-
-            if [[ ! -f $HOME/opnfv-openrc.sh]]; then
+            if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
                echo "Unable to access file $HOME/opnfv-openrc.sh"
                exit 1
             fi
             source $HOME/opnfv-openrc.sh
             cd $WORKSPACE
-
-
             echo "Running QTIP dhrystone with Second Test case"
-            ./QTIP.sh Second dhrystone
+            python qtip.py -s compute -b ssl_parallel.yaml
 
 
 - builder:
     name: qtip-fetch-os-cred
     builders:
-        - shell: |
+        - shell:
             !include-raw ../../utils/fetch_os_creds.sh
index 50369ce..60344fa 100644 (file)
@@ -1,18 +1,23 @@
 - project:
     name: yardstick
 
-    installer:
-        - fuel:
+    project: 'yardstick'
+
+    pod:
+        - lf:
             node: 'opnfv-jump-2'
             installer_type: 'fuel'
             installer_ip: '10.20.0.2'
-        - foreman:
-            node: 'opnfv-jump-2'
-            installer_type: 'foreman'
-            installer_ip: '172.30.10.73'
+        - ericsson:
+            node: 'yardstick-pod'
+            installer_type: 'fuel'
+            installer_ip: '10.20.0.2'
+
+    installer:
+        - fuel
 
     jobs:
-        - 'yardstick-{installer}-{stream}'
+        - 'yardstick-{installer}-{pod}-{stream}'
         - 'yardstick-merge'
         - 'yardstick-verify'
 
     stream:
         - master:
             branch: 'master'
-        - stable-arno:
-            branch: 'stable/arno'
-            gs-pathname: '/arno'
-
-    project: 'yardstick'
 
 - job-template:
     name: 'yardstick-verify'
             deactivate
 
 - job-template:
-    name: 'yardstick-{installer}-{stream}'
+    name: 'yardstick-{installer}-{pod}-{stream}'
 
     project-type: freestyle
 
     parameters:
         - project-parameter:
             project: '{project}'
+        - '{pod}-parameters'
+        - string:
+            name: POD_NAME
+            default: '{pod}'
+            description: "POD where the job runs"
         - string:
             name: INSTALLER_TYPE
             default: '{installer_type}'
         artifactDaysToKeep: -1
         artifactNumToKeep: -1
 
+    triggers:
+        - 'yardstick-trigger-{pod}'
+
     builders:
         - 'yardstick-fetch-os-creds'
         - 'yardstick-daily'
     builders:
         - shell:
             !include-raw ../../utils/fetch_os_creds.sh
+
+########################
+# parameter macros
+########################
+- parameter:
+    name: 'ericsson-parameters'
+    parameters:
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+
+- parameter:
+    name: 'lf-parameters'
+    parameters:
+        - string:
+            name: GIT_BASE
+            default: ssh://gerrit.opnfv.org:29418/$PROJECT
+            description: "URL for LF POD"
+
+########################
+# trigger macros
+########################
+- trigger:
+    name: 'yardstick-trigger-ericsson'
+    triggers:
+        - timed: '@midnight'
+
+- trigger:
+    name: 'yardstick-trigger-lf'
+    triggers:
+        - timed: '#@midnight'
index 00d0464..67a62e3 100755 (executable)
@@ -29,17 +29,22 @@ while read -d $'\n'; do
 done < <(find docs/ -name 'index.rst' -printf '%h\n' | sort -u )
 
 for dir in "${{directories[@]}}"; do
+  _name="${{dir##*/}}"
+  _build="${{dir}}/build"
+  _output="docs/output/${{_name}}"
   echo
-  echo "#############################"
-  echo "Building DOCS in ${{dir##*/}}"
-  echo "#############################"
+  echo "#################${{_name//?/#}}"
+  echo "Building DOCS in ${{_name}}"
+  echo "#################${{_name//?/#}}"
   echo
 
-  if [[ ! -d docs/output/"${{dir##*/}}/" ]]; then
-    mkdir -p docs/output/"${{dir##*/}}/"
-  fi
+  mkdir -p "${{_output}}"
+
+  sphinx-build -b html -E -c docs/etc "${{dir}}" "${{_output}}"
 
-  sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/"
+  sphinx-build -b latex -E -c docs/etc "${{dir}}" "${{_build}}"
+  make -C "${{_build}}" LATEXOPTS='--interaction=nonstopmode' all-pdf
+  mv "${{_build}}"/*.pdf "${{_output}}"
 
 done
 
index cefc857..7a5f812 100755 (executable)
@@ -126,14 +126,12 @@ elif [ "$installer_type" == "foreman" ]; then
         | grep $admin_ip | sed 's/ /\n/g' | grep ^http | head -1) &> /dev/null
 
 elif [ "$installer_type" == "compass" ]; then
-    #ip_compass="10.1.0.12"
     verify_connectivity $installer_ip
-
-    # controller_ip='10.1.0.222'
-    controller_ip=$(sshpass -p'root' ssh 2>/dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@10.1.0.12 \
-        'mysql -ucompass -pcompass -Dcompass -e"select package_config  from cluster;"' \
-        | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"ha_proxy\": {\"vip\":/)print $i}' \
+    controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \
+        'mysql -ucompass -pcompass -Dcompass -e"select *  from cluster;"' \
+        | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"host1\"/) {print $(i+1);break;}}'  \
         | grep -oP "\d+.\d+.\d+.\d+")
+
     if [ -z $controller_ip ]; then
         error "The controller $controller_ip is not up. Please check that the POD is correctly deployed."
     fi