# Pentaho Containers

{% hint style="info" %}

#### Pentaho Containers

Pentaho Server offers flexible deployment options to suit a range of infrastructure strategies. For **on-premises** environments, organizations can deploy using Docker Compose for straightforward single-host setups, or orchestrate across clusters using Kubernetes (K8s & K3s) for greater scalability and resilience.&#x20;

For **cloud (hyperscaler)** deployments, Pentaho provides optimized, prebuilt Docker images purpose-built for Amazon Web Services (EKS/ECR), Microsoft Azure (AKS), and Google Cloud Platform (GKE), allowing teams to leverage managed Kubernetes services and cloud-native storage like Amazon S3. As of Pentaho 11, these images feature standardized installation paths, environment variables, and enhanced entrypoint scripts that support runtime configuration overrides - meaning licenses and configuration files can be injected at startup without rebuilding the image.&#x20;

A **hybrid** approach is also fully supported, where organizations might run the Pentaho Server on-premises for sensitive workloads while deploying Carte server containers or PDI worker nodes in the cloud to handle burst processing, blending the control of local infrastructure with the elasticity of cloud resources.
{% endhint %}

{% hint style="danger" %}
The following steps are intended for setting up a Pentaho Lab environment and need to be completed in order to complete the Workshops.

Ensure you have downloaded the Workshop--Installation:

```bash
cd
git clone https://github.com/jporeilly/Workshop--Installation
```

To install git:

```bash
sudo apt install git
```

{% endhint %}

Select your container host:

{% tabs %}
{% tab title="Docker" %}
{% hint style="info" %}

#### Docker

Docker is a platform that enables developers to package applications and their dependencies into lightweight, portable containers. Containers ensure that applications run consistently across different computing environments, from development laptops to production servers. This workshop will guide you through the complete process of installing Docker Engine on Ubuntu 24.04 LTS (Noble Numbat).
{% endhint %}

1. Before installing Docker, update your existing package list.

```bash
sudo apt update && sudo apt upgrade
```

2. Install packages that allow apt to use repositories over HTTPS.

```bash
sudo apt install -y ca-certificates curl gnupg lsb-release
```

3. Create a directory for keyrings and add Docker's GPG key.

```bash
sudo install -m 0755 -d /etc/apt/keyrings
```

```bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
```

```bash
sudo chmod a+r /etc/apt/keyrings/docker.gpg
```

4. Add the Docker repository to your apt sources.

```bash
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```

5. Now that the Docker repository is added, update the package index.

```bash
sudo apt update && sudo apt upgrade
```

6. Install Docker Engine, containerd, and Docker Compose.

```bash
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

7. Check that Docker is installed correctly by checking the version.

```bash
docker --version
```

You should see output similar to (Nov 2025):

```
Docker version 29.0.2, build 810xxxx
```

8. Verify that Docker Engine is running.

```bash
sudo systemctl status docker
```

The service should show as "active (running)".

9. Quit.

```bash
q
```

10. Test your Docker installation by running the hello-world container.

```bash
sudo docker run hello-world
```

{% hint style="info" %}
This command downloads a test image and runs it in a container. If successful, you'll see a message confirming that Docker is working correctly.
{% endhint %}

***

{% hint style="info" %}

#### Without Sudo

By default, Docker requires sudo privileges. To run Docker commands without sudo.
{% endhint %}

1. Add your user to the docker group.

```bash
sudo usermod -aG docker $USER
```

2. Apply the new group membership (or log out and back in).

```bash
newgrp docker
```

3. Verify you can run Docker without sudo.

```bash
docker run hello-world
```

4. Ensure Docker starts automatically when the system boots.

```bash
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
```

***

{% hint style="info" %}

#### Verification & Testing

To confirm everything is working properly, run the following commands:
{% endhint %}

Check Docker version:

```bash
docker version
```

View Docker system information:

```bash
docker info
```

List running containers:

```bash
docker ps
```

List all containers (including stopped ones):

```bash
docker ps -a
```

List downloaded images:

```bash
docker images
```

***

{% hint style="info" %}

#### Common Commands

Here are essential Docker commands you'll use regularly:

* `docker pull <image>` - Download an image from Docker Hub
* `docker images` - List all local images
* `docker run <image>` - Create and start a container from an image
* `docker ps` - List running containers
* `docker ps -a` - List all containers
* `docker stop <container>` - Stop a running container
* `docker rm <container>` - Remove a stopped container
* `docker rmi <image>` - Remove an image
* `docker logs <container>` - View container logs
* `docker exec -it <container> bash` - Access a running container's shell
  {% endhint %}
  {% endtab %}

{% tab title="K3s" %}
{% hint style="info" %}

#### K3s

K3s is a lightweight, fully compliant Kubernetes distribution designed for resource-constrained and edge computing environments. It's packaged as a single binary or minimal container image, making it significantly easier to deploy and manage than standard Kubernetes. The distribution uses SQLite3 as its default lightweight datastore, though it also supports etcd3, MySQL, and Postgres for users needing more robust options.

The platform simplifies Kubernetes operations by wrapping all control plane components into a single binary and process. This unified approach automates complex tasks like certificate distribution and TLS configuration, while maintaining security by default with sensible settings for lightweight environments. K3s has minimal external dependencies, requiring only a modern Linux kernel and cgroup mounts to run.

K3s comes "batteries-included" with essential components pre-packaged, eliminating the need for separate installation and configuration. This includes containerd for container runtime, Flannel for networking, CoreDNS for service discovery, Traefik for ingress, and several other critical controllers for load balancing, network policies, storage, and image management. This comprehensive bundle makes K3s ideal for quick cluster creation in edge locations, IoT deployments, CI/CD pipelines, and development environments.
{% endhint %}

{% embed url="<https://docs.k3s.io/>" %}

1. Before installing Docker, update your existing package list.

```bash
sudo apt update && sudo apt upgrade
```

2. Install packages that allow apt to use repositories over HTTPS.

```bash
sudo apt install -y ca-certificates curl gnupg lsb-release
```

3. Disable swap (recommended for Kubernetes).

```bash
# Disable swap immediately
sudo swapoff -a

# Disable swap permanently
sudo sed -i '/ swap / s/^/#/' /etc/fstab

# Verify swap is disabled
free -h | grep Swap
```

4. Enable IP Forwarding.

```bash
sudo tee /etc/sysctl.d/k3s.conf <<EOF 
net.ipv4.ip_forward = 1 
net.bridge.bridge-nf-call-iptables = 1 
net.bridge.bridge-nf-call-ip6tables = 1 
EOF 
sudo sysctl --system
```

5. Configure Firewall.

```bash
# Check if UFW is active
sudo ufw status

# If UFW is active, allow required ports
sudo ufw allow 6443/tcp    # Kubernetes API
sudo ufw allow 8472/udp    # Flannel VXLAN
sudo ufw allow 10250/tcp   # Kubelet
sudo ufw allow 80/tcp      # HTTP
sudo ufw allow 443/tcp     # HTTPS
```

***

Select your deployment options:

{% hint style="info" %}

{% endhint %}

{% tabs %}
{% tab title="Single-Node" %}
{% hint style="info" %}

#### **Single-Node Installation**

{% endhint %}

1. Check System requirements.

```bash
# Check system requirements
echo "=== System Information ==="
echo "OS: $(lsb_release -d | cut -f2)"
echo "Kernel: $(uname -r)"
echo "CPU Cores: $(nproc)"
echo "Total RAM: $(free -h | awk '/^Mem:/ {print $2}')"
echo "Available Disk: $(df -h / | awk 'NR==2 {print $4}')"
```

2. Install K3s.

```bash
# Install K3s server (includes agent)
curl -sfL https://get.k3s.io | sh -
```

{% hint style="info" %}
This command:

\- Downloads and installs K3s

\- Starts the K3s service

\- Installs kubectl

\- Configures kubeconfig

```
What gets installed:
- K3s server (control plane + worker)
- Containerd (container runtime)
- Flannel (CNI network plugin)
- CoreDNS (cluster DNS)
- Traefik (ingress controller)
- Local-path provisioner (storage)
- Metrics server
```

{% endhint %}

2. Configure kubectl access.

```bash
# Create kube config directory
mkdir -p ~/.kube

# Copy K3s config to standard location
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config

# Fix permissions
sudo chown $(id -u):$(id -g) ~/.kube/config
chmod 600 ~/.kube/config

# Set KUBECONFIG environment variable
echo 'export KUBECONFIG=~/.kube/config' >> ~/.bashrc
source ~/.bashrc

# Test kubectl access
kubectl version --short
```

4\. Verify Installation

```bash
# Check node status
kubectl get nodes

# Expected output:
# NAME         STATUS   ROLES                  AGE   VERSION
NAME      STATUS   ROLES           AGE     VERSION
pentaho   Ready    control-plane   5d20h   v1.34.3+k3s1

# Check system pods
kubectl get pods -A
```

<figure><img src="https://4179059538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5WjeDOi3MsT9tY3oU6mQ%2Fuploads%2FYhZj3NpxUvk2kMjvKZ0x%2Fimage.png?alt=media&#x26;token=a6392e51-c65f-4f5c-acee-2b38bf3bee78" alt=""><figcaption><p>Verify K3s</p></figcaption></figure>

5. Verify the K3s installation.

```sh
cd
cd ~/Pentaho-K3s-PostgreSQL
./verify-k3s.sh
```

{% endtab %}

{% tab title="Multi-Node" %}
{% hint style="info" %}

#### Multi-Node Cluster

{% endhint %}

#### Server Node (Control Plane)

```bash
# Install K3s server
curl -sfL https://get.k3s.io | sh -

# Get the node token (needed for agents)
sudo cat /var/lib/rancher/k3s/server/node-token
```

#### Agent Nodes (Workers)

On each worker node:

```bash
# Set variables
K3S_URL="https://<server-ip>:6443"
K3S_TOKEN="<node-token-from-server>"

# Install K3s agent
curl -sfL https://get.k3s.io | K3S_URL=$K3S_URL K3S_TOKEN=$K3S_TOKEN sh -
```

#### Verify Multi-Node Cluster

On the server node:

```bash
kubectl get nodes

# Expected output:
# NAME         STATUS   ROLES                  AGE   VERSION
# server-01    Ready    control-plane,master   5m    v1.29.0+k3s1
# worker-01    Ready    <none>                 2m    v1.29.0+k3s1
# worker-02    Ready    <none>                 1m    v1.29.0+k3s1
```

{% endtab %}

{% tab title="Kubectl Aliases" %}

1. Add helpful aliases.

```bash
# Add helpful aliases
cat >> ~/.bashrc << 'EOF'

# Kubernetes aliases
alias k='kubectl'
alias kgp='kubectl get pods'
alias kgs='kubectl get svc'
alias kgn='kubectl get nodes'
alias kga='kubectl get all'
alias kd='kubectl describe'
alias kl='kubectl logs'
alias kaf='kubectl apply -f'
alias kdf='kubectl delete -f'

# Enable kubectl autocompletion
source <(kubectl completion bash)
complete -F __start_kubectl k
EOF

source ~/.bashrc
```

{% endtab %}

{% tab title="Post-Installation" %}
{% hint style="info" %}

### Post-Installation Configuration

{% endhint %}

1. Verify Default Storage Class

```bash
# Verify storage class
kubectl get storageclass
```

```
# Expected output:
NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  5d21h
```

2. Configure Traefik Ingress

```bash
kubectl get pods -n kube-system -l app.kubernetes.io/name=traefik
```

3. Install Helm (Optional but Recommended)

```bash
# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Verify
helm version
```

4\. Install k9s (Optional - Terminal UI)

```bash
# Install k9s for easier cluster management
curl -sS https://webinstall.dev/k9s | bash

# Run k9s
k9s
```

<figure><img src="https://4179059538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5WjeDOi3MsT9tY3oU6mQ%2Fuploads%2FULtnDplq4U3aX3pXeJrm%2Fimage.png?alt=media&#x26;token=406e414e-daa4-4086-9bc0-3fba1680a49e" alt=""><figcaption><p>K9s</p></figcaption></figure>

5\. Verify K3s Installation.

```bash
cd
cd ~/Pentaho-K3s-PostgreSQL

# Make script executable
chmod +x scripts/verify-k3s.sh

# Run verification
./scripts/verify-k3s.sh
```

<figure><img src="https://4179059538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5WjeDOi3MsT9tY3oU6mQ%2Fuploads%2FIge7uTujHyuX8SAY0NiC%2Fimage.png?alt=media&#x26;token=f40d6b85-f9f2-40df-a578-9288c8f4d89c" alt=""><figcaption><p>Verify K3s</p></figcaption></figure>
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="Helm" %}
{% hint style="info" %}

#### Helm Charts

Helm is the package manager for Kubernetes, often referred to as "apt/yum for Kubernetes." It simplifies the deployment and management of Kubernetes applications by:

**Packaging**: Bundling related Kubernetes resources together

**Templating**: Parameterizing manifests for reusability across environments

**Versioning**: Managing application versions and upgrades

**Release Management**: Tracking deployments and enabling rollbacks
{% endhint %}

1. Execute the following install script.

```bash
cd
cd ~/Pentaho-K3s-PostgreSQL/helm-chart
./install-helm.sh
```

<figure><img src="https://4179059538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5WjeDOi3MsT9tY3oU6mQ%2Fuploads%2F5ImRwrXKw8xYjm0T5iGh%2Fimage.png?alt=media&#x26;token=113d002f-3b0d-4926-8384-eeeb8eb8164a" alt=""><figcaption><p>Install Helm</p></figcaption></figure>

or

1. Add the Helm GPG key.

```bash
# Add the Helm GPG key
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null# Install apt-transport-https package
```

2. Install dependencies

```bash
# Install apt-transport-https Package:
sudo apt-get install apt-transport-https --yes
```

3. Add Helm repository.

```bash
# Add the Helm repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list

```

4. Update the package list and install.

```sh
# Update package list:
sudo apt-get update

# install Helm:
sudo apt-get install helm
```

5. Verify installation.

```sh
# Verify Helm Installation:
helm version --client
```

***

**Helm Commands**

```bash
# Checks your Helm chart for issues before deploying.
helm lint

# Renders your Helm chart templates locally and displays the output, useful for debugging.
helm template

# Simulates installing the chart without actually deploying it, allowing you to verify changes.
helm install my-chart . --dry-run

# Provides a list of all available Helm commands and options.
helm --help

# Updates an existing release with a new version of the chart, essential for maintaining and upgrading applications.
helm --help

# Lists all Helm releases in the current namespace, useful for tracking deployed applications.
helm list

# Retrieves the values used for a specific release, allowing you to review or modify configuration settings.
helm get values RELEASE_NAME

# Deletes a Helm release from the cluster, removing the associated Kubernetes resources.
helm delete RELEASE_NAME

# Rolls back a release to a previous version, useful for reverting to a stable state if an update causes issues.
helm rollback RELEASE_NAME REVISION

# Adds a Helm chart repository, enabling you to download charts from different sources.
helm repo add REPO_NAME REPO_URL

# Updates the local cache of chart repositories, ensuring you have the latest versions available.
helm repo update

# Packages a Helm chart into a .tgz file, which can be shared or uploaded to a repository.
helm package CHART_PATH

# Pushes a packaged chart to a Helm repository, facilitating distribution and deployment.
helm push CHART_PATH REPO_NAME
```

{% endtab %}

{% tab title="DBeaver" %}
{% hint style="info" %}

#### DBeaver

Your going to need a database management tool. DBeaver Community is a free, open-source database management tool for personal projects.
{% endhint %}

1. Simpliest option is to download & install from Snapstore.

```bash
cd
sudo apt update && sudo apt upgrade
sudo apt install snapd
sudo snap install dbeaver-ce
```

Or

Go to the official [DBeaver download page](https://dbeaver.io/download/)

{% embed url="<https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb>" %}

Or

To install that DEB file.

```bash
wget https://dbeaver.io/debs/dbeaver.gpg.key -O /tmp/dbeaver.gpg.key
sudo gpg --dearmor -o /usr/share/keyrings/dbeaver.gpg /tmp/dbeaver.gpg.key
echo "deb [signed-by=/usr/share/keyrings/dbeaver.gpg] https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list
sudo apt update
sudo apt install dbeaver-ce
```

4. Pin DBeaver to Dash - bottom toolbar.
   {% endtab %}

{% tab title="Make" %}
{% hint style="info" %}

#### Make

A makefile is simply a way of associating short names, called targets, with a series of commands to execute when the action is requested. For instance, a common makefile target is “clean,” which generally performs actions that clean up after the compiler - removing object files and the resulting executable.

We'll be using Make helper scripts to streamline the deployment process.
{% endhint %}

1. Update operating system.

```bash
sudo apt update && sudo apt upgrade
```

2. Check if make is already installed.

```bash
make -version
```

3. Install the make package.

```bash
sudo apt install make
```

4. Verify the installation.

```bash
ls /usr/bin/make
```

{% endtab %}
{% endtabs %}
