Series support
John Arbash Meinel
john at arbash-meinel.com
Wed Mar 13 07:10:19 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2013-03-13 5:18, Tim Penhey wrote:
> Hi William,
>
...
> Next, looking back at the suggested work, it says to take upload
> tools out of the Bootstrap params. Where do we move it to? Is it
> a function on the environment itself instead of a weird parameter
> to the environs.Bootstrap function. This would have no impact on
> the actual command function except it would do something like:
>
> if c.UploadTools { environ.UploadTools() } return
> environs.Bootstrap(environ, c.Series)
I personally would like to see the logic of *building* the tools
pulled out from Environs, because it is not environ specific. And then
the actual "write this to a bucket/container/etc" would be the
Environs level abstraction. It is possible to do the "UploadTools is
the api" which then calls back into juju-core, but I personally would
prefer passing in stuff that gets called to build, rather than calling
back.
>
> So... back to the series param, if we have a string param to
> environs.Bootstrap, I'm assuming we should allow the bootstrap
> command CLI to allow setting it. And we pass through the
> requested series through, and it will end up with the provider
> looking to see if it is empty, and if so, use the default-series?
>
> I think I've talked (or typed) myself into a reasonable
> understanding, and summarised below:
>
>
> Work Summary:
>
> * Move cert creation and writing to the bootstrap command *
> environs.Bootstrap errors out if no CA Cert defined or no CA Key
> defined * Add "UploadTools" to the Environ interface, and remove
> the parameter from Bootstrap function. * Add a "series string"
> parameter to environs.Bootstrap, which then gets passed through to
> Environ.Bootstrap.
>
> Questions:
>
> * Is it valid to have a CA Cert but no CA private key? * If we
> make an UploadTools method on environs.Environ, should it take a
> series parameter?
UploadTools currently builds for your current series only (so if you
are running on Precise, it builds a precise-specific tarball). So
passing the series doesn't make a lot of sense, since it can't
actually make use of it. (Unless we enable cross-series compilation,
which should be possible given static binaries.)
That also goes to why building (IMO) should be split out from
uploading the tools.
John
=:->
> * Should environs.Environ.Bootstrap be: Bootstrap(series string,
> stateServerCert, stateServerKey []byte) error or
> Bootstrap(stateServerCert, stateServerKey []byte, series string)
> error
>
> Sound sane?
>
> Tim
>
I don't have a preference on the ordering. You don't have optional
params, so the "put it last and default it to None" that you might do
in python doesn't apply in Go.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlFAJloACgkQJdeBCYSNAAPa9gCeJPVuoBPvNPT4uMlu2nyccrEe
048AnjtvV3+wgtlsz8uq8qLPVKZoskUh
=sc/7
-----END PGP SIGNATURE-----
More information about the Juju-dev
mailing list