In AWS App Runner, how does one roll back to old revision - amazon-web-services

What are the ways how one can roll back the App Runner service to the previous revision?
We use a simple GitHub Actions workflow to build and upload a new docker image to the ECR registry.
How can I select an old image in ECR and upload this instead (rolling back revision)?

I'm also interested in this issue. It seems that when you create an app runner app with a specific image tag and that's it you cannot choose which version to deploy. You either have to amend the service change the Container image URI to the previous image

Related

Is there a way to update the image used by node in slurm-gcp?

I installed slurm-gcp from that github using terraform in cloud shell.
https://github.com/SchedMD/slurm-gcp#install-using-terraform
There are two VMs created.
controller
login
I installed several applications in /apps to confirm that they exist.
I would like to edit node's /etc/hosts and add network tag (http-server, https-server) to run the applications.
But nowhere does it say how to modify the image used by node .
Is there no way to edit the image of the slurm?
Thank you.
As of the latest version of Slurm on GCP, the images are pre-built and hosted by SchedMD, and are used directly without the requirement to make build an image at deployment time. You can continue to modify the image by creating your own image. This is done by spinning up a VM with the public image pointed to in the tfvars, making your modifications, saving the image, and pointing your tfvars to your new image.
You can continue to use the custom compute/controller install scripts found in the scripts directory.

How to run the AWS codepipeline with Github release tag?

I am trying to run the AWS codepipeline when there is a new tag in the ECR repo. I am using GitHub action with release tag and pushing the Docker image to ECR. Now the issue is, I want to give the release tags to images like 1.0, 1.1 but at the source stage of codepipeline we need to specify the image tag otherwise it takes latest as default see here due to this codepipeline is not triggering because it is not getting the latest tag.
I want to give the release number as an image tag. How can I do this?
The simple answer is that you can't. A pipeline can only use a single and specific tag in an ECR source.
You would have to hack around it by modifying the pipeline on each deploy as part of your CI/CD process.
I found a way to achieve this with GitHub Action. The thing is when the pipeline will trigger the task definition gets updated every time.
We can follow this documentation. https://docs.github.com/en/actions/guides/deploying-to-amazon-elastic-container-service

Update a Sagemaker Endpoint when changing the docker image

I am looking for the simplest solution for updating a Sagemaker Endpoint. The only thing I want to change is the docker image (to update the code).
I am building the new Docker image on my computer, and then I upload it on ECR (I plan to do this in a CI/CD in the near future).
From my understanding, it seems that the simplest way is to create a new EndpointConfig, then call the UpdateEndpoint API to switch the endpoint to the new config, then delete the old EndpointConfig. Does anyone know a simpler way? Or can anyone confirm that this is the simplest approach to doing this?

Cloud Run deployment using image from last revision

We need to deploy labels to multiple CLoud Run services using below API method
https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services/replaceService
We are looking for options where we can apply labels using API without any new image deployment from Container Registry . We understand that there will be deployment and revision change while applying labels but we want that during deployment it should not pull new image from container registry rather it should use the image from last revision . Any configuration parameter in Cloud Run to prevent new images being pulled while applying labels using API or gcloud run services update SERVICE --update-labels KEY=VALUE
The principle of Cloud Run (and Knative, because the behavior is the same) is that the revision is immutable. Thus, if you change something in it, a new revision is created. You can't fake it!
So, the solution is to not use the latest tag of your image, but the SHA of it.
# the latest
gcr.io/PROJECT_ID/myImage
gcr.io/PROJECT_ID/myImage:latest
# A specific version
gcr.io/PROJECT_ID/myImage:SHA123465465dfsqfsdf
Of course, you have to update your YAML for this.

Copy a GCR image from one project to another

I aim to copy a gcr image from one project to another as soon as the image lands in the container registry of the first project. I am aware of the gcloud container images add-tag command, looking for a more automated option. Also the second project where the image has to be copied is protected by VPC-SC. Any leads will be appreciated...
I understand that you are looking for the best way to mirror the GCR images between two projects. Currently, you can follow the workaround in this document click to copy the container images for your use case. At the moment, the only way to move between two registries is by pulling from one and pushing to another, if you have the right permission. There is currently a tool on github that can automate this for you, gcrane click . However, for mirroring the container images between two projects, a feature request has already been submitted but there is no ETA.
According to the GCP documentation click , If the project is protected by VPC-SC, the container registry does not use googleapis.com domain. To achieve this, container registry need to configured via private DNS or BIND to map to the restricted VIP separately from other APIs.
When a change is made to a container registry that you own, a Pub/Sub message can be published. You can use this Pub/Sub message as a trigger to perform work. My immediate thought would be to create a Cloud Function that is triggered by the arrival of a message which then fires off a Cloud Build recipe. The Cloud Build would perform a docker pull of your original image and then a tag rename and then a docker push. It feels like this would be 100% automated and use components that are designed for CI/CD pipelines.
References:
Configuring Pub/Sub notifications
Cloud Build documentation