Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

AppServiceDeploy

ake133c edited this page Feb 22, 2022 · 33 revisions

Deployment of an FDA web application as an Azure Service App

Setting up appsettings.local.json

First verify that you have the appsettings.local.json in your solution. If you don't have it, please follow the following guidance to create it: Run Sample For The First Time.

Prior to the deploy you would need to verify that you have specified following parameters in the appsettings.local.json file. In this example we will use the name of the application fdadeploy. You can change it to any other available name.

{
    "Publisher": 
    {
       "CompletionCheck": "Callback",
       "CallbackUrlBase": "https://fdadeploy.azurewebsites.net/complete/"
    }

    "InviteOnlyMode":
    {
       "Enabled": false,
       "Domains": [ "autodesk.com" ],
       "Addresses": [ <your comma-separated email addresses> ]
    }

    "Forge":
    {
       "ClientId": <your client id>,
       "ClientSecret": <your client secret>,
       "AuthenticationAddress": "https://developer.api.autodesk.com/authentication/v1/authenticate",
       "DesignAutomation": {
       "BaseAddress": "https://developer.api.autodesk.com/da/us-east/"
    }
}

If you don't have your ClientId and ClientSecret, please refer to the following guidance to obtain them

Create a Publish

  1. In Visual Studio right click on you WebApplication and select Publish

  2. In the WebApplication: Publish window click New button thumbnail

  3. At the next screen select Azure as a target and then press Next thumbnail

  4. At the next screen, on the Specific target blade choose Azure App Service (Linux) and then press Next thumbnail

  5. If you are doing a deploy to an already existing service application then skip this step. Else click '+' button thumbnail

  6. If you are doing a deploy to an already existing service application then skip this step. Else specify the Name of your application and the Resource Group name. Note that the name of your application must be the same as in your CallbackUrlBase. E.g. if your CallbackUrlBase is https://fdadeploy.azurewebsites.net/complete/ then your application Name must be fdadeploy. Press the Create button thumbnail

  7. In the Forge App at the Callback URL(s) section set the callback url of your application, in this case https://fdadeploy.azurewebsites.net/complete/

  8. At the next screen select your App Service instance and press Next thumbnail

  9. At the next screen select Publish (generates pubxml file) and press Finish thumbnail

  10. At the next screen press Publish button thumbnail

  11. Your application is now fully deployed and functioning thumbnail

Optional

Move appsettings.local.json settings to the environment variables

In case you want to change application settings without doing a re-deploy from the Visual Studio you might want to set parameters by using the environment variables. In this case you can override appsettings.local.json in the Azure portal and on any change your deployed application will restart, read the properties set and apply them immediately. Example of setting environment variables to override parameters set in the appsettings.local.json is shown below

  1. Note what parameters you want to move from the appsettings.local.json thumbnail

  2. In Azure portal go to the Configuration blade thumbnail

  3. Name the variables as shown below and save the configuration thumbnail

  4. Browse the application thumbnail

Clone this wiki locally