Issue
The application deployed and First-time setup done successfully. But unable to proceed further with Settings page.
Cause
Admin App secret configuration, azure sql configuration values became corrupted.
Steps for Recovering the Application
Force Admin App's First-Time Setup
On this step, will clear all the data records created during first time setup.
- Please make sure to stop ODS API and Admin App websites on Azure portal
Ex: EdFiOdsApiWebSite-{environment}-{resourceGroupid}
EdFiOdsAdminAppWebSite-{environment}-{resourceGroupid}
Can be restarted after once the sql commands executed successfully.
- Connect to Azure sql server on SSMS or use Azure query editor
- Select EdFi_Admin database
- Execute following set of sql comments for clearing all the relevant data records created during first time setup process
Code Block | ||
---|---|---|
| ||
BEGIN TRAN
DECLARE @ApplicationId INT;
SELECT @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 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
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
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 versions of Admin app, presence of “SetupRequired” file indicating the first time setup process in not completed. If file not present, then first-time setup completed. Recreating the file will enforce the First time setup.
It is txt file with following content:
Placeholder file to let the AdminApp know additional setup of the system is required.
Restart the application on Azure. Now should be able to see the First time setup page.