diff --git a/jobs/consul-client/consul-client.job b/jobs/consul-client/consul-client.job deleted file mode 100755 index 82f05c9..0000000 --- a/jobs/consul-client/consul-client.job +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT "jobs/consul-server/common.sh"; - -COPY "../consul/client.hcl" "/tmp/client.hcl" - -RUN "sudo mv /tmp/client.hcl /etc/consul/client.hcl"; -RUN "sudo chown root:root /etc/consul/client.hcl"; -RUN "sudo apt-get update"; -RUN "sudo apt-get install --yes hashicorp-consul-systemd-client"; - -# Do we need these as a client? I'm guessing not....? -# If we run into issues, we'll unblock them. -# RUN "sudo ufw allow 8301 comment consul-serf-lan"; -# # RUN "sudo ufw allow 8300/tcp comment consul-rpc"; -# RUN "sudo ufw allow 8600 comment consul-dns"; - -# Commented out since we're now running over wgoverlay & allowing all traffic on that interface because dynamic ports -# Delete old ufw rules -RUN "sudo ufw delete allow 8301 comment consul-serf-lan"; -RUN "sudo ufw delete allow 8300/tcp comment consul-rpc"; -RUN "sudo ufw delete allow 8600 comment consul-dns"; - -RUN "sudo systemctl enable consul.service"; -RUN "sudo systemctl restart consul.service"; diff --git a/jobs/consul-server/common.sh b/jobs/consul-server/common.sh deleted file mode 100755 index 75cac89..0000000 --- a/jobs/consul-server/common.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -log_msg() { - echo -e "[ ${HOSTNAME} ] [ $(date -u +"%Y-%m-%dT%H:%M:%SZ") ] $@" >&2; -} - - -log_msg "Installing consul"; -sudo apt-get update; -sudo apt-get install --yes hashicorp-consul; - -log_msg "consul installed successfully. Version:"; -consul --version; - -log_msg "Creating directories"; -if [[ ! -d "/etc/consul" ]]; then - sudo mkdir /etc/consul; - sudo chown root:root /etc/consul; -fi - -if [[ ! -d "/srv/consul" ]]; then - sudo mkdir /srv/consul; - sudo chown root:root /srv/consul; - sudo chmod 0750 /srv/consul; -fi diff --git a/jobs/consul-server/consul-server.job b/jobs/consul-server/consul-server.job deleted file mode 100755 index 640710e..0000000 --- a/jobs/consul-server/consul-server.job +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT "${JOBFILE_DIR}/common.sh"; - -COPY "../consul/server.hcl" "/tmp/server.hcl" - -RUN "sudo mv /tmp/server.hcl /etc/consul/server.hcl"; -RUN "sudo chown root:root /etc/consul/server.hcl"; -RUN "sudo apt-get update"; -RUN "sudo apt-get install --yes hashicorp-consul-systemd-server"; - -# TODO: Restrict these to the wesher subnet, and add 8500/tcp (the HTTP API) -# TODO: Do that for Nomad too -# RUN "sudo ufw allow 8301 comment consul-serf-lan"; -# RUN "sudo ufw allow 8300/tcp comment consul-rpc"; -# RUN "sudo ufw allow 8600 comment consul-dns"; - -# Commented out since we're now running over wgoverlay & allowing all traffic on that interface because dynamic ports -# Delete old ufw rules -RUN "sudo ufw delete allow 8301 comment consul-serf-lan"; -RUN "sudo ufw delete allow 8300/tcp comment consul-rpc"; -RUN "sudo ufw delete allow 8600 comment consul-dns"; - -RUN "sudo systemctl enable consul.service"; -RUN "sudo systemctl restart consul.service"; diff --git a/jobs/dns/dns.job b/jobs/dns/dns.job deleted file mode 100755 index 4547d6b..0000000 --- a/jobs/dns/dns.job +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT "${JOBFILE_DIR}/dns.sh";