in part one you setup a Windows 2012 Cloud Server on Rackspace, and configured it with Apache and FTP. In part two, it is time to install the HyperFileSQL Client/Server, so you can use it to host HyperFile databases and create an SCM (Source Control Manager) database in the Cloud. Remeber there is a similar serious of articles on my site for Linux servers
Note: I ran into some performance issues with WebDev and Windows 2012. Be sure to read the summary article at http://www.thenextage.com/wordpress/linux-and-windows-2012-webdev-cloud-servers-the-summary/ and especially the comments at the end, before deciding if you want to build a 2008 or 2012 Windows server.
Step one is to get the install package for HyperFileSQL. It is included on the original CDs, but since I have downloaded the latest update patches, I used that instead. One of the patches was “WX170PACKUSHFSQLCS078g.exe” that is the HyperFileSQL install. When you run it, it will ask you for a directory to extract the setup to.
After extracting, the installer will run, you can cancel out of the install since you are not installing it locally. In the directory that you extracted the setup into, there will be a WX170PackHFSQLCS.EXE file. That is the windows installer. You will not need the Linux folders for this install.
The next step is to get the install onto the Cloud Server. The easiest way to do that, is to use the FTP you setup in the last article to transfer it to the server. So fire up your favorite FTP client, connect to the server and transfer the install file to the server.
Once the files are transferred, use RDP to connect to the server. Since the home directory of the FTP user you set up is the root web document directory, that is where the install was copied. Use File explorer to navigate to C:Apache24htdocs. This is probably a folder that you will want to get to on a regular basis, so add it to the favorites group by right clicking on the Favorites title and choosing add current location to Favorties.
Run the Install by double clicking on it. That will bring up a license agreement screen, agree and click next.
On the next screen select For Windows on this computer and click next.
Choose Install a new server from the next screen.
Take the defaults on the next screen and click next.
The server will now be configured and ran. Once completed you will get a window telling you that is is completed, click next.
Next it will ask you if you want to continue the configuration via the HyperFileSQL Control Center. Click Continue in CC HFSQL.
That will bring you to the HyperFileSQL control Center.
It has already configured a connection to the server double click on it to connect. Which will bring up a log in screen. The username is admin with no password. Click the green check mark to continue.
Which will bring you to the server status screen.
Now its time to change the admin password. Click on the “Users and groups” tab, select the Admin user, and press the “Edit” button. This will bring up an edit screen for the user where you can set the password.
Set the password as you desire and click the green check mark to save you changes.
Now you need to open up port 4900 on the firewall so that a connection can be made to the HyperFileSQL server. Remember in the first article you created several firewall rules, that is the same way you will create this one. So open the Server Manager Dashboard and click on Configure this Local Server, then click on the link to the right of Windows Firewall in the Server Properties pane.
Now click on Advanced Settings, then on Inbound Rules in the Left Pane and New Rule in the Right Pane.
Chose Port on the first pane of the Wizard.
Chose TCP and 4900 on the next pane.
Allow the connection on the next pane.
Apply it to all 3 types of connections on the next.
And finally name it on the last pane and click Finish.
When I did my setting this did not require a reboot to reset the firewall, like it did with some of the other changes. If the next section fails, try a reboot of the server before getting to frustrated.
One last step, you should clean up the install file since you don’t want it left in what will eventually be your website folders. So go back over to file explorer and delete it.
Connecting to the Server Remotely
You should now be able to connect to the server. On your development machine run the HyperFileSQL Control Center. You can get to it either from the WinDev group on the windows start menu, or by running WinDev and chosing HyperFileSQL Control Center from the Tools menu. Chose the Radio Button for New Connection and fill in the Server, port, and user information and password. Click the green check mark to make the connection.
This will make the connection to the database and bring up the status screen as it did on the remote server.
Create a SCM Database
Now that you have a HyperFileSQL server in the cloud, you can setup an SCM database on the server, and share it with a remote team of developers. Connecting to multiple SCM databases is a little tricky, there is a webinar on wxlive.us that discusses the use of multiple SCMs. Run WinDev and chose “SCM Administrator” from the SCM menu. Then from the File menu of the administrator chose “Create a new SCM Database”. Chose the “Creation in HyperFileSQL Client/Server mode” radio button and fill in the server name, login name and password. Leave the database as SCM and the port as 4900, unless you changed the port when you installed the HyperFileSQL server.
If you get an error concerning creating the group, then you are experiencing a bug that has been resolved by pcSoft, a patch is available from support. For some reason in my setup the SCM Administrator did not automatically connect to the new SCM database after it created it but that is OK because you want to create an SCM user first anyway.
This is where watching the webinar about using multiple SCMs is important. If at all possible you should use the same user and password for all the SCMs that you connect to, as it will make it a little easier to deal with. Go back to the HyperFileSQL Control Center and after a refresh you should see the new SCM database. Click on the server in the tree control on the left pane, which will change the right pane back to the maintenance of the server. Click on the “Users and groups” tab, and click the “New” button to add the user. Fill in the required information, and add the user to the “SCM Users” group by selecting it and pressing the Arrow button to move it the the “Users Groups” list. Click the green check mark to save the record.
You can now add a project to the SCM. Open one of your projects, then from the project menu, chose project description, then the SCM tab. Chose the “Use the SCM” radio button, then press the “Parameters” button and chose “Add the project to a SCM database”
When the wizard comes up, fill in the server, database, port, user name and password and click on the wizard next arrow.
The next screen allows you to configure the directory in the SCM database that the project will be stored in. When done, click the next button.
The next screen allows you to select the Elements to add. When done click the next button.
Next is dependencies. Click the next button.
This will bring you to the final screen of the wizard and it is ready to add the project to the SCM database, click the green check mark.
The project is now added to the SCM database and you are presented with a screen giving you some tips on the use of the SCM. You can close the screen and you will be back in the WinDev IDE.
You have now added a project to the SCM, congratulations!
Use the HyperFileSQL Server for the data of an application
The server can also be used to store databases that you want your application to communicate with over the cloud, and you will also be connecting to the server from you WebDev sites once the server is completely configured. Before you start using it for application data, you should adjust the cache setting of the server. From the HyperFileSQL Control Center, chose the Configuration tab, and then the Caches radio button. This setting controls how much Ram of the server can be used to cache the indexes of the databases. Recommended setting are shown based on the configuration of your server. Set the size to what is appropriate for your use. I am setting mine low since I will only use the HyperFileSQL Server for SCM and testing. Once done click Apply, to save your changes.
To fully test the server and get an idea of what it takes to move a classic database to the cloud you can modify one of the example apps provided with WinDev. There are two methods to move a HyperFile Classic database to your Server, when you change the connection in the Analysis it will give you the opportunity to upload the database at that time, or from the HyperFileSQL Control Center, on the databases tab, there is a button to “Import a HyperFileSQL Classic database”. So open up WinDev, and open the “Sales Management” Example. Then from the Project menu, chose “Load the Analysis”. The from the Analysis menu, chose “Connections”. Since there are no connections defined, a wizard will popup to define a connection.
You are creating a connection to a HyperFileSQL Client/Server so click the next button and specify the server name and port.
Click the next button, and specify the user name and password to connect to the server. You can create several users on your HyperFileSQL server and give them different permissions, to different databases, for now just use the Admin user.
Click the Next button, and the wizard will take a few minutes to communicate with the server to get a list of databases available. Since the only database you have at this point is the SCM that is what will be displayed in the drop down. You are creating a new database, so type its name (“SalesManagement”) into the drop down and press the Next button.
Now you are given a chance to Name the connection and add a description. Change as you like, then press the Next button.
Now that a connection has been defined, the real magic begins. You are asked if you want to associate some of the files of the Analysis with this new connection. Answer “Yes”
Then you are given the opportunity to select which files, select all of them and then press the Next button.
The next question wants to know if you would like to copy the existing files to the Server, since that was the purpose of this exercise, click “Copy now”
Now your given a choice of which files to copy to the server, select them all and press the Next button.
The next screen lets you know that your have completed the wizard, so if you click the green check, you will “Make it So”.
The analysis will be changed and the files will be copied to the server. Once its completed you will be returned the to Analysis and will see that the files now show as being HFSQL C/S files.
That’s all there is to it, if you run the application now, it will be using the data from your shinny new Cloud Server!!! The first time you run the application there will be a few additional prompts that come up to configure the Hot Modification of the database files. Just answer those as you wish.
You will notice that the application is a little slower at times because it is pulling the data from the cloud, but everything will function as expected. Note: Andy Stapleton of Cowboy Computing Solutions has a set of file manager classes that helps speed up applications that will be accessing data over the cloud.
If you want to verify that you really are editing the database located on the server, simply edit a record.
Then use the HyperFileSQL Control Center to view that same record.
Part 2 Conclusion
You have now configured a HyperFileSQL server in the cloud that you can use to serve data to your WD applications and later on, you will configure WB to use that same server. You have also setup a SCM database on that server so that you can share your projects with a development team.
Be sure to save another image of the server incase you want to roll back to this point for any reason.
Still to come: Installing WebDev and adding a couple of sites to the server. I will also be doing an article on setting up PostgreSQL on the server. And if I get enough request, I may also consider doing articles on installing mySQL, PHP, WordPress.