Sync savanna-ci repo with sahara-ci-config

This CR synchronizes savanna-ci repo with sahara-ci-config repo.
After this patch Sahara-CI will use sahara-ci-config repo.

Change-Id: I371837b6c67a82ba8d596278bfb7f54633bacde1
This commit is contained in:
Sergey Kolekonov 2014-05-05 14:17:38 +04:00
parent ccc714241b
commit 4b6ee92cfa
15 changed files with 117 additions and 73 deletions

View File

@ -4,20 +4,20 @@ export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
VANILLA2_IMAGE_PATH=/home/ubuntu/images/sahara-icehouse-vanilla-2.3.0-ubuntu-13.10.qcow2
VANILLA_IMAGE_PATH=/home/ubuntu/images/savanna-itests-ci-vanilla-image
HDP_IMAGE_PATH=/home/ubuntu/images/savanna-itests-ci-hdp-image-jdk-iptables-off.qcow2
VANILLA_IMAGE_PATH=/home/ubuntu/QA/sahara-icehouse-vanilla-1.2.1-ubuntu-13.10.qcow2
HDP_IMAGE_PATH=/home/ubuntu/QA/centos-6_4-64-hdp-1.3-sk
UBUNTU_IMAGE_PATH=/home/ubuntu/images/ubuntu-12.04.qcow2
IDH_IMAGE_PATH=/home/ubuntu/images/centos-6.4-idh.qcow2
#IDH3_IMAGE_PATH=/home/ubuntu/images/centos-6.4-idh-3.qcow2
IDH3_IMAGE_PATH=/home/ubuntu/images/centos_sahara_idh_3.0.2.qcow2
# setup ci tenant and ci users
CI_TENANT_ID=$(keystone tenant-create --name ci --description 'CI tenant' | grep id | awk '{print $4}')
CI_USER_ID=$(keystone user-create --name ci-user --tenant_id $CI_TENANT_ID --pass nova | grep id | awk '{print $4}')
ADMIN_USER_ID=$(keystone user-list | grep admin | awk '{print $2}' | head -n 1)
MEMBER_ROLE_ID=$(keystone role-list | grep Member | awk '{print $2}')
HEAT_OWNER_ROLE_ID=$(keystone role-list | grep heat_stack_owner | awk '{print $2}')
keystone user-role-add --user $CI_USER_ID --role $MEMBER_ROLE_ID --tenant $CI_TENANT_ID
keystone user-role-add --user $ADMIN_USER_ID --role $MEMBER_ROLE_ID --tenant $CI_TENANT_ID
keystone user-role-add --user $CI_USER_ID --role $HEAT_OWNER_ROLE_ID --tenant $CI_TENANT_ID
keystone user-role-add --user $ADMIN_USER_ID --role $HEAT_OWNER_ROLE_ID --tenant $CI_TENANT_ID
_MEMBER_ROLE_ID=$(keystone role-list | grep _member_ | awk '{print $2}')
keystone user-role-add --user $ADMIN_USER_ID --role $_MEMBER_ROLE_ID --tenant $CI_TENANT_ID
ADMIN_ROLE_ID=$(keystone role-list | grep admin | awk '{print $2}')
@ -27,7 +27,7 @@ keystone user-role-add --user $ADMIN_USER_ID --role $ADMIN_ROLE_ID --tenant $CI_
# setup quota for ci tenant
nova-manage project quota $CI_TENANT_ID --key ram --value 200000
nova-manage project quota $CI_TENANT_ID --key instances --value 100
nova-manage project quota $CI_TENANT_ID --key instances --value 64
nova-manage project quota $CI_TENANT_ID --key cores --value 150
cinder quota-update --volumes 100 $CI_TENANT_ID
cinder quota-update --gigabytes 2000 $CI_TENANT_ID
@ -35,17 +35,18 @@ neutron quota-update --tenant_id $CI_TENANT_ID --port 64
neutron quota-update --tenant_id $CI_TENANT_ID --floatingip 64
# create qa flavor
nova flavor-create --is-public true qa-flavor 20 1024 40 1
nova flavor-create --is-public true qa-flavor 20 2048 40 1
nova flavor-delete m1.small
nova flavor-create --is-public true m1.small 2 1024 20 1
# add images for tests
wget http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-disk1.img
glance image-create --name ubuntu-vanilla-2.3-latest --file $VANILLA2_IMAGE_PATH --disk-format qcow2 --container-format bare --is-public=true --property '_sahara_tag_ci'='True' --property '_sahara_tag_2.3.0'='True' --property '_sahara_tag_vanilla'='True' --property '_sahara_username'='ubuntu'
glance image-create --name savanna-itests-ci-vanilla-image --file $VANILLA_IMAGE_PATH --disk-format qcow2 --container-format bare --is-public=true --property '_sahara_tag_ci'='True' --property '_sahara_tag_1.2.1'='True' --property '_sahara_tag_1.1.2'='True' --property '_sahara_tag_vanilla'='True' --property '_sahara_username'='ubuntu'
glance image-create --name savanna-itests-ci-hdp-image-jdk-iptables-off --file $HDP_IMAGE_PATH --disk-format qcow2 --container-format bare --is-public=true --property '_sahara_tag_ci'='True' --property '_sahara_tag_1.3.2'='True' --property '_sahara_tag_hdp'='True' --property '_sahara_username'='root'
glance image-create --name intel-noepel --file $IDH_IMAGE_PATH --disk-format qcow2 --container-format bare --is-public=true --property '_sahara_tag_ci'='True' --property '_sahara_tag_2.5.1'='True' --property '_sahara_tag_idh'='True' --property '_sahara_username'='cloud-user'
glance image-create --name centos-idh-3.0.2 --file $IDH3_IMAGE_PATH --disk-format qcow2 --container-format bare --is-public=true --property '_sahara_tag_ci'='True' --property '_sahara_tag_3.0.2'='True' --property '_sahara_tag_idh'='True' --property '_sahara_username'='cloud-user'
glance image-create --name ubuntu-12.04 --location http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-disk1.img --disk-format qcow2 --container-format bare --is-public=true
glance image-create --name ubuntu-12.04 --file ubuntu-12.04-server-cloudimg-amd64-disk1.img --disk-format qcow2 --container-format bare --is-public=true
rm ubuntu-12.04-server-cloudimg-amd64-disk1.img
# make Neutron networks shared
PRIVATE_NET_ID=$(neutron net-list | grep private | awk '{print $2}')
@ -59,6 +60,11 @@ neutron subnet-update private-subnet --dns_nameservers list=true 8.8.8.8 8.8.4.4
nova --os-username ci-user --os-password nova --os-tenant-name ci keypair-add public-jenkins > /dev/null
# setup security groups (nova-network only)
#nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
# enable auto assigning of floating ips
#ps -ef | grep -i "nova-network" | grep -v grep | awk '{print $2}' | xargs sudo kill -9
@ -76,3 +82,22 @@ nova --os-username ci-user --os-password nova --os-tenant-name ci keypair-add pu
#nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#setup the default security group for Neutron
CI_TENANT_ID=$(keystone tenant-list | grep $1 | awk '{print $2}' | head -n 1)
for group in $(neutron security-group-list | grep default | awk -F '|' '{ print $2 }')
do
neutron security-group-show $group | grep $CI_TENANT_ID > /dev/null
if [ $? == 0 ]
then
neutron security-group-rule-create --protocol icmp --direction ingress $group
neutron security-group-rule-create --protocol icmp --direction egress $group
neutron security-group-rule-create --protocol tcp --port-range-min 1 --port-range-max 65535 --direction ingress $group
neutron security-group-rule-create --protocol tcp --port-range-min 1 --port-range-max 65535 --direction egress $group
neutron security-group-rule-create --protocol udp --port-range-min 1 --port-range-max 65535 --direction egress $group
neutron security-group-rule-create --protocol udp --port-range-min 1 --port-range-max 65535 --direction ingress $group
break
fi
done

View File

@ -1,6 +1,13 @@
DEST=/srv/stack
DATA_DIR=/srv/stack/data
#CINDER_BRANCH=milestone-proposed
#GLANCE_BRANCH=milestone-proposed
#HORIZON_BRANCH=milestone-proposed
#KEYSTONE_BRANCH=milestone-proposed
#NOVA_BRANCH=milestone-proposed
#NEUTRON_BRANCH=milestone-proposed
#SWIFT_BRANCH=milestone-proposed
#HEAT_BRANCH=milestone-proposed
#EXTRA_OPTS=(force_config_drive=true libvirt_images_type=qcow2 force_raw_images=false instances_path=/mnt/ramdisk)
EXTRA_OPTS=(force_config_drive=true libvirt_images_type=qcow2 force_raw_images=false)
ADMIN_PASSWORD=nova
@ -15,8 +22,6 @@ enable_service s-proxy s-object s-container s-account
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_LOOPBACK_DISK_SIZE=50G
SWIFT_DATA_DIR=/opt/swift
SWIFT_DISK_IMAGE=/opt/swift/drives/swift.img
# Force checkout prerequsites
# FORCE_PREREQ=1
@ -25,7 +30,7 @@ VOLUME_BACKING_FILE_SIZE=100000M
# keystone is now configured by default to use PKI as the token format which produces huge tokens.
# set UUID as keystone token format which is much shorter and easier to work with.
#KEYSTONE_TOKEN_FORMAT=UUID
KEYSTONE_TOKEN_FORMAT=UUID
# Change the FLOATING_RANGE to whatever IPs VM is working in.
# In NAT mode it is subnet VMWare Fusion provides, in bridged mode it is your local network.

View File

@ -27,13 +27,13 @@ sudo bash -xe install_puppet.sh
sudo git clone https://review.openstack.org/p/openstack-infra/config.git \
/root/config
sudo /bin/bash /root/config/install_modules.sh
if [ -z "$NODEPOOL_SSH_KEY" ] ; then
sudo puppet apply --modulepath=/root/config/modules:/etc/puppet/modules \
-e "class {'openstack_project::single_use_slave': sudo => $SUDO, bare => $BARE, }"
else
sudo puppet apply --modulepath=/root/config/modules:/etc/puppet/modules \
-e "class {'openstack_project::single_use_slave': install_users => false, sudo => $SUDO, bare => $BARE, ssh_key => '$NODEPOOL_SSH_KEY', }"
fi
#if [ -z "$NODEPOOL_SSH_KEY" ] ; then
sudo puppet apply --modulepath=/root/config/modules:/etc/puppet/modules \
-e "class {'openstack_project::single_use_slave': sudo => $SUDO, bare => $BARE, }"
#else
# sudo puppet apply --modulepath=/root/config/modules:/etc/puppet/modules \
# -e "class {'openstack_project::single_use_slave': install_users => false, sudo => $SUDO, bare => $BARE, ssh_key => '$NODEPOOL_SSH_KEY', }"
#fi
sudo mkdir -p /opt/git
#sudo -i python /opt/nodepool-scripts/cache_git_repos.py
@ -51,6 +51,12 @@ sudo service mysql stop
sudo pip install python-glanceclient
sudo apt-get install qemu kpartx -y
sudo su - jenkins -c "echo 'JENKINS_PUBLIC_KEY' >> /home/jenkins/.ssh/authorized_keys"
#install Sahara requirements
sudo pip install mysql-python
cd /tmp && git clone https://github.com/openstack/sahara
cd sahara && sudo pip install -U -r requirements.txt
sudo su - jenkins -c "echo '
JENKINS_PUBLIC_KEY' >> /home/jenkins/.ssh/authorized_keys"
sync
sleep 20

View File

@ -15,7 +15,7 @@ sudo ufw disable
sudo add-apt-repository ppa:openstack-ubuntu-testing/icehouse -y
sudo apt-get update
sudo apt-get install libstdc++5 xvfb nodejs openstack-dashboard xserver-xorg -y
sudo apt-get install libstdc++5 nodejs openstack-dashboard xserver-xorg -y
/usr/bin/yes | sudo pip install lesscpy mox
sudo iptables -F
sudo sed -i "s/'openstack_dashboard'/'saharadashboard',\n 'openstack_dashboard'/g" /usr/share/openstack-dashboard/openstack_dashboard/settings.py

View File

@ -9,7 +9,7 @@ pipelines:
- event: patchset-created
- event: change-restored
- event: comment-added
comment_filter: (?i)^\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug)|( savanna-ci)|( sahara-ci))\s*$
comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug)|( savanna-ci)|( sahara-ci))\s*$
- event: comment-added
require-approval:
- username: savanna-ci
@ -39,8 +39,6 @@ projects:
- gate-sahara-integration-heat-vanilla1
- gate-sahara-integration-hdp
- gate-sahara-integration-transient
- gate-sahara-integration-idh2
- gate-sahara-integration-idh3
- name: openstack/sahara-dashboard
check:
@ -60,5 +58,3 @@ jobs:
- name: ^.*$
parameter-function: set_ci_tenant
branch: ^(master|milestone-proposed)$
- name: ^.*(idh2|idh3)$
branch: ^(stable/icehouse|milestone-proposed)$

View File

@ -6,7 +6,7 @@
- gerrit-git-prep
- shell: "rm -rf sahara-ci-config\
\ngit clone https://github.com/stackforge/sahara-ci-config\
\nbash -x sahara-ci-config/scripts/diskimage-creating-integration.sh {image}"
\nbash -x sahara-ci-config/slave-scripts/diskimage-creating-integration.sh {image}"
properties:
- zeromq-event

View File

@ -18,7 +18,7 @@
- gerrit-git-prep
- shell: "rm -rf sahara-ci-config\
\ngit clone https://github.com/stackforge/sahara-ci-config\
\nbash -x sahara-ci-config/scripts/gate-ui-tests.sh"
\nbash -x sahara-ci-config/slave-scripts/gate-ui-tests.sh"
publishers:
- console-log

View File

@ -6,9 +6,14 @@
- gerrit-git-prep
- shell: "rm -rf sahara-ci-config\
\ngit clone https://github.com/stackforge/sahara-ci-config\
\nbash -x sahara-ci-config/scripts/gate-savanna-integration-new.sh"
\nbash -x sahara-ci-config/slave-scripts/gate-savanna-integration-new.sh"
properties:
- zeromq-event
wrappers:
- timeout:
timeout: 120
fail: true
- timestamps
publishers:
- console-log
- trigger-parameterized-builds:
@ -28,8 +33,6 @@
- heat-vanilla1
- heat-vanilla2
- heat-hdp
- idh2
- idh3
- transient
jobs:
- 'gate-sahara-integration-{plugin}'
@ -56,7 +59,9 @@
description:
builders:
- shell: "bash -x /opt/ci/jenkins-jobs/sahara-ci-config/scripts/integration-cleanup.sh"
- shell: "rm -rf sahara-ci-config\
\ngit clone https://github.com/stackforge/sahara-ci-config\
\nbash -x sahara-ci-config/slave-scripts/integration-cleanup.sh"
- job:
name: gate-savanna-pep8-trunk
@ -73,7 +78,7 @@
- gerrit-git-prep
- shell: "rm -rf sahara-ci-config\
\ngit clone https://github.com/stackforge/sahara-ci-config\
\nbash -x sahara-ci-config/scripts/gate-savanna-pep8-trunk.sh"
\nbash -x sahara-ci-config/slave-scripts/gate-savanna-pep8-trunk.sh"
publishers:
- console-log

View File

@ -20,4 +20,4 @@
- timed: '0 6 * * *'
builders:
- shell: "bash -e /opt/ci/jenkins-jobs/sahara-ci-config/scripts/update_pool.sh"
- shell: "bash -e /opt/ci/jenkins-jobs/sahara-ci-config/slave-scripts/update_pool.sh"

View File

@ -56,7 +56,7 @@ CLUSTER_CONFIG_TEST=True
EDP_TEST=False
MAP_REDUCE_TEST=False
SWIFT_TEST=True
SCALING_TEST=False
SCALING_TEST=True
TRANSIENT_TEST=True
VANILLA_IMAGE=ci-${image_type}-${GERRIT_CHANGE_NUMBER}-hadoop_1
VANILLA_TWO_IMAGE=ci-${image_type}-${GERRIT_CHANGE_NUMBER}-hadoop_2
@ -89,6 +89,7 @@ export ADDR=`ifconfig eth0| awk -F ' *|:' '/inet addr/{print $4}'`
git clone https://review.openstack.org/openstack/sahara
cd sahara
sudo pip install .
echo "[DEFAULT]
" >> etc/sahara/sahara.conf
@ -104,7 +105,6 @@ os_admin_password=nova
os_admin_tenant_name=ci
use_identity_api_v3=true
use_neutron=true
plugins=vanilla,hdp,idh
[database]
connection=mysql://savanna-citest:savanna-citest@localhost/savanna?charset=utf8" >> etc/sahara/sahara.conf
@ -139,9 +139,9 @@ echo "
index_url = https://sahara.mirantis.com/pypi/
" > ~/.pydistutils.cfg
tox -evenv -- sahara-db-manage --config-file etc/sahara/sahara.conf upgrade head
sahara-db-manage --config-file etc/sahara/sahara.conf upgrade head
screen -dmS sahara-api /bin/bash -c "PYTHONUNBUFFERED=1 tox -evenv -- sahara-api --config-file etc/sahara/sahara.conf -d --log-file log.txt | tee /tmp/tox-log.txt"
screen -dmS sahara-api /bin/bash -c "PYTHONUNBUFFERED=1 sahara-api --config-file etc/sahara/sahara.conf -d --log-file log.txt | tee /tmp/tox-log.txt"
cd /tmp/sahara
export ADDR=`ifconfig eth0| awk -F ' *|:' '/inet addr/{print $4}'`

View File

@ -3,6 +3,7 @@
#this is to fix bug with testtools==0.9.35
#sed 's/testtools>=0.9.32/testtools==0.9.34/' -i test-requirements.txt
sudo pip install .
export PIP_USE_MIRRORS=True
@ -64,13 +65,7 @@ then
fi
if [ $JOB_TYPE == 'transient' ]
then
SSH_USERNAME=ubuntu
CINDER_TEST=True
CLUSTER_CONFIG_TEST=True
EDP_TEST=True
MAP_REDUCE_TEST=True
SWIFT_TEST=True
SCALING_TEST=True
EDP_TEST=False
TRANSIENT_TEST=False
ONLY_TRANSIENT_TEST=True
HEAT_JOB=False
@ -125,10 +120,15 @@ os_admin_password=nova
os_admin_tenant_name=ci
use_identity_api_v3=true
use_neutron=true
min_transient_cluster_active_time=120
plugins=vanilla,hdp,idh
[database]
connection=mysql://savanna-citest:savanna-citest@localhost/savanna?charset=utf8" >> etc/sahara/sahara.conf
connection=mysql://savanna-citest:savanna-citest@localhost/savanna?charset=utf8
[keystone_authtoken]
auth_uri=http://172.18.168.42:5000/v2.0/
identity_uri=http://172.18.168.42:35357/
admin_user=ci-user
admin_password=nova
admin_tenant_name=ci
" >> etc/sahara/sahara.conf
echo "----------- sahara.conf -----------"
cat etc/sahara/sahara.conf
@ -162,14 +162,14 @@ echo "
index_url = https://sahara.mirantis.com/pypi/
" > ~/.pydistutils.cfg
tox -evenv -- sahara-db-manage --config-file etc/sahara/sahara.conf upgrade head
sahara-db-manage --config-file etc/sahara/sahara.conf upgrade head
STATUS=`echo $?`
if [[ "$STATUS" != 0 ]]
then
exit 1
fi
screen -dmS sahara-api /bin/bash -c "PYTHONUNBUFFERED=1 tox -evenv -- sahara-api --config-file etc/sahara/sahara.conf -d --log-file log.txt | tee /tmp/tox-log.txt"
screen -dmS sahara-api /bin/bash -c "PYTHONUNBUFFERED=1 sahara-api --config-file etc/sahara/sahara.conf -d --log-file log.txt | tee /tmp/tox-log.txt"
export ADDR=`ifconfig eth0| awk -F ' *|:' '/inet addr/{print $4}'`
@ -314,7 +314,7 @@ cd $WORKSPACE && .tox/integration/bin/pip freeze
screen -S sahara-api -X quit
echo "-----------Python sahara env-----------"
cd $WORKSPACE && .tox/venv/bin/pip freeze
pip freeze
echo "-----------Sahara Log------------"
cat $WORKSPACE/log.txt

View File

@ -65,17 +65,15 @@ os_admin_password=nova
os_admin_tenant_name=ci
use_floating_ips=true
use_neutron=true
plugins=vanilla,hdp,idh
[database]
connection=mysql://savanna-citest:savanna-citest@localhost/savanna?charset=utf8" > sahara.conf
git clone https://github.com/openstack/sahara
cd sahara
sudo pip install .
export PIP_USE_MIRRORS=True
tox -evenv -- sahara-db-manage --config-file $HOME/sahara.conf upgrade head
screen -dmS sahara /bin/bash -c "PYTHONUNBUFFERED=1 tox -evenv -- sahara-api --config-file $HOME/sahara.conf -d --log-file /tmp/sahara.log"
sahara-db-manage --config-file $HOME/sahara.conf upgrade head
screen -dmS sahara /bin/bash -c "PYTHONUNBUFFERED=1 sahara-api --config-file $HOME/sahara.conf -d --log-file /tmp/sahara.log"
i=0
while true
@ -104,7 +102,7 @@ base_url = 'http://127.0.0.1/horizon'
user = 'ci-user'
password = 'nova'
tenant = 'ci'
flavor = 'm1.small'
flavor = 'qa-flavor'
neutron_management_network = 'private'
floationg_ip_pool = 'public'
keystone_url = 'http://172.18.168.42:5000/v2.0'

View File

@ -1,8 +1,16 @@
#!/bin/bash
cd /opt/ci/jenkins-jobs/sahara-ci-config/slave-scripts
sleep 20
cd /opt/ci/jenkins-jobs/savanna-ci/scripts
JOB_TYPE=$(echo $PREV_JOB | awk -F '-' '{ print $4 }')
if [ $JOB_TYPE == 'vanilla1' ]
then
JOB_TYPE=vanilla-v1
elif [ $JOB_TYPE == 'vanilla2' ]
then
JOB_TYPE=vanilla-v2
fi
if [ $JOB_TYPE == 'heat' ]
then
@ -12,6 +20,6 @@ then
JOB_TYPE=vanilla-v1
fi
python cleanup.py cleanup-heat ci-$PREV_BUILD-$JOB_TYPE
else
python cleanup.py cleanup -$PREV_BUILD-
else
python cleanup.py cleanup -$PREV_BUILD-$JOB_TYPE
fi

View File

@ -2,9 +2,9 @@
source $JENKINS_HOME/credentials
sed "s%-CI_TENANT_ID-%$CI_TENANT_ID%g" -i $WORKSPACE/config/zuul/openstack_functions.py
sed "s%-CI_TENANT_ID-%$CI_TENANT_ID%g" -i $WORKSPACE/scripts/credentials.conf
sed "s%-CI_TENANT_ID-%$CI_TENANT_ID%g" -i $WORKSPACE/slave-scripts/credentials.conf
sudo su - jenkins -c "cat $WORKSPACE/scripts/credentials.conf > /opt/ci/jenkins-jobs/credentials.conf"
sudo su - jenkins -c "cat $WORKSPACE/slave-scripts/credentials.conf > /opt/ci/jenkins-jobs/credentials.conf"
sudo su - zuul -c "cat $WORKSPACE/config/zuul/zuul.conf > /etc/zuul/zuul.conf"
sudo su - zuul -c "cat $WORKSPACE/config/zuul/gearman-logging.conf > /etc/zuul/gearman-logging.conf"
sudo su - zuul -c "cat $WORKSPACE/config/zuul/layout.yaml > /etc/zuul/layout.yaml"
@ -17,6 +17,6 @@ sed "s%apikey: JENKINS_API_KEY%apikey: $JENKINS_API_KEY%g" -i $WORKSPACE/config/
sed "s%credentials-id: CREDENTIALS_ID%credentials-id: $CREDENTIALS_ID%g" -i $WORKSPACE/config/nodepool/savanna.yaml
sudo su - nodepool -c "cat $WORKSPACE/config/nodepool/savanna.yaml > /etc/nodepool/nodepool.yaml"
sed "s%MYSQL_PASS=MYSQL_ROOT_PASSWORD%MYSQL_PASS=$MYSQL_ROOT_PASSWORD%g" -i $WORKSPACE/config/infra-config/prepare_node.sh
sed "s%JENKINS_PUBLIC_KEY%$JENKINS_PUBLIC_KEY%g" -i $WORKSPACE/config/infra-config/prepare_node.sh
cp $WORKSPACE/config/infra-config/* /opt/ci/config/modules/openstack_project/files/nodepool/scripts/
sed "s%MYSQL_PASS=MYSQL_ROOT_PASSWORD%MYSQL_PASS=$MYSQL_ROOT_PASSWORD%g" -i $WORKSPACE/config/nodepool/scripts/prepare_node.sh
sed "s%JENKINS_PUBLIC_KEY%$JENKINS_PUBLIC_KEY%g" -i $WORKSPACE/config/nodepool/scripts/prepare_node.sh
cp $WORKSPACE/config/nodepool/scripts/* /opt/ci/config/modules/openstack_project/files/nodepool/scripts/

View File

@ -1,6 +1,7 @@
#!/bin/bash
#jenkins-cli -s http://127.0.0.1:8080/jenkins quiet-down
#sleep 5
for i in $(nodepool-client list | grep ci-lab | awk -F '|' '{ print $2 }'); do nodepool-client delete $i; done
#jenkins-cli -s http://127.0.0.1:8080/jenkins cancel-quiet-down
for i in $(nodepool-client list | grep ci-lab | awk -F '|' '{ print $2 }')
do
nodepool-client delete $i
sleep 2
done