Mark Reyes
10/23/2024, 1:20 AMMarvin
10/23/2024, 1:20 AMSettings -> Secrets and variables -> Actions -> New repository secret
and add your DOCKER_USERNAME
, DOCKER_PASSWORD
, PREFECT_API_KEY
, and PREFECT_API_URL
.
2. Write a GitHub Workflow:
- Create a YAML workflow file in the .github/workflows/
directory of your repository. The workflow file generally includes triggers and jobs.
- Example:
- Checkout - This step involves cloning your repository into the GitHub Actions runner.
- Login to Docker Hub - Authenticate Docker to push your image to the Docker registry using docker/login-action
.
- Setup Python - Install the version of Python you need for your flow.
- Prefect Deploy - Install dependencies and deploy your flow using the Prefect CLI.
3. AWS EKS Setup for Prefect Worker:
- If your flows need to interact with AWS resources, you need to ensure the appropriate IAM roles and networking are configured in your AWS EKS.
- You may also need to create a Prefect worker service to manage your tasks. While the documentation primarily features ECS, similar steps can be followed for EKS to manage Prefect workload execution.
For further detailed steps, refer to the Prefect documentation on CI/CD with GitHub Actions and AWS integration:
- Prefect CI/CD Guide: https://docs-2.prefect.io/latest/guides/ci-cd/
- Prefect AWS Guide: https://docs-2.prefect.io/latest/integrations/prefect-aws/ecs_guide/
Feel free to ask if you have more questions or need specific examples!