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

InSpec html demo #851

Closed
8 of 16 tasks
arlimus opened this issue Aug 1, 2016 · 5 comments
Closed
8 of 16 tasks

InSpec html demo #851

arlimus opened this issue Aug 1, 2016 · 5 comments
Labels
Type: Enhancement Improves an existing feature
Milestone

Comments

@arlimus
Copy link
Contributor

arlimus commented Aug 1, 2016

We want this for the new inspec home (website) and awesomeness during presentations.

Huge props to Adam Jacob and the full Habitat team for their awesome demos!!

Let's collect ideas and implementation direction here.

Decisions

  • Pre-record inspec behavior OR use a tty-backend with e.g. Docker.
    => pre-record the behavior
  • No server-side component
    => Lives in the inspec repo under www/demo. Users must be able to run this locally in their browser (ideally: via opening an index.html)
  • Pre-generate data file via task and update it on every release.

Tasks

MVP

Release

  • Release 1: create all content for inspec homepage demo (recording + playback) Create all content for inspec homepage demo #1021
  • Run command whitespace-tolerant
  • Error handling for command doesn't match anything (UX + coding)
  • Create script for generating demo contents (i.e. record against current release of inspec in the repository)

Extras

  • Rake task for bump_version to generate updated online demo contents
  • Smart error-handling for certain demo commands (e.g. inspec exec not_here should result in a message about not_here not being here)
  • Windows-centric output for inspec interaction
@arlimus arlimus added the Type: Enhancement Improves an existing feature label Aug 1, 2016
@arlimus arlimus added this to the 1.0.0 milestone Aug 1, 2016
@arlimus arlimus modified the milestones: 0.29.0, 1.0.0 Aug 1, 2016
@vjeffrey
Copy link

vjeffrey commented Aug 2, 2016

from @stevendanna
"...we mentioned potentially doing a "not-canned" demo on the website where people run actual commands and got actual output. One possibility there is a small app (maybe in go?) that spawns a container and then forwards a websocket connection to the container back to the browser. Not attached to the idea, just thought of it on a walk today. This: https://contained.af/ uses that method"

@vjeffrey
Copy link

vjeffrey commented Aug 2, 2016

the website at habitat.sh/try is using josh.js (http://sdether.github.io/josh.js/) --- match commands that are input by the user to the commands you expect, if they don't match, show them a help file, if they do match, display the canned output (https://github.com/habitat-sh/habitat/tree/master/www/source/try, https://github.com/habitat-sh/habitat/tree/master/www/source/javascripts, https://github.com/habitat-sh/habitat/tree/master/www/source/try/responses)

@vjeffrey
Copy link

vjeffrey commented Aug 2, 2016

the presentation used for habitat is a tty.js -- https://github.com/habitat-sh/habitat-launch

@chris-rock
Copy link
Contributor

@stevendanna proposed: One possibility there is a small app (maybe in go?) that spawns a container and then forwards a websocket connection to the container back to the browser. Not attached to the idea, just thought of it on a walk today. This: https://contained.af/ uses that method

@chris-rock
Copy link
Contributor

chris-rock commented Aug 5, 2016

Another alternative would be to use emscripten to compile ruby to javascript. As far as I can see, ruby 1.9.3+ cannot easily compiled to javascript, because it heavily relies on threads. See: https://github.com/replit/emscripted-ruby

Update: Looks like thread support is in Emscripten now: https://groups.google.com/forum/#!topic/emscripten-discuss/gQQRjajQ6iY But I expect a lot of road bumps :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants