In this post, I’m going to talk about CloudBees. CloudBees is a PaaS (Platform as a Service) that allows us to deploy our applications in the cloud. CloudBees is one of some platforms that is now available in the market to deploy and scale our applications. In this sense it may be seen similar to VMWare Cloud Foundry or Heroku, but it gives us some extra features that one can find really interesting.
Go to Java4Developers.com to know more or continue reading …
Quoting CloudBees homepage:
The CloudBees platform is the first Platform as a Service that lets companies build, test and deploy Java web applications in the cloud. With CloudBees, software teams can move their development and production activities instantly to the cloud, without restrictions or infrastructure costs.
So, which are these extra features?. We can define them as follows:
- CloudBees is a PaaS specialized in Java web development. This is quite the same you can find in Cloud Foundry, and it’s pretty different to Heroku (Heroku, as far as I know, was created to deploy Rails apps mainly although it gives support to JVM and many others as well). The good thing about this is that if you’re a Java developer you find really simple to deploy Java web apps in CloudBees and (based on my experience) there are less problems and incompatibilities with CloudBees or Cloud Foundry than the ones you might find with Heroku.
- CloudBees is being developed by the same team which is responsible of Jenkins. What does it mean?. That you can use Jenkins as a service in CloudBees. This may be one big advantage comparing with other PaaS. Use of continuous integration and deployment should be a must in programming. And having the option to use it in a Cloud environment. We will see that using your GitHub account and Jenkins within CloudBees we might be able of developing in our local environment, pushing our code to GitHub and configure our Jenkins service to notice that commit. Our Jenkins service will run and check for errors in our code. If everything is OK, Jenkins may deploy our application in the Cloud. Awesome, isn’t it?.
- Not only CloudBees offers Jenkins as SaaS, but also a good number of another services. Among them we find:
- Real-time web monitoring and analytics provided by New Relic
- MySQL and NoSQL support: CouchDB, MongoDB, …
- Apache Solr search engine: Websolr.
- Code coverage with Sonar.
- Logging, emailing, testing, …
I’m not going to explain the architecture behind CloudBees. First of all because although I have read some about it, I don’t know too much about this subject. Instead of that I’m going to try explaining a little bit about what CloudBees gives us as developers. We could say that CloudBees has two different layers, the PaaS layer and the SaaS one. PaaS is called RUN@cloud and provides us everything we need to deploy and scale our JVM-based application in the Cloud. On the other hand the SaaS layer is named DEV@cloud. Here you cand find every service CloudBees offers us. As CloudBees says a picture is worth 1,000 words, so the big picture is the following:
How does CloudBees let us do this?. I think it would be easy to explain it by example.
Deploying in CloudBees.
What we need now is create a CloudBees account. Fortunately you can use from the beggining without wasting money. CloudBees basic account allows you to deploy your apps and you some of the SaaS. If you want to upgrade your account, you may find interesting checking out CloudBees prices first. To be honest I don’t know if it’s cheaper or more expensive than other PaaS.
So I have received a verification mail of my recent created CloudBees account and I’m ready to deploy my app, what’s next?. Quite simple, you have two methods to upload and deploy your app, from command line or using a CloudBees Eclipse Plugin. I decided to use command line, but the Eclipse plugin looks great.
You are gonna need the CloudBees SDK to start with. Download it to your laptop and configure your PATH variable. Once done this, you’ll have bees command available. Next on the list is creating a new application from your CloudBees console.
What you need now is executing three commands in your project folder:
bees getapp -a yourAccount/yourApp bees run bees deploy
Once you had deployed your application in CloudBees, go to your console and there will be something similar to this:
Move to the Service area and add any service you want. In my case I’ve added some of them:
- New Relic service provides us real-time web monitoring and analytics. It reminds me of Spring Insight but with some more options. You can monitor your app. I think it’s an essential service, specially in a cloud environment so that you you might decide to scale your app based in these values (user requests, required CPU and memory).
- Papertrail service: Hosted log management for apps, servers, and cloud services. An nice service to management all of our logs efficiently.
- Jenkins services. This is the show’s main attraction. You can run Jenkins the same way you are now running in your own server. It has the same features than a normal Jenkins services plus deploying directly to CloudBees. In my case I have configured a Grails application hosted in a Github repository so when a commit is made my Jenkins instance will run. If everything is OK, it will deploy my application to CloudBees. Steps:
- First we let CloudBees access to our GitHub Repository.
- Next we configure our timers.
- We specify our Grails version, properties and so on.
- Finally we need to set deploy values.
- First we let CloudBees access to our GitHub Repository.
After this we have our development ready to go :D.
We can also decide with version of our application want to deploy from our application service.
To end with, I would say that CloudBees is an interesting PaaS to deploy your application in the Cloud and it offers a good number of that. On top of them runs Jenkins that is a good reason to give a try.