Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ prepare-release-dist: build
GOOS=linux GOARCH=arm go build -o dist/latest/scw-linux-arm github.com/scaleway/scaleway-cli/cmd/scw
GOOS=linux GOARCH=arm64 go build -o dist/latest/scw-linux-arm64 github.com/scaleway/scaleway-cli/cmd/scw

GOOS=darwin GOARCH=386 go build --tags kqueue -o dist/latest/scw-darwin-i386 github.com/scaleway/scaleway-cli/cmd/scw
GOOS=darwin GOARCH=amd64 go build --tags kqueue -o dist/latest/scw-darwin-amd64 github.com/scaleway/scaleway-cli/cmd/scw
GOOS=darwin GOARCH=386 go build -o dist/latest/scw-darwin-i386 github.com/scaleway/scaleway-cli/cmd/scw
GOOS=darwin GOARCH=amd64 go build -o dist/latest/scw-darwin-amd64 github.com/scaleway/scaleway-cli/cmd/scw

# Issue with mody and [free|net]bsd for go1.12+ https://github.com/moby/moby/pull/38818
if [ $(GOMINORVERSION) -lt 12 ]; then \
Expand Down
79 changes: 1 addition & 78 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Read the [blog post](https://blog.scaleway.com/2015/05/20/manage-baremetal-serve
* [`rm [OPTIONS] SERVER [SERVER...]`](#scw-rm)
* [`rmi [OPTIONS] IMAGE [IMAGE...]`](#scw-rmi)
* [`run [OPTIONS] IMAGE [COMMAND] [ARGS...]`](#scw-run)
* [`s3 [OPTIONS]`](#scw-s3)
* [`search [OPTIONS] TERM`](#scw-search)
* [`start [OPTIONS] SERVER [SERVER...]`](#scw-start)
* [`stop [OPTIONS] SERVER [SERVER...]`](#scw-stop)
Expand Down Expand Up @@ -200,7 +199,6 @@ Commands:
rm Remove one or more servers
rmi Remove one or more image(s)/volume(s)/snapshot(s)
run Run a command in a new server
s3 Access to s3 bucket
search Search the Scaleway Hub for images
start Start a stopped server
stop Stop a running server
Expand Down Expand Up @@ -774,80 +772,6 @@ Examples:
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
```

#### `scw s3`

Integration of object storage to the scaleway CLI is done using the minio client. This is not a long term solution and we think about providing our own S3 cli, but it will probably not be compliant with minio client.
Please understand that we will put priority on innovation regarding our cloud rather than doing another full s3 client.

```console
NAME:
scw s3 - Minio Client for cloud storage and filesystems.

USAGE:
scw s3 [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]

COMMANDS:
ls List files and folders.
mb Make a bucket or a folder.
cat Display file and object contents.
pipe Redirect STDIN to an object or file or STDOUT.
share Generate URL for sharing.
cp Copy files and objects.
mirror Mirror buckets and folders.
find Search for files and objects.
stat Stat contents of objects and folders.
diff List differences in object name, size, and date between folders.
rm Remove files and objects.
session Manage saved sessions for cp command.
config Manage mc configuration file.

GLOBAL FLAGS:
--config-folder value, -C value Path to configuration folder. (default: "/home/atom/.mc")
--quiet, -q Disable progress bar display.
--no-color Disable color theme.
--json Enable JSON formatted output.
--debug Enable debug output.
--insecure Disable SSL certificate verification.
--help, -h Show help.
```

To begin with, you will need to configure your credentials, using the following command:

```console
$> scw s3 config
AccessKey: <YOUR-ACCESS-KEY>
SecretKey: <YOUR-SECRET-KEY>
```

This call will configure two minio profiles, ams and par, respectively for 'nl-ams' and
'fr-par' regions, currently, the 'fr-par' region is not usable, but will be soon.

The following examples show basic s3 operations on 'nl-ams' region:

Creating a bucket:
```console
$> scw s3 mb ams/minio-test-bucket
Bucket created successfully `ams/minio-test-bucket`.
```

Listing:
```console
$> scw s3 ls ams/
[2018-11-20 11:06:32 CET] 0B minio-test-bucket/
```

Put an object:
```console
$> scw s3 cp /etc/hosts ams/minio-test-bucket/hosts
`/etc/hosts` -> `ams/minio-test-bucket/hosts`
```

Removing an object / bucket:
```console
$> scw s3 rm ams/minio-test-bucket/hosts
Removing `ams/minio-test-bucket/hosts`.
```

#### `scw search`

```console
Expand Down Expand Up @@ -1313,7 +1237,7 @@ View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.17.

* Fix: it is now possible to `scw inspect` snapshots [#510](https://github.com/scaleway/scaleway-cli/issues/510)
* Fix: add region details in cache for snapshots, images, bootscripts and volumes [#510](https://github.com/scaleway/scaleway-cli/issues/510)
* Fix: `scw attach` works again [#508](https://github.com/scaleway/scaleway-cli/issues/508)
* Fix: `scw attach` works again [#508](https://github.com/scaleway/scaleway-cli/issues/508)
* Fix unittests

View full [commits list](https://github.com/scaleway/scaleway-cli/compare/v1.16...v1.17)
Expand Down Expand Up @@ -1723,7 +1647,6 @@ For previous Node.js versions, see [scaleway-cli-node](https://github.com/moul/s
* Support of `run -e, --env` option
* Support of `run --name` option
* Support of `run -v, --volume` option
* Support of `s3` command
* Support of `search` command
* Support of `search --no-trunc` option
* Support of `start` command
Expand Down
39 changes: 0 additions & 39 deletions pkg/cli/cmd_s3.go

This file was deleted.

1 change: 0 additions & 1 deletion pkg/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ var Commands = []*Command{
cmdRm,
cmdRmi,
cmdRun,
cmdS3,
cmdSearch,
cmdStart,
cmdStop,
Expand Down
155 changes: 0 additions & 155 deletions pkg/commands/s3.go

This file was deleted.

4 changes: 0 additions & 4 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ func (c *Config) Save(configPath string) error {
func GetConfig(scwrcPath string) (*Config, error) {
var err error

if scwrcPath != "" {
os.Setenv("SCW_CONFIG_PATH", scwrcPath)
}

orgid := os.Getenv("SCW_ORGANIZATION")
token := os.Getenv("SCW_TOKEN")
if token != "" && orgid != "" {
Expand Down
1 change: 0 additions & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (

func TestGetConfigFilePath(t *testing.T) {
Convey("Testing GetConfigFilePath()", t, func() {
os.Unsetenv("SCW_CONFIG_PATH")
configPath, err := GetConfigFilePath()
So(err, ShouldBeNil)
So(configPath, ShouldNotEqual, "")
Expand Down
16 changes: 8 additions & 8 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ func NewSSHExecCmd(publicIPAddress, privateIPAddress, user string, port int, all
quiet := os.Getenv("DEBUG") != "1"
secureExec := os.Getenv("SCW_SECURE_EXEC") == "1"
sshCommand := &sshcommand.Command{
AllocateTTY: allocateTTY,
Command: command,
Host: publicIPAddress,
Quiet: quiet,
SkipHostKeyChecking: !secureExec,
User: user,
NoEscapeCommand: true,
Port: port,
AllocateTTY: allocateTTY,
Command: command,
Host: publicIPAddress,
Quiet: quiet,
SkipHostKeyChecking: !secureExec,
User: user,
NoEscapeCommand: true,
Port: port,
EnableSSHKeyForwarding: enableSSHKeyForwarding,
}
if gatewayIPAddress != "" {
Expand Down
Loading