21 lines
805 B
Bash
Executable file
21 lines
805 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
SCRIPT "jobs/nomad-both/common.sh";
|
|
|
|
COPY "../nomad/client.hcl" "/tmp/client.hcl"
|
|
|
|
RUN "sudo mv /tmp/client.hcl /etc/nomad/client.hcl";
|
|
RUN "sudo chown root:root /etc/nomad/client.hcl";
|
|
|
|
RUN "sudo apt-get install --yes hashicorp-nomad-systemd-client";
|
|
|
|
# Commented out since we're now running over wgoverlay & allowing all traffic on that interface because dynamic ports
|
|
# RUN "sudo ufw allow 4646/tcp comment nomad-http";
|
|
# RUN "sudo ufw allow 4647/tcp comment nomad-rpc";
|
|
# RUN "sudo ufw allow 4648/tcp comment nomad-serf";
|
|
RUN "sudo ufw delete allow 4646/tcp comment nomad-http";
|
|
RUN "sudo ufw delete allow 4647/tcp comment nomad-rpc";
|
|
RUN "sudo ufw delete allow 4648/tcp comment nomad-serf";
|
|
|
|
RUN "sudo systemctl enable nomad.service";
|
|
RUN "sudo systemctl restart nomad.service";
|