Driving BlueMix from UrbanCode
Hickmat 100000QA3T Comments (2) Visits (10968)
A while back I saw a great article from Dan Berg demonstrating an UrbanCode plugin he'd created to provide Cloud Foundry support. Today I spotted that this has now been surfaced through IBM DevOps Services via the Urba
My simple use case was to take the Java Web Started Boiler plate sample application and have UrbanCode Deploy drive the deployment of new versions to BlueMix. To add more fun into the equation and also to help look at a more complex use case in the future I also took the decision to have the application versions governed via Rational Asset Manager. In this way I could set up my UrbanCode Deploy environment to automatically push out new versions of the application when they were submitted to Rational Asset Manager.
Armed with the use case I set about configuring UrbanCode Deploy. First action was to ensure the agent I would use to interact with Bluemix had the Cloud Foundry CLI installed. This was a simple case of downloading the appropriate RPM from http
Next I installed the Cloud Foundry plugin from DevOps Services project listed above and signed into my Blumix account and created an initial installation of the sample Java Web Starter Boiler plate. Once my Bluemix application had been created I downloaded the starter application package from my Application instance (I clicked on the instance to get to the overview screen and then clicked on View Guide to access the menu with this option on it). I then expanded the downloaded zip file and created an asset in my RAM server and added the component files (with the appropriate directory structure) to the asset. This looked as follows (NB: I've not expanded out the fully folder structure in this screenshot):
So I now had the asset in place and the next thing to do was to reflect this as a Component in UrbanCode and create a deployment process. Creating the Component was the normal simple process and I set it to RAM and the Source Config Type. At this point I didn't have an environment or process so I couldn't set up the action to preform when a new version is imported. I added the following simple deployment process to the component processes for this new component
and set the properties for the "Push Application" step as follows (I've blanked out my Bluemix id obviously )
As you can see from the above there are a set of resource properties which define the connectivity to Bluemix. At this point I didn't have a resource created so I noted that as an action to complete later. So with the component and it deployment process defined I next created a application in UrbanCode, added the component to it created a simple application process to deploy the component as shown below:
Right so that was the component and application in place next step was to create a base resource which I could allocation to an environment. To this base resource I added a group called TEST which would align to the TEST environment I planned to create and under this I added my CentOS agent and to the agent I added my component to be deployed. This ended up looking like:
I then went into the resource properties at the TEST group level and added the CF properties needed for the push step which ended up looking like (NB: again I've blanked out my id)
With the resource in place I could then create my environment. I named this TEST and allocated the base resource as Inte
With all the configuration in place I next did a simple deployment test via the component (Application -> Component -> Run Process). The deployment succeeded but as the code hadn't actually changed there was no obvious effect visible. So I next updated the index.html file, re created the war file, created a new version of the asset in RAM, uploaded the new war file and then save the asset. This new asset version was then detected by UrbanCode and imported triggering the deployment process to be run against the TEST environment. Once this had completed the change was visible in my BlueMix application. So job done on the simple use case
Now some of you will be asking why on earth do this when the linkage with the DevOps Services covers this... We yes I understand but the more complex use case I want to move to next is where I have a solution which has a system of interaction in BlueMix calling into a Process and ESB environment deployed to a Pure Application System. I'm still in the process of trying to get this sample solution created so I can work on the deployment, but by proving out this driving of BlueMix coupled with my existing experience with driving Pure Application System from UrbanCode I am confident that the use case will work (and it'll be a lot of fun to create).