Installing

Ready to install the Tenant SDK? This article will guide you through the process.

We recommend that you create a new Azure subscription for Weavy resources. That way you will restrict access to that subscription only.
A new subscription does not normaly incur any additional costs, since you only pay for resources used.

The following Azure resources are created during the installation:

A Resource group containing:

  • A Storage account
  • A SQL Server instance
  • A SQL Database
  • An App Service Plan
  • An App Service (web site)

If you configure the Tenant SDK to use a custom domain, these resources will also be created:

  • A DNS Zone
  • A Certificate

The following changes will be made to the subscription:

  • Registration of the following resource providers: Microsoft.Web, Microsoft.Sql, Microsoft.Storage
  • A service principal will be created with contributor access to the subscription, which will be userd by the Tenant SDK to manage your tenants and other resources.

The SQL Server and App Service Plan that are created will also contain the Web apps and SQL databases for the Weavy tenants you deploy using the Tenant SDK (until the total number of resources reaches a threshold, which will trigger the creation of a new App Service plan and SQL Server).

Prerequisites

There are a few steps that needs to be taken before installing the Tenant SDK.

1. SMTP Server Settings

You need the specifics of an SMTP server for sending emails from the Tenant Dashboard as well as from your deployed Weavy tenants. If you currently don’t have a publicly available server, there are plenty of email services to choose from (Amazon SES , SendGrid etc.).
Obtain the settings you need to send emails using an SMTP server and have have them ready for when you configure the mail settings of the Tenant SDK.

2. Custom domain

Decide if you want to configure a custom domain for the Weavy tenants you deploy. If you don’t configure a custom domain, the tenant you deploy will be accessible on the default https://*.azurewebsites.net url.

You can configure a custom domain at a later stage, but you will need to manually update existing tenants to use the custom domain as well as making some changes to your Azure environment.

If you are using custom domain you need to take these steps before continuing. Otherwise skip this step.

  • You need to purchase a domain for the tenants you deploy, for example company.com. The deployed sites will then be configured as subdomains with hostname <unique-name>.company.com.
  • You need a SSL wildcard certificate for that domain (*.company.com) in the form of an pfx file with a private key. Name the file custom-domain.pfx
  • Use the Upload/download functionality of the Azure Cloud Shell to upload the file custom-domain.pfx to your mounted drive.

Configuration

Before you install, you need to configure some settings. See the configuration documentation for a complete list of the configuration settings and their meaning.

Log in to your Azure Portal and open the Azure Cloud Shell (see screenshot below).

If you have not used the Azure Cloud Shell before, you will be prompted to create a new Azure file share for persisting files.

Maximize the window and select Bash in the shell language selector.

Execute the following lines in the terminal:

curl https://weavy.blob.core.windows.net/releases/wdm/config.sh > config.sh code ./config.sh

This downloads a configuration template file and launches Visual Studio Code.

Referencing the configuration documentation, enter the appropriate values for the settings defined in the configuration file.

Make sure you supply a value for all settings that are required.

The section called resource names lets you configure the names of some of the deployed resources. Do not remove the variable Prefix when a resource name contains it.

When you are done, save the file ctrl+s and close the editor ctrl+q.

Deploy

Issue the ls command and make sure the following files are listed:

  • config.sh
  • custom-domain.pfx (if you are using a custom domain)

Execute the following line to set execute permissions for the config.sh file:
chmod +x ./config.sh

Then execute the script file by issuing:
./config.sh

The deployment will commence after initial validation of the settings you provided. If you encounter any validation errors - go back and update the config file by executing the following command again: code ./config.sh

Don’t forget to save the file (as described earlier) before executing the script again.

If the deployment fails, you will get an option to remove the resources. Please make sure you do that before attempting to deploy again.

Post deployment steps

If you opted to use a custom domain, you will see the nameservers you need to configure in your DNS in order to delegate your DNS zone to Azure DNS.

Feel free to manually add a custom domain for your Dashboard. If you do, please update the value for ApplicationUrl in the AppSettings for the Dashboard instance.

The configuration settings are saved as AppSettings on the deployed App Service and can later on be changed by navigating to the Wep App (App Service) in your Azure portal.

Next step

Head over to the Builds page and create your first build.