aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/ec2/tasks/setup.yml
diff options
context:
space:
mode:
authorsveneh <sven@ethdev.com>2015-01-26 05:52:38 +0800
committersveneh <sven@ethdev.com>2015-01-26 05:52:38 +0800
commit58ec49a34da85b71fe5f82b263986faa2b570eaa (patch)
tree6f1b72b2968a4f53795be2d095c1c68be894ae54 /ansible/roles/ec2/tasks/setup.yml
parent52e174b1f7fcd5bcc7fa1f134b9cd085a24ff642 (diff)
downloaddexon-tests-58ec49a34da85b71fe5f82b263986faa2b570eaa.tar.gz
dexon-tests-58ec49a34da85b71fe5f82b263986faa2b570eaa.tar.zst
dexon-tests-58ec49a34da85b71fe5f82b263986faa2b570eaa.zip
added EC2 provisioning, optimised docker for EC2, added python and
cppjit client (python not yet working)
Diffstat (limited to 'ansible/roles/ec2/tasks/setup.yml')
-rw-r--r--ansible/roles/ec2/tasks/setup.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/ansible/roles/ec2/tasks/setup.yml b/ansible/roles/ec2/tasks/setup.yml
new file mode 100644
index 000000000..0876d8d2d
--- /dev/null
+++ b/ansible/roles/ec2/tasks/setup.yml
@@ -0,0 +1,33 @@
+---
+- name: create default security group
+ ec2_group:
+ name: "{{ security_group }}"
+ region: "{{ region }}"
+ description: "{{ project_description }}"
+ rules:
+ # ssh
+ - proto: tcp
+ from_port: 22
+ to_port: 22
+ cidr_ip: "{{ ip_access_range }}"
+ rules_egress:
+ - proto: all
+ cidr_ip: "{{ ip_access_range }}"
+
+
+- name: start ec2 instances
+ ec2:
+ group: "{{ security_group }}"
+ instance_type: "{{ instance_type }}"
+ image: "{{ image }}"
+ wait: true
+ region: "{{ region }}"
+ key_name: "{{ keypair }}"
+ instance_tags:
+ Name: test_runner
+ count_tag:
+ Name: test_runner
+ exact_count: "{{ total_no_instances }}"
+# volumes:
+# - device_name: /dev/xvda
+# volume_size: "{{ volume_size_gb }}"