Migrating from Public Preview

NGINX as a Service for Azure (NGINXaaS) is now generally available. If you have created deployments under the “Public Preview” plan they will need to be rebuilt using the “Standard” plan.

Check your current plan

  1. Open your deployment in the Azure portal

  2. Open the JSON view

    screenshot of JSON view of the deployment
  3. look for the sku name field, it should be near the top

{
    "sku": {
        "name": "publicpreview_Monthly_gmz7xq9ge3py"
    },
}

If the SKU name starts with publicpreview or preview, you need to upgrade to the standard plan.

Rebuilding your deployment

We don’t support an in-place upgrade; you need to delete the old deployment and create a new one, which will require some downtime for your deployment. The procedure uses Azure Resource Manager (ARM) templates to minimize data entry, but some configuration elements aren’t captured in the template and need manual attention.

Gather information about the old deployment

  1. Open your deployment in the Azure portal
  2. Note the subscription and resource group
  3. Select “Export template” in the left navigation, and select “Download” at the top
  4. If you are using a system-assigned identity, note the roles assigned to that identity. You may have more roles if you use logging support or SSL/TLS certificates. Select “Identity”, then “Azure role assignments” to view the list of roles

If you have any alerts defined, those will carry over to the new deployment as long as you keep the resource group and deployment name consistent.

Important:
If you added any protected files to your deployment, those cannot be retrieved from Azure. You will need to find a local copy of the protected file so it can be uploaded to the new deployment. The portal does not provide a way to see if you are using protected files.

Delete the old deployment

  1. Open your deployment in the Azure portal

  2. Select the Delete button at the top

    screenshot of the delete button
  3. Wait until your deployment is deleted

  4. If you were sending logs to blob storage with a system-assigned identity, you may have an unknown user in the access control list for the storage account. It’s safe to remove this at any time.

    screenshot of unknown identity having access to blob storage

Create the new deployment

  1. Open the deployment template downloaded earlier, and unzip it locally. There should be two files, parameters.json and template.json

  2. Open https://portal.azure.com/#create/Microsoft.Template, Select “Build your own template in the editor”

  3. Select “Load file,” and upload parameters.json and then template.json

  4. In the resources section, change the SKU name to standard_monthly

    screenshot of template editor
  5. If you had protected files, you have two options:

    1. Delete the block containing "type":"NGINX.NGINXPLUS/nginxDeployments/configurations", and add NGINX configuration after the deployment is created

    2. Add them to the template. Encode your protected files as base64, and add them in a "protectedFiles" array at the same level as "files". Omitting irrelevant data, it should look like this:

      {
         "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
         "resources": [
            {
               "type": "NGINX.NGINXPLUS/nginxDeployments/configurations",
               "properties": {
                  "protectedFiles": [
                     {
                        "content": "YOUR BASE64 ENCODED CONTENT",
                        "virtualPath": "YOUR PATH"
                     }
                  ],
               }
            }
         ]
      }
      
  6. Select “Save”

  7. Enter the subscription and resource group from the original deployment:

    screenshot of custom template wizard
    Note:
      The region displayed may differ from your template. The value in the template is used, but the form always shows the region of the resource group.
    

  8. Select “Review and Create”

  9. You will see a warning about the terms of service; select “Create” to agree and continue

  10. Wait for the deployment to be created

    screenshot of the completed template
  11. If you were using a system-assigned identity, re-add the desired permissions for the new system-assigned identity