Contents
Table of Contents |
---|
Anchor | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
This document outlines the steps to install and update K3s servers and how to deploy and backup Synergy services.
Anchor | ||||
---|---|---|---|---|
|
...
Note |
---|
In case you use licensing portal to get a license for your customer, or you have an integration with your organisations Order Processing system (i.e. Salesforce or Bitrix) then you must skip this step! |
Log in to your Rancher cluster and click on Import Existing and choose Generic:
...
Choose an unique name for the cluster and configure 2 labels cluster_name=$CLUSTER_NAME cluster_reseller=$RESELLER_NAME and .
For example, cluster_name=acmecorp give it a name that would be easy to recognise later when checking the dashboard, for instance, a customer company name.
Cluster_reseller should always be your organisation’s name. In doubt, use getvisibility.
Then press Create:
...
Copy the registration command
Code Block |
---|
kubectl apply -f https://....k3s.getvisibility.com/v3/import/fr84....yaml |
and send it to the client.
Install Server - Client
Requirements
We use Kubernetes, an open-source container orchestration system to manage the application.
At the moment the only Kubernetes distribution supported is K3s (click here for the official documentation) by Suse Linux for both on-premise and cloud deployments. Our plan for the future is to extend the support to Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE) and Azure Kubernetes Service (AKS).
The requirements for the Kubernetes cluster is a single node (1 virtual machine) with the following specs:
CPU cores: 8 (x86_64 processor with speed of 2.3 GHz or more)
RAM: 32GB
Disk: 300GB SSD
OS: we recommend Ubuntu 20.04.4 LTS (Focal Fossa), but you can also use RHEL 8.5, CentOS 7.9 or Suse Linux 15.3. If you are using CentOS or RHEL please refer to the official documentation for additional setup.
Firewall: the K3s server needs ports 80/TCP and 443/TCP to be publicly accessible
In order to download the application artifacts (Docker images and binaries), updates and configuration files, the cluster needs a public internet connection with download speed of 40 Mbps or more and upload speed of 8 Mbps or more. To speed up the initial setup process it is recommended to have a download speed of 100 Mbps or more.
Installation
Ensure the following items are in place and configured:
Domain Name Service (DNS)
Network Time Protocol (NTP)
Software Update Service - access to a network-based repository for software update packages.
Fixed private IPv4 address
Unique static hostname
As root run the following command to install of K3s:
...
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.23.9+k3s1" K3S_KUBECONFIG_MODE="644" sh -s - server --node-name=local-01
Run the registration command:
...
kubectl apply -f https://....k3s.getvisibility.com/v3/import/dxslsxcf84....yaml
Monitor the progress of the installation: watch -c "kubectl get deployments -A"
...
The K3s deployment is complete when elements of all the deployments (coredns, local-path-provisioner, metrics-server, traefik and cattle-cluster-agent) show at least "1" as "AVAILABLE"
...
Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
...
Go to Rancher dashboard and wait for the new cluster to become Active:
Click on Select the cluster name and go to Apps > Charts and install the GetVisibility Essentials Helm chart:
Go to Apps > Charts and install the GetVisibility Monitoring Helm chart:
...
Stop the old k3s binary (e.g. systemctl stop k3s) and start it again (e.g. systemctl start k3s). For more details please refer to the official documentation.
Certificates
By default, certificates in K3s expire in 12 months. If the certificates are expired or have fewer than 90 days remaining before they expire, the certificates are rotated when K3s is restarted.
...
kubectl get pod/gv-essentials-consul-server-0 -o jsonpath='{.spec.nodeName}' |
Log into the server using SSH and execute the following command to take a snapshot of Consul:
kubectl exec -it gv-essentials-consul-server-0 -- consul snapshot save /consul/data/backup.snap |
...
kubectl get pvc/data-default-gv-essentials-consul-server-0 -o jsonpath='{.spec.volumeName}' | xargs -I{} kubectl get pv/{} -o jsonpath='{.spec.hostPath.path}' |
Copy the snapshot file to a safe place.
...
kubectl get pod/gv-postgresql-0 -o jsonpath='{.spec.nodeName}' |
Log into the server using SSH and execute the following command to backup all databases:
kubectl exec -it gv-postgresql-0 -- bash -c "pg_dumpall -U gv | gzip > /home/postgres/pgdata/backup.sql.gz" |
Find the path where the backup has been save to:
kubectl get pvc/pgdata-gv-postgresql-0 -o jsonpath='{.spec.volumeName}' | xargs -I{} kubectl get pv/{} -o jsonpath='{.spec.hostPath.path}' |
Copy the backup file to a safe place.
...