Code Monkey home page Code Monkey logo

cf-example-jenkins's Introduction

Jenkins deployment to a Cloud Foundry based PaaS

Application Overview

Jenkins is an open source continuous integration tool written in Java. It allows to create extensive test workflow and monitor this process with web UI. . You can find its sources in Github repo.

Deploy to Cloud Foundry

There are several ways to deploy Jenkins to Cloud Foundry as an app.

Using custom buildpack and manifest: cf push.

Using java-buildpack: you need to rebuild Jenkins with build-for-using-tomcat.sh script and run cf push (see considerations for details).

After successful deployment you'll be able to see Jenkins using following URL http://jenkins.<cloud-foundry-domain>/.

Considerations

Using jenkins buildpack

The first and the easiest way is to use special buildpack. You will need specify -b parameter if you use command line to deploy Jenkins (doc) or buildpack attribute in manifest file (doc).

Deployment will look in the following way

Using command line arguments:

cf push -p jenkins.war -b https://github.com/Altoros/jenkins-buildpack -m 2G jenkins

, where -m stands for app RAM memory, -p path to jar/war file with the application.

Using manifest: cf push (manifest.yml will be automatically used).

Using java buildpack

Cloud Foundry has a java-buildpack, that is commonly used to run Java applications. It has list of possible frameworks it can handle. This list of frameworks are iterated to find out suitable for application you push. Main class has one of the first positions in this list. In the same time Jenkins has lots of dependencies and it's had to tell command that will gather all of them. Easier solution here is to make java-buildpack to run jenkins within tomcat. In order to do it, we will need to rebuild jenkins to "hide" Main class from java-buildpack. You can see build script in build-for-using-tomcat.sh file. Unfortunately, this way doesn't work well with all versions of Java buildpacks.

Manifest

applications:
  - name: jenkins
    path: jenkins.war
    buildpack: https://github.com/Altoros/jenkins-buildpack
    memory: 3G

Troubleshooting

Jenkins is very demanding memory application: it is recomended to run Jenkins on instances with at least 2G of RAM. You can also change memory consumption with parameters in starting command or build attributes.

Questions

You can leave your questions in issues of this project.

cf-example-jenkins's People

Contributors

allomov avatar mgarciap avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.