-
Install go
see go installer
-
Download hashi-up
curl -sLS https://get.hashi-up.dev | sh
sudo install hashi-up /usr/local/bin/
hashi-up version
- Deploy consul cluster run on each for last part
export SERVER_1_IP=192.168.0.100
export SERVER_2_IP=192.168.0.101
export SERVER_3_IP=192.168.0.102
hashi-up consul install \
--ssh-target-addr $SERVER_1_IP \
--ssh-target-user ubuntu \
--server \
--client-addr 0.0.0.0 \
--bootstrap-expect 3 \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
hashi-up consul install \
--ssh-target-addr $SERVER_2_IP \
--ssh-target-user ubuntu \
--server \
--client-addr 0.0.0.0 \
--bootstrap-expect 3 \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
hashi-up consul install \
--ssh-target-addr $SERVER_3_IP \
--ssh-target-user ubuntu \
--server \
--client-addr 0.0.0.0 \
--bootstrap-expect 3 \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
- Make agent join consul cluster
export SERVER_1_IP=192.168.0.100
export SERVER_2_IP=192.168.0.101
export SERVER_3_IP=192.168.0.102
export AGENT_1_IP=192.168.0.105
hashi-up consul install \
--ssh-target-addr $AGENT_1_IP \
--ssh-target-user ubuntu \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
- Deploy nomad cluster
export SERVER_1_IP=192.168.0.100
export SERVER_2_IP=192.168.0.101
export SERVER_3_IP=192.168.0.102
hashi-up nomad install \
--ssh-target-addr $SERVER_1_IP \
--ssh-target-user ubuntu \
--server \
--bootstrap-expect 3 \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
hashi-up nomad install \
--ssh-target-addr $SERVER_2_IP \
--ssh-target-user ubuntu \
--server \
--bootstrap-expect 3 \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
hashi-up nomad install \
--ssh-target-addr $SERVER_3_IP \
--ssh-target-user ubuntu \
--server \
--bootstrap-expect 3 \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
- Make agent join nomas cluster
export SERVER_1_IP=192.168.0.100
export SERVER_2_IP=192.168.0.101
export SERVER_3_IP=192.168.0.102
export AGENT_1_IP=192.168.0.105
hashi-up nomad install \
--ssh-target-addr $AGENT_1_IP \
--ssh-target-user ubuntu \
--client \
--retry-join $SERVER_1_IP --retry-join $SERVER_2_IP --retry-join $SERVER_3_IP
- Install CNI plugin for docker
curl -L -o cni-plugins.tgz "https://github.com/containernetworking/plugins/releases/download/v1.0.0/cni-plugins-linux-$( [ $(uname -m) = aarch64 ] && echo arm64 || echo amd64)"-v1.0.0.tgz
sudo mkdir -p /opt/cni/bin
sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz