|
| 1 | +<!-- This file was created manually and acts as the landing page for the CLI documentation website. Removing it will break the documentation build. --> |
| 2 | + |
| 3 | +# Scaleway CLI v2 Documentation |
| 4 | + |
| 5 | +<p align="center"><img width="50%" src="assets/cli-artwork.png" /></p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <a href="https://circleci.com/gh/scaleway/scaleway-cli/tree/v2"><img src="https://circleci.com/gh/scaleway/scaleway-cli/tree/v2.svg?style=shield" alt="CircleCI" /></a> |
| 9 | + <a href="https://goreportcard.com/report/github.com/scaleway/scaleway-cli"><img src="https://goreportcard.com/badge/scaleway/scaleway-cli" alt="GoReportCard" /></a> <!-- GoReportCard do not support branches. --> |
| 10 | +</p> |
| 11 | + |
| 12 | +Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal. |
| 13 | + |
| 14 | +!!! warning |
| 15 | + |
| 16 | + This website is under construction and may contain out-of-date information. Refer to the [Scaleway CLI repository](https://github.com/scaleway/scaleway-cli) for the latest release. |
| 17 | + |
| 18 | +## Installation |
| 19 | + |
| 20 | +### With a Package Manager (Recommended) |
| 21 | + |
| 22 | +A package manager installs and upgrades the Scaleway CLI with a single command. |
| 23 | +We recommend this installation mode for more simplicity and reliability: |
| 24 | + |
| 25 | +#### Homebrew |
| 26 | + |
| 27 | +Install the [latest stable release](https://formulae.brew.sh/formula/scw) on macOS/Linux using [Homebrew](http://brew.sh): |
| 28 | + |
| 29 | +```sh |
| 30 | +brew install scw |
| 31 | +``` |
| 32 | + |
| 33 | +#### Arch Linux |
| 34 | + |
| 35 | +Install the latest stable release on Arch Linux from [official repositories](https://archlinux.org/packages/extra/x86_64/scaleway-cli/). |
| 36 | +For instance with `pacman`: |
| 37 | + |
| 38 | +```sh |
| 39 | +pacman -S scaleway-cli |
| 40 | +``` |
| 41 | + |
| 42 | +#### Chocolatey |
| 43 | + |
| 44 | +Install the latest stable release on Windows using [Chocolatey](https://chocolatey.org/) ([Package](https://chocolatey.org/packages/scaleway-cli)): |
| 45 | + |
| 46 | +```powershell |
| 47 | +choco install scaleway-cli |
| 48 | +``` |
| 49 | + |
| 50 | +### Manually |
| 51 | + |
| 52 | +#### Released Binaries |
| 53 | + |
| 54 | +We provide [static-compiled binaries](https://github.com/scaleway/scaleway-cli/releases/latest) for darwin (macOS), GNU/Linux, and Windows platforms. |
| 55 | +You just have to download the binary compatible with your platform to a directory available in your `PATH`: |
| 56 | + |
| 57 | +##### Linux |
| 58 | + |
| 59 | +```bash |
| 60 | +curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh |
| 61 | +``` |
| 62 | + |
| 63 | +##### Windows |
| 64 | + |
| 65 | +You can download the last release here: <https://github.com/scaleway/scaleway-cli/releases><br/> |
| 66 | +[This official guide](https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574%28v%3Doffice.14%29) explains how to add tools to your `PATH`. |
| 67 | + |
| 68 | +### Docker Image |
| 69 | + |
| 70 | +You can use the CLI as you would run any Docker image: |
| 71 | + |
| 72 | +```sh |
| 73 | +docker run -i --rm scaleway/cli:latest |
| 74 | +``` |
| 75 | + |
| 76 | +See more in-depth information about running the CLI in Docker [here](./docs/docker.md) |
| 77 | + |
| 78 | +# Getting Started |
| 79 | + |
| 80 | +## Setup your configuration |
| 81 | + |
| 82 | +After you [installed](#Installation) the latest release just run the initialization command and let yourself be guided! :dancer: |
| 83 | + |
| 84 | +```bash |
| 85 | +scw init |
| 86 | +``` |
| 87 | + |
| 88 | +It will set up your profile, the authentication, and the auto-completion. |
| 89 | + |
| 90 | +## Basic commands |
| 91 | + |
| 92 | +``` |
| 93 | +# Create an instance server |
| 94 | +scw instance server create type=DEV1-S image=ubuntu_focal zone=fr-par-1 tags.0="scw-cli" |
| 95 | +
|
| 96 | +# List your servers |
| 97 | +scw instance server list |
| 98 | +
|
| 99 | +# Create a Kubernetes cluster named foo with cilium as CNI, in version 1.17.4 and with a pool named default composed of 3 DEV1-M and with 2 tags |
| 100 | +scw k8s cluster create name=foo version=1.17.4 pools.0.size=3 pools.0.node-type=DEV1-M pools.0.name=default tags.0=tag1 tags.1=tag2 |
| 101 | +``` |
| 102 | + |
| 103 | +## Environment |
| 104 | + |
| 105 | +You can configure your config or enable functionalities with environment variables. |
| 106 | + |
| 107 | +Variables to override config are describe in [config documentation](docs/commands/config.md). |
| 108 | +To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment. |
| 109 | + |
| 110 | +## Build it yourself |
| 111 | + |
| 112 | +### Build Locally |
| 113 | + |
| 114 | +If you have a >= Go 1.13 environment, you can install the `HEAD` version to test the latest features or to [contribute](./.github/CONTRIBUTING.md). |
| 115 | +Note that this development version could include bugs, use [tagged releases](https://github.com/scaleway/scaleway-cli/releases/latest) if you need stability. |
| 116 | + |
| 117 | +```bash |
| 118 | +go install github.com/scaleway/scaleway-cli/v2/cmd/scw@latest |
| 119 | +``` |
| 120 | + |
| 121 | +Dependencies: We only use go [Modules](https://github.com/golang/go/wiki/Modules) with vendoring. |
| 122 | + |
| 123 | +### Build with Docker |
| 124 | + |
| 125 | +You can build the `scw` CLI with Docker. If you have Docker installed, you can run: |
| 126 | + |
| 127 | +```sh |
| 128 | +docker build -t scaleway/cli . |
| 129 | +``` |
| 130 | + |
| 131 | +Once built, you can then use the CLI as you would run any image: |
| 132 | + |
| 133 | +```sh |
| 134 | +docker run -i --rm scaleway/cli |
| 135 | +``` |
| 136 | + |
| 137 | +See more in-depth information about running the CLI in Docker [here](./docs/docker.md) |
| 138 | + |
| 139 | +# Development |
| 140 | + |
| 141 | +This repository is at its early stage and is still in active development. |
| 142 | +If you are looking for a way to contribute please read [CONTRIBUTING.md](./.github/CONTRIBUTING.md). |
| 143 | + |
| 144 | +# Reach Us |
| 145 | + |
| 146 | +We love feedback. |
| 147 | +Don't hesitate to open a [Github issue](https://github.com/scaleway/scaleway-cli/issues/new) or |
| 148 | +feel free to reach us on [Scaleway Slack community](https://slack.scaleway.com/), |
| 149 | +we are waiting for you on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource). |
0 commit comments