forked from mikenomitch/quick-nomad-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup.sh.tpl
29 lines (20 loc) · 843 Bytes
/
startup.sh.tpl
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
#!/bin/bash
set -ex
export DEBIAN_FRONTEND=noninteractive
echo "========================================="
echo "=== Setting up Nomad and Dependencies ==="
echo "========================================="
sudo apt-get -yqq update
sudo apt-get -yqq install apt-transport-https ca-certificates curl gnupg-agent software-properties-common unzip jq
echo "=== Finished Installing Apt Deps ==="
echo "=== Getting Docker ==="
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get -yqq update
sudo apt-get -yqq install docker-ce
echo "=== Nomad ==="
${nomad_config}
sudo systemctl daemon-reload
echo "=== Starting Nomad ==="
sudo systemctl enable nomad.service
sudo systemctl start nomad.service