Giter Club home page Giter Club logo

amm-techlab's Introduction

Application Migration and Modernization

In this guided hands-on training, we show the participants how to migrate and modernize applications when running a container platform.

Content Sections

The training content resides within the content directory.

The main part are the labs, which can be found at content/en/docs.

Hugo

This site is built using the static page generator Hugo.

The page uses the docsy theme which is included as a Git Submodule. Docsy is being enhanced using docsy-plus as well as docsy-acend and docsy-puzzle for brand specific settings.

After cloning the main repo, you need to initialize the submodule like this:

git submodule update --init --recursive

The default configuration uses the puzzle setup from config/_default. Further, specialized environments can be added in the config directory.

Docsy theme usage

Update submodules for theme updates

Run the following command to update all submodules with their newest upstream version:

git submodule update --remote
git pull --recurse-submodules

Build using Docker

Build the image:

docker build -t puzzle/amm-techlab:latest .

Run it locally:

docker run -i -p 8080:8080 puzzle/amm-techlab

Using Buildah and Podman

Build the image:

buildah build-using-dockerfile -t puzzle/amm-techlab:latest .

Run it locally with the following command. Beware that --rmi automatically removes the built image when the container stops, so you either have to rebuild it or remove the parameter from the command.

podman run --rm --rmi --interactive --publish 8080:8080 localhost/puzzle/amm-techlab

How to develop locally

To develop locally we don't want to rebuild the entire container image every time something changed, and it is also important to use the same hugo versions like in production. We simply mount the working directory into a running container, where hugo is started in the server mode.

export HUGO_VERSION=$(grep "FROM docker.io/klakegg/hugo" Dockerfile | sed 's/FROM docker.io\/klakegg\/hugo://g' | sed 's/ AS builder//g')
docker run --rm --interactive --publish 8080:8080 -v $(pwd):/src docker.io/klakegg/hugo:${HUGO_VERSION} server -p 8080 --bind 0.0.0.0

use the following command to set the hugo environment

export HUGO_VERSION=$(grep "FROM docker.io/klakegg/hugo" Dockerfile | sed 's/FROM docker.io\/klakegg\/hugo://g' | sed 's/ AS builder//g')
docker run --rm --interactive --publish 8080:8080 -v $(pwd):/src docker.io/klakegg/hugo:${HUGO_VERSION} server --environment=<environment> -p 8080 --bind 0.0.0.0

Linting of Markdown content

Markdown files are linted with https://github.com/DavidAnson/markdownlint. Custom rules are in .markdownlint.json. There's a GitHub Action .github/workflows/markdownlint.yaml for CI. For local checks, you can either use Visual Studio Code with the corresponding extension, or the command line like this:

npm install
npm run mdlint

Npm not installed? no problem

export HUGO_VERSION=$(grep "FROM docker.io/klakegg/hugo" Dockerfile | sed 's/FROM docker.io\/klakegg\/hugo://g' | sed 's/ AS builder//g')
docker run --rm --interactive -v $(pwd):/src docker.io/klakegg/hugo:${HUGO_VERSION}-ci /bin/bash -c "set -euo pipefail;npm install; npm run mdlint;"

Github Actions

Build

The build action is fired on Pull Requests does the following

  • builds all PR Versions (Linting and Docker build)
  • deploys the built container images to the container registry
  • Deploys a PR environment in a k8s test namespace with helm
  • Triggers a redeployment
  • Comments in the PR where the PR Environments can be found

PR Cleanup

The pr-cleanup action is fired when Pull Requests are closed and does the following

  • Uninstalls PR Helm Release

Push Main

The push main action is fired when a commit is pushed to the main branch (eg. a PR is merged) and does the following, it's very similar to the Build Action

  • builds main Versions (Linting and Docker build)
  • deploys the built container images to the container registry
  • Deploys the main Version on k8s using helm
  • Triggers a redeployment

Helm

Manually deploy the training Release using the following command:

helm install --repo https://acend.github.io/helm-charts/  <release> acend-training-chart --values helm-chart/values.yaml -n <namespace>

For debugging purposes use the --dry-run parameter

helm install --dry-run --repo https://acend.github.io/helm-charts/  <release> acend-training-chart --values helm-chart/values.yaml -n <namespace>

Contributions

If you find errors, bugs or missing information please help us improve and have a look at the Contribution Guide.

amm-techlab's People

Contributors

abrpuzzle avatar bliemli avatar buehlmann avatar carlbalmer avatar chrira avatar dependabot[bot] avatar elatella avatar fmacheleidt avatar hellerbarde avatar ioboi avatar lukaskoller avatar madchr1st avatar philipschmid avatar pmusy avatar renovate-bot avatar renovate[bot] avatar schlapzz avatar splattner avatar sylivankenobi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amm-techlab's Issues

Action deprecation

"Surgo/docker-smart-tag-action" is not maintained any more:

build-ide
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: Surgo/docker-smart-tag-action@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

build-ide
The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Show code changes in application - 3.2.4:Change your application to event driven

In Task 3.2.4 we only change the images (something the student has already done)
We do not see what has changed in the application - it just magically works.

I think we should show or explain what has changed in the application code.
Maybe we can even let the student make the changes (even if we don't let him build the application)

Webshells do not come up on OCP4.11

On OpenShift 4.11, webshells end up CrashLooping with the following logs:

fixuid: fixuid is not running as root, ensure that the following criteria are met:
- fixuid binary is owned by root: 'chown root:root /path/to/fixuid'
- fixuid binary has the setuid bit: 'chmod u+s /path/to/fixuid'
- NoNewPrivileges is disabled in container security profile
- volume containing fixuid binary does not have the 'nosuid' mount option

Add oc login guide to lab 1

Before a new project can be created at start of lab 2 the oc login command needs to be executed.
This could be added to lab 1 with information on where to find the token.

fix pdf generation

  • pdf page only contains of first chapter
  • no replacing of custom params
  • enable expert mode to show code

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Fallback to renovate.json file as a preset is deprecated, please use a default.json file instead.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update actions/checkout digest to 692973e
  • Update dependency markdownlint-cli to v0.41.0
  • Update docker.io/nginxinc/nginx-unprivileged Docker tag to v1.27
  • Update registry.access.redhat.com/ubi8/go-toolset Docker tag to v1.21.9-3.1718100004
  • Update registry.access.redhat.com/ubi8/ubi Docker tag to v8.10-901.1717584420
  • Update docker.io/ubuntu Docker tag to v24
  • Update docker/build-push-action action to v6
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
content/en/docs/03.0/additional/kafka-local/docker-compose.yml
  • strimzi/kafka 0.14.0-kafka-2.2.0
  • strimzi/kafka 0.14.0-kafka-2.2.0
dockerfile
Dockerfile
  • docker.io/klakegg/hugo 0.111.3-ext-ubuntu
  • docker.io/ubuntu jammy
  • docker.io/nginxinc/nginx-unprivileged 1.26-alpine
content/en/docs/additional/demo/Dockerfile
  • registry.access.redhat.com/ubi8/go-toolset 1.20.12-5.1713833129
  • registry.access.redhat.com/ubi8/ubi 8.9-1160
infra/user-ide/Dockerfile
  • codercom/code-server 4.18.0
manifests/additional/binary/Dockerfile
github-actions
.github/workflows/build-ide.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • docker/setup-buildx-action v3
  • Surgo/docker-smart-tag-action v1
  • docker/login-action v3
  • docker/build-push-action v5
  • actions/upload-artifact v4
.github/workflows/build.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/setup-node v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/build-push-action v5
  • actions/upload-artifact v4
  • azure/setup-helm v4
  • azure/setup-kubectl v4
  • marocchino/sticky-pull-request-comment v2
.github/workflows/pr-cleanup.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • azure/setup-helm v4
  • azure/setup-kubectl v4
.github/workflows/push-main.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/setup-node v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/build-push-action v5
  • actions/upload-artifact v4
  • azure/setup-helm v4
  • azure/setup-kubectl v4
.github/workflows/secret-scan.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
gomod
go.mod
  • go 1.19
  • github.com/acend/docsy-acend v1.0.0
  • github.com/acend/docsy-plus v0.0.0-20220428195954-da462686a1f4@da462686a1f4
  • github.com/google/docsy v0.4.0
  • github.com/google/docsy/dependencies v0.4.0
  • github.com/puzzle/docsy-puzzle v0.0.0-20230123144731-757054047a02@757054047a02
helm-values
helm-chart/values.yaml
npm
package.json
  • husky 9.0.11
  • markdownlint-cli 0.39.0

  • Check this box to trigger a request for Renovate to run again on this repository

Tekton TaskRun als Yaml

Pipeline Trigger nicht über tkn, sondern mit Yaml und oc apply.
Ansonsten haben wir Probleme mit ArgoCD.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.