- prep for jenkins cloud move to openstack

- enhance the persistent_cloud tasks to use newer style conditionals
This commit is contained in:
Seth Vidal 2013-03-07 05:34:59 +00:00
parent 875320a6d1
commit 45c3314058
7 changed files with 40 additions and 13 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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']

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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'