diff --git a/config/nodepool/sahara.yaml b/config/nodepool/sahara.yaml index 71272ed2..5439df7a 100644 --- a/config/nodepool/sahara.yaml +++ b/config/nodepool/sahara.yaml @@ -1,5 +1,4 @@ script-dir: /opt/ci/files/nodepool-scripts -dburi: 'mysql://nodepool@localhost/nodepool' cron: check: '*/1 * * * *' @@ -27,10 +26,11 @@ providers: username: 'ci-user' password: 'nova' auth-url: 'http://172.18.168.42:5000/v2.0' - project-id: 'ci' + project-name: 'ci' max-servers: 6 boot-timeout: 120 - pool: public + ipv6-preferred: False + pool: 'public' networks: - net-id: 'LAB_42_PRIVATE_NETWORK_ID' images: @@ -43,10 +43,11 @@ providers: username: 'ci-user' password: 'nova' auth-url: 'http://172.18.168.43:5000/v2.0' - project-id: 'ci' + project-name: 'ci' max-servers: 6 boot-timeout: 120 - pool: public + ipv6-preferred: False + pool: 'public' networks: - net-id: 'LAB_43_PRIVATE_NETWORK_ID' images: @@ -58,8 +59,3 @@ providers: targets: - name: sahara-gate - jenkins: - url: http://127.0.0.1/jenkins - user: admin - apikey: JENKINS_API_KEY - credentials-id: CREDENTIALS_ID diff --git a/config/nodepool/secure.conf b/config/nodepool/secure.conf new file mode 100644 index 00000000..aeb28e38 --- /dev/null +++ b/config/nodepool/secure.conf @@ -0,0 +1,8 @@ +[database] +dburi=mysql://nodepool@localhost/nodepool + +[jenkins "sahara-gate"] +url=http://127.0.0.1/jenkins +user=admin +apikey=JENKINS_API_KEY +credentials=CREDENTIALS_ID diff --git a/slave-scripts/update_config.sh b/slave-scripts/update_config.sh index 3707e13e..347f601a 100755 --- a/slave-scripts/update_config.sh +++ b/slave-scripts/update_config.sh @@ -11,9 +11,10 @@ sudo service zuul reload sed "s%- net-id: 'LAB_42_PRIVATE_NETWORK_ID'%- net-id: '$LAB_42_PRIVATE_NETWORK_ID'%g" -i $WORKSPACE/config/nodepool/sahara.yaml sed "s%- net-id: 'LAB_43_PRIVATE_NETWORK_ID'%- net-id: '$LAB_43_PRIVATE_NETWORK_ID'%g" -i $WORKSPACE/config/nodepool/sahara.yaml -sed "s%apikey: JENKINS_API_KEY%apikey: $JENKINS_API_KEY%g" -i $WORKSPACE/config/nodepool/sahara.yaml -sed "s%credentials-id: CREDENTIALS_ID%credentials-id: $CREDENTIALS_ID%g" -i $WORKSPACE/config/nodepool/sahara.yaml +sed "s%apikey=JENKINS_API_KEY%apikey=$JENKINS_API_KEY%g" -i $WORKSPACE/config/nodepool/secure.conf +sed "s%credentials=CREDENTIALS_ID%credentials=$CREDENTIALS_ID%g" -i $WORKSPACE/config/nodepool/secure.conf sudo su - nodepool -c "cat $WORKSPACE/config/nodepool/sahara.yaml > /etc/nodepool/nodepool.yaml" +sudo su - nodepool -c "cat $WORKSPACE/config/nodepool/secure.conf > /etc/nodepool/secure.conf" 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