Code Monkey home page Code Monkey logo

scaleway-cli's People

Contributors

aerialls avatar angristan avatar clement-gilbert avatar codelax avatar dependabot[bot] avatar dri42 avatar jawher avatar jeansebastienh avatar jerjako avatar jerome-quere avatar jremy42 avatar jtherin avatar kindermoumoute avatar laure-di avatar loicbourgois avatar lpmi-13 avatar mia-cross avatar mmrqs avatar monitob avatar ojroques avatar onsagerhe avatar oursin avatar quantumsheep avatar quentinbrosse avatar remyleone avatar scaleway-bot avatar seblu avatar sh4d1 avatar thorerik avatar yfodil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scaleway-cli's Issues

Add timeouts used by sync commands

The following command:

  • scw start --sync

Can hang forever if there's a boot issue ; in some scenarii, it is nice to have the ability to set timeouts:

  • one for the API state of the server to become OK
  • one for the SSH port to be open

These timeouts could be disabled by default, and enabled via CLI options or environment variables or via the config file.

Basic skeleton of a go CLI

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.

  • add facilities to setup the CLI scw login --token=XXXXX --organization=YYYYY
  • add a usage message similar to the current CLI
  • add basic interaction with the API
  • add basic actions (ps)
  • add a shared cache for uuids (should handle concurrency)

golang: add a version and commit id

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

show examples from command line

It'd be cool to have some common examples (like those in the README) accessible from command line, with scw --show-examples for instance.

[meta] support docker commands

  • attach
  • build
  • commit
  • cp
  • create
  • events
  • exec
  • export
  • history
  • images
  • import
  • info
  • inspect
  • kill
  • load
  • login
  • logout
  • logs
  • port
  • pause
  • ps
  • pull
  • push
  • rename
  • restart
  • rm
  • rmi
  • run
  • save
  • search
  • start
  • stats
  • stop
  • tag
  • top
  • unpause
  • version
  • wait

Consider having -k as the default behavior

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.

Handle concurrent access to the datastore

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)

golang: flush cache

  • on scw rm, remove server entry
  • on scw rmi, remove image||bootscript||volume||snapshot entry
  • on GET /resource without filter, replace resource-type cache
  • on scw rename, update entry

No error when scw exec fails

To 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:~#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.