All steps performed from osdp
directory
cd osdp
To manually create a virtualenv
$ python3 -m venv .venv
Aactivate your virtualenv.
$ source .venv/bin/activate
Install the required dependencies.
$ $ pip install -r requirements.txt -r requirements-dev.txt
Context values are key-value pairs that can be associated with an app, stack, or construct. They may be supplied in the cdk.json
or or on the command line.
Since the cdk.json
file is generally committed to source control, it should generally be used for values shared with the team. Anything that needs to be overriden with specific deploys should be supplied on theh command line.
stack_prefix
(str) - will be appended to the beginning of the CloudFormation stack on deploy. (*For NU devs this is not required, it will use theDEV_PREFIX
env var in AWS.)collection_url
(str)- the url of the IIIF collection to load during deployment. There is a small collection (6 items) in thecdk.json
file, but you will want to change or override on the command line.
tags
(dict) - Key value pair tags applied to all resources in the stack. Example:
"tags": {
"project": "chatbot"
},
manifest_fetch_url
(str) - The concurrency to use when retrieving IIIF manifests from your API. If not provided, the default will be used (2).
Example:
cdk deploy -c stack_prefix=alice
Synthesize the CloudFormation template for this code (login to AWS account first). You must first log in to AWS with administrator credentials.
$ cdk synth
To deploy the stack to AWS. You must first log in to AWS with administrator credentials.
$ cdk deploy
To run the tests.
$ pytest
$ ruff check .
or
$ ruff check --fix .
To add additional dependencies, for example other CDK libraries, just add
them to your setup.py
file and rerun the pip install -r requirements.txt
command.
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation
Enjoy!