Skip to main content

Scaleway integration with juju

Project description

Juju Scaleway provider

Last release Unit-tests status Coverage Status Requirements freshness Code Quality Software license Popularity

This package provides a CLI plugin for Juju to provision physical servers on Scaleway, the first platform to offer dedicated ARM servers in the cloud.

Juju provides for workloads management and orchestration using a collection of workloads definitions (charms) that can be assembled lego fashion at runtime into complex application topologies.

This plugin is highly inspired by @kapilt Juju plugins.

Installation

Linux

A usable version of Juju is available out of the box in Ubuntu 14.04 and later versions. For earlier versions of Ubuntu, please use the stable PPA:

$ sudo add-apt-repository ppa:juju/stable
$ apt-get update && apt-get install juju

Mac OS X

Juju is in Homebrew. To install Juju it is required to have homebrew installed. To install Juju run the following command:

$ brew install juju

Plugin install (any OS)

Plugin installation is done via pip which is the python language package managers, its available by default on Ubuntu. Also recommended is virtualenv to sandbox this install from your system packages:

$ pip install -U juju-scaleway

Setup

Requirements:

Scaleway API keys

Provide the credentials required by the plugin using environment variables:

$ export SCALEWAY_ACCESS_KEY=<organization_key>
$ export SCALEWAY_SECRET_KEY=<secret_token>

Juju configuration

To configure a Juju environment for Scaleway, add the following in your ~/.juju/environments.yaml:

environments:
    scaleway:
    type: manual
    bootstrap-host: null
    bootstrap-user: root

Usage

You have to tell Juju which environment to use. One way to do this is to use the following command:

$ juju switch scaleway
$ export JUJU_ENV=scaleway

Now you can bootstrap your Scaleway environment:

$ juju scaleway bootstrap

All machines created by this plugin will have the Juju environment name as a prefix for their servers name.

After your environment is bootstrapped you can add additional machines to it via the the add-machine command, for instance the following will add 2 additional machines:

$ juju scaleway add-machine -n 2
$ juju status

You can now use standard Juju commands for deploying service workloads aka charms:

$ juju deploy wordpress

Without specifying the machine to place the workload on, the machine will automatically go to an unused machine within the environment.

There are hundreds of available charms ready to be used, you can find out more about what’s out there from at jujucharms.com. Or alternatively the ‘plain’ html version.

You can use manual placement to deploy target particular machines:

$ juju deploy mysql --to=2

And of course the real magic of Juju comes in its ability to 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 Juju API.

$ juju scaleway list-machines

Id       Name               Status   Created      Address
6222349  scaleway-0            active   2014-11-25   212.47.239.232
6342360  scaleway-ef19ad5cc... active   2014-11-25   212.47.228.28
2224321  scaleway-145bf7a80... active   2014-11-25   212.47.228.79

You can terminate allocated machines by their machine ID. By default with the Scaleway plugin, machines are forcibly terminated which will also terminate any service units 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. Its helpful if state server or other machines are killed independently of Juju.

All commands have builtin help facilities and accept a -v option which will print verbose output while running.

You can find out more about using from Juju docs.

License

This software is licensed under a BSD 2-Clause License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juju-scaleway-1.0.2.tar.gz (14.1 kB view details)

Uploaded Source

Built Distributions

juju_scaleway-1.0.2-py2.7.egg (36.8 kB view details)

Uploaded Source

juju_scaleway-1.0.2-py2-none-any.whl (18.7 kB view details)

Uploaded Python 2

File details

Details for the file juju-scaleway-1.0.2.tar.gz.

File metadata

File hashes

Hashes for juju-scaleway-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6bcf556bcf43cb86fe710d1cf34dd7a24db5d85f89ff4a37dc23f685f50e59ac
MD5 aaac6ff4386f7cac40d8e6dfd2551b33
BLAKE2b-256 41b933a5033df812dff6d6a98e076b5f51a3e73a2776b30545a1ddf1265e82e5

See more details on using hashes here.

File details

Details for the file juju_scaleway-1.0.2-py2.7.egg.

File metadata

File hashes

Hashes for juju_scaleway-1.0.2-py2.7.egg
Algorithm Hash digest
SHA256 88b7386ef39a4ed3e69fb5aab9395be25ca6070cb1e9a4bdc589bae83ff463ef
MD5 d9fc875cf899e02b54609506e3850053
BLAKE2b-256 7469255aed528983d35022b4723f9ede3b5e0bcc3e8381238e50088fcde3a99e

See more details on using hashes here.

File details

Details for the file juju_scaleway-1.0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for juju_scaleway-1.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 cb3037fac93709d84898352544bcb0721d0e92516bd37cad0fef19b156c74ab2
MD5 9053913e9eb5511a312bcdad3994b415
BLAKE2b-256 2534d72609e2a83276594202576aa42872ed50829e187e6fae985d9fefce19d5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page