No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
hello-earth-v1
hello-earth-v2
sozu-project
README.md
Vagrantfile

README.md

sozu-vagrant-demo

This is a Vagrant demonstration of Sōzu, the reverse proxy raised at Clever-Cloud. You cand find more informations about Sōzu here:

Prerequisites

  • Install VirtualBox
  • Install Vagrant
  • Clone this repository: git clone git@github.com:k33g/sozu-vagrant-demo.git

Run

Ignition

cd sozu-vagrant-demo
vagrant up

It could be lonf, so ... ☕️ or ☕️

Play

Now you should have 7 virtual machines:

webapp1         192.168.1.21:8080
webapp2         192.168.1.22:8080
webapp3         192.168.1.23:8080
webapp_new1     192.168.1.31:8080
webapp_new2     192.168.1.32:8080
webapp_new3     192.168.1.33:8080
sozuapp         192.168.1.99:8080 
  • the VMs 1, 2 and 3 contain an Express web application (the same, but with a name generated at run time)
  • the VMs 4, 5 and 6 contain the version 2 of the Express web application
  • the last VM contains the Sōzu reverse proxy
    • the ip of Sōzu is 192.168.1.99 and listen on 8080
    • I added this in my hosts file 192.168.1.99 sozu.local
    • then now, you'll connect to it with http://sozu.local:8080/

Remove application(s)

vagrant ssh sozuapp
cd sozu-project/
sudo ./sozu/target/debug/sozuctl --config ./demo.toml  backend remove --id webapp --ip 192.168.1.21 --port 8080
sudo ./sozu/target/debug/sozuctl --config ./demo.toml  backend remove --id webapp --ip 192.168.1.22 --port 8080
sudo ./sozu/target/debug/sozuctl --config ./demo.toml  backend remove --id webapp --ip 192.168.1.23 --port 8080

Add application(s)

vagrant ssh sozuapp
cd sozu-project/
sudo ./sozu/target/debug/sozuctl --config ./demo.toml  backend add --id webapp --ip 192.168.1.31 --port 8080
sudo ./sozu/target/debug/sozuctl --config ./demo.toml  backend add --id webapp --ip 192.168.1.32 --port 8080
sudo ./sozu/target/debug/sozuctl --config ./demo.toml  backend add --id webapp --ip 192.168.1.33 --port 8080

Resources

You can read these 2 🇫🇷 blog posts: