The OpenShift team is proud to announce we now have a built-in work flow for continuous integration. Our users who are already familiar with Hudson or Jenkins will be pleased to see a fully functional Jenkins environment. Those unfamiliar with continuous integration are in for a real treat.
With Jenkins, users have access to a full library of plugins and a vibrant thriving community of users who have discovered a new way to do development. The basic work flow is this:
1. Commit and push new code to your repo.
2. Jenkins waits for this commit, runs a full series of tests (customized by the developer)
3. The results are saved in Jenkins for review.
4. With OpenShift, if the tests and build are successful, the new code gets deployed. If it fails, the old code continues to run with no downtime related to the push.
Describing these four steps really doesn’t do continuous integration justice. We’ve been using Jenkins internally at Red Hat for testing OpenShift before we release it to our users. It’s just an amazing tool that makes it so much easier to automatically detect issues, get trends, etc.
How can users get started? First, update your rhc tools (gem update rhc or yum update rhc). Next, create an app as normal but use a new flag:
$ rhc-create-app -a myapp -t jbossas-7.0 –enable-jenkins ci
This command automates three steps (all of which could be done manually). First, it will create a new application called “ci”. This app is a dedicated Jenkins instance available at http://ci-$DOMAIN.rhcloud.com/. Next it will create a new jbossas-7.0 application called myapp. Last it will embed a Jenkins client into myapp so it can communicate with the newly created Jenkins instance.
That’s it, after that any commits pushed to the jbossas-7.0 “myapp” repo will automatically build in Jenkins. Users wanting to do the above steps manually (or wanting to add Jenkins builds to an existing application) need to run the following commands:
$ rhc-create-app -a myapp -t jbossas-7.0
$ rhc-create-app -a ci -t jbossas-7.0
$ rhc-ctl-app -a myapp -e add-jenkins-client-1.4
These three commands produce the same result as the single command above. For users wondering about the benefits of building in Jenkins take a look at this list:
1. Additional resources like memory and storage during build time
2. Archived build information
3. No application downtime during the build process
4. Failed builds do not get deployed (it’s like having automated QA)
5. A large community of Jenkins Plugins – https://wiki.jenkins-ci.org/display/JENKINS/Plugins
Jenkins isn’t the only thing we’ve been working on. This release has several other additions including a new cartridge type “raw”. The raw cartridge type is designed to be used for raw computing power. It has no web interface. This can be used as a builder for Jenkins or even for process jobs.
People have been asking for custom domain support for some time so we’ve added support for it. To add a new domain run:
$ rhc-ctl-app -a myapp -c add-alias –alias newdomain.example.com
Note: at this stage in development, this only functions for unencrypted connections. Adding aliases to applications and connecting via SSL will function but produce an error about the domain name mismatch. This is by design. We’re working on adding custom SSL cert functionality as well.
The final feature we’re happy to announce is we’ve added local mirrors for several of our stacks. Current support includes jbossas-7.0, wsgi-3.2 (python), perl-5.10. Ruby is on the way shortly. We’re excited to hear how developers will be using these new features. Please let us know and don’t forget about the forums.