Last active
November 14, 2024 17:53
-
-
Save ilackarms/52fcc04d5b742eb17c9b502e714aa102 to your computer and use it in GitHub Desktop.
simple script to set up gloo with consul, vault, nomad
This file contains hidden or 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
| #!/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/ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to view each UI:
nomad: http://localhost:4646
consul: http://localhost:8500
vault: http://localhost:8200