Skip to content

Commit

Permalink
chore: customise instructions to remove summit refs
Browse files Browse the repository at this point in the history
  • Loading branch information
evanshortiss committed Jun 12, 2023
1 parent f06faec commit 32f3be1
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 6 deletions.
32 changes: 26 additions & 6 deletions docs/modules/m1-overview/pages/setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,29 @@ You should now have a copy of the repository at a unique URL of your own at `htt

== Access your OpenShift Cluster

You'll be using your own OpenShift cluster throughout this workshop. Your cluster will be configured with the **OpenShift Web Terminal** and **Red Hat OpenShift GitOps** Operators. You can think of Operators as addons to an OpenShift or Kubernetes cluster that provide it with extended features/capabilities:

* The **Web Terminal** makes it easy to use pre-authenticated command-line tools (CLIs) to interact with the OpenShift APIs directly from the **OpenShift Web Console** in your web browser.
* The **Red Hat OpenShift GitOps** operator provides a managed an Argo CD instance on OpenShift.

[tabs, subs="attributes+,+macros"]
====
OpenShift (Provided by a Workshop Host)::
+
--
If you're attending this workshop as part of a hosted session, then continue reading this section. If you need to self-host an environment for this workshop then switch to the *Custom OpenShift* tab.
You'll be using your own OpenShift cluster throughout this workshop. Your cluster is pre-configured with the **OpenShift Web Terminal** and **Red Hat OpenShift GitOps** Operators. You can think of Operators as addons to an OpenShift or Kubernetes cluster that provide it with extended features/capabilities:
* The **Web Terminal** makes it easy to use pre-authenticated command-line tools (CLIs) to interact with the OpenShift APIs directly from the **OpenShift Web Console** in your web browser.
* Pre-installing the **Red Hat OpenShift GitOps** operator saved a few minutes of time so you can fully focus on actually learning about GitOps instead of setting it up!
To retrieve your cluster's information:
You likely already accessed these instructions via a unique https://demo.redhat.com[demo.redhat.com] URL, e.g `https://demo.redhat.com/workshop/$WORKSHOP_ID`. If so, return to that URL and:
. Visit the https://summit.demo.redhat.com[summit.demo.redhat.com].
. Enter your email address and the password provided by the workshop administrator(s).
. Enter your email address, and the password provided by the workshop administrator(s).
+
[IMPORTANT]
====
Use your actual email address. This is so you can use the same email and password again to access your cluster information if you lose access, or forget the cluster details.
====
+
image:ex1.demo-redhat-login.png[]
. Click the *Access this workshop* button.
Expand All @@ -72,9 +81,20 @@ To access your OpenShift cluster's *Web Console*:
. Visit the cluster URL in a web browser, and select the *htpasswd_provider* login option when prompted.
+
image:ex1.openshift-login-screen.png[]
. Login to your OpenShift cluster using the *Admin* username and password provided by https://summit.demo.redhat.com[summit.demo.redhat.com].
. Login to your OpenShift cluster using the *Admin* username and password provided by the https://demo.redhat.com[demo.redhat.com] page.
The **Overview** page of the OpenShift Web Console is displayed after a successful login. From here you can perform both administrative and developer-focused tasks.
--
Custom OpenShift::
+
--
Use the instructions in the https://github.com/redhat-scholars/summit-2023-gitops-lab-guide#lab-environment-setup[Using your own Environment section of this repository] to prepare your OpenShift environment for this workshop.
Move onto the next section once the OpenShift environment has been configured.
--
====

== Access the OpenShift Web Terminal

Expand Down
99 changes: 99 additions & 0 deletions lib/tabs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/* Copyright (c) 2018 OpenDevise, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/**
* Extends the AsciiDoc syntax to support a tabset. The tabset is created from
* a dlist enclosed in an example block that is marked with the tabs style.
*
* Usage:
*
* [tabs]
* ====
* Tab A::
* +
* --
* Contents of tab A.
* --
* Tab B::
* +
* --
* Contents of tab B.
* --
* ====
*
* @author Dan Allen <[email protected]>
*/
const IdSeparatorCh = "-";
const ExtraIdSeparatorsRx = /^-+|-+$|-(-)+/g;
const InvalidIdCharsRx = /[^a-zA-Z0-9_]/g;
const List = Opal.const_get_local(Opal.module(null, "Asciidoctor"), "List");
const ListItem = Opal.const_get_local(
Opal.module(null, "Asciidoctor"),
"ListItem"
);

const generateId = (str, idx) =>
`tabset${idx}_${str
.toLowerCase()
.replace(InvalidIdCharsRx, IdSeparatorCh)
.replace(ExtraIdSeparatorsRx, "$1")}`;

function tabsBlock() {
this.onContext("example");
this.process((parent, reader, attrs) => {
const createHtmlFragment = html => this.createBlock(parent, "pass", html);
const tabsetIdx = parent.getDocument().counter("idx-tabset");
const nodes = [];
nodes.push(createHtmlFragment('<div class="tabset is-loading">'));
const container = this.parseContent(
this.createBlock(parent, "open"),
reader
);
const sourceTabs = container.getBlocks()[0];
if (
!(
sourceTabs &&
sourceTabs.getContext() === "dlist" &&
sourceTabs.getItems().length
)
)
return;
const tabs = List.$new(parent, "ulist");
tabs.addRole("tabs");
const panes = {};
sourceTabs.getItems().forEach(([[title], details]) => {
const tab = ListItem.$new(tabs);
tabs.$append(tab);
const id = generateId(title.getText(), tabsetIdx);
tab.text = `[[${id}]]${title.text}`;
let blocks = details.getBlocks();
const numBlocks = blocks.length;
if (numBlocks) {
if (blocks[0].context === "open" && numBlocks === 1)
blocks = blocks[0].getBlocks();
panes[id] = blocks.map(block => (block.parent = parent) && block);
}
});
nodes.push(tabs);
nodes.push(createHtmlFragment('<div class="content">'));
Object.entries(panes).forEach(([id, blocks]) => {
nodes.push(
createHtmlFragment(`<div class="tab-pane" aria-labelledby="${id}">`)
);
nodes.push(...blocks);
nodes.push(createHtmlFragment("</div>"));
});
nodes.push(createHtmlFragment("</div>"));
nodes.push(createHtmlFragment("</div>"));
parent.blocks.push(...nodes);
});
}

function register(registry, context) {
registry.block("tabs", tabsBlock);
}

module.exports.register = register;
2 changes: 2 additions & 0 deletions site-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ asciidoc:
attributes:
experimental: true
page-pagination: true
extensions:
- ./lib/tabs.js

ui:
bundle:
Expand Down
2 changes: 2 additions & 0 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ asciidoc:
attributes:
experimental: true
page-pagination: true
extensions:
- ./lib/tabs.js

ui:
bundle:
Expand Down

0 comments on commit 32f3be1

Please sign in to comment.