Greengrass does not remove old images after updating the deployment more than 3 times

0

Hi,

We are using nucleus version 2.12.1. Documents say greengrass should remove images from older deployments but it is not removing even after we make 5-6 deployments. Here is our sample component recipe:

{
  "RecipeFormatVersion": "2020-01-25",
  "ComponentName": "App1",
  "ComponentVersion": "5.0.0",
  "ComponentType": "aws.greengrass.generic",
  "ComponentDescription": "A component that uses docker run and greengrass to do a task on edges",
  "ComponentPublisher": "Some Publisher",
  "ComponentConfiguration": {
    "DefaultConfiguration": {
      "preDeploymentScript": " ",
      "deploymentExtraArguments": "",
      "postDeploymentScript": " ",
      "filesToUpload": " "
    }
  },
  "ComponentDependencies": {
    "aws.greengrass.DockerApplicationManager": {
      "VersionRequirement": ">=2.0.0 <2.1.0",
      "DependencyType": "HARD"
    },
    "aws.greengrass.TokenExchangeService": {
      "VersionRequirement": ">=2.0.0 <2.1.0",
      "DependencyType": "HARD"
    }
  },
  "Manifests": [
    {
      "Platform": {
        "os": "all",
        "architecture": "all"
      },
      "Lifecycle": {
        "Install": {
          "script": "docker pull app1:1.0",
          "RequiresPrivilege": true,
          "Timeout": 3600
        },
        "Run": {
          "script": "docker run -e AWS_CONTAINER_AUTHORIZATION_TOKEN -e AWS_CONTAINER_CREDENTIALS_FULL_URI  --name app1 --network host  app1:1.0",
          "RequiresPrivilege": true
        },
        "Shutdown": {
          "script": "docker stop app1 && docker rm app1",
          "RequiresPrivilege": true
        }
      },
      "Artifacts": []
    }
  ],
  "Lifecycle": {}
}
질문됨 한 달 전124회 조회
1개 답변
1

Hi there,

Looks like you are not using Greengrass to download the image because your recipe's "artifacts" section is completely empty. For Greengrass to manage the images, you must follow the documentation here: https://docs.aws.amazon.com/greengrass/v2/developerguide/run-docker-container.html#run-docker-container-public-ecr-dockerhub.

Notice the artifacts contains the images in the form of "docker:<image name>:<tag>".

Cheers,

Michael

AWS
전문가
답변함 한 달 전
profile pictureAWS
전문가
Greg_B
검토됨 한 달 전
  • Hi Michael,

    Thanks for the answer. We will try it ASAP and let you know about the result.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠