Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified command-line tools #39

Open
larsbutler opened this issue May 21, 2014 · 8 comments
Open

Unified command-line tools #39

larsbutler opened this issue May 21, 2014 · 8 comments

Comments

@larsbutler
Copy link
Member

Update: I've written up a draft of a more detailed spec. It's here: https://gist.github.com/larsbutler/ac14b62ab9b5d6bf4b9b


This is more of a blueprint than a bug or issue. The goal here is to get some ideas documented and figure out how we can make command-line tools for ZeroVM which are intuitive, stable, and easy to use.

Some ideas have been put forth by members of the community to unify the ZeroVM command-line tools. They are as follows:

Here are my ideas so far, to get the conversation started:

  • The proposal has been to unify the functions of these tools into a single executable, with appropriate sub-commands and flags. Such an executable might be called zvm or zerovm.
  • It might not be appropriate to join the zerovm executable with zvsh,zvapp, and zpm. However, I think it's quite reasonable to be able to join the tools written in Python (zvsh/zvapp/zpm) to be unified under a single executable.
  • Joining zvsh/zvapp/zpm would be a good first step. Later we can decide if it makes sense to try and wrap zerovm into the same tool as well.
  • I don't think it would be appropriate to join the git repositories, and I don't think this would be necessary.
@pkit
Copy link
Member

pkit commented May 21, 2014

I suggest creating a new all-in-one tool, with only the non-debug/testing related stuff.
I.e. no gdb support, no zvm-debug, etc.

@blakeyeager
Copy link

I like Constantine's idea of creating a new all-in-one cli tool that does not include debugging features/support. A CLI tool like this would be targeted at users not developers of zerovm.

I also agree with Lars that at least at first it does not make sense to try and combine to zerovm with the other tools. As such I think the combined cli tool should simply be called zvm.

@mgeisler
Copy link
Contributor

I think it would be helpful to look at what the toold do:

  • zerovm: loads untrusted code and runs it in the sandbox.
  • zvsh: convenience tool for buildings a manifest file and starting zerovm
  • zvapp: run a cluster job locally
  • zpm: user tool for bundling, sharing, and deploying ZeroVM applications.

With this description, I don't think it makes sense to merge zerovm into anything. It is the core application that the other tools are built around. Perhaps some functionality can flow from, say, zvsh into zerovm so that it's easy to use zerovm for one-off jobs. On the other hand, there is a lot of benefit from having a small core tool written in C and then writing more user friendly tools in, say, Python.

The zvsh and zvapp tools have similar purposes: they make it easier to run NaCl applications. There are differences too: one is a front-end for zerovm, the other is a front-end for ZeroCloud, albeit with the cluster running entirely (is this correct?) on the local machine.

I could see zvsh be a frontend for zvapp, in the sense that a local one-off job could be seen as a tiny cluster job. So maybe we should rewrite zvsh so it writes a trivial cluster job description for zvapp? We could probably also include the functionality as a default case in zvapp and get rid of zvsh.

I don't think zpm should be merged with zvapp or zvsh. It is a package management tool at heart. It might even have been a mistake that it grew the zpm execute command -- zvapp could instead have grown proper support for executing a zapp deployed by zpm.

Merging zvsh and zvapp into a single application called zvm would thus be my best idea right now. I like how that would be the "short" and more user friendly version of zerovm.

@mgeisler
Copy link
Contributor

@larsbutler what's your current thinking? I think you proposed joining zvsh, zvapp, and zpm, right?

What do you think of the idea of letting zpm be just a package manager and then merging zvsh and zvapp into a zvm program which is then the one tool to use when executing ZeroVM apps locally and in a cluster?

@larsbutler
Copy link
Member Author

@mgeisler Yeah, that makes sense, except that zpm also has some (remote) execution functionality.

I think it would be interesting to map out all of the CLI tool functions and see what the logical groups and overlaps look like.

@larsbutler
Copy link
Member Author

Another point to consider is that we may want to extend zvsh to execute zapps (locally). In theory that would be cool, so that each tool consumes the same kind of thing.

@mgeisler
Copy link
Contributor

Lars Butler [email protected] writes:

@mgeisler Yeah, that makes sense, except that zpm also has some
(remote) execution functionality.

I think it would be interesting to map out all of the CLI tool
functions and see what the logical groups and overlaps look like.

That's what I tried to do in my comment :) I think we have

  • package management (zpm)
  • user-friendly execution (zvsh and zvapp)
  • low-level execution (zerovm)

That is why I proposed merging just zvsh and zvapp.

@pkit
Copy link
Member

pkit commented May 28, 2014

We have also: testing and debug
zvsh was originally created for running tests from shell scripts in a least intrusive way
A lot of legacy software has test cases that work like:

  • compile (using gcc)
  • execute (using shell command line)
  • parse return code (using shell variables)

Now when you're working with tests, sometimes you will want to debug stuff, then zvsh was altered with support for debugging sessions.

larsbutler added a commit to larsbutler/zerovm-cli that referenced this issue Jan 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants