Latest posts by Ankit Verma (see all)
- Microservices Pattern – Shared Data - February 21, 2021
- Event Sourcing – Data Integrity - January 23, 2021
- CQRS ( Command Query Responsibility Seggregation) - January 8, 2021
Consul
Consul is a service networking solution to connect and secure services across any runtime platform and public or private cloud
Amazon Elastic Cloud Compute (EC2)
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
Steps:
- cd /usr/local/bin
- sudo wget https://releases.hashicorp.com/consul/<linux_version>/<linux_version>.zip
- sudo unzip <linux_version>.zip && sudo rm -rf *.zip
- sudo mkdir -p /etc/consul/data/ && sudo chmod 777 /etc/consul/data/
- sudo mkdir -p /etc/consul/config/ && sudo chmod 777 config/
- Create a config file.
{
"bootstrap": true,
"server": true,
"log_level": "DEBUG",
"enable_syslog": true,
"datacenter": "dc1",
"addresses" : {
"http": "0.0.0.0"
},
"bind_addr": "172.31.43.62",
"node_name": "172.31.43.62",
"data_dir": "/etc/consul/data/consul_data",
"ui": true
}
7. Create a service file.
[ Unit]
Description=Consul Startup process
After=network.target
[Service]
Type=simple
ExecStart=/bin/bash -c '/usr/local/bin/consul agent -config-dir /etc/consul/config/config.json'
TimeoutStartSec=0
[Install]
WantedBy=default.target
8. run by using
Start Services : systemctl start/stop/restart consul.
Just make sure port 8500 must be open to access. Now you are ready for utilizing consul anytime and from anywhere.