Red Hat Scholars - Enable customers and individuals to participate in a Workshop


Have you ever thought or had the need to create a page for people/customer following a workshop? If that’s the case Red Hat Scholars is a framework that will make your life much easier.

Steps to deploy a Red Hat Scholar framework to create a workshop:

1) Fork https://github.com/redhat-scholars/courseware-template repo and unclick: ‘Copy the master Branch only’. This is because this template uses a branch named gh-pages to deploy Git Hub pages trough Actions.

Untitled (1)

2) Click ‘Use this template’ then ‘Create new repository’.

Untitled (2)

3) Click ‘Include all branches’, make it public, give it a name and hit create.

Untitled (3)

4) Once the new repo is created go to ‘Settings’ → ‘Pages’ and verify you have the build and deployment configuration.

Untitled (4)

5) In ‘Settings’ → ‘Actions’ → ‘General’ → ‘Workflow permissions’ click ‘Read and write permissions’ and hit ‘Save’, this allow GitHub Actions to redeploy correctly the page when a change in the code is done.

Untitled (5)

6) Modify ‘site.yml’, it is necessary to change site.url and site.start_page

runtime:
  cache_dir: ./.cache/antora

site:
  ##Change the title
  title: Manual for GitOps workshop
  ##Change url from repo
  url: https://github.com/jtovarro/gitops-workshop-manual
  ##The start_page should be the name of your repo
  start_page: gitops-workshop-manual::index.adoc

content:
  sources:
    - url: ./
      start_path: documentation

asciidoc:
  attributes:
    release-version: master
    page-pagination: true
  extensions:
    - ./lib/tab-block.js
    - ./lib/remote-include-processor.js

ui:
  bundle:
    url: https://github.com/redhat-developer-demos/rhd-tutorial-ui/releases/download/v0.1.9/ui-bundle.zip
    snapshot: true
  supplemental_files:
    - path: ./supplemental-ui
    - path: .nojekyll
    - path: ui.yml
      contents: "static_files: [ .nojekyll ]"

output:
  dir: ./gh-pages

7) In ‘Actions’ it is possible to see all the workflows that deployed GitHub pages, and in the ‘Environments’ section you can find the url to the GitHub page deployed.

Untitled (7)

Untitled (6)

8) To add/remove pages go to ‘documentation/modules/ROOT/pages’ and ‘documentation/modules/ROOT/nav.adoc’ to edit the sections.

Remote Workstation

A possible solution to avoid installing cli in our workstation is to create a remote terminal with oc,jq, and more cli already installed:

  • Using Podman or Docker:
$ podman run -p 7681:7681 -it quay.io/redhat-scholars/ttyd-openshift:latest
$ docker run -p 7681:7681 -it quay.io/redhat-scholars/ttyd-openshift:latest
  • Run localhost:7681 in your browser to access the terminal.

Written on January 17, 2024