summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/artifacts.opnfv.org.sh8
-rw-r--r--utils/build-server-ansible/inventory.ini8
-rw-r--r--utils/build-server-ansible/main.yml41
-rw-r--r--utils/build-server-ansible/vars/CentOS.yml76
-rw-r--r--utils/build-server-ansible/vars/Ubuntu.yml88
-rw-r--r--utils/build-server-ansible/vars/defaults.yml23
-rw-r--r--utils/build-server-ansible/vars/docker-compose-CentOS.yml12
-rw-r--r--utils/build-server-ansible/vars/docker-compose-Ubuntu.yml12
-rwxr-xr-xutils/fetch_k8_conf.sh3
-rwxr-xr-xutils/fetch_os_creds.sh2
-rwxr-xr-xutils/jenkins-jnlp-connect.sh24
-rw-r--r--utils/push-test-logs.sh9
-rwxr-xr-xutils/retention_script.sh5
13 files changed, 26 insertions, 285 deletions
diff --git a/utils/artifacts.opnfv.org.sh b/utils/artifacts.opnfv.org.sh
index 1984b4992..2b35006d4 100755
--- a/utils/artifacts.opnfv.org.sh
+++ b/utils/artifacts.opnfv.org.sh
@@ -31,7 +31,7 @@ do
for index in $(gsutil ls -l gs://artifacts.opnfv.org/logs/"$project"/ |awk 'NF==1'| sed s,gs://artifacts.opnfv.org/,, )
do
index="$(echo ${index%/*} | sed s,/,_,g)"
- echo "<LI><a href=\"http://artifacts.opnfv.org/${index%/*}.html\">"$index"</a></LI>" >> $OUTPUT
+ echo "<LI><a href=\"https://artifacts.opnfv.org/${index%/*}.html\">"$index"</a></LI>" >> $OUTPUT
done
done
@@ -55,7 +55,7 @@ rm -f $OUTPUT
echo "<LI>$path</LI>" >> $OUTPUT
echo "</UL>" >> $OUTPUT
else
- echo "<LI><a href=\"http://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
+ echo "<LI><a href=\"https://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
fi
done
@@ -85,7 +85,7 @@ rm -f $OUTPUT
echo "<LI>$path</LI>" >> $OUTPUT
echo "</UL>" >> $OUTPUT
else
- echo "<LI><a href=\"http://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
+ echo "<LI><a href=\"https://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
fi
done
@@ -119,7 +119,7 @@ do
echo "<LI>$path</LI>" >> $OUTPUT
echo "</UL>" >> $OUTPUT
else
- echo "<LI><a href=\"http://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
+ echo "<LI><a href=\"https://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
fi
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 c9f244bee..000000000
--- a/utils/build-server-ansible/main.yml
+++ /dev/null
@@ -1,41 +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"
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 f50255868..000000000
--- a/utils/build-server-ansible/vars/Ubuntu.yml
+++ /dev/null
@@ -1,88 +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
-
-- 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 8d83380dd..000000000
--- a/utils/build-server-ansible/vars/defaults.yml
+++ /dev/null
@@ -1,23 +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
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 9debb45b7..62c964da7 100644
--- a/utils/push-test-logs.sh
+++ b/utils/push-test-logs.sh
@@ -24,12 +24,13 @@ 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' \
@@ -64,11 +65,11 @@ if [ -d "$dir_result" ]; then
else
echo "Uploading logs to artifact $project_artifact"
gsutil -m cp -r "$dir_result"/* gs://artifacts.opnfv.org/"$project_artifact"/ >/dev/null 2>&1
- echo "Logs can be found in http://artifacts.opnfv.org/logs_${project}_${testbed}.html"
+ echo "Logs can be found in https://artifacts.opnfv.org/logs_${project}_${testbed}.html"
cd $dir_result
files=($(find . -name \* -print|sed 's/^\.//'|sed '/^\s*$/d'))
for f in ${files[@]}; do
- echo "http://artifacts.opnfv.org/${project_artifact}${f}"
+ echo "https://artifacts.opnfv.org/${project_artifact}${f}"
done
fi
fi
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"