charmworld #1

  • By bac
  • Latest version (#1)
  • precise
  • Stable
  • Edge


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 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
Environment bootstrapped
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

Deploy Charmworld

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
# lp:~canonical-losas/canonical-marshal/apache2
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
hasn't finished.


There are the options you can configure for charmworld

Error email

This is the address that error messages (i.e. from cron) will be sent to. (For
Canonistack instances, this must be an address.)

juju set charmworld

Cron interval

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

Script lease time

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

Source location

Adjust this to retrieve charmworld's source code from a different bzr branch.

juju set charmworld 'source=lp:~abentley/charmworld/charm-deployment'

Mongodb storage

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:
Report system bugs at:


(string) The lp credentials to use with charmworld ingest, if available.
(int) The amount of time (in minutes) that periodic cron jobs should run.
(string) The name of the job running the test.
(int) The amount of time (in seconds) that the worker should wait before looking for new jobs.
(int) The maximum number of charms to import from Launchpad during ingest. -1 for no limit.
(string) Used by the nrpe-external-master subordinate charm. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you are running multiple environments with the same services in them this allows you to differentiate between them.
(string) The url of the testing service (e.g. jenkins) used for charm testing
(string) The bzr branch to pull the charmworld source from.
(int) The number of replicas used by ElasticSearch for indices. This number should not exceed the number of ElasticSearch nodes minus one.
(string) Address to mail errors to.
(int) The amount of time (in minutes) that scripts should hold locks.
(int) The number of shards used by ElasticSearch for indices.
(int) The revno of the bzr branch to use. -1 for current tip.
(string) The token needed for triggering builds