forked from replicatedhq/replicated-ci-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplicated.yml
More file actions
168 lines (162 loc) · 3.98 KB
/
Copy pathreplicated.yml
File metadata and controls
168 lines (162 loc) · 3.98 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
# kind: replicated
# apiVersion: v1
replicated_api_version: 2.12.0
name: My Counter App
version: 1.0.0
release_notes: The initial release of my counter application.
properties:
app_url: https://{{repl ConfigOption "hostname" }}
logo_url: "https://lh6.ggpht.com/uCS3dvm72krkJPG7aHlipfbBBCJ-hiq3nc9bx5wQVSXsaB2Fv2KuyDm7UU4seGwHVl4=w300"
console_title: My Counter App Console
backup:
enabled: true
state:
ready:
command: http_status_code
args:
- https://{{repl ConfigOption "hostname"}}/assets/bootstrap.min.css
- "200"
cmds:
- name: host_ip
cmd: publicip
args: []
admin_commands:
- alias: bash
command: ["bash"]
run_type: exec
component: DB
container: redis
- alias: echo
command: ["echo"]
run_type: exec
component: DB
container: redis
host_requirements:
replicated_version: ">=2.12.0"
components:
- name: DB
containers:
- source: public
image_name: redis
version: latest
cmd: "[\"redis-server\", \"--appendonly\", \"yes\"]"
publish_events:
- name: Container redis started
trigger: container-start
data: ""
subscriptions:
- component: App
container: freighter/counter
action: start
config_files: []
customer_files: []
env_vars: []
ports: []
volumes:
- host_path: /data
container_path: /data
- name: LB
containers:
- source: public
image_name: nginx
version: latest
cmd: ""
publish_events:
- name: Container nginx started
trigger: container-start
data: ""
subscriptions: []
config_files:
- filename: /etc/nginx/conf.d/default.conf
file_mode: "0644"
file_owner: "0"
contents: |
server {
listen 443 ssl;
server_name {{repl ConfigOption "hostname" }};
keepalive_timeout 70;
ssl_certificate /opt/certs/server.crt;
ssl_certificate_key /opt/certs/server.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://{{repl HostPrivateIpAddress "App" "freighter/counter" }}:{{repl ContainerExposedPort "App" "freighter/counter" "3000" }};
}
}
customer_files:
- name: ssl_cert_file
filename: /opt/certs/server.crt
- name: ssl_key_file
filename: /opt/certs/server.key
ports:
- private_port: "443"
public_port: "443"
- name: App
cluster: true
cluster_host_count:
min: 1
max: 5
strategy: autoscale
containers:
- source: public
image_name: freighter/counter
display_name: Freighter Counter
version: "1.0"
cmd: ""
publish_events:
- name: Container freighter/counter started
trigger: container-start
data: ""
subscriptions:
- component: LB
container: nginx
action: start
env_vars:
- name: REDIS_HOST
static_val: "{{repl HostPrivateIpAddress \"DB\" \"redis\" }}"
- name: REDIS_PORT
static_val: "{{repl ContainerExposedPort \"DB\" \"redis\" \"6379\" }}"
config:
- name: hostname
title: Hostname
description: Ensure this domain name is routable on your network.
items:
- name: hostname
title: Hostname
type: text
recommended: false
default: ""
value_cmd:
name: host_ip
value_at: 0
when: ""
affix: ""
required: true
items: []
- name: ssl
description: ""
test_proc:
display_name: Verify TLS settings
command: certificate_verify
timeout: 5
arg_fields:
- ssl_cert_file
- ssl_key_file
- hostname
items:
- name: ssl_key_file
title: Private Key File
type: file
required: true
affix: left
- name: ssl_cert_file
title: Certificate File
type: file
required: true
affix: right