From 334590c70f4fcbcb5477e3595d3c7eb4734a8033 Mon Sep 17 00:00:00 2001 From: "Denis V. Meltsaykin" Date: Thu, 21 Jan 2016 20:20:34 +0300 Subject: [PATCH] New job configuration and slight change in XML New job configuration is introduced to get effective build managment. Also, changed the order of boot devices for virtual machines, as sometimes there might be a problem with re-bootstraping slaves that were provisioned with OS previously. Change-Id: I407d0524978e1ef97b5844899a2140ea66311551 --- jenkins/build_cluster/build_cluster.py | 4 +- jenkins/build_cluster/config.xml | 94 +++++++++++++++++++------- 2 files changed, 71 insertions(+), 27 deletions(-) diff --git a/jenkins/build_cluster/build_cluster.py b/jenkins/build_cluster/build_cluster.py index 7e1c4d2..844e73f 100755 --- a/jenkins/build_cluster/build_cluster.py +++ b/jenkins/build_cluster/build_cluster.py @@ -383,8 +383,8 @@ def start_node(name, admin=False): vcpu = cfg["SLAVE_CPU"] memory = cfg["SLAVE_RAM"] * 1024 - first_boot = "hd" - second_boot = "network" + first_boot = "network" + second_boot = "hd" iso = "" admin_net = cfg["ADM_SUBNET_OBJ"].name() diff --git a/jenkins/build_cluster/config.xml b/jenkins/build_cluster/config.xml index 92b04c7..8e9eca8 100644 --- a/jenkins/build_cluster/config.xml +++ b/jenkins/build_cluster/config.xml @@ -1,19 +1,19 @@ - + When choosing parameters please remember that srv## slaves have 32G of RAM and 12 CPUs, while cz7377 has 256G RAM and 12 CPUs. false - NAME - Required! + PERSONAL_TAG + Tag is used in name of build. ISO_URL - Required! Can be direct URL or URL to torrent-file. Public ISOs are available here - http://srv08-srt.srt.mirantis.net/fuelweb/ + Required! Can be direct URL or URL to torrent-file. Public ISOs are available here - <b>http://vault.infra.mirantis.net/</b> @@ -23,36 +23,33 @@ ADMIN_RAM - + It' recommended to set it to 4096 at least. 4096 ADMIN_CPU - - 2 + For srv03#-scc slaves you can use 4 CPUs. + 1 SLAVE_RAM - - 2048 + It' recommended to set it to 4096 at least. + 4096 SLAVE_CPU - + For srv03#-scc slaves you can use 4 CPUs. 1 - - Label of slave - Here you can choose on which slave to run job - MAIN - false - allCases - - + + NODES_DISK_SIZE + Size of virtual disk for slaves. 50GB by default. + 100 + PREPARE_CLUSTER Check it to predefine cluster config - false + true NETWORK_TYPE @@ -70,8 +67,8 @@ Choose base for deployment - CentOS Ubuntu + CentOS @@ -85,11 +82,24 @@ + + Label of Slave + You can choose where to deploy your cluster by typing exact slave label here. + build-slave-1 || build-slave-2 || build-slave-3 || build-slave-4 || build-slave-5 + false + allCases + + + + false + false + - true + build-slave-1 || build-slave-2 || build-slave-3 || build-slave-4 || build-slave-5 + false false false false @@ -98,14 +108,48 @@ set -x -cd /home/jenkins/workspace/deploy_cluster/ -export ENV_NAME=${BUILD_USER_ID}-${BUILD_NUMBER}-${NAME} +export ENV_NAME=${BUILD_USER_ID}-${BUILD_NUMBER} export PYTHONUNBUFFERED=1 -python build_cluster.py +curl -o ./build_cluster.py "https://raw.githubusercontent.com/Mirantis/tools-sustaining/master/jenkins/build_cluster/build_cluster.py" +curl -o ./scancodes.py "https://raw.githubusercontent.com/Mirantis/tools-sustaining/master/jenkins/build_cluster/scancodes.py" + +python build_cluster.py + +#JOB NEVER ENDS, IT JUST RUNS WHILE ENV IS ALIVE. +#ABORT THE BUILD TO DESTROY RUNNIN ENV +set +x +echo "Cluster is ready. Abort job to destroy cluster." +while true +do + sleep 60 +done + - + + + + + set -x +export ENV_NAME=${BUILD_USER_ID}-${BUILD_NUMBER} +export PYTHONUNBUFFERED=1 +python build_cluster.py --destroy + + + + false + false + false + + + + + css + + + + \ No newline at end of file -- 2.45.2