diff --git a/inventory/host_vars/209.132.184.165 b/inventory/host_vars/209.132.184.165 new file mode 100644 index 0000000000..56e0bc4e2c --- /dev/null +++ b/inventory/host_vars/209.132.184.165 @@ -0,0 +1,11 @@ +--- +instance_type: m1.large +image: $el6_qcow_id +keypair: fedora-admin +security_group: jenkins +zone: nova +hostbase: jenkins-el6 +public_ip: 209.132.184.165 +root_auth_users: pingou skvidal +description: jenkins el6 worker/slave +#volumes: diff --git a/inventory/host_vars/209.132.184.166 b/inventory/host_vars/209.132.184.166 new file mode 100644 index 0000000000..afa3878964 --- /dev/null +++ b/inventory/host_vars/209.132.184.166 @@ -0,0 +1,12 @@ +--- +instance_type: m1.large +image: ami-00000001 +keypair: fedora-admin +security_group: jenkins +zone: nova +hostbase: jenkins-f17 +public_ip: 209.132.184.166 +root_auth_users: pingou skvidal +description: jenkins f17 worker/slave +#volumes: + diff --git a/inventory/host_vars/jenkins.cloud.fedoraproject.org b/inventory/host_vars/jenkins.cloud.fedoraproject.org index 0b3f4c6e52..c7582a8ebc 100644 --- a/inventory/host_vars/jenkins.cloud.fedoraproject.org +++ b/inventory/host_vars/jenkins.cloud.fedoraproject.org @@ -1,11 +1,11 @@ --- instance_type: m1.small -image: emi-68D638BF -keypair: admin +image: $el6_qcow_id +hkeypair: fedora-admin security_group: jenkins -zone: fedoracloud +zone: nova hostbase: jenkins-master- -public_ip: 209.132.184.117 +public_ip: 209.132.184.153 root_auth_users: pingou skvidal description: jenkins cloud master -volumes: ['-d /dev/vdb vol-5A7639B9'] +volumes: ['-d /dev/vdb vol-00000011'] diff --git a/inventory/inventory b/inventory/inventory index f9817b9886..63be175aea 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -337,14 +337,15 @@ virthost-comm01.qa.fedoraproject.org 209.132.184.112 [jenkins-slaves] -209.132.184.118 -209.132.184.119 +209.132.184.165 +209.132.184.166 + [jenkins-cloud:children] jenkins-slaves [jenkins-cloud] -jenkins.cloud.fedoraproject.org +jenkins.cloud.fedoraproject.org ansible_ssh_host=209.132.184.153 [osuosl] fakefas01.fedoraproject.org diff --git a/playbooks/groups/jenkins-cloud.yml b/playbooks/groups/jenkins-cloud.yml index fb785efcce..5755806dd2 100644 --- a/playbooks/groups/jenkins-cloud.yml +++ b/playbooks/groups/jenkins-cloud.yml @@ -11,6 +11,7 @@ tasks: - include: $tasks/persistent_cloud.yml + - include: $tasks/growroot_cloud.yml - name: provision master hosts: jenkins.cloud.fedoraproject.org @@ -128,6 +129,7 @@ tasks: - include: $tasks/persistent_cloud.yml + - include: $tasks/growroot_cloud.yml - name: provision workers hosts: jenkins-slaves diff --git a/playbooks/groups/twistedbots.yml b/playbooks/groups/twistedbots.yml index 685a729dfa..73cadeb02a 100644 --- a/playbooks/groups/twistedbots.yml +++ b/playbooks/groups/twistedbots.yml @@ -8,7 +8,8 @@ - ${private}/vars.yml tasks: - - include: $tasks/persistent_cloud_nodisks.yml + - include: $tasks/persistent_cloud.yml + - include: $tasks/growroot_cloud.yml - name: provision instance hosts: twistedbots diff --git a/tasks/persistent_cloud.yml b/tasks/persistent_cloud.yml index 4058cae523..43eb713508 100644 --- a/tasks/persistent_cloud.yml +++ b/tasks/persistent_cloud.yml @@ -7,18 +7,18 @@ - name: spin it up local_action: ec2 keypair=${keypair} image=${image} type=${instance_type} wait=true group=${security_group} ec2_access_key=$persist_access_key ec2_secret_key=$persist_secret_key ec2_url=$os_ec2_url register: inst_res - only_if: "'${host_is_up.rc}' != '0'" + when_failed: $host_is_up - name: assign it a special ip local_action: shell euca-associate-address --config ${persist_config} -i ${inst_res.instances[0].id} ${public_ip} - only_if: "'${host_is_up.rc}' != '0'" + when_failed: $host_is_up - name: wait for the reassignation local_action: wait_for host=${public_ip} port=22 delay=20 timeout=300 - only_if: "'${host_is_up.rc}' != '0'" + when_failed: $host_is_up # attach and mount volumes - name: attach volumes to the system local_action: shell euca-attach-volume --config ${persist_config} -i ${inst_res.instances[0].id} $item - only_if: "'${host_is_up.rc}' != '0' and len('$item') != 0" with_items: $volumes + only_if: is_set('$volumes') and int('$host_is_up.rc') != '0'