Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am creating a juju charm that needs to have parameters passed to the configuration upon deployment.

I have looked around and I know you can use juju deploy <charm> --config="key:value;key2:value2" but I cannot figure out where do those fit in to while creating the charm it self.

How can I do this and how does it work?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Bruno, there is actually an open feature request right now for this capability:

https://bugs.launchpad.net/juju/+bug/893184

You can create a yaml file right now that will set those options, this page explains it:

https://juju.ubuntu.com/docs/drafts/service-config.html#using-configuration-options

Basically to do what your example talks about, save this as local.yaml:

service-name:
  key: "value"
  key2: "value2"

And then do

juju deploy charm-name service-name --config local.yaml

You can also set the options immediately after the deploy (before the unit is even running) with

juju set service-name key=value key2=value2

share|improve this answer
    
great! thx for the reply ;) –  Bruno Pereira Nov 22 '11 at 18:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.