This subordinate charm prepares a Jenkins master node to test Juju artifacts (charms and bundles). All tests are isolated in a LXC container.
A working Juju installation is assumed to be present. If Juju is not yet set up, please follow the getting-started instructions prior to deploying this charm.
This charm is intended to be deployed as part of the cwr-ci bundle:
juju deploy cs:~juju-solutions/cwr-ci
Note: CWR requires Juju 2.1.0 or greater.
This will deploy Jenkins with this charm acting as the charm/bundle test mechanism. More information about this deployment can be found in the bundle readme.
This charm provides extended status to indicate when it is ready:
juju status
This is particularly useful when combined with watch
to track the on-going
progress of the deployment:
watch -c juju status --color
The message column will provide information about this unit's state.
Charms can be deployed in environments with limited network access. To deploy in this environment, configure a Juju model with appropriate proxy and/or mirror options. See Configuring Models for more information.
As mentioned earlier, all tests are isolated in a LXC container. The default
container image includes all software necessary to run cwr
. Optionally,
you may provide your own container image. To create an image, see the
./scripts/build-cwrbox-image
utility. Use your custom image by either:
-
Attaching a resource to this charm:
juju attach cwr cwrbox=./myimage.tgz
-
Configuring this charm with the URL/key of a remotely hosted image:
juju config cwr \ cwrbox_image=<url> \ cwrbox_keys=<gpg-fingerprint-of-image-signer>
To run tests, this charm needs access to your controller(s) to create models and allocate resources needed to run charm/bundle tests. The steps required to do this are covered in detail in the Getting Started section of the cwr-ci bundle readme. A summary of the procedure is as follows:
- Add a user to your controller(s)
- Grant
add-model
permissions to the new user(s) - Run the
register-controller
action - Run the
set-credentials
action - Optionally run the
store-login
action
The test capabilities of this charm are covered in detail in the Workflows section of the cwr-ci bundle readme. At a glance, the following usage scenarios are supported via charm actions:
- Test a charm when a commit is made to a charm source repository
- Test a charm when a release is created in a Github charm source repository
- Test a charm when a pull request is created in a Github charm source repository
- Test a bundle when an included charm is updated in the Charm Store
#juju
on Freenode- Juju mailing list
- Juju community
CWR leverages a plethora of tooling from the Juju ecosystem. Details can be found at the following project links: