make#
Script to deploy three CDK apps needed to form the backend.
The 3 stacks have very particular inputs and outputs that must be orchestrated.
Functions#
Run |
|
Run |
|
Log the output of a subprocess real-time as it executes. |
|
Deploy each of the three apps needed for the rootski database. |
|
Run |
|
Execute a bash command as a subprocess. |
deploy_cdk_app()
#
- rootski_backend_cdk.database.make.deploy_cdk_app(app_py_fpath: pathlib.Path, stack_names: List[str], context_vars: Optional[Dict[str, str]] = None, region: str = 'us-west-2')[source]#
Run
cdk deploy
on a CDK app.- Parameters
app_py_fpath – location of
app.py
for the CDK app to act oncontext_vars – key-value pairs that are used with
note.try_get_context(key)
callsstack_names – list of stack names registered in
app.py::app
to deployregion – AWS region to deploy the stacks to
- Raises
Exception – if the exit status is non-zero
diff_cdk_app()
#
- rootski_backend_cdk.database.make.diff_cdk_app(app_py_fpath: pathlib.Path, stack_names: List[str], context_vars: Optional[Dict[str, str]] = None, region: str = 'us-west-2')[source]#
Run
cdk diff
on a CDK app.- Parameters
app_py_fpath – location of
app.py
for the CDK app to act oncontext_vars – key-value pairs that are used with
note.try_get_context(key)
callsstack_names – list of stack names registered in
app.py::app
to deployregion – AWS region to deploy the stacks to
log_subprocess_output()
#
main()
#
run_cdk_command()
#
- rootski_backend_cdk.database.make.run_cdk_command(cdk_cmd: Literal['diff', 'deploy', 'destroy'], app_py_fpath: pathlib.Path, context_vars: Dict[str, str], stack_names: Optional[List[str]] = None, region: str = 'us-west-2') int [source]#
Run
cdk diff|deploy|destroy
.- Parameters
cdk_cmd – subcommand of the AWS
cdk
command to runapp_py_fpath – location of
app.py
for the CDK app to act oncontext_vars – key-value pairs that are used with
note.try_get_context(key)
callsstack_names – list of stack names registered in
app.py::app
to deployregion – AWS region to deploy the stacks to
- Returns
exit status code of the
cdk <subcommand>
run_shell_cmd()
#
- rootski_backend_cdk.database.make.run_shell_cmd(cmd: List[str]) int [source]#
Execute a bash command as a subprocess.
- Parameters
cmd – Command as a list of arguments
- Returns
exit status code of the command
Classes#
Constant values used during the deployment process. |
|
Output keys for the database-backups-bucket stack. |
|
Utility class to fetch outputs from an IamUserStack. |
|
Utility class to fetch outputs from a LightsailInstanceStack. |