Azure Availability Set support on trunk
Andrew Wilkins
andrew.wilkins at canonical.com
Thu Apr 3 12:28:42 UTC 2014
Hi all,
I've just landed support for Azure's Availability Sets on trunk today.
Here's a little demo.
I've written a donkey charm that exposes /bin/hostname via xinetd on port
1234, and deployed 2 units to a new Azure environment.
$ juju status
machines:
"0":
agent-state: started
agent-version: 1.19.0.1
dns-name: juju-azure-r35kwahf53.cloudapp.net
instance-id:
juju-azure-r35kwahf53-jujua4tnr5eitdysr1mux2py5nnw4i5djn9rs87x7b1dwzs0js
instance-state: ReadyRole
series: trusty
"3":
agent-state: started
agent-version: 1.19.0.1
dns-name: juju-azure-lpdz95star.cloudapp.net
instance-id:
juju-azure-lpdz95star-jujur9vwih1h3c22llw6yxtomzrkdip03i6zl7eygvrqlndooi
instance-state: ReadyRole
series: trusty
"4":
agent-state: started
agent-version: 1.19.0.1
dns-name: juju-azure-lpdz95star.cloudapp.net
instance-id:
juju-azure-lpdz95star-jujuh1f37ozd6o8v7h2t04mxer3x8p8bfe3idmqusbve1ymle4
instance-state: ReadyRole
series: trusty
services:
hostname:
charm: local:trusty/hostname-0
exposed: true
units:
hostname/0:
agent-state: started
agent-version: 1.19.0.1
machine: "3"
open-ports:
- 1234/tcp
public-address: juju-azure-lpdz95star.cloudapp.net
hostname/1:
agent-state: started
agent-version: 1.19.0.1
machine: "4"
open-ports:
- 1234/tcp
public-address: juju-azure-lpdz95star.cloudapp.net
-----------------
If you look at the units closely, you'll see they both have the same
public-address. The exposed ports are load balanced across the units:
$ for x in {1..10}; do nc juju-azure-lpdz95star.cloudapp.net 1234; done |
sort | uniq -c
5 jujuh1f37ozd6o8v7h2t04mxer3x8p8bfe3idmqusbve1ymle4
5 jujur9vwih1h3c22llw6yxtomzrkdip03i6zl7eygvrqlndooi
Naturally if I shut down one of those instances, it all goes to the other.
Instances are automatically spread across "upgrade domains" by Azure, which
means when they upgrade their infrastructure only some of the units
disappear. Once Juju's state servers are HA, then they will be distributed
similarly.
Because public ports must be unique or load balanced, SSH is now proxied
via the API server. Thus, "juju ssh hostname/0" still does the right thing;
it'll connect to that unit's *internal* address by proxying through machine
0.
I'll write about some of the concepts in Azure soon, and put something in
juju-core/doc.
Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140403/7ecdfdc2/attachment.html>
More information about the Juju-dev
mailing list