Commit 77240a7f by John Jarvis

updating edx_sandbox, creating edx_sandbox_jenkins.yml

parent 09f214d0
...@@ -4,20 +4,12 @@ ...@@ -4,20 +4,12 @@
gather_facts: False gather_facts: False
vars: vars:
keypair: continuous-integration keypair: continuous-integration
instance_type: m1.large instance_type: m1.small
security_group: sandbox security_group: sandbox
image: ami-d0f89fb9 image: ami-d0f89fb9
region: us-east-1 region: us-east-1
tasks: roles:
- name: Launch instance - launch_instance
local_action: ec2 keypair=$keypair group=$security_group instance_type=$instance_type image=$image wait=true region=$region count=2
register: ec2
- name: Add new instance to host group
local_action: add_host hostname=${item.public_ip} groupname=launched
with_items: ${ec2.instances}
- name: Wait for SSH to come up
local_action: wait_for host=${item.public_dns_name} port=22 delay=60 timeout=320 state=started
with_items: ${ec2.instances}
- name: Configure instance(s) - name: Configure instance(s)
hosts: launched hosts: launched
...@@ -28,9 +20,12 @@ ...@@ -28,9 +20,12 @@
vars_files: vars_files:
- "{{ secure_dir }}/vars/edxapp_ref_users.yml" - "{{ secure_dir }}/vars/edxapp_ref_users.yml"
- "{{ secure_dir }}/vars/edxapp_sandbox.yml" - "{{ secure_dir }}/vars/edxapp_sandbox.yml"
tasks:
command: true
roles:
- common
- nginx
- edxlocal
- edxapp
- name: Terminate instances - name: Terminate instances
hosts: localhost hosts: localhost
......
- name: Create sandbox instance - name: Create sandbox instance
hosts: localhost hosts: localhost
connection: local connection: local
user: root
sudo: False
gather_facts: False gather_facts: False
vars: vars:
keypair: continuous-integration keypair: continuous-integration
instance_type: m1.large instance_type: m1.small
security_group: sandbox security_group: sandbox
image: ami-d0f89fb9 image: ami-d0f89fb9
region: us-east-1 region: us-east-1
roles: roles:
- launch_instance - launch_instance
...@@ -22,10 +18,21 @@ ...@@ -22,10 +18,21 @@
vars: vars:
migrate_db: True migrate_db: True
vars_files: vars_files:
- "{{ secure_dir }}/vars/edxapp_ref_users.yml"
- "{{ secure_dir }}/vars/edxapp_sandbox.yml" - "{{ secure_dir }}/vars/edxapp_sandbox.yml"
- "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- nginx - nginx
- edxlocal - edxlocal
- edxapp - edxapp
- name: Terminate instances
hosts: localhost
connection: local
tasks:
- name: Terminate instances that were previously launched
local_action:
module: ec2
termination_list: ${ec2.instances}
# with_items: ${ec2.instances}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment