https://github.com/schottsfired/cjt-demo-environment
CloudBees Jenkins Team Demo based on Docker Compose
https://github.com/schottsfired/cjt-demo-environment
cloudbees docker-compose jenkins
Last synced: over 1 year ago
JSON representation
CloudBees Jenkins Team Demo based on Docker Compose
- Host: GitHub
- URL: https://github.com/schottsfired/cjt-demo-environment
- Owner: schottsfired
- Created: 2017-06-22T14:05:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-15T18:06:50.000Z (over 7 years ago)
- Last Synced: 2025-03-27T18:52:35.221Z (over 1 year ago)
- Topics: cloudbees, docker-compose, jenkins
- Language: Dockerfile
- Size: 36.1 KB
- Stars: 3
- Watchers: 2
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CloudBees Jenkins Team Demo
## Features
* [CloudBees Jenkins Team](https://www.cloudbees.com/products/cloudbees-jenkins-team) Master and Agent(s) run as Docker containers
* Agents can be spawned and destroyed dynamically
* All executors support [Maven](https://maven.apache.org/) and [Docker Pipeline](https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin)
## Initial Setup
This demo requires that you have [Docker](https://www.docker.com/get-docker) and [Maven](https://maven.apache.org/) installed.
Open a terminal at this repo location and run `cp .sample.env .env` to create local file called `.env` based on the sample. Then modify `.env` to make it specific to your environment. You should only need to touch ``USER_M2`` and the DockerHub API Key (from http://cloud.docker.com), all others may remain as-is.
Finally, run ``make`` to let Docker do its thing.
NOTE: If any configuration files are modified, like ``jenkins.yaml``, ``plugins.txt``, or ``/init.groovy.d/*.groovy``, then run ``make`` again to build new images.
## Starting and Stopping
To start CJT, run ``docker-compose up``. Logs will be streamed to the console, and CJT can be stopped with `^c`. Alternatively you can run CJT detached using ``docker-compose up -d``, access logs with ``docker logs cjt``, and stop using ``docker-compose down``.
You may then access CJT at http://localhost:9090 and complete the Getting Started wizard.
To start Agent(s), run ``make agent``. To stop all Agents, run ``make stop``. To build a new agent image after making changes, run ``make agent-build``.
To clean up images, run ``make clean``.
NOTE: [Swarm](https://wiki.jenkins.io/display/JENKINS/Swarm+Plugin) Agents require a user with appropriate permissions to connect to CJT. The default is admin/admin and you can change it in your ``.env`` if necessary.
## CI/CD Demos
Thanks to the [Configuration as Code Plugin](https://github.com/jenkinsci/configuration-as-code-plugin), demos are built in!
A [Sample Rest Server](https://github.com/cloudy-demos/sample-rest-server) project is configured out of the box, which uses [Pipeline Shared Libraries](https://github.com/cloudy-demos/pipeline-libraries) as a form of templating.
Sample Rest Server requires a Sonar server to function properly. Run ``make sonar`` to launch one then access it at http://localhost:9000 to see that it's running and view test results.
An [ASP.Net Core App](https://github.com/cloudy-demos/aspnet-app) project is also configured out of the box. Note that this pipeline has an "approval" step that requires a human to approve.