-
Notifications
You must be signed in to change notification settings - Fork 26
/
bootstrap.yaml
51 lines (47 loc) · 1.33 KB
/
bootstrap.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
#cloud-config
# Add groups to the system
# Adds the ubuntu group with members 'root' and 'sys'
# and the empty group hashicorp.
groups:
- ubuntu: [root,sys]
- docker
- hashicorp
# Add users to the system. Users are added after groups are added.
users:
- default
- name: terraform
gecos: terraform
shell: /bin/bash
primary_group: hashicorp
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin, docker
lock_passwd: false
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJqakzRMOnYMYVAjai8JOTdg3stzshNLgHNEgzk9aOMg
packages:
- git
- vim
- python3
write_files:
- content: |
#!/bin/bash
set -e
cd
git clone https://github.com/RoboCup-SSL/ssl-simulation-setup.git
cd ssl-simulation-setup
echo -n "${root_domain}" > config/root_domain
./config/docker/init.sh
./config/caddy/generate_caddyfile.py
docker compose up -d
docker compose -f docker-compose-monitoring.yaml up -d
sleep 30s
./config/guacamole/update_guacamole.py
./config/caddy/update_caddy_passwords.sh
./config/caddy/generate_caddyfile.py
./config/caddy/update_caddy_config.sh
path: /init.sh
owner: terraform:hashicorp
permissions: '0755'
runcmd:
- curl -fsSL https://get.docker.com | sh
- [ "su", "--login", "terraform", "-c", "/init.sh" ]