charmworld #58

Supports: precise

Add to new model

Description

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.


Overview

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.

Installation

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 \
instance-type=m1.small

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
scripts/configure-apache2
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.

Configuration

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 @canonical.com address.)

juju set charmworld error-email=jrandom@example.com

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

Credits

Report charm bugs at: https://bugs.launchpad.net/charms/precise/+source/charmworld
Report system bugs at: https://bugs.launchpad.net/charmworld
Location: http://jujucharms.com/charms/precise/charmworld


Configuration

charm_import_limit
(int) The maximum number of charms to import from Launchpad during ingest. -1 for no limit.
110
charm_testing_job
(string) The name of the job running the test.
charm_testing_token
(string) The token needed for triggering builds
charm_testing_url
(string) The url of the testing service (e.g. jenkins) used for charm testing
cron-interval
(int) The amount of time (in minutes) that periodic cron jobs should run.
15
error-email
(string) Address to mail errors to.
es_replicas
(int) The number of replicas used by ElasticSearch for indices. This number should not exceed the number of ElasticSearch nodes minus one.
es_shards
(int) The number of shards used by ElasticSearch for indices.
1
lp_credentials
(string) The lp credentials to use with charmworld ingest, if available.
nagios_context
(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.
juju
revno
(int) The revno of the bzr branch to use. -1 for current tip.
-1
script-lease-time
(int) The amount of time (in minutes) that scripts should hold locks.
15
source
(string) The bzr branch to pull the charmworld source from.
lp:charmworld
worker-interval
(int) The amount of time (in seconds) that the worker should wait before looking for new jobs.
900