LittleCMDB (An Orchestrator and WaveMaker project) – Part 5

Table of Content

In Part1 we start with the SQL DB Plugin and create the required database for our need.

In Part2 we start with the development of our Workflow. We will start with a few elements.

In Part3 we  finish the  collection of the VM information.

In Part4 we insert our data into the database and test our created workflow

In Part5 we create our webview to get a look on our Data in the SQL Database

In Part6 we will make our Workflow smarter to update the DB with actual VM information

In Part7 problems with vAPP located virtual machines are fixed

Part5

After we have finished our Workflow, it is time to start with WaveMaker.

WaveMaker is Part of VMware. WaveMaker is a WYSIWYG Editor based on JavaScript & open source Web 2.0 standards

With WaveMaker, we will create a Website for a view of our database data. In this post, we will keep it simple and only generate the view. In a later post we will integrate the Website with the Orchestrator so that changes, which will be done, are played back to the Orchestrator and the vCenter Server. To start with WaveMaker, you need the WaveMaker Software. First of all, we have to get WaveMaker. You become WaveMaker on their Website http://www.wavemaker.com there you can click on “Download”

There you can get the install package for your OS.

I use the Windows Version. The installation is easy. Just start the installation and the rest will done with the wizard.

After we are finished with the installation (don’t forget to install additional packages WaveMaker request!). We can start it.

For this view, you can start a new project, or start with the project I created here: http://www.vcoportal.de/2012/05/howto-setup-ldap-authentication-for-wavemaker-part-1/

I will use my created project…you are free to do so or to start from scratch…..to use my project you have to download the package and unzip in in your WaveMaker “Project Folder” in My case that is C:\WaveMaker\projects Just insert the vCO_WM_LDAP folder and start WaveMaker. Then you are able to start from this point by clicking on “Open Project”.

When you have installed the newest WaveMaker Software you become an Upgrade Message for the package. That’s okay the project was created with an earlier version of WaveMaker….so go on…..

To save the download package I will clone and rename the project. For that go to “File” and “Copy current project”

Enter the new project name, in my case “LittleCMDB” and confirm the copy.

When the clone is ready close the current project.

And open the “LittleCMDB” project.

Before we can start with the development of our website, we have to create a “View” in our db. It is also possible to create the view in WaveMaker, but them we are not able to export the view back into the db. Here is a link witch explains how to create a LiveView in WaveMaker: http://dev.wavemaker.com/wiki/bin/wmdoc_6.4/Database#HViewsInWaveMaker

I will create my LiveView in my database. For that, I will start my Management Studio.

After the authentication, I drill down to my DB and there to the Views Folder.

With a “right click” there I can create a New View with fits my need.

In the opening windows select all tables you created in our DB. In my case that are “VM_Datastore”, “VM_Host”, “VM_Info” and “VM_Network”.

Know we have our Tables in the created view. Till know, there are no values chosen.

We will do so, by clicking the values we want integrated in our view.

I choose:

  • VMName
  • CPUConfig
  • MemConfig
  • Cluster
  • Host
  • ResourcePool
  • Folder
  • DiskSize
  • Datastore
  • Network
  • IPAddress

After we have chosen the values, you can save the view

Give a Name for the view, I chose “MyView” as name.

After that, we are finished with the SQL DB.

Now we can start with the development of our website. First, we want to change the name for the Headline. Just click on the Headline and then change the text in the caption field to the right.

I change the name to Little CMDB. Then we go to the Model Tab and click on it.

The Menu on the right site changes and you see the structure of the project. This project has different layers. I will not explain here, how to setup the AD Authentication. For that, and if you want to know more about the different layers, go to my LDAP/vCO/WaveMaker post:
http://www.vcoportal.de/2012/05/howto-setup-ldap-authentication-for-wavemaker-part-1/

We want to work in the “vCO_Tasks” Layer, so just click on that and you are there.

Here we start with the integration of the database. For the database connection you need some Information. You need:

  • The database system (in my case SQL Server)
  • The host name or IPAddress
  • The Username
  • The Password
  • And the Database (in my case Little_CMDB)
  • Optional the Instance

To integrate our database, go to “Services” à “Import Database”:

A wizard is opened and you have to fill in the required field.

After you have filled in our data test the connection and then import the data.

If you get an error during the import there are some possible solutions.

1)      The user has not the permission for the Import

2)      The Schema Filter under the Advanced Options is case sensitive

Here are some links to the WaveMaker Forum to fix Import Problems:

http://dev.wavemaker.com/wiki/bin/Dev/MSSQL#HInstanceName

http://dev.wavemaker.com/forums/?q=node/1827

After you have imported the database, go back to Palette.

Here we drill down to the “Database Widget” and there we take “MyView” DojoGrid and pull it into the Window in the middle.

There you have to choose the View, which you want for your data. I will take the Dialog View. I choose the Dialog View.

When you have made everything right, you will become directly a view on the DB data.

Know we make some facelift for the view. First, you can change the Title name for the DojoGrid. I call it Little CMDB View.

Then I will reduce the columns and change the names to more speaking names (instead of id.vmname and so on). Just right click on the columns and chose “editColumns” to do so.

In my View, I only chose the VM Name for showing. I also change the alignment to center. All other data will be shown in the detail pane. Feel free to change the view to your need.

After that, I change the Names in the Detail Panel. For that, just click on the column and change the name to what you want.

When you are ready save your site and start a test run (when you are lazy, it is enough to start the run, and this will save your project!)

When you made everything right then your data will be loaded after authentication (sometimes it takes a little bit longer, depending on the data in the DB and your environment!)

When everything looks fine, we have to deploy the Website on one of your webservers. You also have the possibility to host the site on your Orchestrator server. Jörg made a Video were it is shown to do so:

http://www.vcoportal.de/2011/11/using-wavemaker-as-web-frontend-for-vco/

The interesting part is at 06:30!
(Note from Jörg:  :mrgreen: Be aware that this is absolutely unsupported!)

The project in this post is  very restricted, cause the circumstance that you must use our own AD- and SQL Server data…..

That’s all for Part5….stay tuned for the next Part……

WaveMaker
WaveMaker
LittleCMDB.zip
16.9 MiB
Details...