Deploying Nx Private Cloud to Azure

You can easily deploy Nx Private Cloud to Azure.

Container Setup

First, create a container configuration using the following image: nxprivatecloud/nxcloud:latest

Second, create a mount point -v /data/private-cloud:/data

Third, provision the following env variables

1[
2  {
3    "name": "ADMIN_PASSWORD",
4    "value": "admin-password"
5  },
6  {
7    "name": "GITHUB_API_URL",
8    "value": "https://api.github.com"
9  },
10  {
11    "name": "GITHUB_AUTH_TOKEN",
12    "value": "your-github-auth-token"
13  },
14  {
15    "name": "GITHUB_WEBHOOK_SECRET",
16    "value": "your-github-webhoook-secret"
17  },
18  {
19    "name": "NX_CLOUD_APP_URL",
20    "value": "url-accessible-from-ci-and-dev-machines"
21  },
22  {
23    "name": "NX_CLOUD_MODE",
24    "value": "private-community"
25  }
26]

All env variables prefixed with GITHUB are required for the GitHub integration. If you don’t use GitHub, you don’t have to set them.

To test that everything works, open NX_CLOUD_APP_URL in the browser and log in using the user name “admin” and the password provisioned above.

Using Azure Blob Storage

If you want to use AzureBlob for storing and delivering cached artifacts, add the following env variables:

1[
2  {
3    "name": "AZURE_CONNECTION_STRING",
4    "value": "your-azure-connection-string"
5  },
6  {
7    "name": "AZURE_CONTAINER",
8    "value": "your-azure-container"
9  }
10]

Using this configuration, the metadata will be stored in the volume and the file artifacts will be stored in Azure Blob Storage.

We highly recommend using Azure Blob Storage for large workspaces.

Using Azure Blob Storage and CosmosDB

If you want to use AzureBlog for storing and delivering cached artifacts and CosmosDB for storing metadata, add the following env variables:

1[
2  {
3    "name": "NX_CLOUD_MONGO_SERVER_ENDPOINT",
4    "value": "your-cosmos-db-url"
5  },
6  {
7    "name": "NX_CLOUD_USE_MONGO42",
8    "value": "false"
9  },
10  {
11    "name": "AZURE_CONNECTION_STRING",
12    "value": "your-azure-connection-string"
13  },
14  {
15    "name": "AZURE_CONTAINER",
16    "value": "your-azure-container"
17  }
18]

Using this configuration, task metadata will be stored in CosmosDB and file artifacts will be stored in Azure Blob Storage. You don’t need a mount point for your container.