https://github.com/sagikazarmark/demo-aws-meetup-60-minutes-cicd
https://github.com/sagikazarmark/demo-aws-meetup-60-minutes-cicd
dagger demo
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagikazarmark/demo-aws-meetup-60-minutes-cicd
- Owner: sagikazarmark
- Created: 2024-12-11T01:59:29.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T11:00:38.000Z (10 months ago)
- Last Synced: 2025-03-24T20:39:36.052Z (7 months ago)
- Topics: dagger, demo
- Language: Go
- Homepage: https://devertix.com/aws-lounge-hungary-ci-cd/
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo: [60 minutes of CI/CD automatizations](https://devertix.com/aws-lounge-hungary-ci-cd/)
**This repository contains the demo code for my presentation.**
The demo uses AWS AppRunner and ECR for deploying a simple application.
## Prerequisites
- AWS account access
- AWS CLI configured (preferably using environment variables in `.env.local`)
- [Dagger](https://docs.dagger.io/quickstart/cli) installed
- [just](https://just.systems/man/en/packages.html) installed (see [justfile](justfile) if you want to run commands directly)> [!TIP]
> Install Nix and Direnv to get Dagger and Go configured.## Initial setup
Create the necessary roles for AppRunner to access ECR:
```shell
aws iam create-role --role-name AppRunnerECRAccessRole --assume-role-policy-document file://etc/aws/AppRunnerECRAccessRole.json
aws iam put-role-policy --role-name AppRunnerECRAccessRole --policy-name ECRAccessPolicy --policy-document file://etc/aws/ECRAccessPolicy.json
```> [!CAUTION]
> The above policy gives read-only access to **all** ECR repositories in the account.Run the initial setup steps to deploy the first version of the application:
```shell
just setup
```## Usage
- Find your AppRunner service on AWS Console
- Make a change in `main.go`
- Run `just deploy` to deploy a new version
- Watch the changes being propagated## Teardown
```shell
just teardown
``````shell
aws iam delete-role-policy --role-name AppRunnerECRAccessRole --policy-name ECRAccessPolicy
aws iam delete-role --role-name AppRunnerECRAccessRole
```