From 18dff1c7db1c441d90be667cf9497def694469bf Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 6 Nov 2024 15:16:52 +0100 Subject: [PATCH 1/4] docs(srv): add registry migration procedure MTA-5186 --- serverless/jobs/api-cli/index.mdx | 9 +++ ...te-external-image-to-scaleway-registry.mdx | 62 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 serverless/jobs/api-cli/index.mdx create mode 100644 serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx diff --git a/serverless/jobs/api-cli/index.mdx b/serverless/jobs/api-cli/index.mdx new file mode 100644 index 0000000000..0dc26eb32a --- /dev/null +++ b/serverless/jobs/api-cli/index.mdx @@ -0,0 +1,9 @@ +--- +meta: + title: Serverless Jobs - API/CLI Documentation + description: API and CLI reference for Scaleway Serverless Jobs. +content: + h1: Serverless Jobs API/CLI Documentation + paragraph: API and CLI reference for Scaleway Serverless Jobs. +--- + diff --git a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx new file mode 100644 index 0000000000..8de56b9beb --- /dev/null +++ b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -0,0 +1,62 @@ +--- +meta: + title: Migrating an external image to the Scaleway Container Registry + description: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. +content: + h1: Migrating an external image to the Scaleway Container Registry + paragraph: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. +tags: containers jobs registry import copy migrate skopeo docker +dates: + validation: 2024-11-06 + posted: 2021-11-06 +categories: + - serverless +--- + + + +This page explains how to migrate images from public external container registries (such as Docker hub, Amazon container registries, GitHub Container registry, etc.) to the [Scaleway Container registry](/containers/container-registry/#container-registry). + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a [Container Registry namespace](/containers/container-registry/how-to/create-namespace/) + +## Import images using Docker + +1. Install the Docker Engine by following the [official documentation](https://docs.docker.com/engine/install/). + +2. Login to your Scaleway Container Registry namespace with the Docker CLI by following [this procedure](/containers/container-registry/how-to/connect-docker-cli/). + +3. Run the command below to pull, tag, then push the public image to your Scaleway Registry namespace. Make sure to replace the namespace name, and the image name by the appropriate values: + ``` + docker pull alpine:latest + docker tag alpine:latest rg.fr-par.scw.cloud/my-namespace/alpine:latest + docker push rg.fr-par.scw.cloud/my-namespace/alpine:latest + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. + +## Import images using Skopeo + +[Skopeo](https://github.com/containers/skopeo) is a command line utility that allows to perform various operations on container images and registries, such as image copy, inspection, deletion, etc. + +1. Install Skopeo by referring to the [official documentation](https://github.com/containers/skopeo/blob/main/install.md). + +2. Run the command below to log in to the Scaleway Container Registry. Make sure to specify the desired region: + + ``` + skopeo login rg.fr-par.scw.cloud -u nologin -p $SCW_SECRET_KEY + ``` + +3. Run the command below to copy an image from an external registry to the Scaleway Registry. Make sure to replace the registry, namespace and image names by the appropriate values: + + ``` + skopeo copy --override-os \ + linux docker://docker.io/alpine:latest \ + docker://rg.fr-par.scw.cloud/my-namespace/alpine:latest + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. \ No newline at end of file From 4fe4ab2dbec48258e519e18f4c1e4e336169792d Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 6 Nov 2024 15:36:06 +0100 Subject: [PATCH 2/4] docs(srv): update --- menu/navigation.json | 8 +++ ...te-external-image-to-scaleway-registry.mdx | 64 +++++++++++++++++++ ...te-external-image-to-scaleway-registry.mdx | 4 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx diff --git a/menu/navigation.json b/menu/navigation.json index b0e4370536..e452e32920 100644 --- a/menu/navigation.json +++ b/menu/navigation.json @@ -3856,6 +3856,10 @@ { "label": "Create and deploy a container with the Scaleway CLI", "slug": "deploy-container-cli" + }, + { + "label": "Migrate images to the Scaleway Registry", + "slug": "migrate-external-image-to-scaleway-registry" } ], "label": "API/CLI", @@ -3980,6 +3984,10 @@ { "label": "Jobs API Reference", "slug": "https://www.scaleway.com/en/developers/api/serverless-jobs/" + }, + { + "label": "Migrate images to the Scaleway Registry", + "slug": "migrate-external-image-to-scaleway-registry" } ], "label": "API/CLI", diff --git a/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx new file mode 100644 index 0000000000..d23ed5e48a --- /dev/null +++ b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -0,0 +1,64 @@ +--- +meta: + title: Migrating an external image to the Scaleway Container Registry + description: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. +content: + h1: Migrating an external image to the Scaleway Container Registry + paragraph: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. +tags: serverless containers registry import copy migrate skopeo docker +dates: + validation: 2024-11-06 + posted: 2021-11-06 +categories: + - serverless +--- + +Serverless Containers rely on images that can be stored in the Scaleway Container Registry, or in external public registries. + + + +This page explains how to migrate images from public external container registries (such as Docker hub, Amazon container registries, GitHub Container registry, etc.) to the [Scaleway Container registry](/containers/container-registry/#container-registry). + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) +- Created a [Container Registry namespace](/containers/container-registry/how-to/create-namespace/) + +## Import images using Docker + +1. Install the Docker Engine by following the [official documentation](https://docs.docker.com/engine/install/). + +2. Login to your Scaleway Container Registry namespace with the Docker CLI by following [this procedure](/containers/container-registry/how-to/connect-docker-cli/). + +3. Run the command below to pull, tag, then push the public image to your Scaleway Registry namespace. Make sure to replace the namespace name, and the image name by the appropriate values: + ``` + docker pull alpine:latest + docker tag alpine:latest rg.fr-par.scw.cloud/my-namespace/alpine:latest + docker push rg.fr-par.scw.cloud/my-namespace/alpine:latest + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. + +## Import images using Skopeo + +[Skopeo](https://github.com/containers/skopeo) is a command line utility that allows to perform various operations on container images and registries, such as image copy, inspection, deletion, etc. + +1. Install Skopeo by referring to the [official documentation](https://github.com/containers/skopeo/blob/main/install.md). + +2. Run the command below to log in to the Scaleway Container Registry. Make sure to specify the desired region: + + ``` + skopeo login rg.fr-par.scw.cloud -u nologin -p $SCW_SECRET_KEY + ``` + +3. Run the command below to copy an image from an external registry to the Scaleway Registry. Make sure to replace the registry, namespace and image names by the appropriate values: + + ``` + skopeo copy --override-os \ + linux docker://docker.io/alpine:latest \ + docker://rg.fr-par.scw.cloud/my-namespace/alpine:latest + ``` + +4. Your image now appears in the [Container Registry section](https://console.scaleway.com/registry/namespaces) of the Scaleway console, in the namespace specified above. \ No newline at end of file diff --git a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx index 8de56b9beb..f6a1bed0ff 100644 --- a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx +++ b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -5,7 +5,7 @@ meta: content: h1: Migrating an external image to the Scaleway Container Registry paragraph: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. -tags: containers jobs registry import copy migrate skopeo docker +tags: serverless jobs registry import copy migrate skopeo docker dates: validation: 2024-11-06 posted: 2021-11-06 @@ -13,6 +13,8 @@ categories: - serverless --- +Serverless Jobs rely on container images. These images can be stored in the Scaleway Container Registry, or in external public registries. + This page explains how to migrate images from public external container registries (such as Docker hub, Amazon container registries, GitHub Container registry, etc.) to the [Scaleway Container registry](/containers/container-registry/#container-registry). From 5823c00714aaf07b1288c460b20a6947c280fc15 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 6 Nov 2024 15:46:48 +0100 Subject: [PATCH 3/4] docs(srv): update --- .../api-cli/migrate-external-image-to-scaleway-registry.mdx | 4 ++-- .../api-cli/migrate-external-image-to-scaleway-registry.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx index d23ed5e48a..f523f6a2bd 100644 --- a/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx +++ b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -15,11 +15,11 @@ categories: Serverless Containers rely on images that can be stored in the Scaleway Container Registry, or in external public registries. - + This page explains how to migrate images from public external container registries (such as Docker hub, Amazon container registries, GitHub Container registry, etc.) to the [Scaleway Container registry](/containers/container-registry/#container-registry). - + - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization diff --git a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx index f6a1bed0ff..976ed12794 100644 --- a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx +++ b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -15,11 +15,11 @@ categories: Serverless Jobs rely on container images. These images can be stored in the Scaleway Container Registry, or in external public registries. - + This page explains how to migrate images from public external container registries (such as Docker hub, Amazon container registries, GitHub Container registry, etc.) to the [Scaleway Container registry](/containers/container-registry/#container-registry). - + - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization From d80654e25efa681d8e19082f0e058d458e172be6 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Fri, 8 Nov 2024 10:46:09 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: nerda-codes <87707325+nerda-codes@users.noreply.github.com> Co-authored-by: Benedikt Rollik --- .../api-cli/migrate-external-image-to-scaleway-registry.mdx | 6 +++--- .../api-cli/migrate-external-image-to-scaleway-registry.mdx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx index f523f6a2bd..cd60fb4fd0 100644 --- a/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx +++ b/serverless/containers/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -1,10 +1,10 @@ --- meta: title: Migrating an external image to the Scaleway Container Registry - description: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. + description: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. content: h1: Migrating an external image to the Scaleway Container Registry - paragraph: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. + paragraph: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. tags: serverless containers registry import copy migrate skopeo docker dates: validation: 2024-11-06 @@ -43,7 +43,7 @@ This page explains how to migrate images from public external container registri ## Import images using Skopeo -[Skopeo](https://github.com/containers/skopeo) is a command line utility that allows to perform various operations on container images and registries, such as image copy, inspection, deletion, etc. +[Skopeo](https://github.com/containers/skopeo) is a command line utility that allows you to perform various operations on container images and registries, such as image copy, inspection, deletion, etc. 1. Install Skopeo by referring to the [official documentation](https://github.com/containers/skopeo/blob/main/install.md). diff --git a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx index 976ed12794..0b11deb74f 100644 --- a/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx +++ b/serverless/jobs/api-cli/migrate-external-image-to-scaleway-registry.mdx @@ -1,10 +1,10 @@ --- meta: title: Migrating an external image to the Scaleway Container Registry - description: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. + description: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. content: h1: Migrating an external image to the Scaleway Container Registry - paragraph: Methods to migrate or import an image from an eternal public container registry to the Scaleway Container Registry. + paragraph: Methods to migrate or import an image from an external public container registry to the Scaleway Container Registry. tags: serverless jobs registry import copy migrate skopeo docker dates: validation: 2024-11-06 @@ -43,7 +43,7 @@ This page explains how to migrate images from public external container registri ## Import images using Skopeo -[Skopeo](https://github.com/containers/skopeo) is a command line utility that allows to perform various operations on container images and registries, such as image copy, inspection, deletion, etc. +[Skopeo](https://github.com/containers/skopeo) is a command line utility that allows you to perform various operations on container images and registries, such as image copy, inspection, deletion, etc. 1. Install Skopeo by referring to the [official documentation](https://github.com/containers/skopeo/blob/main/install.md).