Home > Knowledge Base > Installing with an Azure SQL database

Installing with an Azure SQL database

This article explains how to create an Azure SQL database (a SQL Server database hosted on Windows Azure) that can be used with Cloud Cruiser and how to install Cloud Cruiser with that database.

Azure SQL databases are not yet supported with Cloud Cruiser 4.

Before you begin

If you are also installing Cloud Cruiser on an Azure VM, make sure that the VM is configured according to Configuring a Windows Azure VM for Cloud Cruiser. You can verify endpoints in the Windows Azure Management Portal at Virtual Machines > yourVM > Endpoints.

To create a compliant Azure SQL database

  1. Log in to the Windows Azure Management Portal.
  2. In the bottom left corner, click New.
    New button with '+' icon
  3. Choose Data Services > SQL Database > Custom Create.
    The Specify database settings dialog box appears.
  4. In the Name field, enter a name for your database.
    For consistency with standard Cloud Cruiser installations, use ccdb.
  5. Set Edition to Business and set Limit Database Size to 10 GB.
    This gives you flexibility for a production environment. You can increase this limit later if necessary.
  6. Fill out the remaining fields according to your preferences, advancing through additional pages if necessary.
  7. Click Button with checkmark to create your database.
  8. Click SQL Databases in the main menu, then select your new database.
    Underneath Connect to your database, the name of the server hosting your database is displayed.
  9. Copy the full Server name (without the port number) and save it in a text file. You will need this, the database name, the username, and the password you created for this database when you install the Cloud Cruiser application.

To install the Cloud Cruiser application

This procedure replaces the one in Installing the Cloud Cruiser application.

  1. Download the zipped version of Cloud Cruiser.
    This is different from the executable installation wizard.
  2. Unzip the package to the directory where you want to install Cloud Cruiser.
    For example, C:\Program Files\CloudCruiser. If you are installing a version prior to 3.2, due to a bug you must choose a directory with no spaces in its path.
  3. In this directory, create a directory named lib3rd.
  4. Go to http://www.microsoft.com/en-us/downl....aspx?id=21599 and download the Microsoft SQL Server JDBC Driver.
    You can choose either the archive file or the self-extracting executable.
  5. Unpack the download file to any location you want, then from \sqljdbc_3.0\enu under that directory copy the file sqljdbc4.jar to both of the following directories under the Cloud Cruiser installation:
    • <install_dir>/lib3rd
    • <install_dir>/apache-tomcat-7.0.54/lib
      This path will be slightly different with versions of Cloud Cruiser older than 4.0, which ship with older versions of Tomcat.
  6. In the <install_dir>/apache-tomcat-7.0.54/webapps/ROOT/WEB-INF/classes directory, rename the database.properties.sample file to database.properties, then open the file in a text editor.
  7. Edit the Azure (Microsoft driver) SSL​ block to match the following, substituting your values for the placeholders in <brackets>:
    #### Azure (Microsoft driver) SSL
    jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    jdbc.url=jdbc:sqlserver://<serverName>;database=<dbName>;encrypt=true;hostNameInCertificate=*.database.windows.net
    jdbc.username=<loginName>@<serverName>
    jdbc.password=<password>
    hibernate.dialect=org.hibernate.dialect.SQLServerDialect
    validation.query=select 1
    validation.query.timeout=5

    The following example shows the correct block for a database named ccdb on the server r8lslme0zc.database.windows.net with a login name of ccadmin and password myCl0ud$db:

    #### Azure (Microsoft driver) SSL
    jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    jdbc.url=jdbc:sqlserver://r8lslme0zc.database.windows.net;database=ccdb;encrypt=true;hostNameInCertificate=*.database.windows.net
    jdbc.username=ccadmin@r8lslme0zc.database.windows.net
    jdbc.password=myCl0ud$db
    hibernate.dialect=org.hibernate.dialect.SQLServerDialect
    validation.query=select 1
    validation.query.timeout=5
    
  8. Delete the blocks for all other database types, then save and close the file.
  9. Open a command prompt as an administrator and change directory to <install_dir>.
  10. Run the command
          install -u <dbaName>@<serverName> -p <dbaPassword>.
    To continue the previous example, if you have the DBA account sa with the same password as the Cloud Cruiser database user, the command would be
          install -u sa@r8lslme0zc.database.windows.net -p myCl0ud$db.
    This installs the Cloud Cruiser database.

    The install script ends with the following message. Though you are unable to create a JDBC data source for your Cloud Cruiser database, the product is able to run successfully.

    Creating '<dbName>' data source entry...No driver matches file sqljdbc4.jar

  11. Change directory to bin and run the command:
          ccservice install
    This installs the application server.
  12. Start the application server.

Troubleshooting

This section explains how to fix common problems with this installation scenario.

Error when running the install command

If the following error appears when you run the install command:

Failed to validate the server name in a certificate during Secure Sockets Layer (SSL) initialization. The server name is *.database.windows.net, the name in certificate is xxxxxxxx.database.windows.net.

Then in the database.properties file, update the hostNameInCertificate value to match the server name in the error message, then relaunch the install command.

Error when running the ccservice command

If the following error appears when you run ccservice install:

The specified service already exists.
Failed to install serviceFailed installing 'CloudCruiser' service (errorlevel=8)

Then a previous installation was not fully uninstalled. Remove the previously installed service with the command:

sc delete CloudCruiser

Last modified

Tags

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP