Skip to content

3fs/consul-haproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autoscaled load balancing

Install vagrant plugins

$ vagrant plugin install vagrant-docker-compose

$ vagrant plugin install vagrant-reload

Usage

Create Vagrantfile similar to Vagrantfile inside example directory in the repository.

Create script similar to script inside example directory. Script installs Docker and Docker-compose. Specify path to script that will be executed on guest machine.

	config.vm.provision "shell", path: "~/script.sh"

Copy consul_server and consul_worker to consul_haproxy folder inside your home directory.

Sync consul_haproxy folder to the guest machine:

	server.vm.synced_folder "~/consul_haproxy" , "/vagrant/consul_template"

To run server machine with docker-compose on vagrant up

	server.vm.provision :docker
  	server.vm.provision :docker_compose, yml: "/vagrant/consul_template/consul_server/docker-compose.yml", rebuild: true, run: "always"

To run worker machine with docker-compose on vagrant up

	server.vm.provision :docker
  	server.vm.provision :docker_compose, yml: "/vagrant/consul_template/consul_worker/docker-compose.yml", rebuild: true, run: "always"

About

Autoscaled load balancing using Haproxy and Consul

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published