Merge lp:~julian-edwards/gwacl/user-data-config into lp:gwacl
Status: | Merged |
---|---|
Approved by: | Julian Edwards |
Approved revision: | 147 |
Merged at revision: | 149 |
Proposed branch: | lp:~julian-edwards/gwacl/user-data-config |
Merge into: | lp:gwacl |
Diff against target: |
192 lines (+37/-11) 5 files modified
example/management/run.go (+16/-5) helpers_apiobjects_test.go (+2/-0) management_base_test.go (+1/-1) xmlobjects.go (+7/-1) xmlobjects_test.go (+11/-4) |
To merge this branch: | bzr merge lp:~julian-edwards/gwacl/user-data-config |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email: mp+172260@code.launchpad.net |
Commit message
Add UserData to LinuxProvisioni
Description of the change
This branch adds UserData to LinuxProvisioni
I also changed the management example to pass some dummy userdata and to optionally pause after setting up the VM so users can play with it before shutting down. Additionally I gave the instance a fixed user/pass of ubuntu/Ubuntu123 since random passwords are no use to man nor beast and is certainly not a security hazard on a short-lived private instance.
Long term, I want a new command line utility to manage VMs.
Looks good, but I've got a question (see [1]), hence "needs info".
[0]
46 + var wait string "Pausing so you can play with the newly-created VM")
47 + fmt.Println(
48 + fmt.Println("To clear up, type something and press enter to continue")
49 + fmt.Scan(&wait)
That's great (I was planning to do something like that myself today :)). How about printing more details about the host to help the testing:
request := &gwacl. GetDeploymentRe quest{ServiceNa me: hostServiceName, DeploymentName: machineName} nt(request) Println( "host:" , fqdn) Println( "user:test" ) Println( "password: ", password)
deploy, err := api.GetDeployme
fqdn, err := deploy.GetFQDN()
fmt.
// The user name should be a variable!!!!
fmt.
fmt.
[1]
138 + <UserData> %s</UserData>
What about escaping? Shouldn't this be base64 escaped or do you think it should be the caller's responsibility to do something like that?
My take on this is that gwacl should probably base64-encode this to avoid messing with the XML structure.
[2]
24 + location := "West US"
25 + release := "13.04"
Why this change? I don't mind the location change but precise is our target platform at the moment so I'd rather keep that as our default for experimenting.