blogger templates blogger widgets
This is part of a list of blog posts.
To browse the contents go to

Bluemix - Getting started

There are multiple ways you could port your application to Bluemix.

1. Using Online Editor if you are using Jazz Hub. This is the easiest as you need not setup anything on your local computer. But in this case you are totally dependent on network.
2. Using cf command line tools. Here you create your application and export it as a war(in case of java) file. This file is then exported using cf commands.
3. Using eclipse. You install Bluemix plugin for eclipse and then you could deploy your application right into bluemix. This is the option I prefer. If you are using Jazz Hub for SCM then it's even better.

Most easiest approach I suggest: (3)

Setup eclipse with bluemix plugin and liberty server. Write code and use Git/Jazz SCM to manage your code. Then use bluemix console to build and test your application. Benefit I see in this approach is that
a. You get to use your favorite editor.
b. No annoying compile errors as you have liberty profile and the jars configured.
c. No dependent services are configured on your local machine. Your code is run and tested within bluemix environment.
d. The obvious one. Change code. Commit and push it. Done. You start to see the changes in few seconds. (Provided you have auto build and deploy settings configured)

Most frequent approach I used: (1)

Most of the time I end up having a environment and project already in some local machine that I need to port to bluemix.

Example follows.

I have a web application (HelloWorldWeb) already setup in my local environment. I also have Bluemix plugin installed.

To port this application as it is. I create a new "Bluemix" server.

You may or may not be needing to add a different URL. If the default doesn't work you get yours by examining the bluemix console page url.

Once it's added you get to see the Bluemix virtual server environment in your servers window.

Note that it displays all existing runtimes configured within bluemix. In my case - testWebServer.

Now let's try to run our web application.

Right Click the project -> Run As -> Run On Server

Make sure you select the domain and not You will get this error otherwise: Client error - route is invalid: domain invalid relation

Since I don't have any services configured, I leave it blank.

It will automatically select the runtime or you could specify a runtime by providing it's buildpack url.

Once successful you will see it in Bluemix dashboard.

No comments:

Post a Comment