{"id":18996951,"url":"https://github.com/rburgst/rancherci-presentation","last_synced_at":"2026-04-18T17:32:51.810Z","repository":{"id":145057988,"uuid":"91740234","full_name":"rburgst/rancherci-presentation","owner":"rburgst","description":"The instruction repository containing the conference slides and instructions on how to setup a jenkins CI environment on a Rancher Server cluster","archived":false,"fork":false,"pushed_at":"2017-06-12T09:53:26.000Z","size":130,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T05:17:30.843Z","etag":null,"topics":["docker","docker-compose","rancher-cli","rancher-server"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rburgst.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T21:44:50.000Z","updated_at":"2017-09-27T14:02:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"43b76177-a9ff-4b2a-bb03-2bac543b11b1","html_url":"https://github.com/rburgst/rancherci-presentation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rburgst/rancherci-presentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rburgst%2Francherci-presentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rburgst%2Francherci-presentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rburgst%2Francherci-presentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rburgst%2Francherci-presentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rburgst","download_url":"https://codeload.github.com/rburgst/rancherci-presentation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rburgst%2Francherci-presentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31977964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","rancher-cli","rancher-server"],"created_at":"2024-11-08T17:37:42.518Z","updated_at":"2026-04-18T17:32:51.789Z","avatar_url":"https://github.com/rburgst.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins CI with Rancher-Server\n\nThis document explains the setup of a rancher-server cluster running a complete CI environment consisting \nof:\n\n* a gerrit SCM (git) server (if you arenot familiar with gerrit, think of it as a private github server)\n* a jenkins CI/CD server (your private travis.ci server)\n* a nexus repository server (aka your private maven central) which can mirror maven artifacts and also serve as a private docker registry\n\nPlease also see the accompanying other github repositories\n\n* https://github.com/rburgst/rancherci-seedjob\n* https://github.com/rburgst/rancherci-demoapp\n\n# Basic Setup\n\n2. Setup VMs\n\n        cd 01-setupvms\n        ./01-create-vms.sh\n        \n   please check `/etc/hosts` whether the new hosts have been added , otherwise add them manually\n   \n   \t\tdocker-machine ip rancher-server\n   \t\tdocker-machine ip rancher-agent-01\n   \t\t\n\tmake sure that entries for rancher-server.shared, rancher-server \n\t\n\t\t10.211.55.13   \trancher-server.shared rancher-server\n\t\t10.211.55.14   \trancher-agent-01.shared rancher-agent-01\n\t\t\n        \n2. create the local docker registry for pre-caching all images (only for presentation)\n\n  \t\t./02-01-start-presentation-registry.sh\n\n3. ~~cache images that we will need (optional)~~ (not needed when using presentation registry)\n\n\t~~./03-01-prepull-images.sh~~\n\t\t\n4. start registry gui (just to see whats in there)\n\n\t\t./03-02-start-registry-gui\n\t\t\n\topen [http://rancher-server:9000/](http://rancher-server:9000/) to check the local presentation registry\n\t\n4. start rancher-server\n\n\t\t./04-start-rancher-server.sh\n\t\t\n5. add rancher-agent\n\n\t\t./05-add-rancher-agent.sh\n\t\t\n\tthis will open a web browser with the correct commandline, copy it to the file `06-start-rancher-agent.sh` and make the following changes: \n\t  1. remove the `sudo` as this is not necessary on mac with `docker-machine`\n\t  2. add `rancher-server:5000` before `rancher/agent:v1.2.2` in order to make it download from our \n\t     cache registry\n\t  3. once this is done execute the updated script\n\t  \n\t        ./06-start-rancher-agent.sh\n\t\n6. setup api keys\n\n\t\t./07-setup-api-key.sh\n\t\t\n\tthis will open a web browser and navigate to the \"Add api key\" page on your server\n\t * choose the following values\n\t * name: `rancher-cli`\n\t * description: `access the server via cli`\n\t * now copy the key \n\t\n7. download rancher CLI `brew install rancher-cli`, or directly download from\n\n\t[https://github.com/rancher/cli/releases](https://github.com/rancher/cli/releases)\n\n8. setup rancher CLI\n\n\t\trancher config \n\t\t\n\t* URL: `http://rancher-server:8080`\n\t* keys: here you have to enter the secrets that you have set up in step 6\n\t\n9. build the rancher-cli docker image\n\n\t\tcd ../../container/rancher-cli-configured\n\t\t\n\t1. update the access keys you have copied from the web page\n\t2. build the container and push it to our demo registry\n\n\t\t\t./build.sh\n\t\t\t./push.sh\n\t\t\t\n\t\t\t\t\n# Setup Infrastructure stacks\n\n## Nexus\n\n1. start the nexus stack (already contains all config)\n\n\t\tcd ../stacks/repository-nexus\n\t\trancher up -d\n\t\t\n2. once the registry is up you can log into it from all your nodes\n\n\t\t./docker-login.sh\n\n3. create a `jenkins` user \n \t* username: jenkins\n \t* password: password\n \t* role : Admin\n\n \tUsually you would use the credentials from active directory / LDAP but for the demo we make it quick\n \t\n4. add the nexus repository to the rancher UI\n\n\t[http://rancher-server.shared:8080/env/1a5/infra/registries](http://rancher-server.shared:8080/env/1a5/infra/registries)\n\t\n## Gerrit\n\n1. launch the stack\n\n\t\tcd ../gerrit\n\t\trancher up -d\n\t\t\n\tNote that usually you would launch gerrit with the parameters for LDAP auth, for more info, check: \n\t[https://github.com/openfrontier/docker-gerrit](https://github.com/openfrontier/docker-gerrit)\n\t\t\n2. add your `.ssh/id_rsa.pub` to the admin ssh key list\n\n\t[http://rancher-agent-01.shared:8082/#/settings/ssh-keys](http://rancher-agent-01.shared:8082/#/settings/ssh-keys)\n\t\n2. create a jenkins user with SSH key and projects\n\n\t\t./create-projects.sh\n\t\n3. setup verified permission for admin group on \"all projects\"\n \t1. add verified label (for more info check the [Documentation about \"Verified\" label](https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_Verified)\n\n\n\t\t[http://rancher-agent-01.shared:8082/#/admin/projects/All-Projects](http://rancher-agent-01.shared:8082/#/admin/projects/All-Projects)\n\t\t\n\t\tClick on \"Edit Config\"\n\t\t \n\t\t\t[label \"Verified\"]\n\t\t      function = MaxWithBlock\n\t\t      value = -1 Fails\n\t\t      value =  0 No score\n\t\t      value = +1 Verified\n \t\n \t2. now click on \"Access\" to add the permission to reference `refs/heads/*`\n \t\n   \t\t![label verified](docs/images/label-verified.png)\n   \t\t\n4. finally push the following projects to gerrit\n\t* `rancher-jenkins-seed-jobs` (ssh://admin@rancher-agent-01:29418/demo/rancher-jenkins-seed-jobs)\n\t* `demo_webshop` (ssh://admin@rancher-agent-01:29418/demo/webshop)\n\t\t\n## Jenkins\n\n0. in order to launch Jenkins we need the SEED repo, TODO\n\t\u003e (?) on gerrit or github?\n\n1. launch jenkins\n\n\t\tcd ../jenkins\n\t\trancher up -d\n\n2. go to jenkins web UI and launch the seed job\n\n\t[http://rancher-agent-01.shared:8083/](http://rancher-agent-01.shared:8083/)\n\t\n\n# Further reading\n* http://rancher.com/deploying-a-scalable-jenkins-cluster-with-docker-and-rancher/\n* http://rancher.com/tag/jenkins/\n* http://rancher.com/docker-based-build-pipelines-part-1-continuous-integration-and-testing/\n\nMore details can be found at [Lanyrd](http://lanyrd.com/2017/spring-io/sfqtth/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frburgst%2Francherci-presentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frburgst%2Francherci-presentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frburgst%2Francherci-presentation/lists"}