jumpstarter-io / jsc Goto Github PK
View Code? Open in Web Editor NEWJumpstarter Console
Jumpstarter Console
currently no output. would be nice if "run /app/code/asdf.sh" results in printout of "/app/code/asdf.sh"
Synopsis: jsc [api] [path] [json-args]
"The external jumpstarter api" doesn't really exist yet so this will have to wait until that point, but this feature is planned and of critical importance to customers.
Some critical api calls will be starting/stopping assemblies and taking snapshots.
For some reason jsc requires an argument to the flag that means "ask for password"
At the moment jsc will ignore -p/--port since we use Remoto and you cannot make it connect to any other port than 22.
deploy command shows "could not find recipe dir or file" and then continues to run the recipe
Remoto and execnet leaves a lot of wishes unanswered for us. Here's a list
Crash on start, message from support. Inconsistent stacktraces
File "/usr/local/bin/jsc", line 9, in <module>
load_entry_point('jsc==6.0', 'console_scripts', 'jsc')()
File "/Library/Python/2.7/site-packages/jsc/client.py", line 553, in main
rpc = SshJsonRpc(ssh_username, password, pkey, host=host, port=int(port))
File "/Library/Python/2.7/site-packages/jsc/sshjsonrpc.py", line 41, in __init__
self.ssh_client.connect(host, port, **connect_kw)
File "/Library/Python/2.7/site-packages/paramiko/client.py", line 251, in connect
retry_on_signal(lambda: sock.connect(addr))
File "/Library/Python/2.7/site-packages/paramiko/util.py", line 270, in retry_on_signal
return function()
File "/Library/Python/2.7/site-packages/paramiko/client.py", line 251, in <lambda>
retry_on_signal(lambda: sock.connect(addr))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 61] Connection refused
or
File "/usr/local/bin/jsc", line 9, in <module>
load_entry_point('jsc==6.0', 'console_scripts', 'jsc')()
File "/Library/Python/2.7/site-packages/jsc/client.py", line 553, in main
rpc = SshJsonRpc(ssh_username, password, pkey, host=host, port=int(port))
File "/Library/Python/2.7/site-packages/jsc/sshjsonrpc.py", line 51, in __init__
raise SshRpcError()
jsc.sshrpcutil.SshRpcError
File "/usr/local/bin/jsc", line 9, in
load_entry_point('jsc==6.0', 'console_scripts', 'jsc')()
File "/Library/Python/2.7/site-packages/jsc/client.py", line 553, in main
rpc = SshJsonRpc(ssh_username, password, pkey, host=host, port=int(port))
File "/Library/Python/2.7/site-packages/jsc/sshjsonrpc.py", line 51, in init
raise SshRpcError()
jsc.sshrpcutil.SshRpcError
running command: unzip -d /app/code/src/wp-content/themes/ tint-themeskingdom.zip
Archive: tint-themeskingdom.zip
creating: /app/code/src/wp-content/themes/tint-themeskingdom/
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/404.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/admin-settings.php
extracting: /app/code/src/wp-content/themes/tint-themeskingdom/archive-portfolio.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/archive.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/comments.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/footer.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/functions.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/header.php
creating: /app/code/src/wp-content/themes/tint-themeskingdom/inc/
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/inc/admin-settings.php
inflating: /app/code/src/wp-content/themes/tint-themeskingdom/inc/class-tgm-plugin-activation.php
extracting: /app/code/src/wp-content/themes/tint-themeskingdom/inc/custom-taxonomies.php Traceback (most recent call last):
File "/Users/z/jsc/jsc/client.py", line 579, in <module>
main()
File "/Users/z/jsc/jsc/client.py", line 549, in main
console.cmdloop_with_keyboard_interrupt("Welcome to jsc!")
File "/Users/z/jsc/jsc/client.py", line 163, in cmdloop_with_keyboard_interrupt
self.cmdloop(intro="")
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/Users/z/jsc/jsc/client.py", line 131, in fn
return func(self, {k.lstrip("<").rstrip(">"): opt[k] for k in opt})
File "/Users/z/jsc/jsc/client.py", line 239, in do_deploy
state = recipe.run(self._rpc, rec, args['--dev'])
File "/Users/z/jsc/jsc/recipe.py", line 22, in run
state = rpc.call("rc_" + command, {"args": args, "state": state})
File "/Users/z/jsc/jsc/sshjsonrpcposix.py", line 55, in call
sys.stdout.flush()
IOError: [Errno 35] Resource temporarily unavailable
Adding the following to sshjsonrpc seems to solve the issue on OSX, but it might not be a good solution:
stdout_fd = sys.stdout.fileno()
flags = fcntl.fcntl(stdout_fd, fcntl.F_GETFL)
fcntl.fcntl(stdout_fd, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)
Currently it actually uses the backup gasp
"This is essentially a deploy with a backup source instead of a recipe. The exact same steps is taken when reverting as when deploying except that instead of running the recipe files are decompressed and extracted to /app/code."
Gives a long trace right now. does not look good
Simulate an assembly by creating /app/... and connecting to local ssh.
installed caj wp recipe
tstngx> backup
2: 2015-02-10 10:03:12 UTC, <broken/unknown>
Because of Remoto there is no Windows support atm.
Could be related to osx python version 2.7.6 readline bugs.
Right now it can be confusing since git clone of recipe is somewhat a fallback if directory or recipe file was not found. There's a lot of way of specifying git URI:s. but we should try to support as many of them as we can.
"resturning state in rc_name"
happens during deploy
Error messages shall not only state what's wrong but also help the user. E.g. When deploying a recipe to an non-empty assembly you get the following error:
code not clean
while it IMO should say something like Deploying a recipe requires your code base to be empty. Use the command clean and try again.
I'm guessing there are other error messages that could use the same typ of changes.
Although autocomplete works great on Linux and OS X, it does not work on Windows.
jsc vX.Y attached to assembly [$ID] [$DESC] by [$NAME <$EMAIL>]
/app/code: x used of y (z % free)
deployed recipe: $RECIPE-NAME
at YYYY-MM-DD HH:MM:ss
total backups:
/app/state: x used of y (z % free)
perhaps run with flag -v or something
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.