foundation

PURPOSE

This technical documentation presents the guidelines (e.g server installation instructions, configuration of system elements) allowing preparation, configuration and maintenant in operational state of the primary support server.

The services provided by the CYBSUP01 server are focus on:

HARDWARE LAYER

Current hardware configuration is based on a Dell 5810 server:

BIOS & operating system layer

See Ubuntu-installation procedure to prepare a server into a “ready for virtualization installation” state.

Current prepared server configuration is:

VIRTUALIZATION LAYER

RKE2 virtualization system is implemented as Kubernetes layer hosting the CYBNTY support applications deployed into a Support cluster.

Helm

RKE2 Kubernetes distribution

show logs

journalctl -u rke2-server.service


## Kubernetes resources

### Base data storage resource (Persistent Volume)
- Create a sub-directory of `/srv` dedicated to the Kubernetes resources (e.g Persistent Volumes) via commands:

mkdir /srv/k8s mkdir /srv/k8s/data


- __From root $HOME directory__, create a symbolic link simplying the identification of K8S data storage base path via command:

# Allow direct access to RKE2 dedicated disk area reserved for K8S data (e.g under data folder, for PersistentVolumes creation) sudo ln -s /srv/k8s/data .kube/data


- Create new PV resource file (automatic applied resource during RKE2 start) regarding base persistent volume via command:
  `vi /var/lib/rancher/rke2/server/manifests/rke2-base-pv.yaml`

  - file containing (see for help [best practices for PV](https://www.loft.sh/blog/kubernetes-persistent-volumes-examples-and-best-practices)) according to storage capacity available:

apiVersion: v1 kind: PersistentVolume metadata: name: base-pv spec: capacity: storage: 50Gi volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: “/srv/k8s/data”


  - Check the automatically created resource via command: `kubectl get pv`

# INFRASTRUCTURE SERVICES

## Storage
### Longhorn
Distributed block storage system deployed for containers data management.

## Monitoring & Logging

## Networking
### Container Network Interface (CNI)
Canal solution is deployed as CNI plugin.

## Security
### Rancher Backup
Automated backup solution ensuring auto-save of Rancher instance into a scheduled approach, to file versions allowing restoration in case of Rancher container disaster.

## Server auto-stop
Add a crontab directive to stop the server in a safe way (with wait of existing process secure end before make the stop) with power off:
- open and add command into crontab via command: `sudo crontab -e`
- add line in file and save as:

stop and poweroff in secure way (shutdown -P) the server each day at 20:30:00

30 20 * * * shutdown -P


- check crontab pla via command: `sudo crontab -l`

# APPLICATION SERVICES

## Kubernetes management (Rancher)
- Add needed helm charts to node repository list via command:

helm repo add rancher-stable https://releases.rancher.com/server-charts/stable


### Cert-Manager
- As [documented](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/other-installation-methods/rancher-behind-an-http-proxy/install-rancher#install-cert-manager), add cert-manager Helm repository and install cert-manager with CRDs via command:

helm repo add jetstack https://charts.jetstack.io –force-update kubectl create namespace cert-manager helm install
cert-manager jetstack/cert-manager
–namespace cert-manager
–create-namespace
–version v1.16.1
–set crds.enabled=true


- valid cert-manager deployment via commands:

kubectl rollout status deployment -n cert-manager cert-manager kubectl rollout status deployment -n cert-manager cert-manager-webhook


See [cert-manager documentation](https://cert-manager.io/docs/installation/helm/) for help.

### Kubernetes clusters management (Rancher)
Ranche instance is deployed for management of any K8S cluster of CYDEL01 infrastructure.

See [Rancher technical documentation](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster) for help.

- Namespace creation into the support cluster via command:

sudo kubectl create namespace cattle-system


- [delete certain version created certificates](https://ranchermanager.docs.rancher.com/v2.6/troubleshooting/other-troubleshooting-tips/expired-webhook-certificate-rotation) that will expire after on year via commands:

kubectl delete secret -n cattle-system cattle-webhook-tls kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io –ignore-not-found=true rancher.cattle.io kubectl delete pod -n cattle-system -l app=rancher-webhook


- [Installation of Rancher](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster#5-install-rancher-with-helm-and-your-chosen-certificate-option) over Helm with Rancher-generated certificates

helm install rancher rancher-stable/rancher
–namespace cattle-system
–set hostname=cybsup01
–set bootstrapPassword=admin


- Follow command results to read the web url and to open the web console

- Verify that Rancher server is successfully deployed via commands:

kubectl -n cattle-system rollout status deploy/rancher kubectl -n cattle-system get deploy rancher


## CYBNITY software repository
- Add complementary helm charts (e.g allowing deployment of CYBNITY applications) to node repository list via commands:

helm repo add cybnity https://cybnity.github.io/iac-helm-charts ```

Systems continuous delivery (Spinnaker)

# Back To Home