This repository has been archived by the owner on Jul 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.yaml
92 lines (72 loc) · 2.18 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
- hosts: localhost
strategy: debug
connection: local
gather_facts: false
vars_files:
- keys/credentials.yaml
- group_vars/elb.yaml
- group_vars/vpc.yaml
roles:
# generate etcd key pair
- role: keygen
keypair_region: "{{ ec2_region }}"
keypair_name: "{{ etcd_keypair_name }}"
keypair_file: "{{ etcd_keypair_file }}"
tags: [ install ]
# generate coreos key pair
- role: keygen
keypair_region: "{{ ec2_region }}"
keypair_name: "{{ coreos_keypair_name }}"
keypair_file: "{{ coreos_keypair_file }}"
tags: [ install ]
# generate GPG keyrings for data encryption
- role: gpg_keyrings
tags: [ install ]
# load content for gaia CA files
- role: https_certs
tags: [ install ]
# get "*.gaiahub.io" ACM certificate
- role: acm
tags: [ install ]
# collect vpc facts
- role: vpc_facts
tags: [install]
# create a new VPC
- role: vpc
# setup network: vpc-peering, eip, nat
- role: network
# create new ELB
- role: elb
# create S3 bucket
- role: s3
# create RDS
- role: rds
# find CoreOS AMI from specified channel
- role: find_coreos_ami
tags: [ install ]
# create etcd cluster (with autoscaling group): ATTENTION - this is First CoreOS cluster to create!!!
- role: cluster
cluster_type: etcd
# register etcd nodes in DNS
- role: register_etcd
# create coreos cluster (with autoscaling group)
- role: cluster
cluster_type: coreos
# create elasticsearch cluster (with autoscaling group)
- role: cluster
cluster_type: elasticsearch
# create rabbitmq cluster (with autoscaling group)
- role: cluster
cluster_type: rabbitmq
# create volumes for elasticsearch cluster
- role: volume
volume: "{{ es_volume }}"
number_of_volumes: "{{ cluster_size_desired_capacity.elasticsearch }}"
# create volumes for rabbitmq cluster
- role: volume
volume: "{{ rabbitmq_volume }}"
number_of_volumes: "{{ cluster_size_desired_capacity.rabbitmq }}"
# create volumes for result-upload cluster
- role: volume
volume: "{{ result_upload_volume }}"