You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Setup credentials and clone you pipeline repository:
66
-
- Go to data.all UI ==> Pipeline ==> Click on your pipeline ==> Code ==> Get Credentials ==>
67
-
- Copy paste the commands and execute in your terminal
68
-
69
-
70
-
## Executing the step function - who runs the step function?
71
-
The role assumed by the step function is a basic developer role for the env-group selected, which means that, if the
72
-
step function reads data from a data.all dataset a sharing request has to be done for this environment-group. In case
73
-
of doubts, the role can be accessed in the AWS Step Functions console.
74
-
75
-
*Clarification*: Does this mean that we only can create pipelines with basic-dev roles? No. It means that the IAM role
76
-
assumed by the step function is relative to the environment-group selected (this can be admin,fulldev or basicdev in
77
-
the environment), but it has basicdev role permissions.
18
+
- Environment and Team
19
+
- Development strategy: GitFlow or Trunk-based
20
+
- Development stages: dev, test, prod, qa,... It is required that at least "prod" is added.
21
+
- Template: it corresponds with the --template parameter that can be passed to DDK init command. See the <ahref="https://awslabs.github.io/aws-ddk/release/latest/api/cli/aws_ddk.html#ddk-init">docs</a> for more details.
22
+
- From our the environment and team selected, we can choose whether this pipeline has an input or/and output dataset.
When a pipeline is created, a CICD CloudFormation stack is deployed in the environment AWS account.
27
+
It contains a CodePipeline pipeline (or more for GitFlow development strategy) that reads from an AWS CodeCommit repository.
28
+
29
+
In the first run of the CodePipeline Pipeline a DDK application is initialized in the Pipeline repository. This DDK app is deployed in the subsequent runs.
30
+
If you want to change the deploy commands in the AWS CodeBuild deploy stage, note that the buildspec of the CodeBuild step is part of the CodeCommit repository.
31
+
32
+
33
+
!!!abstract "GitFlow and branches"
34
+
If you selected GitFlow as development strategy, you probably notices that the CodePipelines for non-prod stages fail in the first run because they cannot find their source.
35
+
After the first successful run of the prod-CodePipeline pipeline, just create branches in the CodeCommit repository for the other stages and you are ready to go.
Use these environment variables in your code and avoid hardcoding IAM roles and S3 Bucket names. Use the ENVTEAM IAM role
53
+
to access the datasets of your team. With the input/output variables you can forget about checking the name of Glue databases and S3 Buckets.
54
+
55
+
## Deploying to multiple AWS accounts/Environments
56
+
By default, the DDK application is deployed in the same account as the CICD. The data pipelines that we build with DDK
57
+
constructs are deployed in the same environment account even when we define multiple development stages.
58
+
59
+
Maybe in your enterprise you use one AWS account for CICD resources, and one AWS account for each of the development stages where you host the data pipelines.
60
+
In this scenario, in which you want to deploy the DDK application to different AWS accounts, this is our proposed approach:
61
+
62
+
### Setting up the environments
63
+
64
+
For example, the Data Science team has 3 AWS accounts: DS-DEV, DS-TEST and DS-PROD. In data.all we create 3 environments linked to each of these accounts: DS-DEV-Environment, DS-TEST-Environment and DS-PROD-Environment.
65
+
We also link the CICD account to data.all by creating the CICD-Environment.
66
+
67
+
DS-DEV, DS-TEST and DS-PROD accounts need to be bootstrapped with the following line, assuming 111111111111 = CICD account. The parameter -e needs to be set according to the stage of the account.
68
+
69
+
`ddk bootstrap -e dev -a 111111111111`
70
+
71
+
### Create pipeline
72
+
73
+
We create the pipeline in the CICD-Environment. The CICD stack will be deployed to the CICD account. Create the pipeline selecting with trunk-based + prod stage only.
74
+
75
+
### Customize the ddk.json configuration file
76
+
77
+
We customize the ddk.json file in the CodeCommit repository. More info <ahref="https://awslabs.github.io/aws-ddk/release/stable/how-to/multi-account-deployment.html">here</a>.
0 commit comments