add perms and enable nomad ui

main
Ayush Mukherjee 3 years ago
parent 557c7d86d4
commit a227919b02

@ -56,6 +56,7 @@ cat >/etc/nomad.d/nomad.hcl <<EOF
datacenter = "dc1"
data_dir = "/opt/nomad"
EOF
chown nomad:nomad /etc/nomad.d/nomad.hcl
if [ $nomaduser == "nomad" ]; then
@ -65,8 +66,11 @@ server {
enabled = true
bootstrap_expect = 1
}
ui {
enabled = true
}
EOF
chown nomad:nomad /etc/nomad.d/server.hcl
else
# write client config
@ -75,13 +79,11 @@ client {
enabled = true
}
EOF
chown nomad:no
fi
# reload systemd
systemctl daemon-reload
# enable and start service
systemctl enable --now nomad.service
echo "Done! Nomad service enabled and started."
echo "Done! Run systemctl start to use nomad."

Loading…
Cancel
Save