diff options
-rw-r--r-- | INFO | 1 | ||||
-rw-r--r-- | jjb-sandbox/releng/releng-sandbox-jobs.yml | 77 | ||||
-rwxr-xr-x | jjb-sandbox/releng/verify-sandbox-jobs.sh | 21 | ||||
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 18 | ||||
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 3 | ||||
-rwxr-xr-x | jjb/fuel/fuel-deploy.sh | 53 | ||||
-rw-r--r-- | jjb/infra/bifrost-verify-jobs.yml | 2 | ||||
-rwxr-xr-x | jjb/infra/bifrost-verify.sh | 4 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docker.sh | 19 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-utils.yml | 40 | ||||
-rw-r--r-- | jjb/releng/releng-ci-jobs.yml | 50 | ||||
-rw-r--r-- | prototypes/bifrost/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml | 4 | ||||
-rw-r--r-- | prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml | 11 | ||||
-rwxr-xr-x | prototypes/bifrost/scripts/test-bifrost-deployment.sh | 4 | ||||
-rw-r--r-- | prototypes/puppet-infracloud/hiera/common.yaml | 94 | ||||
-rw-r--r-- | prototypes/puppet-infracloud/manifests/site.pp | 14 | ||||
-rwxr-xr-x | utils/jenkins-jnlp-connect.sh | 1 | ||||
-rw-r--r-- | utils/test/dashboard/dashboard/elastic2kibana/main.py | 101 | ||||
-rw-r--r-- | utils/test/dashboard/dashboard/elastic2kibana/templates/visualization.json | 32 |
19 files changed, 345 insertions, 204 deletions
@@ -20,6 +20,7 @@ Jose Lausuch (Ericsson, jose.lausuch@ericsson.com) Ryota Mibu (NEC, r-mibu@cq.jp.nec.com) Mei Mei (Huawei, meimei@huawei.com) Trevor Bramwell (Linux Foundation, tbramwell@linuxfoundation.org) +Serena Feng (ZTE, feng.xiaowei@zte.com.cn) Link to TSC approval of the project: http://ircbot.wl.linuxfoundation.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-07-14-14.00.html Link to TSC voting for removal of Victor Laza as committer: http://meetbot.opnfv.org/meetings/opnfv-meeting/2016/opnfv-meeting.2016-02-16-14.59.html diff --git a/jjb-sandbox/releng/releng-sandbox-jobs.yml b/jjb-sandbox/releng/releng-sandbox-jobs.yml new file mode 100644 index 000000000..ee35f4299 --- /dev/null +++ b/jjb-sandbox/releng/releng-sandbox-jobs.yml @@ -0,0 +1,77 @@ +- project: + name: 'releng-sandbox-jobs' + jobs: + - 'releng-deploy-sandbox' + - 'releng-clear-jenkins-jobs' + + project: 'releng' + +- job-template: + name: 'releng-deploy-sandbox' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'master' + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + + 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: 'redeploy' + projects: + - project-compare-type: 'ANT' + project-pattern: 'releng' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/master' + file-paths: + - compare-type: ANT + pattern: jjb-sandbox/** + - compare-type: ANT + pattern: utils/** + + builders: + - shell: + !include-raw-escape: verify-sandbox-jobs.sh + - shell: | + #! /bin/bash + jenkins-jobs update -r jjb-sandbox + + publishers: + - archive-artifacts: + artifacts: 'job_output/*' + +- job-template: + name: 'releng-clear-jenkins-jobs' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'master' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + choosing-strategy: 'default' + + triggers: + - timed: '@weekly' + + builders: + - shell: | + #! /bin/bash + jenkins-jobs delete -r -p jjb-sandbox -x jjb-sandbox/releng diff --git a/jjb-sandbox/releng/verify-sandbox-jobs.sh b/jjb-sandbox/releng/verify-sandbox-jobs.sh new file mode 100755 index 000000000..8f67e742b --- /dev/null +++ b/jjb-sandbox/releng/verify-sandbox-jobs.sh @@ -0,0 +1,21 @@ +#! /bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Linux Foundation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +#test for non-ascii characters, these can pass the test and end up breaking things in production +for x in $(find . -name *\.yml); do + + if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then + echo "file "$x" contains non-ascii characters" + exit 1 + fi + +done + +jenkins-jobs test -r jjb/releng-defaults.yaml:jjb/releng-macros.yaml:jjb/opnfv/installer-params.yml:jjb/opnfv/slave-params.yml:jjb-sandbox \ + -o job_output diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index f6b48656a..55ab7fc34 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -228,7 +228,7 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 1' + - timed: '0 0 * * 1,6' - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: @@ -236,7 +236,7 @@ - trigger: name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 3' + - timed: '0 0 * * 3,7' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-master-trigger' triggers: @@ -251,23 +251,23 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 4 * * *' + - timed: '0 8 * * 1,4,6' - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 8 * * *' + - timed: '0 16 * * 2,5' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 12 * * *' + - timed: '0 8 * * 1,3,6' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 16 * * 2,4,7' - trigger: name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 8 * * 3,5,7' #--------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch #--------------------------------------------------------------- diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 6453425ce..3f7a47bee 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -48,5 +48,8 @@ sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/dovetail:${DOCKER_T echo "Dovetail: store results..." sudo cp -r /home/opnfv/dovetail/results ./ +#To make sure the file owner is jenkins, for the copied results files in the above line +#if not, there will be error when next time to wipe workspace +sudo chown -R jenkins:jenkins ${WORKSPACE}/results echo "Dovetail: done!" diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 2104d9090..ef47ff0e3 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -104,58 +104,5 @@ if [[ $exit_code -ne 0 ]]; then exit $exit_code else echo "Deployment is successful!" -fi - -# Quick and dirty fix for SFC scenatio - will be fixed properly post-release -if [[ ! "$DEPLOY_SCENARIO" =~ "os-odl_l2-sfc" ]]; then exit 0 fi - -echo -echo "SFC Scenario is deployed" -echo - -# The stuff below is here temporarily and will be fixed once the release is out -# The stuff below is here temporarily and will be fixed once the release is out -export FUEL_MASTER_IP=10.20.0.2 -export TACKER_SCRIPT_URL="https://git.opnfv.org/cgit/fuel/plain/prototypes/sfc_tacker/poc.tacker-up.sh?h=${GIT_BRANCH#*/}" -export CONTROLLER_NODE_IP=$(sshpass -pr00tme /usr/bin/ssh -o UserKnownHostsFile=/dev/null \ - -o StrictHostKeyChecking=no root@$FUEL_MASTER_IP 'fuel node list' | \ - grep controller | head -1 | cut -d'|' -f5) - -# we can't do much if we do not have the controller IP -if [[ ! "$CONTROLLER_NODE_IP" =~ "10.20.0" ]]; then - echo "Unable to retrieve controller IP" - exit 1 -fi - -echo -echo "Copying and executing poc.tacker-up.sh script on controller node $CONTROLLER_NODE_IP" -echo - -expect << END -spawn /usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root $::env(FUEL_MASTER_IP) -expect { - -re ".*sword.*" { - exp_send "r00tme\r" - } -} -expect "# " -send "/usr/bin/ssh -l root $::env(CONTROLLER_NODE_IP)\r" -expect "# " -send "PS1=\"tacker_poc> \"\r" -expect -re {tacker_poc> $} -send "sudo apt-get install -y git\r" -expect -re {tacker_poc> $} -sleep 10 -send "/bin/mkdir -p /root/sfc-poc && cd /root/sfc-poc\r" -expect -re {tacker_poc> $} -send "git clone https://gerrit.opnfv.org/gerrit/fuel && cd fuel\r" -expect -re {tacker_poc> $} -send "/bin/bash /root/sfc-poc/fuel/prototypes/sfc_tacker/poc.tacker-up.sh\r" -expect -re {tacker_poc> $} -send "exit\r" -expect "Connection to $::env(CONTROLLER_NODE_IP) closed. " -send "exit\r" -expect "Connection to $::env(FUEL_MASTER_IP) closed. " -END diff --git a/jjb/infra/bifrost-verify-jobs.yml b/jjb/infra/bifrost-verify-jobs.yml index b117b32ae..17796a832 100644 --- a/jjb/infra/bifrost-verify-jobs.yml +++ b/jjb/infra/bifrost-verify-jobs.yml @@ -173,4 +173,6 @@ file-paths: - compare-type: ANT pattern: 'prototypes/bifrost/**' + - compare-type: ANT + pattern: 'jjb/infra/**' readable-message: true diff --git a/jjb/infra/bifrost-verify.sh b/jjb/infra/bifrost-verify.sh index 759b50b8e..f7920a36f 100755 --- a/jjb/infra/bifrost-verify.sh +++ b/jjb/infra/bifrost-verify.sh @@ -18,6 +18,7 @@ function fix_ownership() { echo "Not running as part of Jenkins. Handle the logs manually." else sudo chown -R jenkins:jenkins $WORKSPACE + sudo chown -R jenkins:jenkins ${HOME}/.cache fi } @@ -30,6 +31,9 @@ fi # remove previously cloned repos sudo /bin/rm -rf /opt/bifrost /opt/puppet-infracloud /opt/stack /opt/releng +# Fix up permissions +fix_ownership + # clone all the repos first and checkout the patch afterwards sudo git clone https://git.openstack.org/openstack/bifrost /opt/bifrost sudo git clone https://git.openstack.org/openstack-infra/puppet-infracloud /opt/puppet-infracloud diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index f56de7f60..e637f7b32 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -67,22 +67,9 @@ fi # cd to directory where Dockerfile is located -if [[ "$DOCKER_REPO_NAME" == "opnfv/bottlenecks" ]]; then - cd $WORKSPACE/ci/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/cperf" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/dovetail" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/functest" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/qtip" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/storperf" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/yardstick" ]]; then - cd $WORKSPACE/tests/ci/docker/yardstick-ci -else - echo "ERROR: DOCKER_REPO_NAME parameter not valid: $DOCKER_REPO_NAME" +cd $WORKSPACE/docker +if [ ! -f ./Dockerfile ]; then + echo "ERROR: Dockerfile not found." exit 1 fi diff --git a/jjb/opnfv/opnfv-utils.yml b/jjb/opnfv/opnfv-utils.yml new file mode 100644 index 000000000..94a99d451 --- /dev/null +++ b/jjb/opnfv/opnfv-utils.yml @@ -0,0 +1,40 @@ +- project: + + name: opnfv-utils + + jobs: + - 'prune-docker-images' +######################## +# job templates +######################## +- job-template: + name: 'prune-docker-images' + + disabled: false + + concurrent: true + + parameters: + - node: + name: SLAVE_NAME + description: Slaves to prune docker images + default-slaves: + - arm-build1 + - arm-build2 + - ericsson-build4 + - ericsson-build5 + - lf-build2 + allowed-multiselect: true + ignore-offline-nodes: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - shell: | + #!/bin/bash + + (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm + docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi + + triggers: + - timed: '@midnight' diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index ac323a3c1..2d88449e8 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -2,7 +2,6 @@ name: builder-jobs jobs: - 'builder-verify-jjb' - - 'builder-sandbox' - 'builder-merge' - 'artifacts-api' @@ -102,55 +101,6 @@ jenkins-jobs update -r --delete-old jjb/ - job-template: - name: 'builder-sandbox' - - # Upload all jjb jobs to sandbox instance, excluding jobs jjb - # builder jobs - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: 'master' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' - - triggers: - - gerrit: - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: 'releng' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/sandbox' - file-paths: - - compare-type: ANT - pattern: jjb/** - - compare-type: ANT - pattern: utils/** - - builders: - - shell: - !include-raw: verify-releng.sh - - shell: | - #!/bin/bash - source /opt/virtualenv/jenkins-job-builder/bin/activate - cd /opt/jenkins-ci/releng - git pull - cp /etc/jenkins_jobs/jenkins_jobs.ini jenkins_sandbox.ini - sed -i 's/url=.*/url=https:\/\/sandbox.opnfv.org\//g' jenkins_sandbox.ini - jenkins-jobs --conf jenkins_sandbox.ini update -r -x jjb/releng --delete-old jjb - rm -f jenkins_sandbox.ini - -- job-template: name: 'artifacts-api' # Generate and upload the JSON file to used for artifacts site diff --git a/prototypes/bifrost/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml b/prototypes/bifrost/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml deleted file mode 100644 index 69eb787e7..000000000 --- a/prototypes/bifrost/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -node_ssh_pause: 10 -wait_timeout: 1900 -multinode_testing: false diff --git a/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml b/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml index b4dffdccf..d650f1056 100644 --- a/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml +++ b/prototypes/bifrost/playbooks/test-bifrost-infracloud.yaml @@ -67,13 +67,18 @@ - role: ironic-enroll-dynamic - { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool == true } - hosts: baremetal + name: "Create configuration drive files" + become: no + connection: local + roles: + - role: bifrost-configdrives-dynamic +- hosts: baremetal vars: multinode_testing: "{{ inventory_dhcp | bool == true }}" - name: "Create configuration drive files and deploy machines." + name: "Deploy machines." become: no connection: local + serial: 1 roles: - - role: bifrost-configdrives-dynamic - role: bifrost-deploy-nodes-dynamic - role: bifrost-prepare-for-test-dynamic - serial: 1 diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh index fb49afc42..773697efe 100755 --- a/prototypes/bifrost/scripts/test-bifrost-deployment.sh +++ b/prototypes/bifrost/scripts/test-bifrost-deployment.sh @@ -18,6 +18,7 @@ ENABLE_VENV="false" USE_DHCP="false" USE_VENV="false" BUILD_IMAGE=true +PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-2400} # Set defaults for ansible command-line options to drive the different # tests. @@ -114,7 +115,8 @@ ${ANSIBLE} -vvvv \ -e download_ipa=${DOWNLOAD_IPA} \ -e create_ipa_image=${CREATE_IPA_IMAGE} \ -e write_interfaces_file=${WRITE_INTERFACES_FILE} \ - -e ipv4_gateway=192.168.122.1 + -e ipv4_gateway=192.168.122.1 \ + -e wait_timeout=${PROVISION_WAIT_TIMEOUT} EXITCODE=$? if [ $EXITCODE != 0 ]; then diff --git a/prototypes/puppet-infracloud/hiera/common.yaml b/prototypes/puppet-infracloud/hiera/common.yaml index 1fcde2f75..6096b9c83 100644 --- a/prototypes/puppet-infracloud/hiera/common.yaml +++ b/prototypes/puppet-infracloud/hiera/common.yaml @@ -76,5 +76,95 @@ hosts: compute00.opnfvlocal: ip: 192.168.122.4 -# br-eth0 for debian, br_ens3 for RHEL -bridge_name: br-eth0 +# settings for bifrost +bridge_name: br_opnfv +ironic_db_password: pass +bifrost_mysql_password: pass +bifrost_ssh_private_key: | + -----BEGIN RSA PRIVATE KEY----- + MIIEowIBAAKCAQEAvwr2LbfJQuKZDOQse+DQHX84c9LCHvQfy0pu15JkiLM5dUtx + hLr/5fxSzblubS4WkNZVsGTtUp51f8yoQyltqquGlVfUf0GO+PCLaRp0arhli0Rl + sAGatI12amnrVap82jINiKQRO+UnF97z2hiB35Zxko4jSaPOOiL48DEKowZHL2Ja + jjUt6dXcaNotXNaKZpcxz92gdZhFOPU8BrJ/mI9k9u6QI/4qLG/WzW4frHLigA1t + OrZ3Nnu3tloWNsS1lh71KRfEv46VD8tCAZfXqJtjdH4Z4AUO++CLF/K4zXhIoFqU + Wf8aS64YzoaAfnJ+jUwKs92dVjuFtbEk+t2YLQIDAQABAoIBAQCAr++YaD6oUV9r + caANaiiGVhY+3u9oTmXEWMVFbRVPh/riaglzsUuDLm7QqWIbJXqJ4fcitTmv95GK + nt+RLizzVEt5+gnoFs8qHU6rY+ibos6z+0TMRKhjiw8DK4oc0JT9nc3EB1CcmgW1 + bLeyZ+PEKuEiKaDXkAHw43HwyfgyS3Lc90TSaLj3P7egsBuhx1Yy+wgyiPQ/bF0b + OBLHHK+nwYLGAq25n/+zA7XAndc2OQd4KzUJcvjyND+IMYnzEbeFH36UcFqbvgGu + nR55yIrCxsxcJhhT2slMNtg/xCmo3Jzz1kNBtwbNBik4/5Lkckny0xhQl+h7vz9U + +cKjwfK5AoGBAPSy/JHMeQ5/rzbA5LAZhVa/Yc4B5datkwLNg6mh4CzMabJs8AKd + de05XB/Nq6Hfp8Aa7zLt2GIb3iqF6w/y+j8YAXS2KQD8/HDs2/9Oxr512kfssk5D + dcpTqeIFetzM9pqnctVXBGlbz0QLeL+lT3kXY00+CBm6LjEv8dsPxZr3AoGBAMfd + nDnTjUVZ+sRpTBDM3MhKLMETxNWNDaozL+SgpYQwtKlSTfQVdFcM66a8qCFjQFsc + /6AjL0bjCA5u859IoQ4ValD0vgkyLHdEN0P1Grf3MK8kjOW1A1s1i2FY6U0z9AM2 + zsUCA9bB5A9wwxwofoa8VkaDpVSMITbakVoNxJj7AoGAImcft2fmBTHScoJAJLoR + 0xZpK8t8gug4aQZ34luN5v5+RcWnINb+g3GzEA2cec+2B/5BbwmdiH2eiJ/3YnCo + 2kIHwl7x+N+Ypk/GxmhO7Owo2j/e+b3mS6HjmpFmqrBuY2PzcyceyalMxKZQPbGC + MOYm4e88uFFCuUuiV0gqYhUCgYBmSFhCE6yxeCnoSEbgNicq7SLYMIjEDOqYVpfE + 9h2ed9qM6IzyQ+SFBBy4+MVGSOfPeRis2DTCnz8pO8i7lEyvy2/cPFPgmue8pZFu + 2smwqfUlPJxKlgdArzdEO18x3kubNXo9whk614EiEcAX8fVGeK3iak665Pe+fb5z + Cqa47wKBgDp3/dgtMneoePKNefy4a9vp5y4XKviC6GOrr0xpEM2ptZ+I7mUJcACN + KbaW0dPgtS1cApelmF73IAJRYbKMW7lQzql61IoGw4pGTIMPKerqRs/hTWYPZiSG + QHWf3iTV5uQr6cSRoUgkAUHVw2KTGad41RAhDp352iakZuNNBFga + -----END RSA PRIVATE KEY----- +bifrost_ssh_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/CvYtt8lC4pkM5Cx74NAdfzhz0sIe9B/LSm7XkmSIszl1S3GEuv/l/FLNuW5tLhaQ1lWwZO1SnnV/zKhDKW2qq4aVV9R/QY748ItpGnRquGWLRGWwAZq0jXZqaetVqnzaMg2IpBE75ScX3vPaGIHflnGSjiNJo846IvjwMQqjBkcvYlqONS3p1dxo2i1c1opmlzHP3aB1mEU49TwGsn+Yj2T27pAj/iosb9bNbh+scuKADW06tnc2e7e2WhY2xLWWHvUpF8S/jpUPy0IBl9eom2N0fhngBQ774IsX8rjNeEigWpRZ/xpLrhjOhoB+cn6NTAqz3Z1WO4W1sST63Zgt yolanda@trasto +infracloud_vlan: 415 +infracloud_gateway_ip: 172.30.13.1 +default_network_interface: eno3 +dhcp_static_mask: 255.255.255.128 +dchp_pool_start: 10.20.0.130 +dhcp_pool_end: 10.20.0.254 +network_interface: eno1 +ipv4_nameserver: 8.8.8.8 +ipv4_subnet_mask: 255.255.255.0 +ipv4_gateway: 172.30.13.1 +ironic_inventory: + controller00.opnfvlocal: + driver: agent_ipmitool + driver_info: + power: + ipmi_address: 172.30.8.90 + ipmi_username: admin + provisioning_ipv4_address: 10.20.0.130 + ipv4_address: 172.30.13.90 + ansible_ssh_host: 172.30.13.90 + ipv4_gateway: 172.30.13.1 + ipv4_interface_mac: 00:1e:67:f9:9b:35 + name: controller00.opnfvlocal + nics: + - mac: a4:bf:01:01:a9:fc + - mac: 00:1e:67:f6:9b:35 + properties: + cpu_arch: x86_64 + cpus: '44' + disk_size: '1800' + ram: '65536' + uuid: 00a22849-2442-e511-906e-0012795d96dd + compute00.opnfvlocal: + driver: agent_ipmitool + driver_info: + power: + ipmi_address: 172.30.8.91 + ipmi_username: admin + provisioning_ipv4_address: 10.20.0.131 + ipv4_address: 172.30.13.91 + ansible_ssh_host: 172.30.13.91 + ipv4_gateway: 172.30.13.1 + ipv4_subnet_mask: 255.255.255.0 + name: compute00.opnfvlocal + nics: + - mac: a4:bf:01:01:a9:d4 + - mac: 00:1e:67:f6:9b:37 + properties: + cpu_arch: x86_64 + cpus: '44' + disk_size: '1800' + ram: '65536' + uuid: 0051e926-f242-e511-906e-0012795d96dd +ipmi_passwords: {'172.30.8.90': 'octopus', '172.30.8.91': 'octopus'} +neutron_subnet_cidr: '192.168.122.0/24' +neutron_subnet_gateway: '192.168.122.1' +neutron_subnet_allocation_pools: + - 'start=192.168.122.50,end=192.168.122.254' +virt_type: 'qemu' diff --git a/prototypes/puppet-infracloud/manifests/site.pp b/prototypes/puppet-infracloud/manifests/site.pp index 31c45767f..f09bfe2e9 100644 --- a/prototypes/puppet-infracloud/manifests/site.pp +++ b/prototypes/puppet-infracloud/manifests/site.pp @@ -34,11 +34,9 @@ node 'controller00.opnfvlocal' { ssl_cert_file_contents => hiera('ssl_cert_file_contents'), br_name => hiera('bridge_name'), controller_public_address => $::fqdn, - neutron_subnet_cidr => '192.168.122.0/24', - neutron_subnet_gateway => '192.168.122.1', - neutron_subnet_allocation_pools => [ - 'start=192.168.122.50,end=192.168.122.254', - ], + neutron_subnet_cidr => hiera('neutron_subnet_cidr'), + neutron_subnet_gateway => hiera('neutron_subnet_gateway'), + neutron_subnet_allocation_pools => hiera('neutron_subnet_allocation_pools'), opnfv_password => hiera('opnfv_password'), } } @@ -61,7 +59,7 @@ node 'compute00.opnfvlocal' { ssl_key_file_contents => hiera('ssl_key_file_contents'), br_name => hiera('bridge_name'), controller_public_address => 'controller00.opnfvlocal', - virt_type => 'qemu', + virt_type => hiera('virt_type'), } } @@ -73,7 +71,7 @@ node 'jumphost.opnfvlocal' { } } -node 'baremetal.opnfvlocal' { +node 'baremetal.opnfvlocal', 'lfpod5-jumpserver' { class { '::opnfv::server': iptables_public_udp_ports => [67, 69], sysadmins => hiera('sysadmins', []), @@ -91,10 +89,12 @@ node 'baremetal.opnfvlocal' { vlan => hiera('infracloud_vlan'), gateway_ip => hiera('infracloud_gateway_ip'), default_network_interface => hiera('default_network_interface'), + dhcp_static_mask => hiera('dhcp_static_mask'), dhcp_pool_start => hiera('dhcp_pool_start'), dhcp_pool_end => hiera('dhcp_pool_end'), network_interface => hiera('network_interface'), ipv4_nameserver => hiera('ipv4_nameserver'), ipv4_subnet_mask => hiera('ipv4_subnet_mask'), + bridge_name => hiera('bridge_name'), } } diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index 4b710cab2..9ef4298ef 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -151,6 +151,7 @@ fi usage() { cat << EOF +**this file must be copied to the jenkins home directory to work** jenkins-jnlp-connect.sh configures monit to keep slave connection up Checks for new versions of slave.jar run as root to create pid directory and create monit config. diff --git a/utils/test/dashboard/dashboard/elastic2kibana/main.py b/utils/test/dashboard/dashboard/elastic2kibana/main.py index 95f758ea8..f16879b93 100644 --- a/utils/test/dashboard/dashboard/elastic2kibana/main.py +++ b/utils/test/dashboard/dashboard/elastic2kibana/main.py @@ -27,6 +27,9 @@ es_creds = CONF.elastic_creds _installers = {'fuel', 'apex', 'compass', 'joid'} +env = Environment(loader=PackageLoader('elastic2kibana', 'templates')) +env.filters['jsonify'] = json.dumps + class KibanaDashboard(dict): def __init__(self, project_name, case_name, family, installer, pod, scenarios, visualization): @@ -46,14 +49,14 @@ class KibanaDashboard(dict): def _create_visualizations(self): for scenario in self.scenarios: - self._kibana_visualizations.append(KibanaVisualization(self.project_name, - self.case_name, - self.installer, - self.pod, - scenario, - self.visualization)) + self._kibana_visualizations.append(Visualization(self.project_name, + self.case_name, + self.installer, + self.pod, + scenario, + self.visualization)) - self._visualization_title = self._kibana_visualizations[0].vis_title + self._visualization_title = self._kibana_visualizations[0].vis_state_title def _publish_visualizations(self): for visualization in self._kibana_visualizations: @@ -145,30 +148,9 @@ class KibanaDashboard(dict): self._publish() -class KibanaSearchSourceJSON(dict): - """ - "filter": [ - {"match": {"installer": {"query": installer, "type": "phrase"}}}, - {"match": {"project_name": {"query": project_name, "type": "phrase"}}}, - {"match": {"case_name": {"query": case_name, "type": "phrase"}}} - ] - """ - - def __init__(self, project_name, case_name, installer, pod, scenario): - super(KibanaSearchSourceJSON, self).__init__() - self["filter"] = [ - {"match": {"project_name": {"query": project_name, "type": "phrase"}}}, - {"match": {"case_name": {"query": case_name, "type": "phrase"}}}, - {"match": {"installer": {"query": installer, "type": "phrase"}}}, - {"match": {"scenario": {"query": scenario, "type": "phrase"}}} - ] - if pod != 'all': - self["filter"].append({"match": {"pod_name": {"query": pod, "type": "phrase"}}}) - - -class VisualizationBuilder(object): +class VisStateBuilder(object): def __init__(self, visualization): - super(VisualizationBuilder, self).__init__() + super(VisStateBuilder, self).__init__() self.visualization = visualization def build(self): @@ -184,14 +166,12 @@ class VisualizationBuilder(object): }) index += 1 - env = Environment(loader=PackageLoader('elastic2kibana', 'templates')) - env.filters['jsonify'] = json.dumps template = env.get_template('{}.json'.format(name)) vis = template.render(aggs=aggs) return json.loads(vis) -class KibanaVisualization(dict): +class Visualization(object): def __init__(self, project_name, case_name, installer, pod, scenario, visualization): """ We need two things @@ -207,32 +187,35 @@ class KibanaVisualization(dict): :return: """ - super(KibanaVisualization, self).__init__() - vis = VisualizationBuilder(visualization).build() - self.vis_title = vis['title'] - self['title'] = '{} {} {} {} {} {}'.format(project_name, - case_name, - self.vis_title, - installer, - pod, - scenario) - self.id = self['title'].replace(' ', '-').replace('/', '-') - self['visState'] = json.dumps(vis, separators=(',', ':')) - self['uiStateJSON'] = "{}" - self['description'] = "Kibana visualization for project_name '{}', case_name '{}', metric '{}', installer '{}'," \ - " pod '{}' and scenario '{}'".format(project_name, - case_name, - self.vis_title, - installer, - pod, - scenario) - self['scenario'] = 1 - self['kibanaSavedObjectMeta'] = {"searchSourceJSON": json.dumps(KibanaSearchSourceJSON(project_name, - case_name, - installer, - pod, - scenario), - separators=(',', ':'))} + super(Visualization, self).__init__() + visState = VisStateBuilder(visualization).build() + self.vis_state_title = visState['title'] + + vis = { + "visState": json.dumps(visState), + "filters": { + "project_name": project_name, + "case_name": case_name, + "installer": installer, + "metric": self.vis_state_title, + "pod_name": pod, + "scenario": scenario + } + } + + template = env.get_template('visualization.json') + + self.visualization = json.loads(template.render(vis=vis)) + self._dumps(['visState', 'description', 'uiStateJSON']) + self._dumps_2deeps('kibanaSavedObjectMeta', 'searchSourceJSON') + self.id = self.visualization['title'].replace(' ', '-').replace('/', '-') + + def _dumps(self, items): + for key in items: + self.visualization[key] = json.dumps(self.visualization[key]) + + def _dumps_2deeps(self, key1, key2): + self.visualization[key1][key2] = json.dumps(self.visualization[key1][key2]) def _get_pods_and_scenarios(project_name, case_name, installer): diff --git a/utils/test/dashboard/dashboard/elastic2kibana/templates/visualization.json b/utils/test/dashboard/dashboard/elastic2kibana/templates/visualization.json new file mode 100644 index 000000000..d51d4174e --- /dev/null +++ b/utils/test/dashboard/dashboard/elastic2kibana/templates/visualization.json @@ -0,0 +1,32 @@ +{% set vis = vis|default({}) -%} + + +{ + "description": "Kibana visualization for {{ vis.filters }}", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + {% for key, value in vis.filters.iteritems() if key != "metric" %} + {% if not (key == "pod_name" and value == "all") %} + { + "match": { + "{{ key }}": { + "query": "{{ value }}", + "type": "phrase" + } + } + } + {% if not loop.last %} + , + {% endif %} + {% endif %} + {% endfor %} + ] + } + }, + "scenario": 1, + "title": "{{vis.filters.project_name}} {{vis.filters.case_name}} {{vis.filters.installer}} {{vis.filters.metric}} {{vis.filters.pod_name}} {{vis.filters.scenario}}", + "uiStateJSON": {}, + "visState": {{ vis.visState }} +} + |