Preparing to Start Foresight Mobile Platform

To prepare to start Foresight Mobile Platform:

  1. Open the console of one of the Kubernetes main nodes as the fmpadmin user. The archive with application container images and the archive with scripts and yaml files used for starting the application in the Kubernetes environment are loaded to the user's home directory.

  2. Copy the archive fmp_v<version number>.tgz to cluster work nodes.

  3. Load container images to the system:

docker load -i  fmp_v<version number>.tgz

NOTE. Unpack this archive on all cluster work nodes.

After the successful import delete the archive.

  1. Unpack the archive with scripts and yaml files at one control node:

% tar –xvzf ./fmp_k8s_v<version number>.tar

  1. Go to the directory with unpacked scripts:

% cd ./ fmp_k8s_v<version number>

  1. Edit contents of the yaml file ./storage/ceph-storage-ceph_rbd.yml:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fast-rbd
provisioner: kubernetes.io/rbd
parameters:
monitors: 10.30.217.17:6789, 10.30.217.20:6789, 10.30.217.23:6789
adminId: admin
adminSecretName: ceph-secret
adminSecretNamespace: "kube-system"
pool: kube
userId: kube
userSecretName: ceph-secret-kube

In the monitors string specify IP addresses or DNS names of nodes of Ceph cluster with specified monitoring role. To view which clusters have this role specified, execute the command:

% sudo ceph -s

Example of command execution result:

cluster:
id:     a997355a-25bc-4749-8f3a-fb07df0f9105
health: HEALTH_OK
services:
mon: 3 daemons, quorum kn1,kn0,kn3
mgr: kn3(active), standbys: kn0
osd: 4 osds: 4 up, 4 in

The "mon" string in the "services" section indicates names of the nodes with specified monitoring role.

  1. Add secret-keys of distributed Ceph file storage in Kubernetes:

    1. Get key of Ceph administrator:

% sudo ceph --cluster ceph auth get-key client.admin

Example of command execution result:

>> AQCvBnVciE8pERAAJoIDoxgtkfYKZnoBS9R6uA==

Copy the key to the clipboard.

IMPORTANT. Avoid spaces when copying and pasting key to the command to add to Kubernetes settings.

    1. Add the output key to Kubernetes secrets by explicitly specifying it in the command:

% kubectl create secret generic ceph-secret --type="kubernetes.io/rbd" \
  --from-literal=key='AQCvWnVciE7pERAAJoIDoxgtkfYKMnoBB9Q6uA==' --namespace=kube-system

Command execution result:

secret/ceph-secret created

    1. Create a single pool for Kubernetes nodes in the Ceph cluster. The created pool will be used in RBD at nodes:

% sudo ceph --cluster ceph osd pool create kube 32 32

    1. Create a client key. Ceph authentication is enabled in the Ceph cluster:

% sudo ceph --cluster ceph auth get-or-create client.kube mon 'allow r' osd 'allow rwx pool=kube'

    1. Get the client.kube key:

% sudo ceph --cluster ceph auth get-key client.kube

    1. Create a new secret in the project namespace:

% kubectl create secret generic ceph-secret-kube --type="kubernetes.io/rbd" \
--from-literal=key='AQC6DX1cAJD3LRAAUC2YpA9VSBzTsAAeH30ZrQ==' --namespace=fmpns

After executing the operations start Foresight Mobile Platform.

See also:

Preparing Environment for Foresight Mobile Platform | Starting Foresight Mobile Platform