Installation Instructions
Upgrading/ installing AdminApp 2.2.0 while resource group, ODS API and Admin app older version already available and running on Azure.
Note: Please backup your ODS / API and related databases before running this update procedure.
Steps for upgrading
1. Stop existing ODS API and AdminApp services on azure resource group
2. Connect to Azure SQL server from SSMS and run the following SQL commands to delete records/ data to void the first-time setup from old AdminApp application. Note: This step can be ignored if it is new installation.
DECLARE @ApplicationId INT;
SELECT @ApplicationId = ApplicationId FROM dbo.Applications WHERE ClaimSetName = '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
3. Deploy AdminApp 2.2.0 to an existing resource group using powershell script from
Ed-Fi-X-Ods-Deploy-Azure-Deployment-Scripts.zip
Please follow the naming conventions (https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best- practices/resource-naming) for AdminAppName
$params = @{
ResourceGroupName = " Existing resource group name "
AdminAppName = "AdminApp-Latest"
AppInsightLocation = "South Central US"
ProductionApiUrl = " Existing ODS API url "
SQLServerHostname = " Existing SQL server url "
SQLServerUserName = "sql administrator username"
SQLServerPassword = ConvertTo-SecureString "sql administrator password" -AsPlainText -Force
AdminAppSqlUserName = "admin app sql username"
AdminAppSqlPassword = ConvertTo-SecureString "admin app sql password" -AsPlainText -Force
}
Upgrade-AdminApp> .\Deploy-EdFiOdsAdminApp.ps1 @params
EncryptionKey:
Base64-encoded 256 bit key appropriate for use with AES encryption. This is an
optional parameter. If user wants to provide own value, then use following script to generate:
$aes = [System.Security.Cryptography.Aes]::Create()
$aes.KeySize = 256
$aes.GenerateKey()
$EncryptionKey = [System.Convert]::ToBase64String($aes.Key)
Note: If user is not providing Encryption key, then key will be generated during deployment.
4. Once the application deployment done, user will be prompted to confirm deleting and recreating Admin App specific database tables. If yes, then deployment process will delete existing Admin App specific tables and re-create them with latest table schemas on EdFi_Admin database.
5. Data validations and update:
1. We can persist existing vendor applications, key and secrets created. Need to manually update OdsInstance_OdsInstanceId column on dbo.Applications table to have default Ods instance id. Since, latest AdminApp needs association between dbo.Applications and dbo.OdsInstances tables to filter applications for selected instance.
2. Vendor applications created using older AdminApp have prefixed with “Production”. May need to manually remove that prefix.
Steps for new installation
- Please refer Ed-Fi ODS/API Cloud Deployment for Azure (Suite 3)) for new installation on Azure ( Note: New installation will create new resource group and resources).
- Make sure to bypass Admin app installation by making $DoNotInstallAdminApp flag to “$true” on \Deploy-EdFiOds.ps1 file.
- If user is not installing Admin app as part this deployment, then will be prompted to enter SQL credentials for Ed-Fi ODS Production API
Please enter username: EdFiOdsProductionApi
Password can be any value user wants to use (Make sure to satisfy the sql login password requirements. Provided username and password will be used in upcoming step to create user login on SQL server)
- Note: User can skip this step if already knows how to do and access the db server on local SSMS already.Once the deployment completed, please white list your ip address on the AzureSql server by clicking the “Set server firewall” on EdFi_Admin database on Azure resource group.