Installing the database for Azure projects

After you have deployed your Azure project to the cloud, continue to installing the database. Kentico projects hosted in Azure can use any type of SQL database, hosted either on a standard SQL Server or in the cloud. This topic describes the installation on an SQL Azure server.

If you have already configured the connection string for your project, you can skip the Generating the connection string and Setting the connection strings sections.

Installing a database on an Azure SQL server

To install the database on an Azure SQL server, use the system to generate the connection string, paste the connection string as a value to your cloud service and let the system install the database.

Generating the connection string

  1. Access the website of your deployed Azure project. 

    • You can find the URL in Cloud services -> select your service -> Overviewunder Site URL.

      Locating the Site URL property in the Azure portal

  2. Specify the target Azure SQL server (created when Preparing the cloud environment) and supply the credentials for the server:

    • SQL Server name or IP address – enter your Azure SQL server name, you can find all your servers listed under SQL databases ->select your database-> Overview under Server name. The standard format is <servername>

      Specifying the Azure SQL server name and its credentials

  3. Click Next.

  4. Enter the name of the SQL database (created when Preparing the cloud environment).

  5. Choose whether you want to Create Kentico CMS database objects.

    • Select this option if you are installing into an empty database.
    • Clear this option if the existing database already contains Kentico objects (tables, stored procedures, views).
  6. Click Next.

  7. Copy the connection string value into the clipboard.
    Copying the connection string for the ServiceConfiguration.cscfg file

Setting the connection strings

  1. Open the Azure Management Portal in another browser tab.
  2. Navigate to Cloud services -> select your service-> Configuration.
  3. Paste the copied connection string value into the fields of the CMSConnectionString setting for the CMSApp role and also the SmartSearchWorker role if you are using it.
    Setting role connection strings
  4. Click Save.
  5. Close the original window with the database installation.

You have now connected your Cloud Service application to the created Azure SQL database.

We recommend that you configure the connection string in your local Azure project as well to ease future deployments:

  1. Open your Azure project in Visual Studio.
  2. Double-click the CMSApp role.
  3. Switch to the Settings tab and select Cloud as Service Configuration.
  4. Paste the connection string as a value for the CMSConnectionString key.
  5. Repeat for the SmartSearchWorker role if you are using it.

Now you will not have to set the connection string in your local project the next time you deploy your project to the cloud.

Finishing the database installation

  1. Open your project’s website again (<your cloud service name>
    • The database installation automatically resumes.
  2. Confirm the target database by clicking Next.
    • The installer now installs the database for your project.
  3. Enter a license key for the domain.
    • Staging deployments are automatically covered by any other valid license, so you do not have to request a separate license for staging deployments. However, this applies only if you use the recommended configuration, which is to use separate databases for live and staging environment.
  4. Click Next.
  5. Choose an initial website to install:
    • Choose a starter site – choose from the supplied sample sites to try out the system’s functionality, or use them as a template for custom development. We recommend the Dancing Goat or Corporate Site sample sites.
    • Create a new site or import an existing Kentico site - redirects you to the Sites application within the Kentico interface.
      • Use the New site wizard if you wish to create a new site from scratch.
      • Allows you to import sites if you have already created a website using Kentico and you want to import it to the new installation.

The installer creates your chosen website and finishes the installation. See our Recommendations on using Azure SQL Database tiers and adjust the tier of your database to suit your project demands.

If you continue to your new website, you can sign in to the administration interface.

To sign-in to our sample starter sites, use the following credentials:

User name: administrator
Password: (blank password)