From 56a1789dc4dd6ce6f2d9465c5374bff439803322 Mon Sep 17 00:00:00 2001 From: ldecarvalho-doc <82805470+ldecarvalho-doc@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:10:55 +0100 Subject: [PATCH 1/6] fix(ins): update images --- .../instances/how-to/create-an-instance.mdx | 66 +++++++++++++++---- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/compute/instances/how-to/create-an-instance.mdx b/compute/instances/how-to/create-an-instance.mdx index 9122ea7b80..cb6fbceab8 100644 --- a/compute/instances/how-to/create-an-instance.mdx +++ b/compute/instances/how-to/create-an-instance.mdx @@ -7,7 +7,7 @@ content: paragraph: This page explains how to create an Instance tags: instance create dates: - validation: 2024-06-10 + validation: 2024-12-09 posted: 2021-05-26 categories: - compute @@ -81,10 +81,10 @@ Select a tab below for instructions on how to create an Instance via either our - Booting from a volume that either lacks an OS or is among multiple volumes with identical operating systems can lead to inconsistent boot outcomes. - To use **[Block Storage Low Latency](/storage/block/) 15k**, your Instance must have at least **3 GiB/s of block bandwidth**. - You can verify if an Instance type meets this requirement by consulting the [Scaleway Instances internet and Block Storage bandwidth overview](/compute/instances/reference-content/instances-bandwidth-overview/) documentation. + To use **[Block Storage Low Latency](/storage/block/) 15k**, your Instance must have at least **3 GiB/s of block bandwidth**. + You can verify if an Instance type meets this requirement by consulting the [Scaleway Instances internet and Block Storage bandwidth overview](/compute/instances/reference-content/instances-bandwidth-overview/) documentation. - Alternatively, use the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-instance-types-list-instance-types) to check the `block_bandwidth` field at `/instance/v1/zones/{zone}/products/servers`. + Alternatively, use the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-instance-types-list-instance-types) to check the `block_bandwidth` field at `/instance/v1/zones/{zone}/products/servers`. This field provides detailed information about block bandwidth for each Instance type, helping you ensure compatibility with high-performance storage. - **Configure network** of the Instance. @@ -128,15 +128,45 @@ Select a tab below for instructions on how to create an Instance via either our export SCW_PROJECT_ID="" export SCW_DEFAULT_ZONE="" ``` + 2. Get the label of your OS of choice. - 2. Customize the **payload** for your API call. This payload specifies the configuration of the Instance you want to create. We provide an example payload below with all the required parameters, and a table of information to help you adapt it to your needs. + ``` + curl --location "https://api.scaleway.com/marketplace/v2/images" \ + --header "X-Auth-Token: $SCW_SECRET_KEY" + + { + "images": [ + + ... + + { + "id": "607b12c2-685d-45f7-905f-57bc23863834", + "name": "Ubuntu 24.04 Noble Numbat", + "label": "ubuntu_noble", + "description": "Ubuntu is the ideal distribution for scale-out computing, Ubuntu Server helps you make the most of your infrastructure.", + "logo": "https://scw-marketplace-logos.s3.fr-par.scw.cloud/ubuntu.png", + "categories": [ + "distribution" + ], + "valid_until": null, + "created_at": "2024-04-15T11:39:21.011004Z", + "updated_at": "2024-10-09T07:32:04.494117Z" + }, + + ... + + ], + "total_count": 23 + } + ``` + 3. Customize the **payload** for your API call. This payload specifies the configuration of the Instance you want to create. We provide an example payload below with all the required parameters, and a table of information to help you adapt it to your needs. ``` { "name": "my-new-instance", "project": "'""$SCW_PROJECT_ID""'", "commercial_type": "GP1-S", - "image": "544f0add-626b-4e4f-8a96-79fa4414d99a", + "image": "ubuntu_noble", "enable_ipv6": true, "volumes "0": { @@ -153,17 +183,17 @@ Select a tab below for instructions on how to create an Instance via either our | name | A name of your choice for the Instance (string) | Any string containing only alphanumeric characters, dots, spaces and dashes, e.g. `"my-new-instance"`. | | project | The Project in which the Instance should be created (string)| Any valid Scaleway Project ID (see above), e.g. `"b4bd99e0-b389-11ed-afa1-0242ac120002"` | | commercial-type | The commercial Instance type to create (string) | Any valid ID of a Scaleway commercial Instance type, e.g. `"GP1-S"`, `"PRO2-M"`. Use the [List Instance Types](https://www.scaleway.com/en/developers/api/instance/#path-instance-types-list-instance-types) endpoint to get a list of all valid Instance types and their IDs. | - | image | The image to install on the Instance, e.g. a particular OS (string) | Any valid Scaleway image ID, e.g. `"544f0add-626b-4e4f-8a96-79fa4414d99a"` which is the ID for the `Ubuntu 22.04 Jammy Jellyfish` image. Use the [Marketplace API](https://www.scaleway.com/en/developers/api/marketplace/) endpoint to find available images and their IDs. | + | image | The image to install on the Instance, e.g. a particular OS (string) | Any valid Scaleway image label, e.g. `ubuntu_noble` which is the label for the Ubuntu 24.04 Noble Numbat image. Use the [Marketplace API](https://www.scaleway.com/en/developers/api/marketplace/) endpoint to find available images and their IDs. | | enable_ipv6 | Whether to enable IPv6 on the Instance (boolean) | `true` or `false` | | volumes | An object that specifies the storage volumes to attach to the Instance. Must respect the volume constraints of the `commercial_type` (i.e. for each type of Instance, a minimum amount of storage is required, and there is also a maximum that cannot be exceeded. Some Instance types support only Block Storage (`b_ssd`), others also support Local Storage (`l_ssd`) ). These constraints are available at the [List Instance Types](https://www.scaleway.com/en/developers/api/instance/#path-instance-types-list-instance-types) endpoint, via the `volume_constraints` parameter for each type listed in the response | A (dictionary) object with a minimum of one key (`"0"`) whose value is another object containing the parameters `"name"` (a name for the volume), `"size"` (the size for the volume, in bytes), and `"volume_type"` (`"l_ssd"` or `"b_ssd"`). Additional keys for additional volumes should increment by 1 each time (the second volume would have a key of `1`.) Further parameters are available, and it is possible to attach existing volumes rather than creating a new one, or create a volume from a snapshot. For full details see [here](https://www.scaleway.com/en/developers/api/instance/#path-volumes). | - 3. Use the following curl command, replacing the payload with the one you specified in step 2, to create your Instance. + 4. Use the following curl command, replacing the payload with the one you specified in step 2, to create your Instance. ``` curl -X POST -H "Content-Type: application/json" \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/instance/v1/zones/{$ZONE}/servers" \ - -d '{"name": "my-new-instance", "project": "'"$PROJECT_ID"'", "commercial_type": "GP1-S", "image":"544f0add-626b-4e4f-8a96-79fa4414d99a","enable_ipv6": true, "volumes":{"0":{"name": "my-volume","size": 300000000000,"volume_type": "l_ssd"}}}' + -d '{"name": "my-new-instance", "project": "'"$PROJECT_ID"'", "commercial_type": "GP1-S", "image":"ubuntu_noble","enable_ipv6": true, "volumes":{"0":{"name": "my-volume","size": 300000000000,"volume_type": "l_ssd"}}}' ``` Valid Instance creation results in a `201` response containing a `server` object that confirms the attributes of your Instance. @@ -190,15 +220,23 @@ Select a tab below for instructions on how to create an Instance via either our - A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) - Installed and configured the [Scaleway CLI](https://github.com/scaleway/scaleway-cli) on your local machine + 1. Get the label of your OS of choice. + + ```bash + scw marketplace image list + + ID LABEL NAME CATEGORIES VALID UNTIL + 607b12c2-685d-45f7-905f-57bc23863834 ubuntu_noble Ubuntu 24.04 Noble Numbat [distribution] - + ``` - 1. Prepare your command by choosing values for the parameters below to define the Instance you want to create. Use the table to select appropriate values. + 2. Prepare your command by choosing values for the parameters below to define the Instance you want to create. Use the table to select appropriate values. ```bash name=my-new-instance project-id=adcaffc9-38ef-4502-86e1-f70d3c353745 zone=fr-par-1 type=GP1-S - image=544f0add-626b-4e4f-8a96-79fa4414d99a + image=ubuntu_noble ip=new root-volume=l:300GB ``` @@ -209,14 +247,14 @@ Select a tab below for instructions on how to create an Instance via either our | project-id | The Project in which the Instance should be created | Any valid Scaleway Project ID, e.g. `b4bd99e0-b389-11ed-afa1-0242ac120002` | | zone | The Availability Zone in which the Instance should be created. Note that some Instance types are only available in certain Availability Zones (see **type`**below) | Any valid Scaleway Availability Zone, e.g. `fr-par-1`, `pl-waw-2` | | type | The type of Instance to create | Any valid ID of a Scaleway Instance type, e.g. `GP1-S`, `PRO2-M`. Use the [server-type](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/instance.md#server-type-management-commands) command to get a list of all valid Instance types and their IDs. The default value is `DEV1-S` | - | image | The image to install on the Instance, e.g. a particular OS | Any valid Scaleway image ID or its label, e.g. `544f0add-626b-4e4f-8a96-79fa4414d99a` or`ubutunu_jammy` for the Ubuntu 22.04 Jammy Jellyfish image. The default value is `ubuntu_jammy`. Use the [marketplace](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/marketplace.md) command to get a list of all available images and their IDs. | + | image | The image to install on the Instance, e.g. a particular OS | Any valid Scaleway image label, e.g. `ubuntu_noble` which is the label for the Ubuntu 24.04 Noble Numbat image. Use the [Marketplace API](https://www.scaleway.com/en/developers/api/marketplace/) endpoint to find available images and their IDs. | | ip | The IP address to use for the Instance. | `new` to create a new IP, `dynamic` to create a dynamic IP address, `none` for no public IP address, or an existing IP ID. Default is `new` | | root-volume | The root volume for the Instance (type e.g. `l` (local) or `b` (block) followed by a colon and its required size e.g. `10GB`) | Any valid volume type and size that is coherent with the storage constraints of the Instance **type** (available via `scw instance server-type list`) | - 2. Open a terminal and run the command below, with the parameters modified according to your needs as defined in step one. + 3. Open a terminal and run the command below, with the parameters modified according to your needs as defined in step one. ```bash - scw instance server create name=my-new-instance project-id=2ea18278-847c-4c33-8111-9c2376ed921e zone=fr-par-1 type=GP1-S image=544f0add-626b-4e4f-8a96-79fa4414d99a ip=new root-volume=l:300GB + scw instance server create name=my-new-instance project-id=2ea18278-847c-4c33-8111-9c2376ed921e zone=fr-par-1 type=GP1-S image=ubuntu_noble ip=new root-volume=l:300GB ``` Your Instance is created, and its details are returned to you in response. From 222a28da221ca30774622e9259e9ccacfecb7eac Mon Sep 17 00:00:00 2001 From: ldecarvalho-doc <82805470+ldecarvalho-doc@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:33:49 +0100 Subject: [PATCH 2/6] fix(ins): review cglib Co-authored-by: cgilb-scaleway --- compute/instances/how-to/create-an-instance.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compute/instances/how-to/create-an-instance.mdx b/compute/instances/how-to/create-an-instance.mdx index cb6fbceab8..39f3e0dbe0 100644 --- a/compute/instances/how-to/create-an-instance.mdx +++ b/compute/instances/how-to/create-an-instance.mdx @@ -183,7 +183,7 @@ Select a tab below for instructions on how to create an Instance via either our | name | A name of your choice for the Instance (string) | Any string containing only alphanumeric characters, dots, spaces and dashes, e.g. `"my-new-instance"`. | | project | The Project in which the Instance should be created (string)| Any valid Scaleway Project ID (see above), e.g. `"b4bd99e0-b389-11ed-afa1-0242ac120002"` | | commercial-type | The commercial Instance type to create (string) | Any valid ID of a Scaleway commercial Instance type, e.g. `"GP1-S"`, `"PRO2-M"`. Use the [List Instance Types](https://www.scaleway.com/en/developers/api/instance/#path-instance-types-list-instance-types) endpoint to get a list of all valid Instance types and their IDs. | - | image | The image to install on the Instance, e.g. a particular OS (string) | Any valid Scaleway image label, e.g. `ubuntu_noble` which is the label for the Ubuntu 24.04 Noble Numbat image. Use the [Marketplace API](https://www.scaleway.com/en/developers/api/marketplace/) endpoint to find available images and their IDs. | + | image | The image to install on the Instance, e.g. a particular OS (string) | Any valid Scaleway image label, e.g. `ubuntu_noble` which is the label for the Ubuntu 24.04 Noble Numbat image. | | enable_ipv6 | Whether to enable IPv6 on the Instance (boolean) | `true` or `false` | | volumes | An object that specifies the storage volumes to attach to the Instance. Must respect the volume constraints of the `commercial_type` (i.e. for each type of Instance, a minimum amount of storage is required, and there is also a maximum that cannot be exceeded. Some Instance types support only Block Storage (`b_ssd`), others also support Local Storage (`l_ssd`) ). These constraints are available at the [List Instance Types](https://www.scaleway.com/en/developers/api/instance/#path-instance-types-list-instance-types) endpoint, via the `volume_constraints` parameter for each type listed in the response | A (dictionary) object with a minimum of one key (`"0"`) whose value is another object containing the parameters `"name"` (a name for the volume), `"size"` (the size for the volume, in bytes), and `"volume_type"` (`"l_ssd"` or `"b_ssd"`). Additional keys for additional volumes should increment by 1 each time (the second volume would have a key of `1`.) Further parameters are available, and it is possible to attach existing volumes rather than creating a new one, or create a volume from a snapshot. For full details see [here](https://www.scaleway.com/en/developers/api/instance/#path-volumes). | @@ -247,7 +247,7 @@ Select a tab below for instructions on how to create an Instance via either our | project-id | The Project in which the Instance should be created | Any valid Scaleway Project ID, e.g. `b4bd99e0-b389-11ed-afa1-0242ac120002` | | zone | The Availability Zone in which the Instance should be created. Note that some Instance types are only available in certain Availability Zones (see **type`**below) | Any valid Scaleway Availability Zone, e.g. `fr-par-1`, `pl-waw-2` | | type | The type of Instance to create | Any valid ID of a Scaleway Instance type, e.g. `GP1-S`, `PRO2-M`. Use the [server-type](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/instance.md#server-type-management-commands) command to get a list of all valid Instance types and their IDs. The default value is `DEV1-S` | - | image | The image to install on the Instance, e.g. a particular OS | Any valid Scaleway image label, e.g. `ubuntu_noble` which is the label for the Ubuntu 24.04 Noble Numbat image. Use the [Marketplace API](https://www.scaleway.com/en/developers/api/marketplace/) endpoint to find available images and their IDs. | + | image | The image to install on the Instance, e.g. a particular OS | Any valid Scaleway image label, e.g. `ubuntu_noble` which is the label for the Ubuntu 24.04 Noble Numbat image. | | ip | The IP address to use for the Instance. | `new` to create a new IP, `dynamic` to create a dynamic IP address, `none` for no public IP address, or an existing IP ID. Default is `new` | | root-volume | The root volume for the Instance (type e.g. `l` (local) or `b` (block) followed by a colon and its required size e.g. `10GB`) | Any valid volume type and size that is coherent with the storage constraints of the Instance **type** (available via `scw instance server-type list`) | From 66e36ea4bdde38402021cadd64c74ecb2bd35f32 Mon Sep 17 00:00:00 2001 From: ldecarvalho-doc <82805470+ldecarvalho-doc@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:46:34 +0100 Subject: [PATCH 3/6] fix(ins): review me --- compute/instances/how-to/create-an-instance.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute/instances/how-to/create-an-instance.mdx b/compute/instances/how-to/create-an-instance.mdx index 39f3e0dbe0..bbe3e12780 100644 --- a/compute/instances/how-to/create-an-instance.mdx +++ b/compute/instances/how-to/create-an-instance.mdx @@ -137,7 +137,7 @@ Select a tab below for instructions on how to create an Instance via either our { "images": [ - ... + {...} { "id": "607b12c2-685d-45f7-905f-57bc23863834", From 0939b6f0361ba477378c4b1345281851ce2b1d69 Mon Sep 17 00:00:00 2001 From: ldecarvalho-doc <82805470+ldecarvalho-doc@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:47:04 +0100 Subject: [PATCH 4/6] fix(ins): review me 2 --- compute/instances/how-to/create-an-instance.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute/instances/how-to/create-an-instance.mdx b/compute/instances/how-to/create-an-instance.mdx index bbe3e12780..0ec46e3737 100644 --- a/compute/instances/how-to/create-an-instance.mdx +++ b/compute/instances/how-to/create-an-instance.mdx @@ -137,7 +137,7 @@ Select a tab below for instructions on how to create an Instance via either our { "images": [ - {...} + {...}, { "id": "607b12c2-685d-45f7-905f-57bc23863834", From c9043720f31e4d6cba606222bcdf61a418efe3e5 Mon Sep 17 00:00:00 2001 From: ldecarvalho-doc <82805470+ldecarvalho-doc@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:52:30 +0100 Subject: [PATCH 5/6] fix(ins): remove double ssh key requirement --- compute/instances/how-to/create-an-instance.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/compute/instances/how-to/create-an-instance.mdx b/compute/instances/how-to/create-an-instance.mdx index 0ec46e3737..a08b912ec6 100644 --- a/compute/instances/how-to/create-an-instance.mdx +++ b/compute/instances/how-to/create-an-instance.mdx @@ -109,7 +109,6 @@ Select a tab below for instructions on how to create an Instance via either our - 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 - An [SSH key](/identity-and-access-management/organizations-and-projects/how-to/create-ssh-key/) - - An [SSH key](/identity-and-access-management/organizations-and-projects/how-to/create-ssh-key/) - A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) - Installed [curl](https://curl.se/) on your local machine From 9ecc3ab15ce22c9ba553a7e0c9bd331f30eedcae Mon Sep 17 00:00:00 2001 From: ldecarvalho-doc <82805470+ldecarvalho-doc@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:02:09 +0100 Subject: [PATCH 6/6] fix(ins): remove elipses Co-authored-by: cgilb-scaleway --- compute/instances/how-to/create-an-instance.mdx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/compute/instances/how-to/create-an-instance.mdx b/compute/instances/how-to/create-an-instance.mdx index a08b912ec6..27001c1a0e 100644 --- a/compute/instances/how-to/create-an-instance.mdx +++ b/compute/instances/how-to/create-an-instance.mdx @@ -135,9 +135,6 @@ Select a tab below for instructions on how to create an Instance via either our { "images": [ - - {...}, - { "id": "607b12c2-685d-45f7-905f-57bc23863834", "name": "Ubuntu 24.04 Noble Numbat", @@ -151,9 +148,6 @@ Select a tab below for instructions on how to create an Instance via either our "created_at": "2024-04-15T11:39:21.011004Z", "updated_at": "2024-10-09T07:32:04.494117Z" }, - - ... - ], "total_count": 23 }