That could be useful, assuming it has properties of not hanging on dead
envs.. etc. at the moment jenv parsing clients are responsible for manually
verifying connectivity to servers.

Although it doesn't really address the issue for servers interacting with
the api. ie they'll need to have their ui or config  modified to take user
info or the output of  api-info.

Realistically as i pointed out in a previous api compatibility discussion,
jenvs are part of the api atm. Fwiw, we've got roughly a half-dozen
programs i can think of that of the top of my head that use the api
(landscape, community cloud installer, cloudfoundry orchestrator, deployer,
gui, and others). In general we should try to keep or version compatible
with non juju binary clients on the api, unless we're saying the api is
private.  And if we need to break compatibility, at minimum we should state
why we're doing so, which is still missing in this thread. ie. why can't
bootstrap user have an alias to 'admin' for compatibility in this case?

fwiw, looks like latest jujuclient Environment.connect already used the the
user in the jenv instead of hardcoding admin.

-k






On Mon, Sep 29, 2014 at 5:10 AM, John Meinel <j...@arbash-meinel.com> wrote:

> I think we want a simpler single-command to get everything you need to
> connect to the API. "juju api-info" or something like that, which
> essentially gives you the structured .jenv information that you would use
> (cert information, username, password, IP addresses, etc)
>
> John
> =:->
>
>
> On Mon, Sep 29, 2014 at 12:54 AM, Tim Penhey <tim.pen...@canonical.com>
> wrote:
>
>> 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
>>
>>
>> --
>> Juju-dev mailing list
>> Juju-dev@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>>
>
>
> --
> Juju-dev mailing list
> Juju-dev@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to