-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathudo.sample.yml
133 lines (117 loc) · 4.35 KB
/
udo.sample.yml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Sample Udo configuration file with all features.
# See udo.sample.simple.yml for a more compact and basic version.
# You should copy this into your application's root
# directory and name it udo.yml
# what's your awesome application or company called?
app_name: myapp
# your yum repo that houses your RPMs
repo:
# use yum-s3-iam plugin to access our private s3 repo with an instance role
plugin_url: https://s3-us-west-2.amazonaws.com/myapp-pub/provision/yum-plugin-s3-iam-1.0-1.noarch.rpm
# yum repo URL
repo_url: https://s3-us-west-2.amazonaws.com/myapp-yum/prod/repo
### global defaults for all clusters/roles
region: 'us-west-2' # what region are we working in here? (Oregon, yo)
availability_zones:
- 'us-west-2a'
ami: 'ami-a99deb89' # AMI to use for all instances (unless overridden)
packages: # common packages to install for all instances
- 'myapp-base'
# display extra API call information
# useful if you want to find out why something is failing
debug: 0
# optional: slack integration webhook
slack:
url: https://myapp.slack.com/services/hooks/incoming-webhook?token=Zgasdlgj0ioj30tj
username: UdoBot
channel: '#notdevops'
icon_emoji: ':ship:'
### CLOUD-INIT
# note: cloud_init_* is baked into LaunchConfigurations.
# to apply changes you must reload your LaunchConfigurations
# or use the 'update-lc' command
# add some additional cloud-init script commands before installing packages
cloud_init_pre: |
touch /root/myapp_init
# install AWS CLI tools
yum install -y aws-cli
# run after your packages are installed
# note: it's a good idea to install the CodeDeploy agent last, because
# autoscaling lifecycle hooks to deploy on instance creation will do a
# deploy straight away, so you want your dependencies in place when that happens
cloud_init_post: |
# install CodeDeploy agent
cd /home/ec2-user
aws s3 cp s3://aws-codedeploy-us-west-2/latest/install . --region us-west-2
chmod +x ./install
./install auto
rm install
# CodeDeploy
# 'application' and 'group' should reference existing configurations
# http://docs.aws.amazon.com/codedeploy/latest/userguide/welcome.html
deploy:
application: 'MyCompany'
github:
repo: 'mycompany/myapp' # GH repo name
# cluster = set of AWS resources managed as a group
# (instances, ASgroup, launchconfigs, all in a VPC)
clusters:
# create a "development" cluster
dev:
# human-readable name
description: "Development"
# override default
repo_url: https://s3-us-west-2.amazonaws.com/myapp-yum/dev/repo
# yum packages to install
packages:
- 'myapp-prov-dev'
- 'myapp-cfg-dev'
keypair_name: 'dev'
subnets_cidr:
- '10.10.0.0/16'
- '10.20.0.0/16'
# for instance roles
iam_profile: 'developer'
# optional
tenancy: 'dedicated' # VPC 'default' or 'dedicated' hardware
# application roles for instances
# (sub-clusters that can be managed as distinct sets)
roles:
webapp:
instance_type: 'm3.medium'
spot_price: 0.018
scale_policy:
min_size: 1
max_size: 3
desired: 2
elbs:
- 'dev-https'
security_groups:
- 'sg-abcdef123' # you'll want to set this up manually
packages:
- 'myapp-app'
- 'myapp-app-deps'
- 'myapp-app-core'
- 'myapp-static'
tags:
'myapp-web-workers': 10
deployment_group: 'dev-webapp' # CodeDeploy DeploymentGroup name
worker:
# you can stick cloud_init_extra on clusters/roles to run a custom script
cloud_init_extra: |
curl --silent --location https://rpm.nodesource.com/setup | bash - # NPM yum
instance_type: 'm1.medium'
packages:
- 'myapp-schwartz-worker'
- 'myapp-daemon-worker'
scale_policy:
min_size: 1
max_size: 4
desired: 1
deployment_group: 'dev-worker'
qa:
# ...
stage:
# ...
prod:
# ...