Merge lp:~jtv/gwacl/machine-types into lp:gwacl

Proposed by Jeroen T. Vermeulen on 2013-07-19
Status: Rejected
Rejected by: Julian Edwards on 2013-07-22
Proposed branch: lp:~jtv/gwacl/machine-types
Merge into: lp:gwacl
Diff against target: 100 lines (+96/-0)
1 file modified
machinetypes.go (+96/-0)
To merge this branch: bzr merge lp:~jtv/gwacl/machine-types
Reviewer Review Type Date Requested Status
GWACL Hackers 2013-07-19 Pending
Review via email: mp+175736@code.launchpad.net

Commit message

Describe Azure machine types.

Description of the change

This is to help users select a machine type. It would be very easy to add code to automate that choice: order machine types by cost, then walk through them in that order and pick the first type that matches the request. But our immediate purpose is to implement that in Juju, which has its own generic types and code for doing this. So in the short term, this information is provided just so that it can be translated into Juju's information structures.

Jeroen

To post a comment you must log in.
Julian Edwards (julian-edwards) wrote :

Not quite sure how this happened but you obviously missed the fact that I was already working on this :(

I landed https://code.launchpad.net/~julian-edwards/gwacl/trunk/+merge/175732 a short while ago.

Julian Edwards (julian-edwards) wrote :

59 + CPUCores: 0,

Not that it matters any more, but this is wrong, it's one core.

Jeroen T. Vermeulen (jtv) wrote :

> Not quite sure how this happened but you obviously missed the fact that I was
> already working on this :(
>
> I landed https://code.launchpad.net/~julian-edwards/gwacl/trunk/+merge/175732
> a short while ago.

Clearly that happened while I was also pretty much done with this branch. I was just doing what we agreed yesterday.

My internet connection has been incredibly unreliable, so if you said you were doing the gwacl part, I never heard it. You sent an email when I was already basically done with my branch, just before my lunch. But even if I'd seen that in time, it wouldn't have made a difference.

Jeroen T. Vermeulen (jtv) wrote :

> 59 + CPUCores: 0,
>
> Not that it matters any more, but this is wrong, it's one core.

See the comment in the line above, and the comment for the CPUCores field in the struct definition.

Julian Edwards (julian-edwards) wrote :

On Friday 19 Jul 2013 06:51:27 you wrote:
> > 59 + CPUCores: 0,
> >
> > Not that it matters any more, but this is wrong, it's one core.
>
> See the comment in the line above, and the comment for the CPUCores field in
> the struct definition.

In the comment it says one :)

I still don't think a zero value is at all valid, you can't have no cpu cores.
The fact that it's shared is a separate property that I thought we'd said we
weren't going to model.

Julian Edwards (julian-edwards) wrote :

On Friday 19 Jul 2013 06:49:23 Jeroen T. Vermeulen wrote:
> > Not quite sure how this happened but you obviously missed the fact that I
> > was already working on this :(
> >
> > I landed
> > https://code.launchpad.net/~julian-edwards/gwacl/trunk/+merge/175732 a
> > short while ago.
>
> Clearly that happened while I was also pretty much done with this branch. I
> was just doing what we agreed yesterday.
>
> My internet connection has been incredibly unreliable, so if you said you
> were doing the gwacl part, I never heard it. You sent an email when I was
> already basically done with my branch, just before my lunch. But even if
> I'd seen that in time, it wouldn't have made a difference.

I'm sorry for not making myself clearer. Feel free to change things around as
you wish.

Julian Edwards (julian-edwards) wrote :

As you're out on public holiday today, I've taken what you did here that was different to the stuff I already landed and proposed a new diff to the stuff I already landed: https://code.launchpad.net/~julian-edwards/gwacl/augment-rolesizes/+merge/176108

Unmerged revisions

194. By Jeroen T. Vermeulen on 2013-07-19

Documentation.

193. By Jeroen T. Vermeulen on 2013-07-19

Describe Azure machine types.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'machinetypes.go'
2--- machinetypes.go 1970-01-01 00:00:00 +0000
3+++ machinetypes.go 2013-07-19 06:14:27 +0000
4@@ -0,0 +1,96 @@
5+// Copyright 2013 Canonical Ltd. This software is licensed under the
6+// GNU Lesser General Public License version 3 (see the file COPYING).
7+
8+package gwacl
9+
10+// MachineType specifies a type of machine. It can be used to specify
11+// requirements, but for now it is only used to describe the machine types
12+// available in Azure.
13+//
14+// Information taken from:
15+// http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx
16+//
17+// This struct may change if Azure adds more detailed machine types.
18+type MachineType struct {
19+ // CPUCores can be 0, for a shared CPU which can act like anything
20+ // between 0 and 1 cores.
21+ CPUCores int
22+ // Memory is in MB.
23+ Memory int64
24+ // MaxOSDisk specifies the maximum permitted size of the OS disk.
25+ // Actual OS disk size is determined by the OS image.
26+ MaxOSDisk int64
27+ // Cost is not actual price, just an indication of the relative prices
28+ // for running different machine types. It makes sense to pick the
29+ // cheapest type that matches your requirements.
30+ Cost uint64
31+}
32+
33+const (
34+ // MB is the unit in which we specify sizes, so it's 1.
35+ // But please include it anyway, so that units are always explicit.
36+ MB = 1
37+ GB = 1024*MB
38+ TB = 1024*GB
39+)
40+
41+// AzureMachineTypes describes the machine types that Azure offers at the time
42+// of writing. This may be out of date, so use your own information if you
43+// need more precision. In particular, we make no promises about prices!
44+//
45+// The keys in this map are the names for the machine types as Azure knows
46+// them. The values are the specifications of those machine types as we
47+// understand them.
48+//
49+// Costs based on:
50+// http://www.windowsazure.com/en-us/pricing/details/virtual-machines/
51+// We used those numbers, in tenths of US dollar-cents per hour. But the
52+// prices may not be accurate, or they may change without notice. See them
53+// only as a general impression of the relative cost between machine types.
54+//
55+// Based on Azure information as available on 2013-07-19.
56+var AzureMachineTypes = map[string]MachineType{
57+ "ExtraSmall": {
58+ // Only one CPU, shared with other virtual machines.
59+ CPUCores: 0,
60+ Memory: 768*MB,
61+ MaxOSDisk: 20*GB,
62+ Cost: 20,
63+ },
64+ "Small": {
65+ CPUCores: 1,
66+ Memory: 1.75*GB,
67+ MaxOSDisk: 70*GB,
68+ Cost: 90,
69+ },
70+ "Medium": {
71+ CPUCores: 2,
72+ Memory: 3.5*GB,
73+ MaxOSDisk: 135*GB,
74+ Cost: 180,
75+ },
76+ "Large": {
77+ CPUCores: 4,
78+ Memory: 7*GB,
79+ MaxOSDisk: 285*GB,
80+ Cost: 360,
81+ },
82+ "ExtraLarge": {
83+ CPUCores: 8,
84+ Memory: 14*GB,
85+ MaxOSDisk: 605*GB,
86+ Cost: 720,
87+ },
88+ "A6": {
89+ CPUCores: 4,
90+ Memory: 28*GB,
91+ MaxOSDisk: 285*GB,
92+ Cost: 1020,
93+ },
94+ "A7": {
95+ CPUCores: 8,
96+ Memory: 56*GB,
97+ MaxOSDisk: 605*GB,
98+ Cost: 2040,
99+ },
100+}

Subscribers

People subscribed via source and target branches