Skupper workshop: Patient Portal on Kubernetes
Table of contents
- Description
- Solution architecture
- Service topology
- Workshop outline
- Links
- Prerequisites
- Step by step
- 1. Sign in to Red Hat Developer
- 2. Create an OpenShift Sandbox cluster
- 4. Access the OpenShift cluster
- 5. In the Red Hat OpenShift Sandbox project, open your project
- 6. Create a virtual machine with OpenShift Virtualization
- 7. Install packages on the virtual machine
- 8. Deploy the database with Podman
- 9. Deploy the application frontend and backend
- 10. Configure Service Interconnect (Skupper) so the Podman database can talk to the OpenShift application
- 13. Access the application and confirm communication works
- 14. Closing notes
- Summary
Description
This workshop introduces Red Hat Service Interconnect, an application integration solution that lets different systems communicate efficiently and securely.
Solution architecture
Service topology
Workshop outline
- Sign in to Red Hat Developer.
- Create an OpenShift cluster.
- Access the OpenShift cluster.
- In the Red Hat OpenShift Sandbox project, open your project.
- Create a virtual machine with OpenShift Virtualization.
- Install packages on the virtual machine:
- podman
- kubernetes-client
- skupper
- oc
- wget
- Deploy the database with Podman.
- Deploy the application frontend and backend.
- Configure Service Interconnect (Skupper) so the database running under Podman can talk to the app on OpenShift.
- Access the application and confirm communication works.
- Closing notes.
Links
| Resource | Link |
|---|---|
| [1] Red Hat Developer | https://developers.redhat.com/ |
| [2] OC | https://docs.openshift.com/container-platform/4.15/cli_reference/openshift_cli/getting-started-cli.html |
| [3] Skupper | https://skupper.io/ |
Prerequisites
- A Red Hat Developer account
- Basic Kubernetes knowledge
- Basic Red Hat OpenShift knowledge
- Basic Podman knowledge
- Google Chrome preferred—it lets you paste commands into the VM console over browser VNC.
Step by step
1. Sign in to Red Hat Developer
Go to Red Hat Developer and sign in with your account.
2. Create an OpenShift Sandbox cluster
2.1. Open the Red Hat OpenShift Sandbox and click “Start Cluster”.
2.2. Start the OpenShift Sandbox cluster.
4. Access the OpenShift cluster
Open the OpenShift Sandbox cluster and click “Open Console”.
5. In the Red Hat OpenShift Sandbox project, open your project
Click your project and switch to the “Administrator” view.
6. Create a virtual machine with OpenShift Virtualization
- Open Virtualization in the OpenShift cluster menu and click Virtual Machines.
- Click Create Virtual Machine.
- Choose From Template and select the Fedora VM template.
- Click Create VirtualMachine.
7. Install packages on the virtual machine
- Open the virtual machine and click Console. (Prefer Google Chrome—it supports pasting commands into the VM console over browser VNC.)
- Sign in with the credentials shown in the console.
- Run the commands below to install the required packages:
sudo dnf install -y podman kubernetes-client wget
# Instalar o oc
wget -qO- https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz | tar xz -C ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
# Instalar o skupper
curl https://skupper.io/install.sh | sh
8. Deploy the database with Podman
Run the command below to deploy the database:
podman network create skupper
podman run --name database-target --network skupper --detach --rm -p 5432:5432 quay.io/skupper/patient-portal-database
9. Deploy the application frontend and backend
In your OpenShift console, deploy the following YAML for the frontend:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: frontend
name: frontend
spec:
replicas: 3
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: quay.io/skupper/patient-portal-frontend
env:
- name: DATABASE_SERVICE_HOST
value: database
- name: DATABASE_SERVICE_PORT
value: "5432"
- name: PAYMENT_PROCESSOR_SERVICE_HOST
value: payment-processor
- name: PAYMENT_PROCESSOR_SERVICE_PORT
value: "8080"
ports:
- containerPort: 8080
In your OpenShift console, deploy the following YAML for the backend:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: payment-processor
name: payment-processor
spec:
replicas: 3
selector:
matchLabels:
app: payment-processor
template:
metadata:
labels:
app: payment-processor
spec:
containers:
- name: payment-processor
image: quay.io/skupper/patient-portal-payment-processor
ports:
- containerPort: 8080
10. Configure Service Interconnect (Skupper) so the Podman database can talk to the OpenShift application
We’ll split this into three stages:
- Kubernetes cluster setup
- Podman site setup
- Expose the database service onto the Skupper VAN
Kubernetes cluster setup:
- Start Skupper on the OpenShift cluster with the console enabled
skupper init --enable-console --enable-flow-collector --console-user admin --console-password admin
- Open the Skupper console—check your OpenShift routes for the URL.
- Create a token to connect the Podman site to the OpenShift cluster
skupper token create ./skupper-token.yaml
Podman site setup:
- On the virtual machine, run the commands below to connect the Podman site to the OpenShift cluster
- Start Skupper on the Podman site, without ingress.
skupper switch podman # para mudar o contexto para podman o padrão é kubernetes
- Connect the Podman site to the OpenShift cluster
skupper link create ./skupper-token.yaml
Open the Skupper console on the OpenShift cluster and confirm the Podman site is connected.
Expose the database service onto the Skupper VAN:
- Expose the database service onto the Skupper VAN
systemctl --user enable --now podman.socket
skupper service create database 5432
skupper service bind database host database-target --target-port 5432
- On the OpenShift cluster, create a Skupper service for the database. That service points at the database running on the Podman site, through the Skupper VAN.
skupper service create database 5432
Now the frontend and backend talk to the database running on a Podman site through the Skupper VAN.
13. Access the application and confirm communication works
Expose the frontend on the OpenShift cluster with a few more steps.
Create a Service for the frontend that points at its Deployment using this YAML:
apiVersion: v1
kind: Service
metadata:
name: frontend
namespace: SEU-NAME-SPACE
spec:
selector:
app: frontend
ports:
- protocol: TCP
port: 8080
targetPort: 8080
Create a Route that points at the frontend Service.
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: frontend
namespace: SEU-NAME-SPACE
labels: {}
spec:
to:
kind: Service
name: frontend
tls: {}
port:
targetPort: 8080
alternateBackends: []
14. Closing notes
Red Hat Service Interconnect (Skupper):
Gives you a solid way to integrate applications across environments. It simplifies service-to-service communication and adds flexibility and scale. By abstracting the underlying network, Skupper lets developers focus on business logic instead of connectivity details.
With features such as automatic service discovery:
Intelligent routing and built-in security help applications talk efficiently and securely, wherever they run. That approach eases infrastructure management, cuts down on manual wiring, and speeds development and deployment of distributed apps.
Skupper also ships an intuitive UI and strong CLI tools for configuring and monitoring service communication. With an extensible architecture and support for multiple protocols, it fits integration scenarios of many sizes.
Summary
In this workshop you used Red Hat Service Interconnect (Skupper) to connect a database to a Kubernetes cluster so distributed applications can communicate efficiently and securely. Skupper simplifies service integration in heterogeneous environments and makes modern application development and deployment easier. Hope the workshop was useful—and that you can take these ideas into your own projects. Thanks for joining!







