Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The application deployed and First-time setup done successfullywas successful. But unable to proceed further with Settings the Admin App settings page.

Cause

Admin App secret configuration, azure sql configuration values became corrupted.

Steps for Recovering the Application

1) Force Admin App's First-Time Setup

On this step, will we need to clear all the data records created during first time setup.

  1. Please make sure to stop ODS API and Admin App websites on the Azure portal

Ex:  EdFiOdsApiWebSite-{environment}-{resourceGroupid}

...

  1. Connect to Azure sql server on SSMS or use Azure query editor
  2. Select the EdFi_Admin database
  3. Execute the following set of sql comments commands for clearing all the relevant data records created during first time setup process
Code Block
titleSQL
BEGIN TRAN   
DECLARE @ApplicationId INT;

    SELECTSELECT @ApplicationId = ApplicationId FROM dbo.Applications WHERE ApplicationName = 'Ed-Fi ODS Admin App'    

DELETE FROM dbo.ClientAccessTokens WHERE EXISTS (

        SELECT 1 FROM dbo.ApiClients

        WHERE ClientAccessTokens.ApiClient_ApiClientId = ApiClients.ApiClientId

          AND        AND Application_ApplicationId = @ApplicationId 
    ) 

    DELETE FROM dbo.ApiClients WHERE Application_ApplicationId = @ApplicationId
    DELETE FROM dbo.ApplicationEducationOrganizations WHERE Application_ApplicationId = @ApplicationId
    DELETE FROM dbo.ProfileApplications WHERE Application_ApplicationId = @ApplicationId
    DELETE FROM dbo.Applications WHERE ApplicationId = @ApplicationId
    DELETE FROM dbo.OdsInstances
    DELETE FROM adminapp.SecretConfigurations
COMMIT  TRAN

References

If you have any questions on how to connect to the EdFi-Admin database please refer to this articles below:

https://docs.microsoft.com/en-us/azure/azure-sql/database/connect-query-portal

https://docs.microsoft.com/en-us/azure/azure-sql/database/connect-query-ssms

2) Update/

...

Re-deploy just Admin app on Azure

Deployed pages and resources can be accessed on Azure portal.

https://www.gslab.com/blogs/kudu-azure-web-app

Older Note: That older versions of Admin app , need the presence of “SetupRequired” file indicating . This indicates to the first time setup process in that it has not completedrun. If the file not present, then this means that the first-time setup was completed. Recreating the file will enforce the First time setup process to run again.

It is txt file with following content:

To create this file just create text file with the name “SetupRequired” and set the content of it to: Placeholder file to let the AdminApp know additional setup of the system is required.

Restart the application on Azure. Now On Azure proceed to restart the application. Once the restart has finished use your web browser and navigate to the Admin App URL. You should be able to see continue the First time setup page.