How to Download and Run Metrolla Software

By: Adam Szablya
Date: 10/12/2024

Preface:

It is not super obvious how one would download oursoftware and that is by design. The Metrolla Software is provided to our Licensed providers in two forms. The first is Docker and the second is K3S. There is no download link or file download provided. The code is built into container images and shipped in that format to customers via customer specific credentials. At Metrolla we strive to make working with our product a seamless and easy process. As a result we provide Helm Charts to our partners to assist in setting up your environment.

Our Charts are located here and access is granted via customer or partner specific credentials:

https://github.com/Metrolla-Inc/HelmCharts

Additionally we provide initialization scripts in the Helm Charts that automates the setup and deployment of the code with Ansible to automate the below steps.

Requirements to the walkthrough: 

Debian or Ubuntu
Helm
Docker
K3S

Ansible (Optional and Recomended)


It is recommended that you use Ansible playbooks to download and install all steps easy and simple.

Step 1 - Install Helm:

Follow the steps here: https://helm.sh/docs/intro/install/

or use my preferred method "From Script"

Helm now has an installer script that will automatically grab the latest version of Helm and install it locally.
You can fetch that script, and then execute it locally. It's well documented so that you can read through it and understand what it is doing before you run it.

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
Yes, you can curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash if you want to live on the edge.



Step 2 - Install Docker:

Follow the steps here: https://docs.docker.com/engine/install/

Install Docker Engine
This section describes how to install Docker Engine on Linux, also known as Docker CE. Docker Engine is also available for Windows, macOS, and Linux, through Docker Desktop. For instructions on how to install Docker Desktop, see:
Step 2.5: Setup Docker Secrets

Set up Docker login and Kubernetes secrets
This playbook is designed to be run on localhost with elevated privileges (i.e. sudo or root access).
The Docker credentials and registry are specified using variables:


DOCKER_USERNAME='YOUR-ASSINGED-USERNAME'
DOCKER_PASSWORD='YOUR_ASSIGNED_PASSW0RD!'
DOCKER_REGISTRY='harbor.lab.volf.co'

Step 3 - Install K3S:

Follow the steps here: https://docs.k3s.io/installation

Make sure you meet the requirements for the install: https://docs.k3s.io/installation/requirements?os=debian


Setup  k3s environment:
Deleting any existing Kubernetes secrets
The next step is to remove the existing Kubernetes secret named regcred, ignoring any errors (for instance, the secret might not exist):


kubectl delete secret regcred --ignore-not-found=true


Create new Kubernetes secret:
The new secret, also named regcred, is created from the saved Docker config:


kubectl create secret generic regcred \
--from-file=.dockerconfigjson=$HOME/docker_config.json \
--type=kubernetes.io/dockerconfigjson

Check if containers are already there and delete existing
Before deploying the new pods, delete any existing ones defined in ../pods.yaml:


kubectl delete -f ../pods.yaml --ignore-not-found=true

Step 4 - Deploy the Pods!

It is recommended you use Ansible to make the download and deployment easy.

Finally, deploy the pods defined in ../pods.yaml:


kubectl apply -f ../pods.yaml

you can then acccess the GUI via a browser at  computer-hostname.local