Installing AdminUI

Installing AdminUI with an existing IdentityServer

If you already have a working IdentityServer installation up and running then this walkthrough is for you.

This walkthrough will take you through the entire Azure configuration process, resulting in a working environment for IdentityExpress AdminUI, with the UI and backend API running on the same machine and targeting an existing IdentityServer. This will also include migrating your user store to the AdminUI Identity Schema.

Configure a Database.

AdminUI currently only supports MySql, PostgreSQL and SqlServer. These can run in any azure or non-azure service.

Any used databases must accept remote connections, also ensure that your firewall allows connections on any used ports.

Create Azure Website

Initially you will want to create 2 Azure Web Apps (note this process can also be done with Azure VM's, though you will need to follow the AdminUI IIS Installation guide).

One website will be for the UI and the other for the backend API.

AdminAPI Configuration

Once you have a Web App Setup for the API, you will need to add some variables to the site in order to get it to run. The variables to be aware of for the API are:

  • DbProvider: This sets the database type you are using. Supported types and their values are: SqlServer MySql PostreSql

  • DbConnectionString: The connection string for your Identity database.

  • AuthorityUrl: Url of the IdentityServer installation

  • UiUrl: Url of the AdminUI frontend (the idxui container)

  • RequireHttpsMetadata: Set to true or false if you want to ensure IdentityServer discovery endpoint uses TLS. Must be true for production

  • RunIdentityMigrations: Set to true or false if you require AdminUI to run Entity Framework migrations for ASP.NET Identity DbContext's. This is recommended.

  • RunIdentityServerMigrations: Set to true or false if you require AdminUI to run Entity Framework migrations for IdentityServer DbContext's. This is useful if you have a new instance of IdentityServer currently without databases.

  • IdentityDatabaseToMigrateConnectionString (optional): The connection string of your existing ASP.NET Core Identity Entity Framework database that will be migrated to the database used in IdentityConnectionString (this must not be equal to IdentityConnectionString).

In Azure, these variables will need to be added manually to the App Settings header in the Application Settings blade.

AzureAppSettingsExample

AdminUI Configuration

Once you have a App Service Setup for the UI, you will need to add some variables to the site in order to get it to run. The variables to be aware of for the UI are:

  • AuthorityUrl: Url of the IdentityServer installation

  • UiUrl: Url of the AdminUI frontend (this Web APP)

  • ApiUrl: Url of the API setup in the previous step.

In Azure, these variables will need to be added manually to the App Settings header in the Application Settings blade.

For the UI there is an extra configuration step needed after the App Settings

Once you have configured these variables you will need to navigate to the folder that was placed in the WebApp wwwroot folder and edit the env.js file in wwwroot. The variables in this will need to match the variables above:

var ENV = {
    AuthorityUrl: '**Identity Server Url Here**',
    UiUrl: '**Url of this website**',
    ApiUrl: '**Url Setup in the previous step**'
};

Deploying to Azure Web App

For each website you will need to FTP the folders supplied to the correct Azure folder. To achieve this you will need an FTP Client such as Filezilla. Once you have an FTP Client setup, you will need to go in to the Deployment Credentials blade of your app underneath the deployment header and setup the FTP credentials. Next go into the Properties blade underneath the Settings Header. From this blade you can grab your FTP HOST NAME.

Using your FTP Client, connect to this website, from here navigate to Site -> wwwroot. You will want to place the contents of the relevant folder in this wwwroot folder. Do this for both the API and the UI.

Note: Any EF migrations should run on Website startup, if not you can hit the URL for the API to ensure they have ran.