ACTION: if you have "admin" hardcoded in scripts, this is a warning that things will change soon(ish)
Tim Penhey
tim.penhey at canonical.com
Sun Sep 28 20:54:48 UTC 2014
On 26/09/14 20:39, Bjorn Tillenius wrote:
> On Fri, Sep 26, 2014 at 04:57:17PM +1200, Tim Penhey wrote:
>> Hi folks,
>>
>> All environments that exist so far have had an "admin" user being the
>> main (and only) user that was created in the environment, and it was
>> used for all client connections.
>>
>> Code has landed in master now that makes this initial username
>> configurable. The juju client is yet to take advantage of this, but
>> there is work due to be finished off soon that does exactly that.
>>
>> Soon, the 'juju bootstrap' command will use the name of the currently
>> logged in user as the initial username to create [1].
>
> What's the official way of getting the username in 1.20.8? I see 'juju
> api-endpoints' which returns the state servers, and 'juju
> get-environment' that returns a bunch of information, except the
> username.
>
> The only way I see is to get the .jenv file and parse it, but it feels a
> bit dirty. Is it guaranteed that the location and name of the file won't
> change, and that the format of it won't be changed in way that breaks
> backwards-compatibility?
We don't have one yet, but one command that was proposed was
"juju whoami"
This would be pretty trivial to implement. There are a bunch of user
commands that will be coming on-line soon.
We won't land the change to change the admin user until there is an easy
way to determine what that name it.
The change will not change the user for any existing environment, only
newly bootstrapped ones.
Tim
More information about the Juju-dev
mailing list