-
Notifications
You must be signed in to change notification settings - Fork 0
/
user-data
100 lines (91 loc) · 3.5 KB
/
user-data
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
#cloud-config
---
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
# uncomment the following line and replace it with your discovery URL
# discovery: https://discovery.etcd.io/12345693838asdfasfadf13939923
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: docker.service
content: |
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.io
[Service]
ExecStartPre=/bin/mount --make-rprivate /
# Run docker but don't have docker automatically restart
# containers. This is a job for systemd and unit files.
ExecStart=/usr/bin/docker -d -s=btrfs -r=false -H fd://
[Install]
WantedBy=multi-user.target
- name: docker-tcp.socket
command: start
content: |
[Unit]
Description=Docker Socket for Remote API
[Socket]
ListenStream=4243
Service=docker.service
BindIPv6Only=both
[Install]
WantedBy=sockets.target
- name: etcd.service
command: start
- name: fleet.service
command: start
content: |
[Unit]
Description=fleet
[Service]
Environment=FLEET_PUBLIC_IP=$private_ipv4
ExecStart=/usr/bin/fleet
- name: stop-reboot-manager.service
command: start
content: |
[Unit]
Description=stop update-engine-reboot-manager
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl stop update-engine-reboot-manager.service
ExecStartPost=/usr/bin/systemctl mask update-engine-reboot-manager.service
- name: stop-update-engine.service
command: start
content: |
[Unit]
Description=stop update-engine
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl stop update-engine.service
ExecStartPost=/usr/bin/systemctl mask update-engine.service
- name: write-deis-motd.service
command: start
content: |
[Unit]
Description=write the Deis motd
ConditionFileNotEmpty=/run/deis/motd
[Service]
Type=oneshot
ExecStartPre=/usr/bin/rm /etc/motd
ExecStart=/usr/bin/ln -s /run/deis/motd /etc/motd
- name: link-deis-bashrc.service
command: start
content: |
[Unit]
Description=remove .bashrc file for CoreOS user
ConditionFileNotEmpty=/run/deis/.bashrc
[Service]
Type=oneshot
ExecStartPre=/usr/bin/rm /home/core/.bashrc
ExecStart=/usr/bin/ln -s /run/deis/.bashrc /home/core/.bashrc
write_files:
- path: /run/deis/motd
content: " \e[31m* * \e[34m* \e[32m***** \e[39mddddd eeeeeee iiiiiii ssss\n\e[31m* * \e[34m* * \e[32m* * \e[39md d e e i s s\n \e[31m* * \e[34m***** \e[32m***** \e[39md d e i s\n\e[32m***** \e[31m* * \e[34m* \e[39md d e i s\n\e[32m* * \e[31m* * \e[34m* * \e[39md d eee i sss\n\e[32m***** \e[31m* * \e[34m***** \e[39md d e i s\n \e[34m* \e[32m***** \e[31m* * \e[39md d e i s\n \e[34m* * \e[32m* * \e[31m* * \e[39md d e e i s s\n\e[34m***** \e[32m***** \e[31m* * \e[39mddddd eeeeeee iiiiiii ssss\n\n\e[39mWelcome to Deis\t\t\tPowered by Core\e[38;5;45mO\e[38;5;206mS\e[39m\n"
- path: /run/deis/.bashrc
owner: core
content: |
source /usr/share/skel/.bashrc
function nse() {
sudo nsenter --pid --uts --mount --ipc --net --target $(docker inspect --format="{{ .State.Pid }}" $1)
}