This service has two purposes:
- A website for charm authors to review the details and assess the quality
of Juju charms.
- A RESTful service to browse and search Juju charms.
If you're reading this on http://jujucharms.com then you've seen what it
can do. In short, this deploys charmworld
which is the Charm Browser and additional tools.
You will need to have Juju installed and a Juju
To deploy charmworld you will need a MongoDB and ElasticSearch instance
in addition to charmworld:
juju deploy mongodb --constraints instance-type=m1.small
juju deploy cs:~charming-devs/precise/elasticsearch --constraints instance-type=m1.small
juju deploy cs:~juju-jitsu/precise/charmworld --constraints \
Once deployed relate mongodb and elasticsearch to charmworld
juju add-relation charmworld mongodb
juju add-relation charmworld elasticsearch:essearch
Add an Apache proxy
# You'll need a local juju repository with a copy of
juju deploy local:apache2 --repository=$PATH_TO_REPOSITORY
juju add-relation apache2:reverseproxy charmworld
To use SSL with an Apache proxy, you can pass the name the the key and
cert to configure-apache2. The script will set the ssl_certlocation and
ssl_keylocation for the apache2 charm. The cert and key must be placed
in the apache2 charm's data directory before deploying it. If you are
testing a local deploy, you can use the script/gen-selfsigned-cert to
create a test key and cert.
scripts/configure-apache2 $MYSITE_KEY $MYSITE_CRT
Finally, expose charmworld to the Internet
juju expose apache2
You should now be able to get to charmworld via the IP address provided in the
output of juju status.
NOTE: There is a delay after the adding the mongodb and elasticsearch
relations. This is due to the process of ingesting the initial batch of charms.
Future updates will take far less time. How will you know when it's ready?
Like all good charms, the port won't open until after the charm is ready.
So if you've run the juju expose command and you don't see any open ports
listed in the juju status output (and no error states), then the set up
There are the options you can configure for charmworld
This is the address that error messages (i.e. from cron) will be sent to. (For
Canonistack instances, this must be an @canonical.com address.)
juju set charmworld email@example.com
Adjust this to determine how often periodic scripts are run by cron.
The default is 15 mins. An interval of less than 5 would likely cause
issues, so values of less than 5 are promoted to 5. A value of 0 will disable
the cron job.
juju set charmworld cron-interval=15
Sets the expectation for how cronjobs should execute. Scripts that run longer
will be forced to yield their locks.
juju set charmworld script-lease-time=15
Adjust this to retrieve charmworld's source code from a different bzr branch.
juju set charmworld 'source=lp:~abentley/charmworld/charm-deployment'
If a particular filesystem has more storage than the root filesystem, for
example /mnt on Canonistack instances, you may wish to configure Mongodb to use
a particular path:
juju set mongodb dbpath=/mnt/mongodb
Report charm bugs at: https://bugs.launchpad.net/charms/precise/+source/charmworld
Report system bugs at: https://bugs.launchpad.net/charmworld