-
Notifications
You must be signed in to change notification settings - Fork 16
/
node2-init.yaml
97 lines (91 loc) · 7.71 KB
/
node2-init.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
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
# Copyright (c) 2020 Tigera, Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package_update: true
packages:
- vsftpd
- iptables-persistent
write_files:
- encoding: b64
content: IyEvYmluL3NoCgpbIC1mICIvZXRjL25ldHBsYW4vNTEtc3RhdGljLnlhbWwiIF0gJiYgZXhpdCAwCgp3aGlsZSBbICEgLWYgL2V0Yy9uZXRwbGFuLzUwLWNsb3VkLWluaXQueWFtbCBdOwpkbwogICAgICAgIHNsZWVwIDEKZG9uZQoKSUZBQ0U9JChncmVwICdzZXQtbmFtZTonIC9ldGMvbmV0cGxhbi81MC1jbG91ZC1pbml0LnlhbWwgfCB0ciAtZCBbOnNwYWNlOl0gfCBjdXQgLWYyIC1kJzonKQoKcHJpbnRmICduZXR3b3JrOlxuICBldGhlcm5ldHM6XG4gICAgJXM6XG4gICAgICBhZGRyZXNzZXM6IFsgMTk4LjE5LjAuMy8yMCBdXG4gIHZlcnNpb246IDInICRJRkFDRSB8IHRlZSAvZXRjL25ldHBsYW4vNTEtc3RhdGljLnlhbWwK
owner: root:root
path: /etc/dynamicaddress.sh
permissions: '0755'
- encoding: b64
content: W1VuaXRdCkRlc2NyaXB0aW9uPUluc3RhbGwgazNzIG5vZGUKQWZ0ZXI9bmV0d29yay1vbmxpbmUudGFyZ2V0CkNvbmRpdGlvblBhdGhFeGlzdHM9IS92YXIvbGliL3JhbmNoZXIvazNzCgpbU2VydmljZV0KRXhlY1N0YXJ0PS9iaW4vc2ggLWMgL2V0Yy9rM3MtYWdlbnQuc2gKCltJbnN0YWxsXQpXYW50ZWRCeSA9IG11bHRpLXVzZXIudGFyZ2V0
owner: root:root
path: /etc/systemd/system/k3s-agent.service
permissions: '0644'
- encoding: b64
content: IyEvYmluL2Jhc2gKClRPS0VOPSIiCndoaWxlIFsgLXogIiRUT0tFTiIgXQpkbwoJc2xlZXAgMQoJVE9LRU49JChlY2hvIHN1ZG8gY2F0IC92YXIvbGliL3JhbmNoZXIvazNzL3NlcnZlci9ub2RlLXRva2VuIHwgc3NoIC1pIC9ob21lL3VidW50dS8uc3NoL2lkX3JzYSAtbyBTdHJpY3RIb3N0S2V5Q2hlY2tpbmc9bm8gLW8gVXNlcktub3duSG9zdHNGaWxlPS9kZXYvbnVsbCB1YnVudHVAMTk4LjE5LjAuMSB8IGdyZXAgJzo6c2VydmVyOicpCmRvbmUKCmVjaG8gIlRva2VuIGFjcXVpcmVkOiAkVE9LRU4iCgp3aGlsZSBbICEgLWQgL3Zhci9saWIvcmFuY2hlciBdCmRvCgljdXJsIC1zZkwgaHR0cHM6Ly9nZXQuazNzLmlvIHwgSU5TVEFMTF9LM1NfVkVSU0lPTj0idjEuMTguMTArazNzMSIgSzNTX1VSTD1odHRwczovLzE5OC4xOS4wLjE6NjQ0MyBLM1NfVE9LRU49JFRPS0VOIHNoIC0KCXNsZWVwIDEKZG9uZQoKZWNobyBJbnN0YWxsYXRpb24gQ29tcGxldGVkLgoK
owner: root:root
path: /etc/k3s-agent.sh
permissions: '0755'
- encoding: b64
content: ZXhwb3J0IEtVQkVDT05GSUc9L2hvbWUvdWJ1bnR1Ly5rdWJlL2NvbmZpZwpleHBvcnQgREFUQVNUT1JFX1RZUEU9a3ViZXJuZXRlcwoK
owner: root:root
path: /etc/skel/.bash_aliases
- encoding: b64
content: CjE5OC4xOS4wLjEgY29udHJvbAoxOTguMTkuMC4yIG5vZGUxCjE5OC4xOS4wLjMgbm9kZTIKMTk4LjE5LjE1LjI1NCBob3N0MQoK
owner: root:root
path: /etc/cloud/templates/hosts.debian.tmpl
append: true
- encoding: b64
content: IyEvYmluL2Jhc2gKQVJDSD1gdW5hbWUgLW1gCmlmIFtbICRBUkNIID09ICJ4ODZfNjQiIF1dCnRoZW4KL3Vzci9iaW4vY3VybCAtbyAvdXNyL2Jpbi9rdWJlY3RsIC1MIGh0dHBzOi8vc3RvcmFnZS5nb29nbGVhcGlzLmNvbS9rdWJlcm5ldGVzLXJlbGVhc2UvcmVsZWFzZS92MS4xOS4yL2Jpbi9saW51eC9hbWQ2NC9rdWJlY3RsCi91c3IvYmluL2NobW9kICt4IC91c3IvYmluL2t1YmVjdGwKL3Vzci9iaW4vY3VybCAtbyAvdXNyL2xvY2FsL2Jpbi9jYWxpY29jdGwgLUwgaHR0cHM6Ly9naXRodWIuY29tL3Byb2plY3RjYWxpY28vY2FsaWNvY3RsL3JlbGVhc2VzL2Rvd25sb2FkL3YzLjIxLjQvY2FsaWNvY3RsLWxpbnV4LWFtZDY0Ci91c3IvYmluL2NobW9kICt4IC91c3IvbG9jYWwvYmluL2NhbGljb2N0bCAKL3Vzci9iaW4vY3VybCAtbyAvdXNyL2xvY2FsL2Jpbi92ZXJpZnkgLUwgaHR0cHM6Ly9naXRodWIuY29tL3RpZ2VyYS9jY29sMS9yZWxlYXNlcy9kb3dubG9hZC8xLjAvdmVyaWZ5X2FtZDY0Ci91c3IvYmluL2NobW9kICt4IC91c3IvbG9jYWwvYmluL3ZlcmlmeQplbHNlCi91c3IvYmluL2N1cmwgLW8gL3Vzci9iaW4va3ViZWN0bCAtTCBodHRwczovL3N0b3JhZ2UuZ29vZ2xlYXBpcy5jb20va3ViZXJuZXRlcy1y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wJ6zoioOTPjWnCUfix4Kjay5WGswSJ
tsMVe2WTaUV/bG/d23du4CLmVHnZOmJK0Ml4iJ0CgYBCBgJhLM8bdvg3vi32XdS4
QQ9E6gPGIZGy75s7ZMfA5Zg4auVfolhOKR5mnA4RJa7oOgfysiSWSZf1e2cVZdNT
SSmC4XsyofOAgPnW8USPZKf02OVKX6ls4M/+VdyopWMYGrWEiw7GNaSE9T7QPZqL
+LSDhYwgli8FHfO8TxIMLQKBgQCv5frtIjsGwcWPOvGCDTbpTRw7pWcL1cYw2Itu
JtGrFiQdYO+ypXfW4wp0JRcfIJ05U7kWft99129sbam6C2O+uPlwzJKozsnuVKH2
nXUwCv9A54dXjGV9dA0MmjCvLtK2MBRamXkkKGHHzW4+mQAYhrpzyhIYJU3+fkxM
wc1qjQKBgF7erwUBI5zt+vPcurh/pANDWuEOz1zqBr3svqXytI8UvySuHP9qfHY0
JLdAyiMNRolMOEVe7umTbB95DifK7DqK2bTw9jrtUdOJ18G5cTf3+pv8NZKCg0B8
56E90uQJS9aJ/qVZiubWiZpFuIX2tqjulqpp9aN3NbA/Uv8YJa78
-----END RSA PRIVATE KEY-----
rsa_public: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvW2dRLu0PLQeQ5q5X76RaPvh8/lhhTzucdOizgzJfbUClve4KVCivtB1/S0rX6uuZL6TZhtRDrB1bVGAkwnt6zTT/irQ1ly1AseLAGIdA+03ikQ4gD1hL+MPURko4O9qWyDpBzPtjinRkXYTPdDe3g5jj1CZMI8uw+oOwdxf/9efeEfiQZ+pZuqgtEJttxWx3NrLqiyZhiciSVoRxyXkOltMdovzNeeeRB0KkFKhjSWhjTW0QRJ19ZsDtH3lxChQd7YFfTtYL0oe3ZkRINzHwfr1vzTVaolWTF70H4LWFaTZpmFWZ+WmmXNriUHwov2TBsCYRMAJkM72PAi8WmtWR calico@cloud
bootcmd:
- [ /usr/sbin/iptables, -t, mangle, -A, POSTROUTING, -p, tcp, --tcp-flags, 'SYN,RST', SYN, -j, TCPMSS, --set-mss, 1300 ]
- [ /usr/sbin/ip6tables, -t, mangle, -A, POSTROUTING, -p, tcp, --tcp-flags, 'SYN,RST', SYN, -j, TCPMSS, --set-mss, 1300 ]
runcmd:
- [ /usr/bin/cloud-init, single, --name, cc_write_files, --frequency, always ]
- [ /usr/bin/sh, -c, /etc/dynamicaddress.sh ]
- [ /usr/bin/systemctl, enable, NetworkManager-wait-online.service ]
- [ /usr/bin/cp, -Ra, /etc/ssh/ssh_host_rsa_key, /home/ubuntu/.ssh/id_rsa ]
- [ /usr/bin/cp, -Ra, /etc/ssh/ssh_host_rsa_key.pub, /home/ubuntu/.ssh/id_rsa.pub ]
- [ /usr/bin/chmod, +x, /root/bin_downloader.sh ]
- [ /root/bin_downloader.sh ]
- [ /usr/bin/chown, -R, ubuntu:ubuntu, /home/ubuntu ]
- [ /usr/bin/systemctl, enable, k3s-agent.service ]
power_state:
mode: reboot