Difference between revisions of "HashiCorp/Consul"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| Line 4: | Line 4: | ||
unzip consul_1.4.3_linux_amd64.zip  | unzip consul_1.4.3_linux_amd64.zip  | ||
sudo mv consul /usr/bin  | sudo mv consul /usr/bin  | ||
</source>  | |||
= Run consul =  | |||
You need run at least one <tt>consul server</tt> 3-5 are recommended.  | |||
All other agents do run in a <tt>client</tt> mode, it's very light weight process that :  | |||
* register services  | |||
* check healthchecks  | |||
* forward queries to servers  | |||
* agent needs to run on every node that is a part of a cluster  | |||
Run consul in dev mode where single server is also acting as a client:  | |||
<source lang=bash>  | |||
consul agent -dev -node <consul_srv_name>  | |||
# -node is optional as by default hostname is used, but for OSX with period in it will case problems with dns queries  | |||
consul members  | |||
</source>  | </source>  | ||
Revision as of 20:54, 11 March 2019
Install
wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip unzip consul_1.4.3_linux_amd64.zip sudo mv consul /usr/bin
Run consul
You need run at least one consul server 3-5 are recommended. All other agents do run in a client mode, it's very light weight process that :
- register services
 - check healthchecks
 - forward queries to servers
 - agent needs to run on every node that is a part of a cluster
 
Run consul in dev mode where single server is also acting as a client:
consul agent -dev -node <consul_srv_name> # -node is optional as by default hostname is used, but for OSX with period in it will case problems with dns queries consul members
References
- A practical and simple consul-template example Tutorial with docker restart based on a template change
 - Consul template Official Git repository