juju-solutions / charmguardian

Testing tool for Juju charm, bundles, and charm/bundle merge proposals.
3 stars 3 forks source link

feature request: expose juju admin user and api endpoint via ENV #15

Open adam-stokes opened 10 years ago

adam-stokes commented 10 years ago

Would it be possible to expose the juju admin user and state server api endpoint through environment variables? This would make it easier to access the juju api through a library binding and would essentially work no matter what provider is used. Something like

JUJU_API_USER = user-admin
JUJU_API_ENDPOINT = wss://10.0.0.1:17070/
bcsaller commented 10 years ago

This would also have to include the password. Rather than generically provide the ability for any charm to do anything to an entire deployment I'd like to see a relation with juju-core to get admin creds (which would be handled in the relationship hook)

juju add-relation my-service juju-core:credentials

adam-stokes commented 10 years ago

@bcsaller good idea, i second this :+1: