-
-
Save Clivern/a01515babd14c95d9fc0e127893b47c3 to your computer and use it in GitHub Desktop.
HashiCorp Nomad installation on Linux x64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Installation of Hashicorp Nomad for deploy process | |
# | |
# Download this file: | |
# curl -sSL https://gist.githubusercontent.com/ryanpadilha/351a4a4f17afdc8eb0d963897b98122a/raw/ -o nomad-install.sh | |
# | |
echo "Initializing script for devops - Nomad Hashicorp" | |
NOMAD_VERSION=0.7.0 | |
#CONSUL_VERSION=1.0.1 | |
sudo mkdir -p /var/wplex/devops | |
cd /var/wplex/devops | |
#echo "fetching consul binary for Linux x64..." | |
#curl -sSL https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip -o consul.zip | |
echo "fetching nomad binary for Linux x64..." | |
curl -sSL https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip -o nomad.zip | |
# echo "fetching nomad binary for LXC containers..." | |
# curl -sSL https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64-lxc.zip -o nomad.zip | |
echo "Installing nomad..." | |
unzip nomad.zip | |
sudo install nomad /usr/bin/nomad | |
sudo mkdir -p /etc/nomad.d | |
sudo chmod a+w /etc/nomad.d | |
echo "Installing autocomplete..." | |
nomad -autocomplete-install | |
echo "Creating structure for hashicorp-cluster..." | |
DATA_DIR="/var/wplex/devops/nomad-hashicorp" | |
if [ ! -d "$DATA_DIR" ]; then | |
sudo mkdir -p "$DATA_DIR" | |
echo "Hashicorp directory created: $DATA_DIR" | |
fi | |
echo "Cleaning files..." | |
sudo rm -rf nomad.zip | |
echo "Done script for devops - Nomad Hashicorp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment