Skip to content

Instantly share code, notes, and snippets.

@ilackarms
Last active November 14, 2024 17:53
Show Gist options
  • Select an option

  • Save ilackarms/52fcc04d5b742eb17c9b502e714aa102 to your computer and use it in GitHub Desktop.

Select an option

Save ilackarms/52fcc04d5b742eb17c9b502e714aa102 to your computer and use it in GitHub Desktop.
simple script to set up gloo with consul, vault, nomad
#!/usr/bin/env bash
set -e
if ! type levant > /dev/null; then
echo installing levant...
wget https://github.com/jrasell/levant/releases/download/0.2.7/darwin-amd64-levant
chmod +x darwin-amd64-levant
sudo mv darwin-amd64-levant /usr/local/bin/levant
fi
if ! type vagrant > /dev/null; then
echo installing vagrant...
brew cask install vagrant
fi
if [[ ! -f Vagrantfile ]]; then
echo cloning Gloo repo and changing directory to gloo/install/nomad...
git clone --branch v0.18.23 https://github.com/solo-io/gloo
cd gloo/install/nomad
fi
echo bringing up vagrant box
vagrant up
echo deploying gloo
levant deploy \
-var-file variables/variables-linux.yaml \
jobs/gloo.nomad
echo deploying petstore
levant deploy \
-var-file variables/variables-linux.yaml \
jobs/petstore.nomad
echo creating route
glooctl add route \
--path-prefix / \
--dest-name petstore \
--prefix-rewrite /api/pets \
--use-consul
echo example curl:
curl localhost:8080/
@ilackarms
Copy link
Author

to view each UI:
nomad: http://localhost:4646
consul: http://localhost:8500
vault: http://localhost:8200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment