diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/build-server-ansible/inventory.ini | 8 | ||||
-rw-r--r-- | utils/build-server-ansible/main.yml | 46 | ||||
-rw-r--r-- | utils/build-server-ansible/vars/CentOS.yml | 76 | ||||
-rw-r--r-- | utils/build-server-ansible/vars/Ubuntu.yml | 158 | ||||
-rw-r--r-- | utils/build-server-ansible/vars/defaults.yml | 27 | ||||
-rw-r--r-- | utils/build-server-ansible/vars/docker-compose-CentOS.yml | 12 | ||||
-rw-r--r-- | utils/build-server-ansible/vars/docker-compose-Ubuntu.yml | 12 | ||||
-rwxr-xr-x | utils/fetch_k8_conf.sh | 3 | ||||
-rwxr-xr-x | utils/fetch_os_creds.sh | 2 | ||||
-rwxr-xr-x | utils/jenkins-jnlp-connect.sh | 24 | ||||
-rw-r--r-- | utils/push-test-logs.sh | 8 | ||||
-rwxr-xr-x | utils/retention_script.sh | 5 |
12 files changed, 21 insertions, 360 deletions
diff --git a/utils/build-server-ansible/inventory.ini b/utils/build-server-ansible/inventory.ini deleted file mode 100644 index 115b1306e..000000000 --- a/utils/build-server-ansible/inventory.ini +++ /dev/null @@ -1,8 +0,0 @@ -############################################################################# -# Copyright (c) 2016 The 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 -############################################################################## -localhost ansible_connection=local diff --git a/utils/build-server-ansible/main.yml b/utils/build-server-ansible/main.yml deleted file mode 100644 index 1df8a0400..000000000 --- a/utils/build-server-ansible/main.yml +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################ -# Copyright (c) 2016 The 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 -############################################################################# ---- -- hosts: "localhost" - become: "True" - tasks: - - debug: - msg: "{{ inventory_hostname }} is {{ ansible_distribution }}" - - include_vars: vars/defaults.yml - - include: vars/CentOS.yml - when: ansible_distribution == "CentOS" - - include: vars/Ubuntu.yml - when: ansible_distribution == "Ubuntu" - - name: Install Docker. - package: name={{ docker_package }} state={{ docker_package_state }} - - name: Ensure Docker is started and enabled at boot. - service: - name: docker - state: started - enabled: "yes" - - name: install gsutil - pip: - name: gsutil - state: present - - name: install tox - pip: - name: tox - state: present - - name: install yamllint - pip: - name: yamllint - state: present - - include: vars/docker-compose-CentOS.yml - when: ansible_distribution == "CentOS" - - include: vars/docker-compose-Ubuntu.yml - when: ansible_distribution == "Ubuntu" - - name: Install manifest-tool - get_url: - url: '{{ manifest_tool_url }}/{{ manifest_tool_version }}/manifest-tool-linux-{{ facter_architecture }}' - dest: '{{ manifest_tool_bin_dir }}/manifest-tool' - mode: '755' diff --git a/utils/build-server-ansible/vars/CentOS.yml b/utils/build-server-ansible/vars/CentOS.yml deleted file mode 100644 index 7a2c1d1d5..000000000 --- a/utils/build-server-ansible/vars/CentOS.yml +++ /dev/null @@ -1,76 +0,0 @@ -############################################################################ -# Copyright (c) 2016 The 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 -############################################################################ ---- -- name: Ensure old versions of Docker are not installed. - package: - name: '{{ item }}' - state: absent - with_items: - - docker - - docker-common - - docker-engine - -- name: Add Docker GPG key. - rpm_key: - key: https://download.docker.com/linux/centos/gpg - state: present - -- name: Ensure epel is installed. - yum: - name: epel-release - state: present -- name: Ensure depdencies are installed. - yum: - name: "{{ item }}" - state: present - with_items: - - python-pip - - rpm-build - - kernel-headers - - libpcap-devel - - zlib-devel - - numactl-devel - - doxygen - - python-sphinx - - libvirt-devel - - python-devel - - openssl-devel - - python-six - - net-tools - - bc - - sysstat - - xmlstarlet - - facter - - jq - -- name: install the 'Development tools' package group - yum: - name: "@Development tools" - state: present - -- name: Add Docker repository. - get_url: - url: "{{ docker_yum_repo_url }}" - dest: '/etc/yum.repos.d/docker-ce.repo' - owner: root - group: root - mode: 0644 - -- name: Configure Docker Edge repo. - ini_file: - dest: '/etc/yum.repos.d/docker-ce.repo' - section: 'docker-ce-edge' - option: enabled - value: '{{ docker_yum_repo_enable_edge }}' - -- name: Configure Docker Test repo. - ini_file: - dest: '/etc/yum.repos.d/docker-ce.repo' - section: 'docker-ce-test' - option: enabled - value: '{{ docker_yum_repo_enable_test }}' diff --git a/utils/build-server-ansible/vars/Ubuntu.yml b/utils/build-server-ansible/vars/Ubuntu.yml deleted file mode 100644 index bd77a4d10..000000000 --- a/utils/build-server-ansible/vars/Ubuntu.yml +++ /dev/null @@ -1,158 +0,0 @@ -############################################################################# -# Copyright (c) 2016 The 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 -############################################################################# ---- -- name: Ensure old versions of Docker are not installed. - package: - name: '{{ item }}' - state: absent - with_items: - - docker - - docker-engine - -- name: Ensure depdencies are installed. - apt: - name: "{{ item }}" - state: present - with_items: - - apt-transport-https - - ca-certificates - - git - - build-essential - - curl - - wget - - rpm - - fuseiso - - createrepo - - genisoimage - - libfuse-dev - - dh-autoreconf - - pkg-config - - zlib1g-dev - - libglib2.0-dev - - libpixman-1-dev - - python-virtualenv - - python-dev - - libffi-dev - - libssl-dev - - libxml2-dev - - libxslt1-dev - - bc - - qemu-kvm - - libvirt-bin - - ubuntu-vm-builder - - bridge-utils - - monit - - openjdk-8-jre-headless - - python-nose - - dirmngr - - collectd - - flex - - bison - - libnuma-dev - - shellcheck - - python-pip - - sysstat - - xmlstarlet - - facter - - jq - - python-tox - - collectd-dev - - python3 - - python3-dev - - libdpdk-dev - - dpdk-dev - - fakeroot - - devscripts - - debhelper - - dpkg-dev - - po-debconf - - dh-systemd - - dh-strip-nondeterminism - - autotools-dev - - libltdl-dev - - iptables-dev - - javahelper - - libatasmart-dev - - libcap-dev - - libcurl4-gnutls-dev - - libdbi0-dev - - libesmtp-dev - - libganglia1-dev - - libgcrypt11-dev - - libgps-dev - - libhiredis-dev - - libi2c-dev - - libldap2-dev - - liblua5.3-dev - - liblvm2-dev - - libmemcached-dev - - libmodbus-dev - - libmnl-dev - - libmosquitto-dev - - libmysqlclient-dev - - libnotify-dev - - libopenipmi-dev - - liboping-dev - - libow-dev - - libpcap0.8-dev - - libpcap-dev - - libperl-dev - - libpq-dev - - libprotobuf-c-dev - - libriemann-client-dev - - librdkafka-dev - - librabbitmq-dev - - librrd-dev - - libsensors4-dev - - libsigrok-dev - - libsnmp-dev - - libsnmp9-dev - - snmp - - snmp-mibs-downloader - - snmpd - - perl - - libtokyocabinet-dev - - libtokyotyrant-dev - - libudev-dev - - libupsclient-dev - - libvarnishapi-dev - - libvirt-dev - - libvirt-daemon - - libxen-dev - - libyajl-dev - - linux-libc-dev - - default-jdk - - protobuf-c-compiler - - openvswitch-switch - - mcelog - -- name: Add Docker apt key. - apt_key: - url: https://download.docker.com/linux/ubuntu/gpg - id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 - state: present - register: add_repository_key - ignore_errors: true - -- name: Ensure curl is present (on older systems without SNI). - package: name=curl state=present - when: add_repository_key|failed - -- name: Add Docker apt key (alternative for older systems without SNI). - # yamllint disable rule:line-length - shell: "curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -" - # yamllint enable rule:line-length - args: - warn: "no" - when: add_repository_key|failed - -- name: Add Docker repository. - apt_repository: - repo: "{{ docker_apt_repository }}" - state: present - update_cache: "yes" diff --git a/utils/build-server-ansible/vars/defaults.yml b/utils/build-server-ansible/vars/defaults.yml deleted file mode 100644 index ff37c953c..000000000 --- a/utils/build-server-ansible/vars/defaults.yml +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################# -# Copyright (c) 2016 The 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 -############################################################################# ---- -docker_package: "docker-ce" -docker_package_state: present - -# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed. -docker_apt_release_channel: stable -# yamllint disable rule:line-length -docker_apt_repository: "deb https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" -# yamllint enable rule:line-length - -# Used only for RedHat/CentOS. -# yamllint disable rule:line-length -docker_yum_repo_url: https://download.docker.com/linux/centos/docker-ce.repo -# yamllint enable rule:line-length -docker_yum_repo_enable_edge: 0 -docker_yum_repo_enable_test: 0 - -manifest_tool_version: 'v0.7.0' -manifest_tool_url: 'https://github.com/estesp/manifest-tool/releases/download' -manifest_tool_bin_dir: '/usr/local/bin' diff --git a/utils/build-server-ansible/vars/docker-compose-CentOS.yml b/utils/build-server-ansible/vars/docker-compose-CentOS.yml deleted file mode 100644 index fc4bcba7e..000000000 --- a/utils/build-server-ansible/vars/docker-compose-CentOS.yml +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################# -# Copyright (c) 2016 The 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 -############################################################################## ---- -- name: Ensure docker compose is installed. - yum: - name: 'docker-compose' - state: present diff --git a/utils/build-server-ansible/vars/docker-compose-Ubuntu.yml b/utils/build-server-ansible/vars/docker-compose-Ubuntu.yml deleted file mode 100644 index f985b6a4d..000000000 --- a/utils/build-server-ansible/vars/docker-compose-Ubuntu.yml +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################# -# Copyright (c) 2016 The 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 -############################################################################# ---- -- name: Ensure docker compose is installed - apt: - name: 'docker-compose' - state: present diff --git a/utils/fetch_k8_conf.sh b/utils/fetch_k8_conf.sh index 32c07f8b6..e5e237d03 100755 --- a/utils/fetch_k8_conf.sh +++ b/utils/fetch_k8_conf.sh @@ -59,6 +59,9 @@ if [ "$installer_type" == "compass" ]; then info "Fetch admin.conf successfully" elif [ "$installer_type" == "joid" ]; then info "Do nothing, config file has been provided in $HOME/joid_config/config for joid" +elif [ "$installer_type" == "fuel" ]; then + info "Getting kubernetes config ..." + docker cp -L fuel:/opt/kubernetes.config $dest_path else error "Installer $installer_type is not supported by this script" fi diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 501095036..4a66187e5 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -113,7 +113,7 @@ if [ "$installer_type" == "fuel" ]; then ssh ${ssh_options} "${ssh_user}@${controller_ip}" \ "sudo cat /root/keystonercv3" > "${dest_path}" - if [[ ! "${BUILD_TAG}" =~ 'virtual' ]]; then + if [[ ! "${DEPLOY_SCENARIO}" =~ -noha$ ]]; then ssh ${ssh_options} "${ssh_user}@${installer_ip}" \ "cat /etc/ssl/certs/os_cacert" > "${os_cacert}" fi diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index 0647d3210..4716af9a2 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -8,7 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -#Monit setup script for opnfv jnlp slave connections +#Monit setup script for opnfv jnlp agent connections test_firewall() { jenkins_hostname="${jenkins_hostname:-build.opnfv.org}" @@ -25,7 +25,7 @@ LF firewall not open, please send a report to helpdesk with your gpg key attache opnfv-helpdesk@rt.linuxfoundation.org Jenkins Home: $jenkinshome Jenkins User: $jenkinsuser -Slave Name: $slave_name +Slave Name: $agent_name IP Address: $(curl -s http://icanhazip.com) EOF exit 1 @@ -44,8 +44,8 @@ main () { exit 1 fi - if [[ -z $slave_name || -z $slave_secret ]]; then - echo "slave name or secret not defined, please edit this file to define it" + if [[ -z $agent_name || -z $agent_secret ]]; then + echo "agent name or secret not defined, please edit this file to define it" exit 1 fi @@ -141,8 +141,8 @@ depends on jenkins_piddir\ fi if [[ $started_monit == "true" ]]; then - wget --timestamping https://"$jenkins_hostname"/jnlpJars/slave.jar && true - chown $jenkinsuser:$jenkinsuser slave.jar + wget --timestamping https://"$jenkins_hostname"/jnlpJars/agent.jar && true + chown $jenkinsuser:$jenkinsuser agent.jar if [[ -f /var/run/$jenkinsuser/jenkins_jnlp_pid ]]; then echo "pid file found" @@ -173,8 +173,8 @@ 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 +jenkins-jnlp-connect.sh configures monit to keep agent connection up +Checks for new versions of agent.jar run as root to create pid directory and create monit config. can be run as root additional times if you change variables and need to update monit config. after running as root you should see "you are ready to start monit" @@ -183,7 +183,7 @@ usage: $0 [OPTIONS] -h show this message -j set jenkins home -u set jenkins user - -n set slave name + -n set agent name -s set secret key -l set host, default is build.opnfv.org/ci -t test the connection string by connecting without monit @@ -205,8 +205,8 @@ do case $OPTION in j ) jenkinshome="$OPTARG" ;; u ) jenkinsuser="$OPTARG" ;; - n ) slave_name="$OPTARG" ;; - s ) slave_secret="$OPTARG";; + n ) agent_name="$OPTARG" ;; + s ) agent_secret="$OPTARG";; l ) jenkins_hostname="$OPTARG" ;; h ) usage ;; t ) started_monit=true @@ -218,5 +218,5 @@ do done jenkins_hostname="${jenkins_hostname:-build.opnfv.org/ci}" -connectionstring="java -jar slave.jar -jnlpUrl https://"$jenkins_hostname"/computer/"$slave_name"/slave-agent.jnlp -secret "$slave_secret" -noCertificateCheck " +connectionstring="java -jar agent.jar -jnlpUrl https://"$jenkins_hostname"/computer/"$agent_name"/slave-agent.jnlp -secret "$agent_secret" -noCertificateCheck " main "$@" diff --git a/utils/push-test-logs.sh b/utils/push-test-logs.sh index 075a62233..62c964da7 100644 --- a/utils/push-test-logs.sh +++ b/utils/push-test-logs.sh @@ -24,17 +24,17 @@ node_list=(\ 'lf-pod1' 'lf-pod2' \ 'lf-virtual2' 'lf-virtual3' \ 'intel-pod12' 'intel-pod18' \ +'itri-pod1' \ 'ericsson-pod1' 'ericsson-pod2' \ 'ericsson-virtual1' 'ericsson-virtual2' 'ericsson-virtual3' \ 'ericsson-virtual4' 'ericsson-virtual5' \ -'arm-pod5' 'arm-pod6' \ +'arm-pod9' 'arm-pod10' \ 'huawei-pod1' 'huawei-pod2' 'huawei-pod3' 'huawei-pod4' \ -'huawei-pod6' 'huawei-pod7' 'huawei-pod12' \ +'huawei-pod6' 'huawei-pod7' 'huawei-pod12' 'huawei-pod8' \ 'huawei-virtual1' 'huawei-virtual2' 'huawei-virtual3' 'huawei-virtual4' \ 'huawei-virtual5' 'huawei-virtual8' 'huawei-virtual9' \ 'zte-pod2' 'zte-pod3' 'zte-pod9' \ -'zte-virtual1' \ -'arm-virtual3') +'zte-virtual1') if [[ ! " ${node_list[@]} " =~ " ${testbed} " ]]; then diff --git a/utils/retention_script.sh b/utils/retention_script.sh index b2177930b..3d0673ad0 100755 --- a/utils/retention_script.sh +++ b/utils/retention_script.sh @@ -15,10 +15,7 @@ # limitations under the License. ############################################################################## -PATH=$PATH:/usr/local/bin/ - -#These are the only projects that generate artifacts -for x in armband ovsnfv fuel apex compass4nfv +for x in airship apex armband compass4nfv fuel ovsnfv do echo "Looking at artifacts for project $x" |