forked from zalando-stups/senza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
passing-a-stage.yaml
64 lines (56 loc) · 2.38 KB
/
passing-a-stage.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
# this is a senza.yaml describing a Location Service Demo (LSD) backend server.
# use it as an example for passing a STAGE environment to your application (see
# NOTEs below). to pass the stage to your application from your deployment, use
# senza create <application-yaml> <stack-name> <version> Stage=<MYSTAGE>, where
# <MYSTAGE> should be something like LIVE, STAGING, and so on.
# example: senza create lsd.yaml 21 0.21 Stage=STAGING.
# NOTE the Stage: section passing a stage parameter to the Taupage AMI.
SenzaInfo:
StackName: lsd
Parameters:
- ImageVersion:
Description: "Docker image version of lsd."
- Stage:
Description: "Stage of the application (live, staging, ...)"
# NOTE the environment: section under TaupageConfig: which passes the
# <Stage> argument of senza (create) to Taupage which turns it into a
# runtime UNIX/LINUX environment variable which can be retrieved from
# within your application, e.g. in scala as sys.env.get("STAGE").
SenzaComponents:
# this basic configuration is required for the other components
- Configuration:
Type: Senza::StupsAutoConfiguration # auto-detect network setup
# will create a launch configuration and auto scaling group with scaling triggers
- AppServer:
Type: Senza::TaupageAutoScalingGroup
Minimum: 0
Maximum: 1
InstanceType: t2.micro
SecurityGroups:
- app-lsd
IamRoles:
- app-lsd
ElasticLoadBalancer: AppLoadBalancer
AssociatePublicIpAddress: false # change for standalone deployment in default VPC
TaupageConfig:
application_version: "{{Arguments.ImageVersion}}"
runtime: Docker
# NOTE change "/mentoring/lsd" to your team/application path
source: "pierone.stups.zalan.do/mentoring/lsd:{{Arguments.ImageVersion}}"
health_check_path: /
ports:
8080: 9000
# NOTE replace <my_mint_bucket> with your real mint bucket name
mint_bucket: "<my_mint_bucket>"
enhanced_cloudwatch_metrics: true
# NOTE UNIX/LINUX environment vars created from senza create command line:
environment:
STAGE: "{{Arguments.Stage}}"
# creates an ELB entry and Route53 domains to this ELB
- AppLoadBalancer:
Type: Senza::WeightedDnsElasticLoadBalancer
HTTPPort: 8080
HealthCheckPath: /
SecurityGroups:
- app-lsd-lb
Scheme: internet-facing