acme-prefect
April 26, 2025 ยท View on GitHub
Sample project using prefect orchestration library and acme-portal-sdk to manage deployments via acme-portal VSCode extension.
Features
-
Shows use of
prefectlibrary for workflow orchestration -
Shows how
acme-portal-sdkcan be used to provide deployment related data and actions foracme-portalVSCodeextension -
Relies on use of Prefect Cloud and ECS Push Work Pool with:
-
Cluster:
prefect-clusteror other name -
Launch Type:
FARGATE -
Task Role ARN: set to ARN of role that controls the permissions of the task while it is running
-
Container Name:
acme-prefect, as we are using a custom built container to runt the flows -
Execution Role ARN: controls the permissions of the task when it is launching, to capture logs
-
Cloudwatch Logs Options: e.g.
{"mode":"non-blocking","awslogs-group":"/ecs/prefect-job-default","awslogs-region":"us-east-1","max-buffer-size":"25m","awslogs-create-group":"true","awslogs-stream-prefix":"ecs"}
-
Dev environment
The project comes with a python development environment. To generate it, after checking out the repo run:
chmod +x create_env.sh
Then to generate the environment (or update it to latest version based on state of uv.lock), run:
./create_env.sh
This will generate a new python virtual env under .venv directory. You can activate it via:
source .venv/bin/activate
If you are using VSCode, set to use this env via Python: Select Interpreter command.
Project template
This project has been setup with acme-project-create, a python code template library.
Required setup post template use
-
Enable GitHub Pages to be published via GitHub Actions by going to
Settings-->Pages-->Source -
Create
releaseenvironment for GitHub Actions to enable uploads of the library to PyPi -
Setup auth to PyPI for the GitHub Action implemented in
.github/workflows/release.ymlvia Trusted Publisheruv publishdoc -
Once you create the python environment for the first time add the
uv.lockfile that will be created in project directory to the source control and update it each time environment is rebuilt -
In order not to replicate documentation in
docs/docs/index.mdfile andREADME.mdin root of the project setup a symlink fromREADME.mdfile to theindex.mdfile. To do this, fromdocs/docsdir run:ln -sf ../../README.md index.md