GROUP=alpha
REBOOT_STRATEGY=best-effort
sudo systemctl restart update-engine
sudo update_engine_client -check_for_update
sudo update_engine_client -update
update-ssh-keys -D coreos-cloudinit
echo 'ssh-rsa ...' | update-ssh-keys -a core
sudo su -
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
dnf -y install ncurses-devel ncurses
- CoreOS 的檔案會被 mount 在
/media/root
裡
sudo route add default gw {gwip}
sudo systemctl enable docker # 開機服務
sudo systemctl is-enabled docker # 檢查是否 enable
- 建立下列檔案
/etc/systemd/system/{name}.service
/etc/systemd/system/{name}.timer
sudo loginctl enable-linger core # 免登入
sudo loginctl show-user core # 顯示狀態
[Unit]
Description=Add default gateway
[Service]
Type=oneshot
ExecStart=/usr/bin/sudo /bin/route add default gw {gwip}
[Unit]
Description=Boot run
[Timer]
OnBootSec=30
[Install]
WantedBy=network.target