Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AWS equivalent of Google Cloud Run #64

Open
cayhorstmann opened this issue Jun 23, 2024 · 7 comments
Open

Use AWS equivalent of Google Cloud Run #64

cayhorstmann opened this issue Jun 23, 2024 · 7 comments
Labels
betterbuild Better build reorg 2024

Comments

@cayhorstmann
Copy link
Owner

Find the best AWS equivalent of Google Cloud Run. It should be able to run a Docker container, shutting down when there are no active requests. Deploy the comrun service first, then play-codecheck.

@cayhorstmann cayhorstmann added the betterbuild Better build reorg 2024 label Jun 23, 2024
@kn15235
Copy link

kn15235 commented Jun 25, 2024

Hi! I will be working on this issue

@cayhorstmann
Copy link
Owner Author

About your questions:

When you and I did steps, it may be that resources were tagged with two sets of user accounts. Delete all prior resources. Then try to create everything with your user account, and see that the arn all have your user id. In that case, you can then use

ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output text)

in the instructions.

With REGION, point readers to the page with the regions that have AppRunner and tell them to set REGION to a specific region if the one returned from REGION=$(aws configure get region) isn't the right one.

@cayhorstmann
Copy link
Owner Author

You asked about the ECR tags. latest is what is used by Docker locally, so that's fine. But you need to decide: Do you want two ECR repos, each with tag latest, or do you want one, with tags comrun_latest and play-codecheck_latest. Either approach will work.

@cayhorstmann
Copy link
Owner Author

You need to provide CLI instructions to construct that AppRunnerECRAccessRole. You followed some blog to do that. Once you do that, its arn will be arn:aws:iam::$ACCOUNT_ID:role/service-role/AppRunnerECRAccessRole

@kn15235
Copy link

kn15235 commented Jul 15, 2024

Just to make an update of what I've done over the weekend, I have deleted all prior resources (that we've created so far) such as configuration profiles, ecr repositories/registries, docker images, and IAM access roles. When I created my own access key and secret access key using the AWS mangement console in my root user account, when running, aws sts get-caller-identity --query "Account" --output text) I got a different number which was my account ID instead, so I'll input ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output text) into the instructions

@kn15235
Copy link

kn15235 commented Jul 15, 2024

When it comes to the ECR tags, I was having trouble with tagging since I was running into some errors which I couldn’t solve at the moment. Although I would really wanted to make one ECR repos which the tags ‘comrun_latest ‘ and ‘play-codecheck_latest’ since it seemed simpler, I only managed to have it work out for 2 ECR repos. Also when it comes to deploying the play-codecheck service, I was having trouble on figuring out which docker image was play-codecheck when I ran ‘docker images’
image
Is the play-codecheck service with the name ‘codecheck’? Or is it something else? If it is, I will edit the build-instructions on my branch for the play-codecheck service to the correct one

@kn15235
Copy link

kn15235 commented Jul 15, 2024

I tracked back to my steps and found the blog (https://www.apprunnerworkshop.com/intermediate/container-image/apprunner-iam-ecr-access/) that provided the CLI instructions for the ‘AppRunnerECRAccessRole’ I created before and put them into my google document instructions too

I have also completed my build instructions that I made on a google document, https://docs.google.com/document/d/1qjkbXKZpAVrjKTsQPhp8aZcXI-4eTqP3M9utncp5HC4/edi, and I will revise it when typing them into the build-instructions.md file. So far, what I’ve done was edit the comrun service name to “Comrun Service Deployment (Google Cloud)” and also tried messing around with the build-instructions.md file along with looking at the raw code as well as the preview. So far, I managed to do this:
image
However, when trying to write the instructions, I’m a bit unfamiliar with editing a .md file and how to format everything so I’m having a bit of trouble… I will take some time aside to learn before I can make a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
betterbuild Better build reorg 2024
Projects
None yet
Development

No branches or pull requests

2 participants