.NET PaaS, Anil, Anil Mahadev, Database Driven App to the Uhuru PaaS, Mahadev, Mahadev Anil, MongoDB, MySQL, PHP, Rabbit MQ, Redis, SQLServer, Ubuntu, Uhuru .NET PaaS, Uhuru PaaS, Uhuru Software, Windows
So I do hope my last article got y’all excited about this article!
It was not so long ago when a friend of mine and I were having this discussion about Cloud Computing, SaaS, IaaS and PaaS.
One of the important factors that we both had in common is that we started our careers together in the IT Industry and had become IT Architects/Solutions Architects in our designated fields.
So he asked me one question, about what were my thoughts on PaaS and how it would affect traditional software development/deployments practices?
That rang a bell in my mind. I then was thinking about Microsoft Azure, Cloud Foundry and incidentally, it struck me that by that time, I had gotten access to the UhuruCloud Trial PaaS.
I then mentioned UhuruCloud to him.
His first question was, is it for .NET Apps only? I then replied, no its for Windows and Linux based apps hosting both MSSQL and MySQL database platforms + NoSQL databases such as MongoDB and Redis etc
He was silent for a while. He then went on to say
We then he mentioned, isn’t Uhuru still in Beta?
I mentioned to him yes, he was correct, and also I re-iterated to him mentioning that I stumped along a few errors initially during the process.
As Architects, we then came to a conclusion that no software in the world is bug-free .
Lastly, he mentioned that he was planning on taking a look at Azure.
I then, told him that it would ok for him to try Azure, however, the time taken to deploy a .NET app in Uhuru PaaS, took me a lot lesser time than in Azure.
It then he asked me to show me how easy it was to port a .NET DB App to the Cloud.
As I was writing this blog, I told him, I will demo it for you as we speak.
He was looking forward to it.
Now on to the Article
My fellow readers, as per my last article, I did mention that we would be going through on how to deploy a sample .NET Database enabled Application to the Uhuru PaaS!
[Note: If you wish to view the images in their original size, just click on the image to view the same]
Windows 7 Developer based Workstation with Visual Studio 2010 Professional or above
MMC plugin x86/x64 depending on your OS architecture from the Uhuru Software website
Visual Studio Plugin x86/x64 depending on your Visual Studio version
Sample Application that says dotNETTestApp-withDB
And finally! and most important of all getting an Uhuru Trial PaaS account here
The links to the above are given below for downloading
- Download MMC Snap-In installer (x86)
- Download MMC Snap-in installer (x64)
- Download Visual Studio Extension
- Sample Applications for .NET, Ruby, Java and node.js
Once you have installed the above lets Begin!
Before moving on, I wanted to explore the Architecture of how the Uhuru Public PaaS and Private PaaS is designed.
Below is how the Uhuru Public PaaS is designed
Below is how the Uhuru Private PaaS is designed
Extract the sample applications to a folder of your choice
1) Open the dotNETTestApp-withDB folder and double click on the DatabaseTestApp Visual C# Project
2) Now in Visual Studio 2010 , you should see a screen as shown below with the App and Web.config file
3) To ensure that we that we indeed have the Cloud Manager setup – Click on View Menu—> Cloud Manager
4) We are now going to create a new Service that will allow our sample App to connect to the Uhuru PaaS
Before we jump into it, I would like to show the sample code used for creating the database table in our sample application
// This will create a table called test and will contain a series of Random GUIDs of 20 rows respectively. This application will have a GridView to display the data and a button to populate it.
protected void Button1_Click(object sender, EventArgs e)
command.CommandText = “select * from ” + tableName;
Let us now explore the Web.config file
The <add key> component is very important as it defines the Service Name to which we will deploy our App to the Uhuru PaaS.
Make sure that you use the same name otherwise the app will not get deployed successfully.
Now it’s time to begin the Fun Stuff!
[Defining your Uhuru Cloud Credentials in Cloud Manager]
1) In Visual Studio –> Cloud Manager Window –> Click on Connect to Target
2) Add your Uhuru Trial PaaS credentials as sent you by Uhuru Software
3) Click on Add once done
4) You should now see your Uhuru credentials populated
5) Click on the Connect button on the Cloud Manager and ensure that the status mentions Current Target: your Uhuru credentials
6) Click on the Services button –> Right Click and choose Add New Service
7) Now for simplicity, I will choose the same Service Name as defined in the Web.config file. For the Service Type –> Choose MSSQL and click Create
8) Now you can see the service being created
9) Now we need to verify a couple of things before we go ahead and deploy
As shown in the screenshot we need to ensure the following properties of the Web Application is set before deployment
1) Deployable : True
2) Services : mssql#DatabaseTestApp
3) URL : anilapp.uhurucloud.net <your custom URL.uhurucloud.net>
Finally in the Solution Explorer –> Right Click on the project and choose Build
Verify that the build has succeeded.
Now it’s time to push the App to the Uhuru PaaS
Right Click on the Project and choose Build and Push
And let the Uhuru Cloud Manager now do the magic
Now it’s succeeded!! Woot!!!
Now click on the Back button in the Cloud Manager
You can see that our Application has been deployed but not started
To start the App –> Right Click under AppName and choose Start selected apps
You can now see that the App has started
Now let’s click on the URLs section to view our App in your favorite Web Browser
Now let’s click on the Button to insert Sample Data
We just deployed a database enabled application to the Uhuru PaaS without any fuss!!
Once you are done with the results, you can go ahead and stop the application, by right clicking on the selected app and choose Stop selected apps
Please note that this is still in Beta! I have managed to run into a couple of errors but if you follow this blog to the T you should be able to deploy without any issues!
Who is Uhuru PaaS for and not?
|Who is Uhuru PaaS For?||Uhuru PaaS is Not For!|
|Application Developers who wish to build and deploy cross-platform applications from Windows and Linux to the Cloud||For .NET and SQL Server Only Shops|
|For Test and Dev Environments where Apps need to be tested and provisioned to Production Servers with minimum configuration and less IT Management|
|Can be deployed in Highly Scalable environments with Automatic Failover and VM/Self Healing by just specifying the number of instances that needs to be deployed.|
|Suits both Public and Private Cloud initiatives|
In the coming weeks I will be continuing my journey with Uhuru PaaS as this is
a great way to deploy Multi-App/DB platform apps to the Cloud with ease.