updated setup file
[ealt-edge.git] / example-apps / ROBO / deployment / setup.md
1
2 # Pre-Setup (Before Application Integration)
3 Step 1: docker login to akraino dockerhub
4 username/pwd - ealtedge/Huawei_akraino
5
6 or 
7
8 pull images manually
9 docker pull ealtedge/obj-detection
10 docker pull ealtedge/inventory-be:v1.3
11 docker pull ealtedge/robo-be
12 docker pull ealtedge/robo
13
14 Step 2: pretrained model for obj detection
15 - copy pretrained model to Host machine where PCB containers are running
16     1. cloen model from gitlab git clone https://gitlab.com/gauravagrawal/ealtedge/-/tree/master/ ROBO-Model
17     2. create folder /root/model/ in host machine.
18     3. scp all files in models cloned to above path. 
19
20 Step 3: Install Influx DB
21 - Install local path storage (if by default is not available on edge node)
22     1. git clone https://github.com/rancher/local-path-provisioner.git
23     2. cd local-path-provisioner
24     3. helm install local-path --namespace kube-system ./deploy/chart/ --set storageClass.provisionerName=rancher.io/local
25 -path --set storageClass.defaultClass=true --set storageClass.name=local-path
26
27 - Install influx db
28     1. create my-test namespace
29     2. helm repo add influxdata https://influxdata.github.io/helm-charts
30     3. helm upgrade -i influxdb influxdata/influxdb --set service.type=NodePort --namespace my-test
31
32 Step 4: update influx db IP and nodeport in smart shelf App yaml 
33 - update smart shelf yaml file
34     1. update below enviorment variable in smartshelf-deployment.yaml: INFLUXDB_IP, INFLUXDB_PORT from Nodeport and Node IP for Influx DB in k3s cluster.
35
36 Step 5: Install MINIO storage and create bucket 
37 - Install minio storage server
38     1. docker pull minio/minio
39     2. docker run -d --name minio -p 9000:9000 -v data:/data minio/minio server /data
40     3. docker exec -it minio cat /data/.minio.sys/config/config.json | egrep "(access|secret)_key"
41     4. create credentials-velero file...
42 add values as :
43 [default]
44 aws_access_key_id=minioadmin
45 aws_secret_access_key=minioadmin
46
47 - Install minio cleint and create bucket for backup
48     1. docker pull minio/mc
49     2. enter to client container to add server and create bucket: docker run -it --entrypoint=/bin/sh minio/mc
50     3. first create server alias in mc client: "mc alias set edge_minio http://159.138.33.54:9000"
51     4. then create bucket: mc mb edge_minio/mybucket
52     5. then list bucket: mc ls edge_minio
53
54 Step 6: Install Velero server and client 
55 - Install velero client
56     1. download binary velero amd64/arm64: https://github.com/justmeandopensource/kubernetes/blob/master/docs/setup-velero-notes.md
57     2. move binary files to: /usr/local/bin
58     3. test velero cli is working by exec velero cmd
59
60 - Install velero server
61     1. helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts
62     2. kubectl create ns velero
63     3. install velero using CLI:
64     velero install \
65    --provider aws \
66    --bucket mybucket \
67    --secret-file ./credentials-velero \
68      --plugins velero/velero-plugin-for-aws:v1.0.0 \
69    --backup-location-config
70 region=minio,s3ForcePathStyle=true,s3Url=http://hostVMIP:9000
71
72 - Some Pre-Checks
73     - Check whether the config file is at location /root/.kube/
74     - Check that ports are not already occupied
75
76 Step 7: Post setup, cleanup velero
77 - Install velero resource
78     1. kubectl delete namespace velero
79     2. kubectl delete clusterrolebinding  velero
80     3. kubectl delete crds -l component=velero
81
82
83
84