-
Notifications
You must be signed in to change notification settings - Fork 7
/
cloud-config.yaml
57 lines (56 loc) · 1.77 KB
/
cloud-config.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
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpIgFxCmmSHISwTmSxrYbiBIbuo0CorhnLD9jZQdlFZ6DMdBykr6jcq3mzU7gk1mPSRTqqeuIMceb1OGDE35icg+d4/3dl0Qstq3j6kNP2zg60i5+OleSFdM4TnxrXkjjgCV7QDW/TYndrJiInB0quPNwPnafgHCJWBiHdv0gSm3jEWi2jGbFAL+pIKDoKAgQcTMcUve79gniadVWLc74mf8UcysivVWEwX8UjKZynVcI0tefFYQQeAr+r020oICLdoCDsm7fjDDeosbw6WjVSQgt0p0DZD0a8FUHCjUgQKl7oXC8AcQ+4DY780gOjnnWnHXodCDcOxAj36VqE5DOB melnik@melnik-work
users:
- name: melnik
coreos-ssh-import-github: zonorti
groups:
- sudo
- docker
- name: denz
coreos-ssh-import-github: dennybaa
groups:
- sudo
- docker
hostname: HOSTNAME
write_files:
- path: /root/prepare-drive
permissions: 0755
content: |
##!/bin/bash
/usr/bin/test -f /var/data/active || /usr/sbin/wipefs -f /dev/sdb
/usr/bin/test -f /var/data/active || /usr/sbin/mkfs.btrfs -f /dev/sdb
/usr/bin/test -f /var/data/active || /usr/bin/mkdir -p /var/data
/usr/bin/touch /var/data/active
coreos:
etcd:
name: HOSTNAME
discovery: https://discovery.etcd.io/4cd6529256354a0d378888045767bf3b
addr: EXTIP:4001
peer-addr: EXTIP:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: format-sdb.service
command: start
content: |
[Unit]
Description=Formats the sdb drive
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash /root/prepare-drive
- name: var-data.mount
command: start
content: |
[Unit]
Description=Mount sdb to /var/data
Requires=format-sdb.service
After=format-sdb.service
Before=docker.service
[Mount]
What=/dev/sdb
Where=/var/data
Type=btrfs