openshift-evangelists / workshopper Goto Github PK
View Code? Open in Web Editor NEWWorkshop content rendering tool
Workshop content rendering tool
docker run -it --rm -p 8080:8080 -v $(pwd):/app-data -e WORKSHOPS_URLS="https://raw.githubusercontent.com/openshift-labs/cloud-native-guides/ocp-3.9/_cloud-native-roadshow.yml" -e LOG_TO_STDOUT=true quay.io/osevg/workshopper:latest
Go to http://localhost:8080 and search for "oc login"
Stop docker. Run the following
docker run -it --rm -p 8080:8080 -v $(pwd):/app-data -e WORKSHOPS_URLS="https://raw.githubusercontent.com/openshift-labs/cloud-native-guides/ocp-3.9/_cloud-native-roadshow.yml" -e LOG_TO_STDOUT=true quay.io/osevg/workshopper:edge
Compare what you see at (2) with (4).
In the previous code, there was a "all labs" link which generated a single page including all the labs. It's useful for saving as PDF or printing and would be valuable to add it again.
Write documentation how to use the tool, i.e. write how to build content for the tool.
This particular RFE is because, by default Markdown links like [some text](http://somelink)
will open in the same browser tab, taking the user away from the workshopper content. It would be nice to automatically declare (via CSS or some other mechanism, not sure which is best) that every link should open in a new tab.
As a workaround, I currently add {:target="_blank"}
to every single link (in Markdown) and that's kinda ugly (but not super painful).
Once we start creating content, and possibly making the tool accessible to others, it might make sense to categorize workshops and possibly modules, and provide filtering.
Example:
https://kiosk-dot-codelabs-site.appspot.com/devoxx?cat=Compute
When running with docker run this container, Ctrl-C does not stop the container.
http://www.methods.co.nz/asciidoc/userguide.html#X105
Regular paragraph text is effectively computed to 14px
Callout text ends up being 16px
I can't seem to find where in the CSS this is happening, though.
Hello,
I'd like to use the workshopper in my company with the limitation, that I can only use OpenShift for building the workshopper docker image and to use the default RedHat rpm repositories. I'm modified the Dockerfile in that manner that it is using the RHEL 7 image as a base image and enabled the rhscl repository to install ruby 2.5. Furthermore
Dockerfile.txt
the option "ADD --chown=workshopper:root ..." was not working with OpenShift 3.9. Also I added to commands with "RUN gem ..." or "RUN bundle ..." the prefix "source scl_source enable rh-ruby25" to test the execution.
The OpenShift build breaks at after updating the system gems with the error message "ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory @ dir_chdir - /opt/rh/rh-ruby25/root/usr/share/gems/gems/rubygems-update-2.7.7". Do you know were the error is in my Dockerfile?
This is my current setup:
oc v3.10.0+dd10d17
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://master.xxx:443
openshift v3.9.30
kubernetes v1.9.1+a0ce1bc657
Also I attached my modified Dockerfile.
Thanks very much in advance,
Olaf
When running workshop in a room with real people and have workshop notes on projection screen, would be nice for workshopper app to have a way of showing the URL, in very large text in a splash screen. This way as soon as people come in they can see the URL and go to notes straight away. Don't need to create a document in something else where can make URL really large and visible. Bonus points if allow you to supply a short paragraph to show with it, also in large text, so can say what URL is for and that they should go to it straight away. Right now options are to include in workshop name or use a '##' title to show it.
When generating a ToC using markdown {:toc}
syntax, the generates links are the http://host/index.html#myheader
which interferes with the angular routing.
I have a shared OCP cluster that I use to deliver workshops, I previously create 30 users user[0-30] and some lab instructions I would like to generate the commands in the asciidoc using the username instead of getting it from the yaml file, which I would need to change every time I would provision the labs for each user. e.g.
oc new-app osevg/workshopper -e CONTENT_URL_PREFIX="https://raw.githubusercontent.com/samueltauil/openshiftv3-workshop/master" -e WORKSHOPS_URLS="https://raw.githubusercontent.com/samueltauil/openshiftv3-workshop/master/_module_groups.yml" -e USERNAME="user23"
so i could use in my asciidoc the env var USERNAME
instead of getting that from yaml _modules.yaml
, that way I can do a for loop to increment the user number by the bash command.
As many of the workshops provide information with user credentials which can not be repeated per attendee, I think it would be nice to have the following feature:
When you click in an event/workshop, if it's configured to provide credentials you would have an intermediate page that would provide those to you (Or maybe just display the credentials on the top banner and modify instructions accordingly to the credentials of the user). A cookie should be set so that the user will always get the same credentials.
Credentials could come from:
As an example:
http://testdrive-master-labguides.6923.rh-us-east-1.openshiftapps.com/workshop/ocp-admin-testdrive/lab/environment
Looks like we need:
.sectionbody .copypaste .content pre.CodeRay.hilight { border: 1px solid #FF0000 }
This works in docker.io/osevg/workshopper/0.2
Using the following:
WORKSHOPS_URLS=”https://gist.githubusercontent.com/marekjelen/a4339ab8d6b31d1174c754ad83f2129f/raw/02c29ae2fa5217c847a03ec7e79fde7641b18989/workshop.yml"
And setting DEFAULT_LAB=roadshow
seems to have no effect. I still have the list of labs and have to select roadshow.
In the old Ruby app we had the following:
{% if modules.pipelines %}
This doesn't appear to work in the Java version. Therefore the current codechanges and pipelines labs are broken as these don't evaluate correctly.
@marekjelen can you please fix this super quickly? or maybe @jorgemoralespou or @siamaksade
Kinda urgent.
Given a module definition:
modules:
environment:
name: Environment Overview
vars:
MASTERS:
INFRA:
NODES:
NFS_ENABLED:
LOGGING_ENABLED:
ETHERPAD_ENABLED:
NUM_USERS:
ETHERPAD_URL_PREFIX:
installation:
name: Installation and Verification
cns-deploy:
name: Deploying Container Native Storage
requires:
- installation
vars:
NODE_BRICK_DEVICE: "/dev/xvdd"
CNS_NAMESPACE: "container-native-storage"
HEKETI_ADMIN_PW: "myS3cr3tpassw0rd"
HEKETI_ADMIN_PW_BASE64: "bXlTM2NyM3RwYXNzdzByZA=="
HEKETI_USER_PW: "mys3rs3cr3tpassw0rd"
CNS_STORAGECLASS: "cns-gold"
The following asciidoc generates a link, but the resulting URL does not work:
This PVC has been automatically fulfilled by CNS because the `cns-gold` *StorageClass*
was set up as the system-wide default in lab module link:cns-deploy["Deploying
Container-native Storage"]
The URL should be: /#/workshop/ocp-admin-testdrive/module/cns-deploy
But it ends up being: /cns-deploy
Is there a special syntax for linking directly to a module? Or is this a bug with a hyphenated module name?
As we have roadshow written in 3 different languages, it would be awesome if we could provide a way to have a selector for the language the user wants for his lab and then display the appropriate labs.
So we could have one workshop delivered with users selecting which language backends to use for his own labs.
Would be great if there was a "copy to clipboard" button for code blocks.
Currently triple-clicking shell commands results in copying a carriage return into the buffer, which really stinks for commands that need modification before submission.
Requested by @jorgemoralespou
Current asciidoctor.js and the bundled one in docker hub image fails on Chrome and Safari. Browsers are hanged on "loading" state due to an error in asciidoctor.js. I've replaced that one with the one comes with "npm install asciidoctor.js" to fix the issue. FYI
Serverside branch does not evaluate conditional statements for active modules correctly:
{% if modules.demos_msa-cicd-eap %}
ACTIVATED
{% else %}
NOT ACTIVATED
{% endif %}
Using latest
, the above statements prints ACTIVATED
for a specific workshop while using the serverside
, it would always evaluate to NOT ACTIVATED
.
The narrow width of the area for exercises really makes certain things difficult -- especially displaying long shell commands or wide command output.
Squash layers / create intermediate layer / something
In the workshop and module list it would be nice to have an indication of the time it takes to complete.
The workshop ids in the URL are very long and would be more aesthetic to shorten them
/#/workshop/8df65d89543986560ad211a6b0987ee2b3c07e523e204acd227fb0485fd95802
Is there a need to keep all the three content env vars?
CONTENT_URL_PREFIX
GITHUB_REPOSITORY
GITHUB_REF
CONTENT_URL_PREFIX
essential satisfies the requirement for pulling content from other repositories.
Allow specify workshop logo that will be shown with the workshop.
It would be nice to have a previous-next link in the modules so you don't need to go back to the list.
https://kiosk-dot-codelabs-site.appspot.com/codelabs/cloud-shell/index.html?index=..%2F..%2Fdevoxx#1
The new feature to report issues (https://github.com/marekjelen/starter-guides/blob/master/_modules.yml#L2) should be configruable per workshop so that I can deliver a workshop with my own content/fork, with changes that are not yet merged in master and that I don't need to edit this link and commit.
I want to be able to fix issues reported to my own fork before merging the content back. This is helpful when you want to run dry a workshop.
So that I can just pass all the content statically, if hosted on a single repository, and have it in the image to avoid going to the internet for every page.
Copying to clipboard by clicking red frame does not work after navigation.
Workaround: refresh the page
/cc @jorgemoralespou
I'm not sure what the refresh interval is for the modules or the workshop definition, but if there is a very long refresh interval it could be nice to have an endpoint to hit to force a reload.
I had today a deployment with liveness/readiness probes configured to /, but that url redirected to the content, which had an error and returned 500, so the deployment never finished (was never ready).
If there's an error on the content, the deployment will never finish.
It would be nice if there was a "submit feedback / open an issue" link that could go to a repo and open an issue, potentially with a prefix (eg: [some-module]) corresponding to the module being clicked out of...
Have a list on the module with the list of modules, those that are done, those that are missing, that is navigable.
Example:
https://kiosk-dot-codelabs-site.appspot.com/codelabs/cloud-shell/index.html?index=..%2F..%2Fdevoxx#1
When using the latest master commits, workshopper is not rendering some variables. I don't think it's actually the variables (I tried different variable names, locations, etc). But I think something on my adoc is causing WorkShopper to get angry and stop processing variables.
I frequently get this error:
⌂77% [thoraxe:~/Red_Hat/openshift/workshopper] master(5) ± bundle exec rackup -p 8080 -E development
Puma starting in single mode...
* Version 3.12.0 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:8080
Use Ctrl-C to stop
::1 - - [18/Sep/2018:08:01:03 -0400] "GET /workshop/ocp-admin-testdrive/lab/environment HTTP/1.1" 200 - 0.7298
::1 - - [18/Sep/2018:08:01:03 -0400] "GET /workshop/ocp-admin-testdrive/asset/images/webssh_login.png HTTP/1.1" 304 - 0.0491
Rack::Lint::LintError: Status must be >=100 seen as integer
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/lint.rb:20:in `assert'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/lint.rb:620:in `check_status'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/lint.rb:51:in `_call'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/lint.rb:37:in `call'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/show_exceptions.rb:23:in `call'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/common_logger.rb:33:in `call'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/chunked.rb:54:in `call'
/home/thoraxe/.gem/ruby/gems/rack-2.0.5/lib/rack/content_length.rb:15:in `call'
/home/thoraxe/.gem/ruby/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/thoraxe/.gem/ruby/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/thoraxe/.gem/ruby/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/thoraxe/.gem/ruby/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/thoraxe/.gem/ruby/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'
::1 - - [18/Sep/2018:08:01:03 -0400] "GET / HTTP/1.1" 500 1104 0.1138
::1 - - [18/Sep/2018:08:01:04 -0400] "GET /favicon.ico HTTP/1.1" 304 - 0.0496
On pages where things are failing to get substituted.
When I load the same pages with the 0.3 tag, no errors and variables are rendered just fine.
here's an example set of variables to export before running workshopper:
export WORKSHOPS_URLS=https://raw.githubusercontent.com/thoraxe/openshift-cns-testdrive/310-infra-fixes/labguide/_ocp_admin_testdrive.yaml
export CONTENT_URL_PREFIX=https://raw.githubusercontent.com/thoraxe/openshift-cns-testdrive/310-infra-fixes/labguide
export KEYNAME=qwikLABS-L117-23233
export OCP_ROUTING_SUFFIX=apps.248053005789.aws.testdrive.openshift.com
export MASTER_HOSTNAME=master
export MASTER_EXTERNAL_FQDN=master.248053005789.aws.testdrive.openshift.com
export MASTER_EXTERNAL_IP=34.237.220.127
export MASTER_INTERNAL_FQDN=master.internal.aws.testdrive.openshift.com
export INFRA_INTERNAL_FQDN=infra.internal.aws.testdrive.openshift.com
export INFRA_INTERNAL_IP=10.0.1.26
export NODE1_HOSTNAME=node01
export NODE1_EXTERNAL_FQDN=node01.248053005789.aws.testdrive.openshift.com
export NODE1_INTERNAL_FQDN=node01.internal.aws.testdrive.openshift.com
export NODE1_INTERNAL_IP=10.0.1.220
export NODE2_HOSTNAME=node02
export NODE2_EXTERNAL_FQDN=node02.248053005789.aws.testdrive.openshift.com
export NODE2_INTERNAL_FQDN=node02.internal.aws.testdrive.openshift.com
export NODE2_INTERNAL_IP=10.0.3.237
export NODE3_HOSTNAME=node03
export NODE3_EXTERNAL_FQDN=node03.248053005789.aws.testdrive.openshift.com
export NODE3_INTERNAL_FQDN=node03.internal.aws.testdrive.openshift.com
export NODE3_INTERNAL_IP=10.0.4.24
export NODE4_EXTERNAL_FQDN=node04.248053005789.aws.testdrive.openshift.com
export NODE4_INTERNAL_FQDN=node04.internal.aws.testdrive.openshift.com
export NODE4_INTERNAL_IP=10.0.1.201
export NODE5_EXTERNAL_FQDN=node05.248053005789.aws.testdrive.openshift.com
export NODE5_INTERNAL_FQDN=node05.internal.aws.testdrive.openshift.com
export NODE5_INTERNAL_IP=10.0.3.57
export NODE6_EXTERNAL_FQDN=node06.248053005789.aws.testdrive.openshift.com
export NODE6_INTERNAL_FQDN=node06.internal.aws.testdrive.openshift.com
export NODE6_INTERNAL_IP=10.0.4.38
export IDM_INTERNAL_FQDN=idm.internal.aws.testdrive.openshift.com
export WEB_CONSOLE_URL=https://openshift.248053005789.aws.testdrive.openshift.com/console
export SSH_CONSOLE_URL=http://ssh.248053005789.aws.testdrive.openshift.com:8080/ssh/host/master.internal.aws.testdrive.openshift.com
export API_HEALTH_URL=https://openshift.248053005789.aws.testdrive.openshift.com/healthz/ready
export NODE_BRICK_DEVICE=/dev/xvdd
export NODE_BRICK_DEVICE2=/dev/xvde
export CNS_NAMESPACE=storage
export HEKETI_ADMIN_PW=myS3cr3tpassw0rd
If you export all of these and visit the homepage of workshopper with 0.3 or older, you'll see the KEYNAME
variable shown (eg: http://localhost:8080/index.html#/workshop/ocp-admin-testdrive/module/environment and you'll see the qwikLABS-L117-23233
value shown on the page).
If you export all of these and visit the homepage of workshopper with the latest master, you'll see the KEYNAME
variable is not shown and you will also see an error in your Puma log.
When using admonitions (eg: NOTE:
) or definition lists (eg: <2>
), the resulting text on the page has a larger size than normal paragraph text.
I'm seeing a computed text size for admonitions and DLs as 16px, whereas regular paragraph text is 14px.
I'd think this should all be the same?
I'm trying to use this version with our summit workshop and does not work and don't get any output at all. It would be nice if I could start the container with a flag to get verbose output (if there is any output).
The workshop I'm trying to execute is:
$ git clone https://github.com/openshift-labs/devops-oab-guides.git
$ cd devops-oab-guides
$ docker run -p 8080:8080 -v $(pwd):/app-data \
-e CONTENT_URL_PREFIX="file:///app-data" \
-e WORKSHOPS_URLS="file:///app-data/_devops-workshop.yml" \
osevg/workshopper:edge
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.