Using Weave and Scope with Convox
Weave and Convox make a great match. While Convox simplifies platform maintenance, allowing you to create a private cloud in minutes, Weave Run and Weave Scope do the same for distributed application development by...
Weave and Convox make a great match. While Convox simplifies platform maintenance, allowing you to create a private cloud in minutes, Weave Run and Weave Scope do the same for distributed application development by adding load balancing, service discovery and monitoring. With the new release of Weave Scope visualizing your setup is fast, and with a few clicks it allows you to quickly spot any issues with your infrastructure.
To incorporate Weave into the Convox platform simply use Weave’s ECS AMI while installing Convox.
- Check Weave’s latest ECS AMIs and choose the AWS region and its corresponding Weave AMI to which you want to install Convox.
- Next, select an existing EC2 Key Pair or create a new one from Amazon. Ensure you save the key, as you will need it to access the Scope UI.
- Download the Convox CLI for your platform and then install Convox and Weave by typing:
convox install --region chosen-region --ami chosen-ami-id --key chosen-ec2-key-name
That’s all there is to it. You have just installed Convox with Weave support:
- Your Convox apps can now use Weave Run for load balancing and service discovery.
- You can also visualize the Convox rack by pointing your browser at port 4040 of your Convox EC2 instances.
To demonstrate, launch the sinatra sample app into Convox. Then, visualize the app with Weave Scope:
- Get the public IP of one the Convox instances, which you can see from the AWS Console shown below.
- Create a SOCKS proxy to the Convox instance:
ssh -N -D 9999 -i chosen-ec2-key-name.pem ec2-user@XXX.XXX.XXX.XXX
XXX.XXX.XXX.XXXis the public IP of the Convox instance
- Configure your browser to use the SOCKS proxy at
localhost:9999we just created.
- Open URL
http://XXX.XXX.XXX.XXX:4040in your browser, where you should see the following:
You can optionally verify that Weave is ready to load balance and discover services for your app by running
weave status dns:
ssh -i chosen-ec2-key-name.pem ec2-user@XXX.XXX.XXX.XXX
[ec2-user@ip-XXX-XXX-XXX-XXX ~]$ weave status dns ecs-agent 10.36.0.1 bc8aae0dca6a 12:ec:a9:3b:12:be ecs-agent 10.44.0.2 5965bceaaaf0 8a:c2:66:c6:d6:43 ecs-agent 10.46.0.2 be8b1b9c6d9e be:9f:10:e3:70:42 postgres 10.44.0.4 b1f46278e02e 8a:c2:66:c6:d6:43 redis 10.36.0.4 0b0ce5ebbb84 12:ec:a9:3b:12:be registry 10.46.0.3 558d38feecfa be:9f:10:e3:70:42 web 10.36.0.5 938e01fe2cac 12:ec:a9:3b:12:be web 10.46.0.4 a46dbd35dedd be:9f:10:e3:70:42 worker 10.44.0.3 26e8ab9ce65a 8a:c2:66:c6:d6:43