Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.0 release #185

Merged
merged 234 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
4754503
Pipeline clean-up. Added pipeline environment first resolvers
dlpzx Jul 6, 2022
ca5405f
Passed environmentoptions to component react
dlpzx Jul 6, 2022
0b54eee
frontend views
dlpzx Jul 7, 2022
d3b545e
frontend views
dlpzx Jul 8, 2022
8d3a31d
views
dlpzx Jul 8, 2022
78c63de
fix input environment creation
dlpzx Jul 11, 2022
1875e25
multipipelines
dlpzx Aug 29, 2022
261016b
Create folder sharing with S3 access point
LEUNGUU Aug 31, 2022
56340f2
remove inputoutput dataset from pipeline object
dlpzx Aug 31, 2022
d4c28bb
remove inputoutput dataset from pipeline object
dlpzx Aug 31, 2022
07b4f42
Fix graphql api for pipeline environments
dlpzx Sep 2, 2022
f87aec3
Fix graphql api for pipeline environments - runs
dlpzx Sep 2, 2022
54bc794
Added get and list APIs for pipeline environments
dlpzx Sep 2, 2022
a427f6c
defined resolvers
dlpzx Sep 2, 2022
6d1b39f
Draft on cdk stack for pipelines
dlpzx Sep 2, 2022
67384b9
First implementation API-frontend views multi-environment pipelines
dlpzx Sep 7, 2022
91ab147
Changes in cdk stack
dlpzx Sep 8, 2022
93d5b93
Frontend adjustments
dlpzx Sep 9, 2022
9853a1e
Frontend adjustments
dlpzx Sep 12, 2022
7c6664a
ddkjson clean + changes frontend
dlpzx Sep 12, 2022
f0085d3
Added create environment test
dlpzx Sep 13, 2022
d516313
Added deletion of environments in pipeline deletion
dlpzx Sep 13, 2022
e973b5b
Added deletion of environments in pipeline deletion
dlpzx Sep 13, 2022
f966116
Lint issues
dlpzx Sep 13, 2022
034a647
fix integration test
dlpzx Sep 13, 2022
e09db49
fix integration test
dlpzx Sep 13, 2022
ab8aace
Fix documnetation for pipelines
dlpzx Sep 13, 2022
9258190
Fix delete_pipelines api with environments
dlpzx Sep 13, 2022
5c645c1
Fix datapipeline tests
dlpzx Sep 14, 2022
88ab976
Fix datapipeline tests
dlpzx Sep 14, 2022
e4f4ccb
Add revoke folder sharing functions
LEUNGUU Sep 7, 2022
15978e7
Fix datapipeline tests - added pipeline environment fixture
dlpzx Sep 14, 2022
f518e75
Cleaned migration versions and initialization of the database
dlpzx Sep 15, 2022
8cd89f3
Cleaned migration versions and initialization of the database
dlpzx Sep 15, 2022
43d85ad
Cleaned migration versions and initialization of the database
dlpzx Sep 15, 2022
c29f8a2
Cleaned migration versions and initialization of the database
dlpzx Sep 16, 2022
251247c
Clean docs
dlpzx Sep 16, 2022
71f3bde
Added clean-up version and v1.2.0
dlpzx Sep 16, 2022
3b8b286
DataPipelineEnvironment as Base
dlpzx Sep 16, 2022
96d1a7d
DataPipelineEnvironment as Base,Resource
dlpzx Sep 16, 2022
e6b024a
Added clean-up version and v1.2.0 - added Resource columns for pipeli…
dlpzx Sep 16, 2022
3bd2811
Modified app.py for multi-account
dlpzx Sep 19, 2022
fc03bf3
Finished documentation - missing screenshots
dlpzx Sep 19, 2022
f068cfe
Fix len of Query object + final touches frontend
dlpzx Sep 19, 2022
33bd1d3
Merge pull request #117 from LEUNGUU/feat/replace-s3-bucketpolicy-wit…
dlpzx Sep 19, 2022
d8c1bd3
Fix integration tests multi-env pippeline
dlpzx Sep 20, 2022
a069a98
Fix integration tests multi-env pippeline
dlpzx Sep 20, 2022
4493c66
Documentation with pictures + buildspec condition enhacements
dlpzx Sep 20, 2022
bdecfac
Merge pull request #134 from awslabs/Enhacement-rds-tables-and-migrat…
dlpzx Sep 20, 2022
b0e7783
cdk pipelines
dlpzx Sep 26, 2022
e4eb3a8
Added ddk commands in cdk deploy
dlpzx Sep 26, 2022
0ffc56d
Added ddk commands in cdk deploy
dlpzx Sep 29, 2022
e3f8519
cloning the repo from deployment
dlpzx Sep 29, 2022
13115cd
cloning the repo from deployment
dlpzx Sep 29, 2022
57d6096
Deployment from clone working
dlpzx Oct 4, 2022
91fac83
Added frontend views and methods for CICD stack
dlpzx Oct 4, 2022
3f0c11e
Added frontend views and methods for CICD stack + deletion of stacks
dlpzx Oct 4, 2022
11868eb
flaking + frontend input for stack cicdStack
dlpzx Oct 4, 2022
5916eaf
Disabled gitflow from cdk cli and pipeline
dlpzx Oct 5, 2022
e6bb2ba
Disabled gitflow from cdk cli and pipeline
dlpzx Oct 5, 2022
0e79da4
Disabled gitflow from cdk cli and pipeline
dlpzx Oct 5, 2022
1f66828
add Cognito Group resolver
LEUNGUU Oct 7, 2022
e5fc455
Modified output to array of groups and list of dictionaries - backend
dlpzx Oct 9, 2022
12198f6
api call in frontend view
dlpzx Oct 9, 2022
bf2a7c0
api call in frontend view + fix input output in resolver local + fix …
dlpzx Oct 10, 2022
056b545
flake
dlpzx Oct 10, 2022
6c9aa26
SSM cdk.json deploy application
dlpzx Oct 10, 2022
c11d5d2
Parameterized branch; some cleanup
rb201 Oct 11, 2022
58e95ce
Backwards compatibility
dlpzx Oct 11, 2022
721629e
Removed function no longer needed
rb201 Oct 11, 2022
89f55d9
Updated branch var
rb201 Oct 11, 2022
3f52c27
Cleaned up unused libs
rb201 Oct 11, 2022
3ece816
Merge pull request #160 from awslabs/parameterize-branch-var
dlpzx Oct 11, 2022
66eca87
Typo in get env var
rb201 Oct 11, 2022
ade84f9
Merge pull request #161 from awslabs/fix-typo-env-var-git-branch
rb201 Oct 11, 2022
f7cbb48
Added logging; added exception to SSM
rb201 Oct 11, 2022
4f92298
tmp github as source
rb201 Oct 12, 2022
fb36a0b
Merge pull request #162 from awslabs/add-exception-to-ssm
dlpzx Oct 12, 2022
36f3f2d
make source control configurable + echo on codebuild env vars
dlpzx Oct 12, 2022
cac2dfe
git branch from codebuild source environment variable
dlpzx Oct 12, 2022
4409ec8
modified echo in codebuild
dlpzx Oct 12, 2022
8cd724c
Merge pull request #163 from awslabs/v1m1m0
dlpzx Oct 12, 2022
3cdcd12
Added orga views and filter for orga or environment
dlpzx Oct 13, 2022
52ccaf6
Backwards compatibility with codepipelines
dlpzx Oct 14, 2022
f785088
documentation
dlpzx Oct 14, 2022
3ef5f0a
Backwards compatibility
dlpzx Oct 14, 2022
945d866
Pipeline clean-up. Added pipeline environment first resolvers
dlpzx Jul 6, 2022
a137c2f
Passed environmentoptions to component react
dlpzx Jul 6, 2022
64caa5d
frontend views
dlpzx Jul 7, 2022
4902734
frontend views
dlpzx Jul 8, 2022
d41614c
views
dlpzx Jul 8, 2022
347cf53
fix input environment creation
dlpzx Jul 11, 2022
c4bdd72
multipipelines
dlpzx Aug 29, 2022
fd4b214
remove inputoutput dataset from pipeline object
dlpzx Aug 31, 2022
614f649
remove inputoutput dataset from pipeline object
dlpzx Aug 31, 2022
eb8bb18
Fix graphql api for pipeline environments
dlpzx Sep 2, 2022
b492bc7
Fix graphql api for pipeline environments - runs
dlpzx Sep 2, 2022
4aa26c7
Added get and list APIs for pipeline environments
dlpzx Sep 2, 2022
f3f25f3
defined resolvers
dlpzx Sep 2, 2022
16d8b07
Draft on cdk stack for pipelines
dlpzx Sep 2, 2022
6e1aeba
First implementation API-frontend views multi-environment pipelines
dlpzx Sep 7, 2022
5df4104
Changes in cdk stack
dlpzx Sep 8, 2022
1c8ebd6
Frontend adjustments
dlpzx Sep 9, 2022
1ddc8d4
Frontend adjustments
dlpzx Sep 12, 2022
ef3f97e
ddkjson clean + changes frontend
dlpzx Sep 12, 2022
059f808
Added create environment test
dlpzx Sep 13, 2022
7773ad9
Added deletion of environments in pipeline deletion
dlpzx Sep 13, 2022
ca195e2
Added deletion of environments in pipeline deletion
dlpzx Sep 13, 2022
7988945
Lint issues
dlpzx Sep 13, 2022
5faa596
fix integration test
dlpzx Sep 13, 2022
04ffb2d
fix integration test
dlpzx Sep 13, 2022
fa362b4
Fix documnetation for pipelines
dlpzx Sep 13, 2022
5631d1c
Fix delete_pipelines api with environments
dlpzx Sep 13, 2022
771d101
Fix datapipeline tests
dlpzx Sep 14, 2022
1307064
Fix datapipeline tests
dlpzx Sep 14, 2022
350a860
Fix datapipeline tests - added pipeline environment fixture
dlpzx Sep 14, 2022
a018469
Clean docs
dlpzx Sep 16, 2022
27d0ba4
DataPipelineEnvironment as Base
dlpzx Sep 16, 2022
c15dad1
DataPipelineEnvironment as Base,Resource
dlpzx Sep 16, 2022
9f612c3
Modified app.py for multi-account
dlpzx Sep 19, 2022
9f0c4a6
Finished documentation - missing screenshots
dlpzx Sep 19, 2022
f24e388
Fix len of Query object + final touches frontend
dlpzx Sep 19, 2022
9846b82
Fix integration tests multi-env pippeline
dlpzx Sep 20, 2022
5dab8d5
Fix integration tests multi-env pippeline
dlpzx Sep 20, 2022
b2ceb34
Documentation with pictures + buildspec condition enhacements
dlpzx Sep 20, 2022
93f0f78
cdk pipelines
dlpzx Sep 26, 2022
b25f581
Added ddk commands in cdk deploy
dlpzx Sep 26, 2022
1c92c9c
Added ddk commands in cdk deploy
dlpzx Sep 29, 2022
2f4d879
cloning the repo from deployment
dlpzx Sep 29, 2022
c4bac86
cloning the repo from deployment
dlpzx Sep 29, 2022
bc28d94
Deployment from clone working
dlpzx Oct 4, 2022
4fe9aed
Added frontend views and methods for CICD stack
dlpzx Oct 4, 2022
d341602
Added frontend views and methods for CICD stack + deletion of stacks
dlpzx Oct 4, 2022
1ed70c4
flaking + frontend input for stack cicdStack
dlpzx Oct 4, 2022
8040df5
Disabled gitflow from cdk cli and pipeline
dlpzx Oct 5, 2022
d74268f
Disabled gitflow from cdk cli and pipeline
dlpzx Oct 5, 2022
4090b79
Disabled gitflow from cdk cli and pipeline
dlpzx Oct 5, 2022
818d938
Backwards compatibility
dlpzx Oct 11, 2022
23e56b4
Backwards compatibility with codepipelines
dlpzx Oct 14, 2022
dd6f563
documentation
dlpzx Oct 14, 2022
1e01c08
Backwards compatibility
dlpzx Oct 14, 2022
3b7e00a
Merge remote-tracking branch 'origin/77-multi-environment-pipelines' …
dlpzx Oct 14, 2022
43232c9
flaking
dlpzx Oct 14, 2022
05fc5ff
updated git install in docker-dev adn docker-ecs
dlpzx Oct 14, 2022
2754739
Show only not invited groups and remove two unused apis
LEUNGUU Oct 17, 2022
b9b6a83
Added integration test for cdk-pipelines
dlpzx Oct 17, 2022
b8b20be
last review of documentation
dlpzx Oct 17, 2022
82c2d28
Generic-names in pipeline blueprint
dlpzx Oct 17, 2022
99a39d2
resolve conflicts
dlpzx Oct 17, 2022
d85f9cf
Merge branch 'main' into 77-multi-environment-pipelines
dlpzx Oct 17, 2022
7a47fc0
Merge branch 'v1m2m0' into 77-multi-environment-pipelines
dlpzx Oct 17, 2022
c4f32c7
fix coverage test import
dlpzx Oct 17, 2022
d765fde
Merge remote-tracking branch 'origin/77-multi-environment-pipelines' …
dlpzx Oct 17, 2022
359e15d
Cognito list groups in handlers + added integration test for list groups
dlpzx Oct 17, 2022
3d80fe5
small change in integration test
dlpzx Oct 17, 2022
2984336
added integration test for list groups
dlpzx Oct 17, 2022
e2c7f28
testing of env non-local
dlpzx Oct 17, 2022
024a071
Fix integration tests pipeline
dlpzx Oct 17, 2022
b9b839d
testing of env non-local
dlpzx Oct 17, 2022
310518f
fix conf_test for pipelines
dlpzx Oct 17, 2022
b454e9d
Create folder sharing with S3 access point
LEUNGUU Aug 31, 2022
fa2e1a5
Add revoke folder sharing functions
LEUNGUU Sep 7, 2022
37b9e4d
Cleaned migration versions and initialization of the database
dlpzx Oct 18, 2022
e184378
Cleaned migration versions and initialization of the database
dlpzx Sep 15, 2022
8c4da35
Cleaned migration versions and initialization of the database
dlpzx Sep 15, 2022
9733fc8
Cleaned migration versions and initialization of the database
dlpzx Sep 16, 2022
e2ea860
Added clean-up version and v1.2.0
dlpzx Oct 18, 2022
0eb2934
Added clean-up version and v1.2.0 - added Resource columns for pipeli…
dlpzx Sep 16, 2022
92387c7
SSM cdk.json deploy application
dlpzx Oct 10, 2022
d049038
Parameterized branch; some cleanup
rb201 Oct 11, 2022
4707016
Removed function no longer needed
rb201 Oct 11, 2022
6870809
Updated branch var
rb201 Oct 11, 2022
a345357
Cleaned up unused libs
rb201 Oct 11, 2022
9f104be
Typo in get env var
rb201 Oct 11, 2022
27e566c
Added logging; added exception to SSM
rb201 Oct 11, 2022
a2a8958
tmp github as source
rb201 Oct 12, 2022
32e108d
make source control configurable + echo on codebuild env vars
dlpzx Oct 12, 2022
69ba8dd
git branch from codebuild source environment variable
dlpzx Oct 12, 2022
9217c45
modified echo in codebuild
dlpzx Oct 12, 2022
ab20df3
Fix migration order
dlpzx Oct 18, 2022
d433ca5
Merge remote-tracking branch 'origin/v1m2m0' into v1m2m0
dlpzx Oct 18, 2022
fb97450
Merge branch 'v1m2m0' into 77-multi-environment-pipelines
dlpzx Oct 18, 2022
039d936
Renamed cdk.json and cdk.context.json
dlpzx Oct 18, 2022
3e30b92
Merge branch 'v1m2m0' into list-and-search-for-possible-values-when-i…
dlpzx Oct 18, 2022
4862657
Merge pull request #169 from awslabs/167-rename-cdkjson-to-cdkjsontem…
dlpzx Oct 19, 2022
086cbbe
required --app for non cdk.context (SSM cdk.json) deployments
dlpzx Oct 20, 2022
fc361f9
Merge pull request #173 from awslabs/167-rename-cdkjson-to-cdkjsontem…
dlpzx Oct 20, 2022
de6ec86
Merge pull request #158 from awslabs/list-and-search-for-possible-val…
dlpzx Oct 20, 2022
8a2f309
sorted environments in cdk_pipeline
dlpzx Oct 20, 2022
b5a4aa6
fixed paths in cdk-pipelines
dlpzx Oct 21, 2022
73427ee
flaking
dlpzx Oct 21, 2022
9a35a23
flaking
dlpzx Oct 21, 2022
e9fc504
Add CodeCommit permissions for git clone
noah-paige Oct 21, 2022
e107121
Modifications to tag resources in multi-account pipelines non-cdk
dlpzx Oct 24, 2022
f5c6546
Modifications to tag resources in multi-account pipelines non-cdk - w…
dlpzx Oct 24, 2022
9513699
Merge remote-tracking branch 'origin/77-multi-environment-pipelines' …
dlpzx Oct 24, 2022
31d790f
Deploy CDK Pipeline and Clean Up Repo
noah-paige Oct 24, 2022
1c22690
Better sharing management
Oct 25, 2022
f5c4985
Merge pull request #175 from awslabs/77-multi-env/clean-up-fix
dlpzx Oct 25, 2022
d1cad94
Remove unnecessary boto3 and clean prints
dlpzx Oct 25, 2022
68b0844
flaking
dlpzx Oct 25, 2022
e4b6eda
Testing feedbacks
Oct 26, 2022
47ad72d
fix lint issues
Oct 26, 2022
f9285c5
fix it test
Oct 26, 2022
d930e1a
remove empty f strings + put back waiter for cross account sharing
Oct 26, 2022
94efd00
time sleep
Oct 26, 2022
46a91fd
Rename ssm param
Oct 26, 2022
d507f8a
Fix deletion of multiple stacks in pipeline
dlpzx Oct 27, 2022
16506b6
check > 0 environments on submit + stack view
dlpzx Oct 27, 2022
ff85691
Better sharing management
Oct 25, 2022
051f7b1
Testing feedbacks
Oct 26, 2022
85fdaf0
fix lint issues
Oct 26, 2022
cf62501
fix it test
Oct 26, 2022
e195ce9
remove empty f strings + put back waiter for cross account sharing
Oct 26, 2022
3ef336a
time sleep
Oct 26, 2022
b7321b1
First draft - refractoring to include S3 management
dlpzx Oct 27, 2022
341f86e
Merge remote-tracking branch 'origin/fix/issue-142' into fix/issue-142
dlpzx Oct 27, 2022
3e0fb28
Enhacement- Check minimum dev envs at pipeline creation
dlpzx Oct 27, 2022
a2e3d82
Fix CICD stack view on cdktrunk
dlpzx Oct 27, 2022
a6efa67
fix an invoke error in s3_approve_share
LEUNGUU Oct 28, 2022
36b0374
Merge remote-tracking branch 'origin/77-multi-environment-pipelines' …
dlpzx Oct 28, 2022
3f479e8
Status frontend bug for cdk-stacks status
dlpzx Oct 28, 2022
8810965
Added cicd stack output in list pipelines api call
dlpzx Oct 28, 2022
d53edc6
Merge pull request #168 from awslabs/77-multi-environment-pipelines
dlpzx Oct 28, 2022
5aa6f5f
flaking and clean up
dlpzx Oct 28, 2022
60747d2
Readded share_object
dlpzx Oct 28, 2022
7067b3f
Missing quicksight method
dlpzx Oct 28, 2022
0a02b78
Fix return in sharing service + added descriptions
dlpzx Oct 28, 2022
37c74c8
Fix error handling in S3 share
dlpzx Oct 28, 2022
e3ab9fb
refactor s3 sharing logic
LEUNGUU Oct 31, 2022
34b5427
fix syntax error
LEUNGUU Nov 1, 2022
ccba328
Merge pull request #183 from awslabs/refactor-s3-sharing
dlpzx Nov 2, 2022
724d2df
flaking
dlpzx Nov 3, 2022
1beb991
Merge pull request #176 from awslabs/fix/issue-142
dlpzx Nov 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/


# VSCode extension
.vscode/
/.favorites.json
*.code-workspace

# TypeScript incremental build states
*.tsbuildinfo

# Local state files & OS specifics
.DS_Store
node_modules/
lerna-debug.log
dist/
pack/
.BUILD_COMPLETED
.local-npm/
.tools/
coverage/
.nyc_output
.LAST_BUILD
*.sw[a-z]
*~
.idea

# We don't want tsconfig at the root
/tsconfig.json

# Backed up json files
*.json-e

# CDK Context & Staging files
cdk.context.json
.cdk.staging/
cdk.out/
.out

# DDK Context & Staging files
.ddk.out/
37 changes: 37 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

# !/usr/bin/env python3

import aws_cdk as cdk
from aws_ddk_core.cicd import CICDPipelineStack
from ddk_app.ddk_app_stack import DDKApplicationStack
from aws_ddk_core.config import Config

app = cdk.App()

class ApplicationStage(cdk.Stage):
def __init__(
self,
scope,
environment_id: str,
**kwargs,
) -> None:
super().__init__(scope, f"dataall-{environment_id.title()}", **kwargs)
DDKApplicationStack(self, "DataPipeline-PIPELINENAME-PIPELINEURI", environment_id)

config = Config()
(
CICDPipelineStack(
app,
id="dataall-pipeline-PIPELINENAME-PIPELINEURI",
environment_id="cicd",
pipeline_name="PIPELINENAME",
)
.add_source_action(repository_name="dataall-PIPELINENAME-PIPELINEURI")
.add_synth_action()
.build().add_stage("dev", ApplicationStage(app, "dev", env=config.get_env("dev"))).add_stage("prod", ApplicationStage(app, "prod", env=config.get_env("prod")))
.synth()
)

app.synth()


30 changes: 30 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"app": "python3 app.py",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"requirements*.txt",
"source.bat",
"**/__init__.py",
"python/__pycache__",
"tests"
]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
]
}
}
22 changes: 22 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/ddk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"environments": {
"cicd": {
"account": "111111111111",
"region": "eu-west-1"
},
"dev": {
"account": "222222222222",
"region": "eu-west-1",
"resources": {
"ddk-bucket": {"versioned": false, "removal_policy": "destroy"}
}
},
"prod": {
"account": "333333333333",
"region": "eu-west-1",
"resources": {
"ddk-bucket": {"versioned": true, "removal_policy": "retain"}
}
}
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import Any

from aws_ddk_core.base import BaseStack
from constructs import Construct


class DDKApplicationStack(BaseStack):

def __init__(self, scope: Construct, id: str, environment_id: str, **kwargs: Any) -> None:
super().__init__(scope, id, environment_id, **kwargs)

# The code that defines your stack goes here:
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==6.2.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
aws-cdk-lib==2.20.0
constructs>=10.0.0,<11.0.0
aws_ddk_core==0.3.1
30 changes: 30 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import setuptools

with open("README.md") as fp:
long_description = fp.read()


setuptools.setup(
name="sample-app",
version="0.3.1",
description="An empty DDK Python app",
long_description=long_description,
long_description_content_type="text/markdown",
author="author",
package_dir={"": "sample-app"},
packages=setuptools.find_packages(where="sample-app"),
install_requires=open("requirements.txt").read().strip().split("\n"),
python_requires=">=3.6",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: JavaScript",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Code Generators",
"Topic :: Utilities",
"Typing :: Typed",
],
)
13 changes: 13 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/source.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@echo off

rem The sole purpose of this script is to make the command
rem
rem source .venv/bin/activate
rem
rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows.
rem On Windows, this command just runs this batch file (the argument is ignored).
rem
rem Now we don't need to document a Windows command for activating a virtualenv.

echo Executing .venv\Scripts\activate.bat for you
.venv\Scripts\activate.bat
7 changes: 7 additions & 0 deletions backend/blueprints/cdk_data_pipeline_blueprint/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

# call tests for your code below

# pytest tests/unit/my_test.py
25 changes: 25 additions & 0 deletions backend/blueprints/data_pipeline_blueprint/app_multiaccount.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
import os
import aws_cdk as cdk
from aws_cdk import Tags
from ddk_app.ddk_app_stack import DdkApplicationStack

from utils.config import MultiaccountConfig

stage_id = os.environ.get('STAGE', None)
pipeline_name = os.environ.get('PIPELINE_NAME')

app = cdk.App()

config = MultiaccountConfig()
environment_id = config.get_stage_env_id(stage_id)
env_vars = config.get_env_var_config(environment_id)['env_vars']

Tags.of(app).add("dataall", "true")
Tags.of(app).add("Target", pipeline_name)
DdkApplicationStack(app,
f"{pipeline_name}-DdkApplicationStack",
environment_id,
env_vars)

app.synth()
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from typing import Any, Optional

from aws_cdk import Environment, Tags
from aws_ddk_core.base import BaseStack
from aws_ddk_core.config import Config
from constructs import Construct


class DdkApplicationStack(BaseStack):


def __init__(self, scope: Construct,
id: str,
environment_id: str,
env_vars: dict,
env: Optional[Environment] = None,
**kwargs: Any) -> None:
self._config = Config()
super().__init__(
scope,
id,
environment_id=environment_id,
env=env or self._config.get_env(environment_id),
**kwargs)

Tags.of(self).add("Team", str(env_vars['Team']))

# The code that defines your stack goes here:
Loading