-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from RMI-PACTA/ci/simplify-pull-only-deploy
Ci/simplify pull only deploy
- Loading branch information
Showing
6 changed files
with
510 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "0.0.0.5", | ||
|
||
"parameters": { | ||
|
||
"containerGroupName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The name of the container group." | ||
} | ||
}, | ||
|
||
"dataTimestamp": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The time to start the container group." | ||
} | ||
}, | ||
"issReportingYear": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Reporting year to use for ISS data." | ||
} | ||
}, | ||
|
||
"identity": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The ID of the user assigned identity to use for the container group." | ||
} | ||
}, | ||
"location": { | ||
"type": "string", | ||
"defaultValue": "[resourceGroup().location]", | ||
"metadata": { | ||
"description": "Location for all resources." | ||
} | ||
}, | ||
"restartPolicy": { | ||
"type": "string", | ||
"defaultValue": "Never", | ||
"allowedValues": [ | ||
"Always", | ||
"Never", | ||
"OnFailure" | ||
], | ||
"metadata": { | ||
"description": "The behavior of Azure runtime if container has stopped." | ||
} | ||
}, | ||
"starttime": { | ||
"type": "string", | ||
"defaultValue": "[utcNow()]", | ||
"metadata": { | ||
"description": "The time this template is deployed." | ||
} | ||
}, | ||
|
||
"PGHOST": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Explicitly define a (full URL) hostname for PGHOST." | ||
} | ||
}, | ||
"PGPASSWORD": { | ||
"type": "securestring", | ||
"metadata": { | ||
"description": "password to connect to database" | ||
} | ||
}, | ||
|
||
"imageTagWorkflow": { | ||
"type": "string", | ||
"defaultValue": "main", | ||
"metadata": { | ||
"description": "Image tag for the workflow container." | ||
} | ||
}, | ||
|
||
"logWorkspaceId": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The ID for a Log Analytics Workspace." | ||
} | ||
}, | ||
"logWorkspaceKey": { | ||
"type": "securestring", | ||
"metadata": { | ||
"description": "The key for a Log Analytics Workspace." | ||
} | ||
}, | ||
|
||
"storageAccountKeyExtracted": { | ||
"type": "securestring", | ||
"metadata": { | ||
"description": "The storage account key for the storage account for extracted files." | ||
} | ||
}, | ||
"storageAccountNameExtracted": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The storage account name for the storage account for extracted files." | ||
} | ||
}, | ||
"storageAccountShareExtracted": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The file share name for the extracted files." | ||
} | ||
} | ||
|
||
}, | ||
|
||
"variables": { | ||
|
||
"PGDATABASE": "FDS", | ||
"PGUSER": "postgres", | ||
"containerregistry": "ghcr.io/rmi-pacta", | ||
"machineCpuCoresLimitWorkflow": 2, | ||
"machineCpuCoresRequestWorkflow": 2, | ||
"machineMemoryInGBLimitWorkflow": 16, | ||
"machineMemoryInGBRequestWorkflow": 16, | ||
"mountPathExport": "/mnt/factset-extracted" | ||
|
||
}, | ||
|
||
"functions": [], | ||
|
||
"resources": [ | ||
|
||
{ | ||
"type": "Microsoft.ContainerInstance/containerGroups", | ||
"apiVersion": "2021-09-01", | ||
"name": "[parameters('containerGroupName')]", | ||
"location": "[parameters('location')]", | ||
"identity": { | ||
"type": "UserAssigned", | ||
"userAssignedIdentities": { | ||
"[parameters('identity')]": {} | ||
} | ||
}, | ||
"properties": { | ||
"diagnostics": { | ||
"logAnalytics": { | ||
"logType": "ContainerInstanceLogs", | ||
"workspaceId": "[parameters('logWorkspaceId')]", | ||
"workspaceKey": "[parameters('logWorkspaceKey')]" | ||
} | ||
}, | ||
"containers": [ | ||
{ | ||
"name": "workflow-factset", | ||
"properties": { | ||
"image": "[concat(variables('containerregistry'),'/workflow.factset:', parameters('imageTagWorkflow'))]", | ||
"ports": [], | ||
"resources": { | ||
"limits": { | ||
"cpu": "[variables('machineCpuCoresLimitWorkflow')]", | ||
"memoryInGB": "[variables('machineMemoryInGBLimitWorkflow')]" | ||
}, | ||
"requests": { | ||
"cpu": "[variables('machineCpuCoresRequestWorkflow')]", | ||
"memoryInGB": "[variables('machineMemoryInGBRequestWorkflow')]" | ||
} | ||
}, | ||
"environmentVariables": [ | ||
{ | ||
"name": "PGUSER", | ||
"value": "[variables('PGUSER')]" | ||
}, | ||
{ | ||
"name": "PGPASSWORD", | ||
"secureValue": "[parameters('PGPASSWORD')]" | ||
}, | ||
{ | ||
"name": "PGHOST", | ||
"value": "[parameters('PGHOST')]" | ||
}, | ||
{ | ||
"name": "PGDATABASE", | ||
"value": "[variables('PGDATABASE')]" | ||
}, | ||
{ | ||
"name": "DEPLOY_START_TIME", | ||
"value": "[parameters('starttime')]" | ||
}, | ||
{ | ||
"name": "MACHINE_CORES", | ||
"value": "[variables('machineCpuCoresRequestWorkflow')]" | ||
}, | ||
{ | ||
"name": "LOG_LEVEL", | ||
"value": "TRACE" | ||
}, | ||
{ | ||
"name": "EXPORT_DESTINATION", | ||
"value": "[variables('mountPathExport')]" | ||
}, | ||
{ | ||
"name": "DATA_TIMESTAMP", | ||
"value": "[parameters('dataTimestamp')]" | ||
}, | ||
{ | ||
"name": "ISS_REPORTING_YEAR", | ||
"value": "[parameters('issReportingYear')]" | ||
}, | ||
{ | ||
"name": "UPDATE_DB", | ||
"value": "FALSE" | ||
} | ||
], | ||
"volumeMounts": [ | ||
{ | ||
"name": "factset-extracted", | ||
"mountPath": "[variables('mountPathExport')]" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"restartPolicy": "[parameters('restartPolicy')]", | ||
"osType": "Linux", | ||
"volumes": [ | ||
{ | ||
"name": "factset-extracted", | ||
"azureFile": { | ||
"shareName": "[parameters('storageAccountShareExtracted')]", | ||
"readOnly": false, | ||
"storageAccountName": "[parameters('storageAccountNameExtracted')]", | ||
"storageAccountKey": "[parameters('storageAccountKeyExtracted')]" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
], | ||
"outputs": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
|
||
"imageTagWorkflow": { | ||
"value": "pr-73" | ||
}, | ||
"dataTimestamp": { | ||
"value": "20231231" | ||
}, | ||
"issReportingYear": { | ||
"value": "2022" | ||
}, | ||
|
||
"identity": { | ||
"value": "/subscriptions/feef729b-4584-44af-a0f9-4827075512f9/resourceGroups/RMI-SP-PACTA-DEV/providers/Microsoft.ManagedIdentity/userAssignedIdentities/pacta-runner-dev" | ||
}, | ||
|
||
"storageAccountKeyExtracted": { | ||
"reference": { | ||
"keyVault": { | ||
"id": "/subscriptions/feef729b-4584-44af-a0f9-4827075512f9/resourceGroups/RMI-SP-PACTA-DEV/providers/Microsoft.KeyVault/vaults/pacta-vault-dev" | ||
}, | ||
"secretName": "rawdata-storageaccountkey" | ||
} | ||
}, | ||
"storageAccountNameExtracted": { | ||
"value": "pactarawdata" | ||
}, | ||
"storageAccountShareExtracted": { | ||
"value": "factset-extracted" | ||
}, | ||
|
||
"logWorkspaceId": { | ||
"reference": { | ||
"keyVault": { | ||
"id": "/subscriptions/feef729b-4584-44af-a0f9-4827075512f9/resourceGroups/RMI-SP-PACTA-DEV/providers/Microsoft.KeyVault/vaults/pacta-vault-dev" | ||
}, | ||
"secretName": "LogWorkspaceID-Dev" | ||
} | ||
}, | ||
"logWorkspaceKey": { | ||
"reference": { | ||
"keyVault": { | ||
"id": "/subscriptions/feef729b-4584-44af-a0f9-4827075512f9/resourceGroups/RMI-SP-PACTA-DEV/providers/Microsoft.KeyVault/vaults/pacta-vault-dev" | ||
}, | ||
"secretName": "LogWorkspaceKey-Dev" | ||
} | ||
}, | ||
|
||
"PGPASSWORD": { | ||
"reference": { | ||
"keyVault": { | ||
"id": "/subscriptions/feef729b-4584-44af-a0f9-4827075512f9/resourceGroups/RMI-SP-PACTA-DEV/providers/Microsoft.KeyVault/vaults/pacta-vault-dev" | ||
}, | ||
"secretName": "factset-database-password" | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.