- Deploy the main Antiope Framework
- Clone this repo as antiope-azure inside the antiope directory
- Create the Azure Service Principals as described in AzureCredentials
cd antiope-azure
make layer env=FNORD
Antiope uses a config.ENV file to specify a few environment variables for the Makefile, and a cft-deploy Manifest file as the parameters to CloudFormation.
- Create the Manifest (replace FNORD with your environment name. ie dev, qa, prod, etc)
make manifest env=FNORD manifest=antiope-azure-FNORD-Manifest.yaml
echo "AZURE_MANIFEST=manifest=antiope-azure-FNORD-Manifest.yaml" >> ../config-files/config.FNORD
Edit the Manifest file:
- Set
pAzureLambdaLayerPackage:
to match the output from themake layer
command above - Remove the line with
LocalTemplate:
towards the top - Remove the
pBucketName:
,pTemplateURL:
Parameters. They will be supplied by the Makefile - Provide a name for the SecretsManager credential as
pAzureServiceSecretName
- Provide the main Antiope Stack Name as
pAntiopeMainStackName
- Add the following as part if the StackPolicy block to prevent Cloudformation from touching your subscription table:
- Resource:
- LogicalResourceId/SubscriptionDBTable
Effect: Deny
Principal: "*"
Action:
- "Update:Delete"
- "Update:Replace"
make cfn-validate-manifest env=prod
Make sure all the values look right
make deploy env=prod
Add the Azure service principal secrets to the Secrets Manager secret that was created by make deploy
As Antiope uses Serverless Transforms as part of the CloudFormation process, you can re-use the transformed templates to promote code from a lower environment to an upper or production environment.
- Generate a new Manifest for the upper environment using the
make manifest
command - Make sure to copy the LambdaLayer package from the lower environment's bucket to the upper environment.
- Get the value of
TemplateURL
from the stack outputs of the lower environment. This file points to the exact set of lambda and cloudformation used to deploy the lower environment. - Run the
make promote
command:
make promote env=UPPER template=TEMPLATE_URL_FROM_STEP_3
Note, if the lower environment is in a different account, the antiope bucket will need a cross-account bucket policy granting access to the upper environment's account_id. The prefix the upper account requires is deploy-packages/*