scaleway / scaleway-cli Goto Github PK
View Code? Open in Web Editor NEWCommand Line Interface for Scaleway
Home Page: https://www.scaleway.com/en/cli/
License: Apache License 2.0
Command Line Interface for Scaleway
Home Page: https://www.scaleway.com/en/cli/
License: Apache License 2.0
The following command:
Can hang forever if there's a boot issue ; in some scenarii, it is nice to have the ability to set timeouts:
These timeouts could be disabled by default, and enabled via CLI options or environment variables or via the config file.
This is the first step of the Go implementation of scaleway-cli, it consists of creating a skeleton on top of which we can add commands. Since scaleway-cli is highly inspired from the docker-cli which is written in go, we can probably get some inspiration from Docker's repository.
scw login --token=XXXXX --organization=YYYYY
Maybe we can generate a version.go file from the Makefile with commit ID and version from a somewhere
Then we need to put the information in scw -v
and scw version
It'd be cool to have some common examples (like those in the README) accessible from command line, with scw --show-examples
for instance.
inspect <items...>
rm <servers...>
stop <servers...>
rmi <images...>
start <servers...>
restart <servers...>
Currently:
scw exec $uuid 'ls -l'
Prompts to add the SSH key to known hosts (we need to add -k to bypass this check).
Since the usage of this command is primarily for scripting, it would be cool to have -k as the default behavior, and introduce a --safe (or equivalent) extra argument to force the check.
It seems that the // support is not fully complete, sometimes when spawning multiple scw create ..., I get the following stacktraces:
/usr/local/lib/node_modules/scaleway-cli/node_modules/nedb/lib/datastore.js:67
if (err) { throw err; }
^
Error: ENOENT, rename '/tmp/scw.db~'
at Error (native)
/usr/local/lib/node_modules/scaleway-cli/node_modules/nedb/lib/datastore.js:67
if (err) { throw err; }
^
Error: ENOENT, unlink '/tmp/scw.db~'
at Error (native)
Try to mimics nodejs behavior (#40)
scw rm
, remove server entryscw rmi
, remove image||bootscript||volume||snapshot entryGET /resource
without filter, replace resource-type cachescw rename
, update entryTo reproduce: Try to exec something when the server is starting
➜ ~ scw create Ubuntu_Utopic_14_10
29ba8d8f-5b6c-49a8-8100-cef936aa336b
➜ ~ scw start 29ba8d8f-5b6c-49a8-8100-cef936aa336b
29ba8d8f-5b6c-49a8-8100-cef936aa336b
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b
usage: scw exec [OPTIONS] SERVER COMMAND [ARGS...]. See 'scw exec --help'.
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b ls
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b ls -l
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b ls -la
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b bash
root@determined-thompson:~#
root@determined-thompson:~#
root@determined-thompson:~# exit
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b ls -la
total 28
drwx------ 4 root root 4096 Jun 5 14:52 .
drwxr-xr-x 21 root root 4096 Mar 17 15:18 ..
-rw-r--r-- 1 root root 3106 Feb 20 2014 .bashrc
drwx------ 2 root root 4096 Jun 5 14:52 .cache
-rw-r--r-- 1 root root 140 Feb 20 2014 .profile
-rw-rw-r-- 1 root root 1240 Mar 17 14:45 .s3cfg.sample
drwx------ 2 root root 4096 Jun 5 14:51 .ssh
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b ls -la
total 28
drwx------ 4 root root 4096 Jun 5 14:52 .
drwxr-xr-x 21 root root 4096 Mar 17 15:18 ..
-rw-r--r-- 1 root root 3106 Feb 20 2014 .bashrc
drwx------ 2 root root 4096 Jun 5 14:52 .cache
-rw-r--r-- 1 root root 140 Feb 20 2014 .profile
-rw-rw-r-- 1 root root 1240 Mar 17 14:45 .s3cfg.sample
drwx------ 2 root root 4096 Jun 5 14:51 .ssh
➜ ~ scw exec 29ba8d8f-5b6c-49a8-8100-cef936aa336b bash
root@determined-thompson:~#
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.