discoposse / nomad-vagrant-lab Goto Github PK
View Code? Open in Web Editor NEWA nifty little 3-node or 6-node local cluster configuration to run HashiCorp Nomad
A nifty little 3-node or 6-node local cluster configuration to run HashiCorp Nomad
One of the previous commits mistakingly changed Vancouver to also be Toronto. I'll be submitting a PR to resolve this.
Although this may not be an issue in all cases, we should account for these scenarios. When spinning up the Vagrant lab the scripts work just fine. But if we decide to run vagrant provision
after the environment is up and running, the scripts throw many errors and cause failures.
When doing a vagrant up
and the shell script provisioning kicks in we are presented with the following error (for each host):
nomad-a-1: cp:
nomad-a-1: cannot stat '/vagrant/nomad-server.hcl'
nomad-a-1: : No such file or directory
The script is failing at line#35
The launch scripts work fine except on subsequent executions. We begin to experience errors, etc. which are less than optimal. We need to ensure that we are only killing processes when they are actually already running. This will allow for future potential of streamlining the spin up of auto starting the services at Vagrant provisioning time.
When the scripts were changed in #4, we removed the nohup
in the startup commands. This leaves flowing logging to stdout which makes it less than ideal for executing commands on the nodes. Especially when walking through the Pluralsight course. I will be submitting a PR to add nohup
back.
So, following the blog post the following instructions seem incorrect:
Connect via ssh to the first node using the command vagrant ssh nomad-a-1
Change to the code folder with the command cd /vagrant
Launch the Nomad script with this command: sudo sh launch nomad-a-1.sh
Connect via ssh to the second node using the command vagrant ssh nomad-a-2
Change to the code folder with the command cd /vagrant
Launch the Nomad script with this command: sudo sh launch nomad-a-2.sh
Connect via ssh to the third node using the command vagrant ssh nomad-a-3
Change to the code folder with the command cd /vagrant
Launch the Nomad script with this command: sudo sh launch nomad-a-3.sh
I believe they should be:
Connect via ssh to the first node using the command vagrant ssh nomad-a-1
Change to the code folder with the command cd /vagrant
Launch the Nomad script with this command: sudo sh launch-a-1.sh
Connect via ssh to the second node using the command vagrant ssh nomad-a-2
Change to the code folder with the command cd /vagrant
Launch the Nomad script with this command: sudo sh launch-a-2.sh
Connect via ssh to the third node using the command vagrant ssh nomad-a-3
Change to the code folder with the command cd /vagrant
Launch the Nomad script with this command: sudo sh launch-a-3.sh
When attempting to spin up Nomad cluster it fails because the backend Consul cluster is not up and running. We need to tweak the spin up script(s) to form the Consul cluster first before forming the Nomad cluster.
@discoposse What are your thoughts on the direction of the scripts to spin up Consul/Nomad clusters?
Now that I know this repo is for usage of the Pluralsight course as well, is your idea that the user is to login to each node and spin up these services? Which would lead them into further learning potentially? Or does it make sense to have these services up, running and ready for interaction?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.