The webteam uses a Jenkins instance hosted on the canonical JENKAAS stack. This Jenkins is used to:
- Manage and update Kubernetes cluster configuration.
- Build deployment images for our services.
- Deploy our staging and production deployment images to Kubernetes.
- Deploy staging instances of our autodeploy sites.
Our Jenkins instance can be found at: https://jenkins.canonical.com/webteam/
- launchpad.net (No proxy needed)
- NPM registry
- Yarn registry
- Bower registry (Only Ubuntu Tutorials relies on this, deprecated)
- Swift (python3-swiftclient)
- Git Repo (repo)
- Jenkins user is in docker group
- bzr is logged in as isd-web-publisher
- Can checkout private Launchpad bzr & git repos
- Can checkout GitHub repos
Inside our Jenkins instance, we have a Provision job to automate much of our configuration. This job needs to be configured to target the required node under the “Restrict where this project can be run” option.
Jenkins Node configuration
Inside Jenkins, there are configuration pages for each node. Some configuration is required to be added to these.
Our nodes are tagged with labels, which we use inside jobs to select compatible jobs. An example of labels which are applied to nodes:
- provisioned - To mark the node as ready for use
- xenial - Use the correct Ubuntu version
- autodeploy - Marking compatibility with our mojo autodeploy system
- k8s - Marking compatibility with out Kubernetes deployment flow
Inside this configuration, we can set environment variables which are used for jobs. At the time of writing, these are the current values but please check if they have been updated on existing nodes:
- HTTP_PROXY: “http://squid.internal:3128”
- HTTPS_PROXY: “http://squid.internal:3128”
- NO_PROXY: “10.50.142.23,auth.prodstack4-5.canonical.com,objectstorage.prodstack4-5.canonical.com,prod-comms.docker-registry.canonical.com,canonical.com,.canonical.com,ubuntu.com,.ubuntu.com,snapcraft.io,.snapcraft.io”
- DOCKER_REGISTRY: “prod-comms.docker-registry.canonical.com”