This repository has been archived by the owner on Sep 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
cloud-config.yml
73 lines (70 loc) · 2.49 KB
/
cloud-config.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
#cloud-config
coreos:
etcd2:
discovery: https://discovery.etcd.io/<token>
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
initial-advertise-peer-urls: http://$private_ipv4:2380
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380
units:
- name: etcd2.service
command: start
- name: fleet.service
command: start
- name: iptables-restore.service
enable: true
command: start
- name: gitevents-proxy.service
command: start
content: |
[Unit]
Description=gitevents SSL Proxy
[Service]
User=core
TimeoutStartSec=500
Restart=always
ExecStartPre=-/usr/bin/docker kill gitevents-proxy
ExecStartPre=-/usr/bin/docker rm gitevents-proxy
ExecStartPre=/usr/bin/docker pull quay.io/patrickheneise/lets-nginx-node
ExecStart=/usr/bin/docker run --net=host --name gitevents-proxy --env EMAIL=<email> --env DOMAIN=<domain> quay.io/patrickheneise/lets-nginx-node
ExecStop=/usr/bin/docker stop gitevents-proxy
- name: gitevents.service
command: start
content: |
[Unit]
Description=gitevents Core
After=docker.service
[Service]
User=core
TimeoutStartSec=60
Restart=always
ExecStartPre=-/usr/bin/docker kill gitevents
ExecStartPre=-/usr/bin/docker rm gitevents
ExecStartPre=/usr/bin/docker pull quay.io/gitevents/gitevents
ExecStart=/usr/bin/docker run --name=gitevents --net=host -e "CONFIG_URL=<config-url>" quay.io/gitevents/gitevents
ExecStop=/usr/bin/docker stop gitevents
Restart=on-failure
RestartSec=5
fleet:
public-ip: $public_ipv4
write_files:
- path: /var/lib/iptables/rules-save
permissions: 0644
owner: 'root:root'
content: |
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth1 -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-N DOCKER
COMMIT
# the last line of the file needs to be a blank line or a comment