Deploying a Bitbucket Project via Maven with Jelastic

| May 9, 2013

As you know Jelastic Platform can build apps right in the cloud instead of building them locally and uploading WAR archives.

  • This is much faster and takes less traffic.
  • Packages can be huge and need to be re-uploaded every time you put some corrections into your code.
  • Jelastic can take only your code changes from version control repository and rebuild the application in the cloud.
  • In such a way you get the efficiency of the cloud and can use your computer without any extra load.

If you used to work with Bitbucket hosting service for projects, no problems! Today we'll show you how to create highly available cluster in the cloud and deploy your code right from Bitbucket in a few minutes. Firstly, let's examine what Bitbucket is in brief.
Bitbucket is a distributed version control system (DVCS) code hosting site that supports Mercurial and Git. With these services your data is distributed by definition but you still need a place to share it and keep track of your development. That is where Bitbucket DVCS comes in. Bitbucket provides a fully-featured environment for managing your development project, including a code repository, a wiki, a powerful issue tracker and easy collaboration with others.
Follow this instruction to add your Bitbucket project to Jelastic.

Create the environment

1. Log into the Jelastic Manager
2. While in Jelastic dashboard, click the Create environment button.


3. Pick your application server and select Maven building tool. Then specify the number of cloudlets, type your environment name, for example, bitbucket, and click Create.


Get the repository link

1. Navigate to Bitbucket official web-site and log in the system.


2. Click on the desired repository in the Repositories list.


3. Here you should get the link to your project - just copy it from the following window.


4. You've got the https:// link of the following kind:

Delete {USER_NAME}@ part of the link to get such URL:{USER_NAME}/{PROJECT_NAME}.git

5. Now all is ready for adding your project to the Jelastic cloud.

Add the project


1. Click the Add project button next to the Maven node in your environment.

2. In the Add project dialog box choose the Git tab and fill in all required fields: Name of your project, Path (modified link) to your project, Branch, Login and Password of your repository, the name of your Environment and specify Context in which you will deploy your project. Click Apply.


3. Now, just click on Build and deploy button and enjoy. That's all you have to do!


You can open your application in a web browser.

Update the project

In case you've performed some changes in your code and want them to be applied to the project in Jelastic cloud, click Build and Deploy button next to the project in your environment.


That's all! Now you a have highly available cluster integrated with Bitbucket! If one of the instances fails, the users who were on that instance get automatically switched to the other instance in this cluster. Thanks to the replication, the other instance already has all the sessions of the failed instance, so end-users never notice any change. Enjoy developing your project with Jelastic!