generated from RedHatQuickCourses/rhods-model
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bb6ce0b
Showing
93 changed files
with
6,074 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish to GitHub Pages | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
issues: write | ||
packages: write | ||
pull-requests: write | ||
repository-projects: write | ||
security-events: write | ||
statuses: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" | ||
|
||
- name: Install Antora | ||
run: npm ci | ||
|
||
- name: Generate Site | ||
run: npm run build | ||
|
||
- name: Publish to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: build/site | ||
keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Publish PR preview to GitHub Pages | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed # The PR preview is removed when the PR is merged | ||
paths-ignore: | ||
- ".gitignore" | ||
- "README.md" | ||
|
||
concurrency: pr-preview-${{ github.ref }} | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
issues: write | ||
packages: write | ||
pull-requests: write | ||
repository-projects: write | ||
security-events: write | ||
statuses: write | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install Antora | ||
run: npm ci | ||
|
||
- name: Generate Site | ||
run: npm run build | ||
|
||
- name: Publish PR preview to GitHub Pages | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: ./build/site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
#build/Release | ||
build | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Local VSCode settings | ||
.vscode/settings* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"asciidoctor.asciidoctor-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Creating Machine Learning Models with Red Hat OpenShift Data Science | ||
|
||
This course is the third in a series of 6 courses about Red Hat OpenShift Data Science (RHODS). This course teaches you how to create machine learning models in RHODS, and how to export models using Jupyter Notebooks. | ||
|
||
# Creating Course Content | ||
|
||
We use a system called Antora (https://antora.org) to publish courses. Antora expects the files and folders in a source repository to be arranged in a certain opinionated way to simplify the process of writing course content using asciidoc, and then converting the asciidoc source to HTML. | ||
|
||
Refer to the quick courses [contributor guide](https://redhatquickcourses.github.io/welcome/1/guide/overview.html) for a detailed guide on how to work with Antora tooling and publish courses. | ||
|
||
## TL;DR Quickstart | ||
|
||
This section is intended as a quick start guide for technically experienced members. The contributor guide remains the canonical reference for the course content creation process with detailed explanations, commands, video demonstrations, and screenshots. | ||
|
||
### Pre-requisites | ||
|
||
* You have a macOS or Linux workstation. Windows has not been tested, or supported. You can try using a WSL2 based environment to run these steps - YMMV! | ||
* You have a somewhat recent version of the Git client installed on your workstation | ||
* You have a somewhat new Node.js LTS release (Node.js 16+) installed locally. | ||
* Install a recent version of Visual Studio Code. Other editors with asciidoc editing support may work - YMMV, and you are on your own... | ||
|
||
### Antora Files and Folder Structure | ||
|
||
The *antora.yml* file lists the chapters/modules/units that make up the course. | ||
|
||
Each chapter entry points to a *nav.adoc* file that lists the sections in that chapter. The home page of the course is rendered from *modules/ROOT/pages/index.adoc*. | ||
|
||
Each chapter lives in a separate folder under the *modules* directory. All asciidoc source files live under the *modules/CHAPTER/pages* folder. | ||
|
||
To create a new chapter in the course, create a new folder under *modules*. | ||
|
||
To add a new section under a chapter create an entry in the *modules/CHAPTER/nav.adoc* file and then create the asciidoc file in the *modules/CHAPTER/pages* folder. | ||
|
||
### Steps | ||
|
||
1. Clone the course repository. | ||
``` | ||
$ git clone git@github.com:RedHatQuickCourses/rhods-model.git | ||
``` | ||
|
||
2. Install the npm dependencies for the course tooling. | ||
``` | ||
$ cd rhods-model | ||
$ npm install | ||
``` | ||
|
||
3. Start the asciidoc to HTML compiler in the background. This command watches for changes to the asciidoc source content in the **modules** folder and automatically re-generates the HTML content. | ||
``` | ||
$ npm run watch:adoc | ||
``` | ||
4. Start a local web server to serve the generated HTML files. Navigate to the URL printed by this command to preview the generated HTML content in a web browser. | ||
``` | ||
$ npm run serve | ||
``` | ||
|
||
5. Before you make any content changes, create a local Git branch based on the **main** branch. As a good practice, prefix the branch name with your GitHub ID. Use a suitable branch naming scheme that reflects the content you are creating or changing. | ||
``` | ||
$ git checkout -b rsriniva/ch01s01 | ||
``` | ||
|
||
6. Make your changes to the asciidoc files. Preview the generated HTML and verify that there are no rendering errors.Commit your changes to the local Git branch and push the branch to GitHub. | ||
``` | ||
$ git add . | ||
$ git commit -m "Added lecture content for chapter 1 section 1" | ||
$ git push -u origin rsriniva/ch01s01 | ||
``` | ||
|
||
7. Create a GitHub pull request (PR) for your changes using the GitHub web UI. | ||
|
||
8. Request a review of the PR from your technical peers and/or a member of the PTL team. | ||
|
||
9. Make any changes requested by the reviewer in the **same** branch as the PR, and then commit and push your changes to GitHub. If other team members have made changes to the PR, then do not forget to do a **git pull** before committing your changes. | ||
|
||
10. Once reviewer(s) approve your PR, you should merge it into the **main** branch. | ||
|
||
11. Wait for a few minutes while the automated GitHub action publishes your changes ot the production GitHub pages website. | ||
|
||
12. Verify that your changes have been published to the production GitHub pages website at https://redhatquickcourses.github.io/rhods-model | ||
|
||
# Problems and Feedback | ||
If you run into any issues, report bugs/suggestions/improvements about this course here - https://github.com/RedHatQuickCourses/rhods-model/issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
site: | ||
title: Creating Machine Learning Models with Red Hat OpenShift Data Science | ||
start_page: rhods-model::index.adoc | ||
|
||
content: | ||
sources: | ||
- url: ./ | ||
|
||
asciidoc: | ||
attributes: | ||
page-pagination: true | ||
|
||
ui: | ||
bundle: | ||
url: ./ui-bundle/ui-bundle.zip | ||
supplemental_files: ./supplemental-ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: rhods-model | ||
title: Creating Machine Learning Models with Red Hat OpenShift Data Science | ||
version: 1.33 | ||
nav: | ||
- modules/ROOT/nav.adoc | ||
- modules/chapter1/nav.adoc | ||
- modules/chapter2/nav.adoc | ||
- modules/chapter3/nav.adoc | ||
- modules/appendix/nav.adoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
cd ui-assets | ||
zip -r ../ui-bundle/ui-bundle.zip ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
schemaVersion: 2.1.0 | ||
metadata: | ||
name: rhods-quick-course | ||
displayName: RHODS Quick Course | ||
description: RHODS Quick Course published using Antora | ||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg | ||
tags: | ||
- Node.js | ||
- Antora | ||
- ubi8 | ||
projectType: Node.js | ||
language: JavaScript | ||
version: 2.1.1 | ||
starterProjects: | ||
- name: rhods-quick-course | ||
git: | ||
remotes: | ||
origin: 'https://github.com/RedHatTraining/rhods-quick-course.git' | ||
components: | ||
- name: runtime | ||
container: | ||
image: registry.access.redhat.com/ubi8/nodejs-16:latest | ||
args: ['tail', '-f', '/dev/null'] | ||
memoryLimit: 1024Mi | ||
mountSources: true | ||
env: | ||
- name: DEBUG_PORT | ||
value: '5858' | ||
endpoints: | ||
- name: http-node | ||
targetPort: 8080 | ||
- exposure: none | ||
name: debug | ||
targetPort: 5858 | ||
commands: | ||
- id: install | ||
exec: | ||
component: runtime | ||
commandLine: npm install | ||
workingDir: ${PROJECT_SOURCE} | ||
group: | ||
kind: build | ||
isDefault: true | ||
- id: run | ||
exec: | ||
component: runtime | ||
commandLine: npm start | ||
workingDir: ${PROJECT_SOURCE} | ||
group: | ||
kind: run | ||
isDefault: true | ||
- id: debug | ||
exec: | ||
component: runtime | ||
commandLine: npm run debug | ||
workingDir: ${PROJECT_SOURCE} | ||
group: | ||
kind: debug | ||
isDefault: true | ||
- id: test | ||
exec: | ||
component: runtime | ||
commandLine: npm test | ||
workingDir: ${PROJECT_SOURCE} | ||
group: | ||
kind: test | ||
isDefault: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* xref:index.adoc[] |
Oops, something went wrong.