BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
EyalGonen
Lapis Lazuli | Level 10

Hi @JuanS_OCS 

 

How do you know which images to delete? For example, I want to delete all images in ECR that belong to SAS release Stable 2024.04. I am not aware of any image tag that associates an image with Stable 2024.04. Maybe I am wrong. Please let me know if you find how to do it.

gwootton
SAS Super FREQ
If you have the assets for a given release, you could grep the overlays/required/transformers.yaml to identify the tag for each image associated with that release, for example:

$ grep newTag -m1 -B1 sas-bases/overlays/required/transformers.yaml
newName: cr.sas.com/viya-4-x64_oci_linux_2-docker/sas-activities
newTag: 1.53.15-20221103.1667486852217

But the version can change during a release cycle, if an update is pushed to 2024.04 for a given image and you pulled the latest assets for it, then the image tag would be different for that image than what you might have in your ECR.

Using the lifecycle option lets you instruct the ECR to remove all entries that meet given criteria, while keeping some history.
--
Greg Wootton | Principal Systems Technical Support Engineer
EyalGonen
Lapis Lazuli | Level 10

Hi @gwootton 

 

If I understand correctly the ECR lifecycle option is at the repository level and not at the registry level (correct me if I am wrong) so this means that I need to set it up for all the SAS repositories and there are dozens of them...

Has anyone tried this lifecycle approach in a production site?

 

I think the SAS Mirror Manager should really have a "cleanup" option since it can tell the exact image tags associated with each Cadence release and it can safely remove images from the CR. 

gwootton
SAS Super FREQ
I believe this is something done at the repository level, so it might be easier to use the CLI to loop through all your repositories to apply the lifecycle policy to each. I've not had any experience using the functionality in AWS. I don't know of any plans to add that functionality to Mirror Manager.

It looks like there is functionality in the AWS console to preview the results of the lifecycle policy before applying it.

https://docs.aws.amazon.com/AmazonECR/latest/userguide/lpp_creation.html

--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 18 replies
  • 4135 views
  • 4 likes
  • 3 in conversation