Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(568)

Issue 10959043: Azure provider: map instances onto Azure services.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by rvb
Modified:
10 years, 9 months ago
Reviewers:
mp+173140, gz, jameinel
Visibility:
Public.

Description

Azure provider: map instances onto Azure services. We had to change our strategy w.r.t. how the Azure provider maps Juju instances onto Azure's objects. Our original plan was to use a Service as a container for all the Deployments created by the provider, each of these deployments corresponding to a Juju node. This is graphical representation of the model we had in mind: Account > - Hosted Service (container configured in the juju config) - Deployment 1 (juju instance 1) - VM - Deployment 2 (juju instance 2) - VM - Deployment 3 (juju instance 3) - VM We thought we could use Service as a container of Deployments (and thus, VMs). But we can't! It turns out a Service can only be deployed to "staging" and to "production"... and those are its two Deployments. You can't add more. Here is the Azure model as we now know it: Account > - Hosted Service 1 > - Deployment, production slot > - VM - VM - Deployment, staging slot > - VM - VM - Hosted Service 2 > We discussed our options with the Red Squad and mgz and reached the conclusion that having one hosted service per Juju instance is the only reasonnable solution to accomodate Juju's model with how Azure's structure. We're going with: one Juju Instance is one Azure Service, containing one Deployment, containing one VM. Account > (container configured in the juju config) - Hosted Service 1 (juju instance 1) - Deployment 1 - VM - Hosted Service 2 (juju instance 2) - deployment 2 - VM - Hosted Service 3 (juju instance 3) - deployment 3 - VM In this branch, I change the code from the old model to the new. The changes are surprinsingly straighforward: - In Environ.Instances() and Environ.AllInstances(), use the gwacl method to list the hosted services instead of the method used to list deployments. - Use the gwacl object representing a Service instead of the one representing a Deployment inside the instance.go:azureInstance object. Note that the hostname of the Azure instance, which is stored by Azure on the Deployment object, will be copied over (by the Azure provider, when the hosted service and the deployment will be created) in the Hosted Service's base64-encoded 'Label' field. This is mainly a convenient shortcut to avoid having to fetch the Deployment inside each Service when we want a list of the instances' hostnames. - Get rid of the management hosted service name config item. https://code.launchpad.net/~rvb/juju-core/use-hosted-services/+merge/173140 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -114 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/azure/config.go View 5 chunks +13 lines, -26 lines 0 comments Download
M environs/azure/config_test.go View 5 chunks +15 lines, -31 lines 0 comments Download
M environs/azure/environ.go View 4 chunks +19 lines, -18 lines 1 comment Download
M environs/azure/environ_test.go View 8 chunks +26 lines, -22 lines 0 comments Download
M environs/azure/instance.go View 2 chunks +15 lines, -4 lines 0 comments Download
M environs/azure/instance_test.go View 2 chunks +29 lines, -13 lines 0 comments Download

Messages

Total messages: 4
rvb
Please take a look.
10 years, 9 months ago (2013-07-05 09:04:43 UTC) #1
jameinel
LGTM I think you are losing the environment grouping you used to have (because one ...
10 years, 9 months ago (2013-07-05 10:23:54 UTC) #2
rvb
On 2013/07/05 10:23:54, jameinel wrote: > LGTM > > I think you are losing the ...
10 years, 9 months ago (2013-07-05 14:59:14 UTC) #3
gz
10 years, 9 months ago (2013-07-05 15:12:12 UTC) #4
LGTM, pending StartInstance etc implementation.

I'll echo John's comment that including the environment name and machine tag in
the service name seems like a good idea, compare environs/openstack/provider.go
machineFullName and machinesFilter.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b