cluster-deployment/jobs/nomad-both/nomad-both.job

22 lines
793 B
Bash
Executable file

#!/usr/bin/env bash
SCRIPT "${JOBFILE_DIR}/common.sh";
COPY "../nomad/both.hcl" "/tmp/both.hcl"
RUN "sudo mv /tmp/both.hcl /etc/nomad/both.hcl";
RUN "sudo chown root:root /etc/nomad/both.hcl";
RUN "sudo apt-get install --yes hashicorp-nomad-systemd-both";
# 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";