2017-04-06 10:08:54 -04:00
|
|
|
---
|
2018-10-26 20:02:51 -04:00
|
|
|
description: |
|
|
|
|
The Scaleway Packer builder is able to create new images for use with Scaleway
|
|
|
|
BareMetal and Virtual cloud server. The builder takes a source image, runs any
|
|
|
|
provisioning necessary on the image after launching it, then snapshots it into
|
|
|
|
a reusable image. This reusable image can then be used as the foundation of new
|
|
|
|
servers that are launched within Scaleway.
|
2017-04-06 10:08:54 -04:00
|
|
|
layout: docs
|
2018-10-26 20:02:51 -04:00
|
|
|
page_title: 'Scaleway - Builders'
|
|
|
|
sidebar_current: 'docs-builders-scaleway'
|
2017-04-06 10:08:54 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
# Scaleway Builder
|
|
|
|
|
|
|
|
Type: `scaleway`
|
|
|
|
|
2017-04-11 06:19:28 -04:00
|
|
|
The `scaleway` Packer builder is able to create new images for use with
|
2018-10-26 20:02:51 -04:00
|
|
|
[Scaleway](https://www.scaleway.com). The builder takes a source image, runs
|
|
|
|
any provisioning necessary on the image after launching it, then snapshots it
|
|
|
|
into a reusable image. This reusable image can then be used as the foundation
|
2017-04-06 10:08:54 -04:00
|
|
|
of new servers that are launched within Scaleway.
|
|
|
|
|
2018-10-26 20:02:51 -04:00
|
|
|
The builder does *not* manage snapshots. Once it creates an image, it is up to
|
|
|
|
you to use it or delete it.
|
2017-04-06 10:08:54 -04:00
|
|
|
|
|
|
|
## Configuration Reference
|
|
|
|
|
|
|
|
There are many configuration options available for the builder. They are
|
|
|
|
segmented below into two categories: required and optional parameters. Within
|
|
|
|
each category, the available configuration keys are alphabetized.
|
|
|
|
|
|
|
|
In addition to the options listed here, a
|
|
|
|
[communicator](/docs/templates/communicator.html) can be configured for this
|
|
|
|
builder.
|
|
|
|
|
|
|
|
### Required:
|
|
|
|
|
2018-11-08 19:34:23 -05:00
|
|
|
- `api_access_key` (string) - The organization access key to use to identify
|
|
|
|
your organization. It can also be specified via environment variable
|
|
|
|
`SCALEWAY_API_ACCESS_KEY`. Your access key is available in the
|
|
|
|
["Credentials" section](https://cloud.scaleway.com/#/credentials) of the
|
2018-02-08 14:53:05 -05:00
|
|
|
control panel.
|
2017-04-06 10:08:54 -04:00
|
|
|
|
2018-10-26 20:02:51 -04:00
|
|
|
- `api_token` (string) - The token to use to authenticate with your account.
|
|
|
|
It can also be specified via environment variable `SCALEWAY_API_TOKEN`. You
|
|
|
|
can see and generate tokens in the ["Credentials"
|
|
|
|
section](https://cloud.scaleway.com/#/credentials) of the control panel.
|
2017-04-06 10:08:54 -04:00
|
|
|
|
2018-02-08 14:53:05 -05:00
|
|
|
- `image` (string) - The UUID of the base image to use. This is the image
|
|
|
|
that will be used to launch a new server and provision it. See
|
|
|
|
<https://api-marketplace.scaleway.com/images> get the complete list of the
|
|
|
|
accepted image UUID.
|
2017-04-06 10:08:54 -04:00
|
|
|
|
2018-02-08 14:53:05 -05:00
|
|
|
- `region` (string) - The name of the region to launch the server in (`par1`
|
|
|
|
or `ams1`). Consequently, this is the region where the snapshot will be
|
|
|
|
available.
|
2017-04-06 10:08:54 -04:00
|
|
|
|
2018-04-07 16:07:49 -04:00
|
|
|
- `commercial_type` (string) - The name of the server commercial type:
|
2018-10-26 20:02:51 -04:00
|
|
|
`ARM64-128GB`, `ARM64-16GB`, `ARM64-2GB`, `ARM64-32GB`, `ARM64-4GB`,
|
|
|
|
`ARM64-64GB`, `ARM64-8GB`, `C1`, `C2L`, `C2M`, `C2S`, `START1-L`,
|
|
|
|
`START1-M`, `START1-S`, `START1-XS`, `X64-120GB`, `X64-15GB`, `X64-30GB`,
|
|
|
|
`X64-60GB`
|
2017-04-06 10:08:54 -04:00
|
|
|
|
|
|
|
### Optional:
|
|
|
|
|
2018-02-08 14:53:05 -05:00
|
|
|
- `server_name` (string) - The name assigned to the server. Default
|
|
|
|
`packer-UUID`
|
2017-04-06 10:08:54 -04:00
|
|
|
|
2018-02-08 14:53:05 -05:00
|
|
|
- `image_name` (string) - The name of the resulting image that will appear in
|
|
|
|
your account. Default `packer-TIMESTAMP`
|
2017-04-11 06:19:28 -04:00
|
|
|
|
2018-02-08 14:53:05 -05:00
|
|
|
- `snapshot_name` (string) - The name of the resulting snapshot that will
|
2017-07-11 08:06:53 -04:00
|
|
|
appear in your account. Default `packer-TIMESTAMP`
|
2017-04-06 10:08:54 -04:00
|
|
|
|
2018-10-26 20:02:51 -04:00
|
|
|
- `boottype` (string) - The type of boot, can be either `local` or
|
|
|
|
`bootscript`, Default `bootscript`
|
2018-09-27 10:27:33 -04:00
|
|
|
|
2018-10-26 20:02:51 -04:00
|
|
|
- `bootscript` (string) - The id of an existing bootscript to use when
|
|
|
|
booting the server.
|
2018-06-29 16:00:44 -04:00
|
|
|
|
2017-04-06 10:08:54 -04:00
|
|
|
## Basic Example
|
|
|
|
|
|
|
|
Here is a basic example. It is completely valid as soon as you enter your own
|
|
|
|
access tokens:
|
|
|
|
|
2018-10-26 20:02:51 -04:00
|
|
|
``` json
|
2017-04-06 10:08:54 -04:00
|
|
|
{
|
|
|
|
"type": "scaleway",
|
2018-11-08 19:34:23 -05:00
|
|
|
"api_access_key": "YOUR API ACCESS KEY",
|
2017-04-06 10:08:54 -04:00
|
|
|
"api_token": "YOUR TOKEN",
|
2017-07-11 02:43:04 -04:00
|
|
|
"image": "UUID OF THE BASE IMAGE",
|
2017-04-06 10:08:54 -04:00
|
|
|
"region": "par1",
|
2018-05-28 10:18:59 -04:00
|
|
|
"commercial_type": "START1-S",
|
2017-04-19 05:10:52 -04:00
|
|
|
"ssh_username": "root",
|
2017-07-11 08:06:53 -04:00
|
|
|
"ssh_private_key_file": "~/.ssh/id_rsa"
|
2017-04-06 10:08:54 -04:00
|
|
|
}
|
|
|
|
```
|
2017-04-19 05:10:52 -04:00
|
|
|
|
2018-02-08 14:53:05 -05:00
|
|
|
When you do not specified the `ssh_private_key_file`, a temporarily SSH keypair
|
|
|
|
is generated to connect the server. This key will only allow the `root` user to
|
|
|
|
connect the server.
|