Setup Jenkins on SAP Cloud Foundry

Chairat Onyaem
Oct 22, 2017 · 3 min read
Image for post
Image for post

Download Jenkins.war

Deploy Jenkins on Cloud Foundry

Login

cf api https://api.cf.eu10.hana.ondemand.com
cf login

Deploy Jenkins

cf push <path_to_jenkins.war> -b https://github.com/Altoros/jenkins-buildpack -m 2G <unique_app_name>
$ cf push -p Downloads/jenkins.war -b https://github.com/Altoros/jenkins-buildpack -m 2G jenkins-chairatCreating app jenkins-chairat in org P1941180417trial_trial / space dev as pacroy@gmail.com...OKCreating route jenkins-chairat.cfapps.eu10.hana.ondemand.com...OKBinding jenkins-chairat.cfapps.eu10.hana.ondemand.com to jenkins-chairat...OKUploading jenkins-chairat...Uploading app files from: /var/folders/z9/509z92q528g_vyl_l8g72s7w0000gn/T/unzipped-app082759293Uploading 21.6M, 1177 filesDone uploadingOKStarting app jenkins-chairat in org P1941180417trial_trial / space dev as pacroy@gmail.com...Creating containerSuccessfully created containerDownloading app package...Downloaded app package (69.9M)Staging...cat: /tmp/buildpackdownloads/33bbc852fcb5b983f2ec3eef5d6759f4/VERSION: No such file or directory-------> Buildpack version-----> Extracting JRE./tmp/app/vendor ~-----> Moving jre1.8.0_102 to target folder.~-----> Repacking jenkins.war./tmp/app ~~-----> Building runtime environment.-----> Done.Exit status 0Staging completeUploading droplet, build artifacts cache...Uploading build artifacts cache...Uploading droplet...Uploaded build artifacts cache (131B)Uploaded droplet (207.3M)Stopping instance b61f17b6-70bc-4547-aeae-9e789a2f5279Uploading completeDestroying containerSuccessfully destroyed container0 of 1 instances running, 1 starting0 of 1 instances running, 1 starting1 of 1 instances runningApp startedOKApp jenkins-chairat was started using this command `java -jar jenkins.war --httpPort=$PORT`Showing health and status for app jenkins-chairat in org P1941180417trial_trial / space dev as pacroy@gmail.com...OKrequested state: startedinstances: 1/1usage: 2G x 1 instancesurls: jenkins-chairat.cfapps.eu10.hana.ondemand.comlast uploaded: Sun Oct 22 03:06:18 UTC 2017stack: cflinuxfs2buildpack: https://github.com/Altoros/jenkins-buildpackstate     since                    cpu      memory       disk           details#0   running   2017-10-22 10:08:12 AM   160.3%   1.1G of 2G   427.7M of 1G

Login to Jenkins

Image for post
Image for post
cf logs jenkins-chairat --recent | grep -B 1 -A 2 "following password"
Image for post
Image for post
Image for post
Image for post

References

Chairat.me

Personal blog of a developer who passionate in new…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store