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

Issue 7223063: Boilerplate environments.yaml (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by wallyworld
Modified:
11 years, 3 months ago
Reviewers:
mp+145769
Visibility:
Public.

Description

Boilerplate environments.yaml A new command "juju generate-config" is introduced to generate sensible config for each registered provider. The Environs interface has a new method "BoilerPlateConfig()" which is used to gather the config for each provider. If a user has an environments.yaml already, it is not overwritten. Otherwise the boilerplate has sensible defaults which just need a little tweaking to get a working system. As new providers are rehistered (eg local, mass), the boilerplate header will need to be tweaked to refer to the new providers. As a driveby, since config is being generated, I've renamed auth-method to auth-mode. Python juju uses auth-mode and Go juju should be compatible. https://code.launchpad.net/~wallyworld/juju-core/boilerplate-environment-setup/+merge/145769 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 39

Patch Set 2 : Boilerplate environments.yaml #

Total comments: 34

Patch Set 3 : Boilerplate environments.yaml #

Total comments: 18

Patch Set 4 : Boilerplate environments.yaml #

Unified diffs Side-by-side diffs Delta from patch set Stats (+457 lines, -53 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 2 2 chunks +16 lines, -4 lines 0 comments Download
M cmd/juju/bootstrap_test.go View 1 2 3 2 chunks +16 lines, -3 lines 0 comments Download
A cmd/juju/generateconfig.go View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
A cmd/juju/generateconfig_test.go View 1 2 1 chunk +82 lines, -0 lines 0 comments Download
M cmd/juju/main.go View 1 1 chunk +1 line, -0 lines 0 comments Download
A environs/boilerplate_config.go View 1 2 3 1 chunk +85 lines, -0 lines 0 comments Download
A environs/boilerplate_config_test.go View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M environs/config.go View 1 2 1 chunk +30 lines, -11 lines 0 comments Download
M environs/config_test.go View 1 2 3 chunks +21 lines, -2 lines 0 comments Download
M environs/dummy/environs.go View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M environs/ec2/ec2.go View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M environs/export_test.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M environs/interface.go View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M environs/openstack/config.go View 1 2 5 chunks +10 lines, -10 lines 0 comments Download
M environs/openstack/config_test.go View 1 2 5 chunks +9 lines, -9 lines 0 comments Download
M environs/openstack/export_test.go View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M environs/openstack/live_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M environs/openstack/provider.go View 1 2 3 5 chunks +66 lines, -11 lines 0 comments Download

Messages

Total messages: 13
wallyworld
Please take a look.
11 years, 3 months ago (2013-01-31 04:30:00 UTC) #1
dimitern
LGTM, nice!
11 years, 3 months ago (2013-01-31 09:26:06 UTC) #2
jameinel
overall LGTM, a couple small points most of which can be treated as follow up ...
11 years, 3 months ago (2013-01-31 09:45:02 UTC) #3
fwereade
Looks good; some comments follow. https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go#newcode37 cmd/juju/bootstrap.go:37: if _, ok := ...
11 years, 3 months ago (2013-01-31 14:02:23 UTC) #4
rog
thanks a lot for working on this. i have some trivial comments, but a couple ...
11 years, 3 months ago (2013-01-31 14:45:21 UTC) #5
fwereade
https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go#newcode39 cmd/juju/bootstrap.go:39: filename, err := environs.WriteEnvirons("", environs.BoilerPlateConfig()) On 2013/01/31 14:45:21, rog ...
11 years, 3 months ago (2013-01-31 15:02:36 UTC) #6
wallyworld
Please take a look. https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go#newcode37 cmd/juju/bootstrap.go:37: if _, ok := err.(*os.PathError); ...
11 years, 3 months ago (2013-02-01 11:52:56 UTC) #7
rog
looking good. mostly trivials here, with a couple of slightly more significant queries. https://codereview.appspot.com/7223063/diff/1/cmd/juju/bootstrap.go File ...
11 years, 3 months ago (2013-02-01 13:49:09 UTC) #8
wallyworld
Please take a look. https://codereview.appspot.com/7223063/diff/9001/cmd/juju/bootstrap.go File cmd/juju/bootstrap.go (right): https://codereview.appspot.com/7223063/diff/9001/cmd/juju/bootstrap.go#newcode36 cmd/juju/bootstrap.go:36: if err != nil { ...
11 years, 3 months ago (2013-02-04 01:25:05 UTC) #9
rog
LGTM with the below minor issues addressed. thanks a lot for bearing with me through ...
11 years, 3 months ago (2013-02-04 09:39:25 UTC) #10
fwereade
LGTM; otherwise general +1 to rog's suggestions. Thanks for this. https://codereview.appspot.com/7223063/diff/7003/cmd/juju/generateconfig.go File cmd/juju/generateconfig.go (right): https://codereview.appspot.com/7223063/diff/7003/cmd/juju/generateconfig.go#newcode51 ...
11 years, 3 months ago (2013-02-04 15:49:16 UTC) #11
wallyworld
https://codereview.appspot.com/7223063/diff/7003/cmd/juju/generateconfig.go File cmd/juju/generateconfig.go (right): https://codereview.appspot.com/7223063/diff/7003/cmd/juju/generateconfig.go#newcode51 cmd/juju/generateconfig.go:51: fmt.Fprint(out, "Edit the file to configure your juju environment ...
11 years, 3 months ago (2013-02-04 23:45:30 UTC) #12
wallyworld
11 years, 3 months ago (2013-02-04 23:58:16 UTC) #13
*** Submitted:

Boilerplate environments.yaml

A new command "juju generate-config" is introduced to generate sensible config
for each registered provider. The Environs interface has a new method
"BoilerPlateConfig()"
which is used to gather the config for each provider.

If a user has an environments.yaml already, it is not overwritten. Otherwise the
boilerplate
has sensible defaults which just need a little tweaking to get a working system.

As new providers are rehistered (eg local, mass), the boilerplate header will
need to be tweaked
to refer to the new providers.

As a driveby, since config is being generated, I've renamed auth-method to
auth-mode. 
Python juju uses auth-mode and Go juju should be compatible.

R=dimitern, jameinel, fwereade, rog
CC=
https://codereview.appspot.com/7223063
Sign in to reply to this message.

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