Documentation & Tutorials
This provider is in “beta” and makes use of manual provisioning. Manual provisioning allows Juju users to implement any cloud provider’s API calls and act similar to a provider implemented in the Juju Core code base. You can access the provider source-code on github
This package provides a CLI plugin for Juju that allows automated provisioning of C1 BareMetal SSD servers on Scaleway.
This plugin is highly inspired from kAPIlt Juju plugin.
This process requires you to have a Scaleway account.
The plugin installation is done via pypi, the Python package manager, available by default on Ubuntu. A virtualenv is also recommended to sandbox this install from your system packages:
pip install -U juju-scaleway
Before you can start using Juju with Scaleway, you need to get an API token.
API tokens are unique identifiers associated with your Scaleway account and consist of an Access Key (
-organisation in the Scaleway CLI) and a Secret Key (
-token in the Scaleway CLI). The Secret key is required to authenticate against our API and will only be displayed when you create the token. Make sure to take a note of it and to keep it secret.
The Secret key is required to authenticate against our API’s and will only be displayed when you create the token. Make sure to take a note of it and to keep it secret.
Open the drop-down menu on your account name and click on Credentials.
To generate a new token, click on Generate new token in the Tokens section of the page.
The Access Key and the Secret Key will show on your screen. Take a note of the Secret Key as it will not be recoverable.
In a terminal, export your credentials required by the plugin using environment variables:
As environment variables are not shared between shells, you will need to repeat this operation for every shell. You can avoid this repetition by adding this environment variables in your shell’s rc files, for instance append them to your
The next step is to add an environment for Scaleway in your
'~/.juju/environments.yaml'. This environment looks like the following:
Then, you have to tell Juju which environment to use. To do this, in a terminal use the following command:
To set Scaleway as your default provider, run the following command in your terminal:
juju switch scaleway
Now you can bootstrap your Scaleway environment. You need to route the command through the scaleway plugin that we installed via pip.
juju scaleway bootstrap
All machines created by this plugin will have the Juju environment name as a prefix for their servers name, for instance
After your environment is bootstrapped you can add additional machines to it via the
add-machine command, for instance the following will add 2 additional machines:
You can now use standard Juju commands to deploy service workloads (also known as charms):
juju deploy wordpress
If you don’t specify a machine to place the workload on, the machine will automatically go to an unused machine within the environment.
You can use manual placement to deploy target particular machines:
juju deploy mysql --to=2
This command deploys a MySQL unit to the server number #2.
Assemble these workloads together via relations like lego blocks:
juju add-relation wordpress mysql
You can list all machines in Scaleway that are part of the Juju environment with the list-machines command. This directly queries the Scaleway API and does not interact with the Juju API.
You can terminate allocated machines via their machine id. By default, the Scaleway plugin forces the terminatiom of machines, which also terminates any service unit running on on those machines:
juju scaleway terminate-machine 1 2
And you can destroy the entire environment via:
juju scaleway destroy-environment
destroy-environment also takes a –force option which only uses the Scaleway API. It’s helpful if the state server or other machines are killed independently of Juju.