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