environment identifiers

Kapil Thangavelu kapil.thangavelu at canonical.com
Tue Jan 15 15:52:41 UTC 2013


On Tue, Jan 15, 2013 at 9:34 AM, Gustavo Niemeyer <
gustavo.niemeyer at canonical.com> wrote:

> The environment identifier we've been using so far to disambiguate is
> a name, which even though prone to duplication, is also encouraged to
> be unique within a user's context (note you've added JUJU_ENV last year
> with it in several places).
>

Unfortunately that's not unique from a service provider perspective or
really any non-user centric perspective. The JUJU_ENV usage from last year
is for juju cli usage and thus defer's to the uniqueness of name within the
user's environments.yaml.


>
> If we introduce a different form of identification for environments, that
> will span consequences throughout the system: How do you see it? How
> do you export it? How do you set it? How do you correlate it to the
> actual environment? And so on. So, I'd rather avoid that for the moment
> if possible.
>
>
Its an environment instance property, it wouldn't be exported as that
captures definition. The in review branch currently sets the environment id
as part of state server initialization. As an environment instance identity
property it can only be set once. Wrt to correlation the goal is that its
also available from the websocket endpoint used that's configured with the
service provider.

While i respect the desire to defer, its currently needed for some in
progress integration work this cycle.

cheers,

Kapil

On Tue, Jan 15, 2013 at 1:14 PM, Kapil Thangavelu
> <kapil.thangavelu at canonical.com> wrote:
> > Hi Folks,
> >
> > a use case that has come up for a few users that are developing tools
> that
> > work across multiple environments is an ability to uniquely identify an
> > environment from within a charm. Their typically deploying a subordinate
> for
> > data aggregation and from within the subordinate need to tag the data
> from
> > the env with a unique id to disambiguate from other environments. To
> support
> > this i've added a JUJU_ENV_ID hex uuid env var that's available from
> within
> > hooks.
> >
> > thoughts?
> >
> > cheers,
> >
> > Kapil
> >
> >
> >
> > --
> > Juju-dev mailing list
> > Juju-dev at lists.ubuntu.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/juju-dev
> >
>
>
>
> --
> gustavo @ http://niemeyer.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20130115/f8eb2299/attachment.html>


More information about the Juju-dev mailing list