During this demo, the following features will be shown:
-
Create and publish an OSTree repository using a GitOps approach
-
Edge Device installation ISO generation:
- Injecting kickstart in a base ISO (standard RHEL ISO)
- Using Image Builder to create a Simplified installer
-
Device Onboarding customization using the following different methods:
- Kickstart
- Custom RPMs
- AAP post-automation
- Ignition files
- FDO process
-
Application deployment using:
- Podman
- Using shell scripting
- Using Quadlet descriptors (GitOps)
- Microshift
- Using Manifest (GitOps)
- Using Helm
- Custom RPM
- Podman
-
Edge Device Upgrade
-
Edge Device Self-Healing
- Auto rollbacks in Operating System Upgrades
- Edge Device configuration enforcing (GitOps)
- Podman auto-update rollback
-
Virtual Machine management
-
Extras:
- Serverless rootless container applications with just Podman
This is the summary of the demo steps:
-
Section 1 - Creating RHEL Images the GitOps way
- Open Gitea and review the
device-edge-images
repository files - Open Gitea webhook settings
- Open "Jobs" page in AAP and keep it visible
- Push
rhde/prod/rhde_image/prod-image-definition.yml
andrhde/prod/rhde_image/prod-kickstart.ks
files - Show the "New Edge Device Image" Workflow at the AAP
- Open the Image Builder Cockpit Web console and check that the image is being created
- Describe the
rhde/prod/rhde_image/prod-image-definition.yml
andrhde/prod/rhde_image/prod-kickstart.ks
that you used to create the image - Go to the "New Edge Device Image" workflow in AAP and Approve the Image Publishing
- Open the ostree-repo contents published, including
kickstarts
and therepos
directories inhttp://<edge-management-server-ip>/<user>/prod/
.
- Open Gitea and review the
-
Section 2 - Automated device onboarding
- Open the "Jobs" page in the AAP and keep it visible while performing the following steps.
- Push a file with your pull-secret in Gitea under
rhde/prod/rhde_config/os/etc/crio/openshift-pull-secret
- Create the boot ISO using the AAP Job
Create ISO Kickstart
- Boot the edge server from ISO
- Wait until the server bootsand review the Workflow Jobs in AAP
- SSH into the edge device and explain how AAP auto-registration is done
-
Section 3 - Consistent edge device configuration at scale
-
Configuration consistency across all devices
- Show that sudo is not asking for a password by running
sudo cat /etc/hosts
on the edge device - Open "Jobs" page in AAP and keep it visible while performing the next step
- Change the
rhde/prod/rhde_config/os/etc/sudoers
file in Gitea to force sudo to ask for a password - Review Jobs running in AAP
- Check that
/etc/sudoers
in the edge device has the desired configuration - Show how now
sudo cat /etc/hosts
command ask for a password
- Show that sudo is not asking for a password by running
-
(Optional) Preventing manual configuration overwrite
- Open an SSH Terminal in the edge device as root user and keep the "Jobs" page in AAP visible while performing the next step
- Overwrite manually the
/etc/sudoers
file and remove password authentication again - Show how the "Configure Edge Device" Workflow Job is being launched automatically in AAP
- Run
cat /etc/sudoers
in the edge device to check that you have the "right" configuration back - Show the Python script that monitors file changes in
/etc/
withcat /usr/local/bin/watch_etc.py
-
-
Section 4 - Edge computing APPs lifecycle management
-
APPs with Podman and Systemd
-
Deploying an APP in Podman in a declarative way
- Show
rhde/prod/rhde_config/apps/podman/quadlet
folder in Gitea - Run the "Create Quadlet APP" Template in AAP
- Run
podman ps
on the device - Show the APP by visiting
http:<edge device IP>:<configured port>
- Change something in the
rhde/prod/rhde_config/apps/podman/quadlet/
app and see the change
- Show
-
(Optional) Podman "self-managing" features with Podman container image auto-update
- Open
http:<edge device ip>:8081
in your laptop - Show the image load problem in the APP
- Show the binding betwen
prod
andv1
tags in Quay.io for the 2048 continer image - Show the issue introduced in container image
v2
- Run the
watch 'podman auto-update --dry-run; echo ""; podman ps'
- Move the
prod
container image tag tov2
in Quay.io - Show how the new image is detected and deployed but how Podman rollback to the previous version due to the issue
- Move the
prod
container image tag tov3
where the image locad problem is solved and show the fixed app in your Browser
- Open
-
(Optional) Example of Podman additional capabilities for edge: Serverless APP with just Podman and Systemd
- Run
podman ps
on the edge device - Run
watch podman ps
on the edge device - Visit
http://<edge device IP>:8080
from your laptop - Show what happened in the
watch podman ps
terminal - Wait 90 seconds and show how the Container is stopped automatically
- Run
-
-
APPs with Microshift
-
Deploy an APP on Microsift from Manifest files on Gitea
- Show manifests located in
rhde/prod/rhde_config/apps/microshift/manifest
in Gitea. - Run
watch "oc --kubeconfig /var/lib/microshift/resources/kubeadmin/kubeconfig get pod --all-namespace"
as root - Launch the "Microshift APP Deploy - Manifest" Template in AAP
- Open
http://frontend-game2048.apps.<edge device ip>.nip.io
in your laptop - Open "Jobs" in AAP and keep it visible along with the
watch
on the CLI - Change image version to
v3
inrhde/prod/rhde_config/apps/microshift/manifest/2-deployment.yml
- Check the
watch
command and wait until the new POD is running - Open
http://frontend-game2048.apps.<edge device ip>.nip.io
in your laptop and show the 2048 app with the image loaded
- Show manifests located in
-
Deploy an APP on Microsift with external Helm repo and vars file on Gitea
- Open "Jobs" in AAP and
watch "oc --kubeconfig /var/lib/microshift/resources/kubeadmin/kubeconfig get pod --all-namespace"
- Show
rhde/prod/rhde_config/apps/microshift/helm/wordpress_vars.yml
in Gitea - Run the "Microshift APP Deploy - Helm" Template manually in the AAP
- Visit
http://wordpress-wordpress.apps.<edge device ip>.nip.io
in your laptop when the PODs are running - Open
rhde/prod/rhde_config/apps/microshift/helm/wordpress_vars.yml
and change thereplicaCount
number - Wait and see how that number of replicas is deployed on Microshift
- Open "Jobs" in AAP and
-
-
-
Section 5 - Bulletproof system upgrades
- Check that there are no pending upgrades with
watch "rpm-ostree upgrade --preview"
- Modify the
builder_compose_pkgs
in the image definition by removingpython-inotify
and addingzsh
- Show the Image Creation Workflow in AAP
- Explain Greenboot meanwhile the image is created and show the
01-check-packages.sh
script - Publish the new image in AAP
- Check the upgrade availability with
rpm-ostree upgrade --preview
in the edge system - Perform the upgrade by either running
rpm-ostree upgrade
and rebooting using the CLI or by launching the " OSTree Upgrade" Job Template in AAP - Watch the system console while the edge device tries to boot the new system image (and how to finally it fallbacks to the previous image)
- Show the "Upgrade Failed" message in Slack
- SSH to the edge device and review Greenboot and Journal messages
- Show with
rpm-ostree upgrade --check
that we still have pending the upgrade - Create and publish the new Image by modifying the Image description in Gitea adding again the
python-inotify
package. - Perform again the upgrade and check that this time the system is able to complete it.
- Check that there are no pending upgrades with
-
Section 6 - Secure Onboarding with FDO
- Open Gitea and explain the files in
rhde_image/test
directory - Modify something in the
test-image-definition.yml
to trigger the build of a new image - Show the Workflow in AAP
- Download the ISO from
http://<edge manager ip>/<user>/
and show thetest-ignition.ign
file - Prepare your Hardware or create the VM (with UEFI boot and a TPM module included)
- Open an SSH session in the Edge Management server and run
sudo watch /etc/fdo/stores
- Boot from the ISO. While waiting explain FDO automations with the
/etc/fdo/serviceinfo-api-server.conf.d/serviceinfo-api-server.yml
file - SSH the edge device and show that both the Ignition and FDO customizations took place. Show
journalctl -u fdo-client-linuxapp
- Show and explain how the FDO Vouchers where used during the onboarding (in this demo with auto-approval)
- Open Gitea and explain the files in
-
Section 7 - Custom offline onboarding
-
Prepare the automation scripts
- (optional) Generate the Encryption Pass and Keys by launching the
Generate Encryption Pass and Keys
Job in AAP - Create the Encrypted TAR file with the automations by runnign the
Create Offline Automation Files
Job in AAP
- (optional) Generate the Encryption Pass and Keys by launching the
-
Create the custom RPMs
- Go to where you have your local clone of the
rhde
repository, copy the generated files (rhde_encrypted.tar
->onboarding-kiosk
) (rhde_automation_encryption_key
andrhde-automation-pub.pem
->usb-automation
) and push the changes - Create the RPMs launching the
Create Custom RPMs
Job in AAP
- Go to where you have your local clone of the
-
Create the Offline Image
- Open the image definition in Gitea in
rhde/dev/rhde_image/dev-image-definition.yml
and add the custom RPMs that you created (if they are not already there) - Show in the image definition the container images that will be embeded. If you want run the
Get list of Microshift offline images
Job in AAP to get the latest ones - Generate the RHDE image by changing something in
rhde/dev/rhde_image/dev-image-definition.yml
(ie. addingtcpdump
package)
- Open the image definition in Gitea in
-
Download the ISO
- Inject the Kickstart in the generated ISO by running the
Create ISO Kickstart
Job in AAP. You need to customize the variables before running it. - Download the ISO from
http://<edge manager ip>/<username>/dev/iso/<username>-dev-rhel.iso
- Inject the Kickstart in the generated ISO by running the
-
Deploy and trigger the onboarding
- Prepare two devices/VMs and boot from ISO
-
USE CASE 1 - Manual token entry using keyboard (in device 1)
- Try to access the APP
http://web-secret-http.apps.<ip>.nip.io
and SSH to the device and show Microshift Pods withoc --kubeconfig /var/lib/microshift/resources/kubeadmin/kubeconfig get pod --all-namespaces
- Access the device/VM console
- Introduce the Encryption pass that you find in Gitea (
rhde/dev/rhde_config/scripts/offline-automation/output/rhde_automation_encryption_key
) - When the Kiosk mode disappears, refresh
http://web-secret-http.apps.<ip>.nip.io
, you should see now the secrets.
- Try to access the APP
-
USE CASE 2 - USB Key automation (in device 2)
- Try to access the APP
http://web-secret-http.apps.<ip>.nip.io
and SSH to the device and show Microshift Pods withoc --kubeconfig /var/lib/microshift/resources/kubeadmin/kubeconfig get pod --all-namespaces
- Copy the
rhde/dev/rhde_config/scripts/offline-automation/output/rhde_encrypted.tar
in an USB key - When Microshift is up, connect the USB Key to the device and wait few seconds
- When the Kiosk mode disappears, refresh
http://web-secret-http.apps.<ip>.nip.io
, you should see now the secrets.
- Try to access the APP
-
BONUS - Automated offline upgrade
- Create a new image
- Download the certificates and pass from Gitea (
rhde/dev/rhde_config/scripts/offline-automation/output
) - Create an
input
andoutput
directories - Create the script that will generate the ecnrypted TAR file in the
output
directory with the contents that you put in theinput
directory - Prepare the contents and copy them into a
input
directory - Run the script
- Copy the
rhde_encrypted.tar
file to the USB key (top directory) - SSH into the device and see the running image with the
sudo rpm-ostree status
command. Open the USB log withtail -f /var/log/usb_check.log
- Plug in the USB key and wait until the device reboots
- Check again the device images with
sudo rpm-ostree status
-
-
Section 8 - Bulletproof system upgrades
- Go to Gitea and show files under
rhde/prod/rhde_config/virt
- Tag in the "Edge Devices" inventory one of the host by changing the variable
kvm_type
to the VM bundle name - Run the deployment of any VM bundle by running the "Deploy service in VM" Job selecting the bundle in the Survey
- When the Workflow is finish, go to the device Cockpit (port
9090
) and check that the VMs and associated resources where created - Show how you can also manage the VMs lifecycle from the AAP by stopping all VMs associated to a VM bundle running the "KVM - Stop all bundle VMs" Job
- Go to Gitea and show files under