...
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Downloading OOM |
---|
|
git clone http://gerrit.onap.org/r/oom
cd oom/kubernetes
cd onap/resources/scripts
ls -l |
Code Block |
---|
language | bash |
---|
theme | Confluence |
---|
|
total 16 |
...
-rw-r--r-- 1 root root 1612 Sep 11 16:18 cleanup_gluster.bash |
...
-rw-r--r-- 1 root root 9956 Sep 11 18:51 deploy_glusterfs.bash |
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Script syntax |
---|
|
bash deploy_glusterfs.bash |
Code Block |
---|
language | bash |
---|
theme | Confluence |
---|
|
deploy_glusterfs.bash: usage: deploy_gluster.bash <dev path> namespace |
...
e.g. deploy_glusterfs.bash /dev/vdb onap
This script deploys a GlusterFS kubernetes on OpenStack to be used as Persistent Volumes |
Code Block |
---|
language | bash |
---|
theme | RDark | title | Execute the script |
---|
|
bash deploy_glusterfs.bash /dev/vdb onap |
...
Code Block |
---|
language | bash |
---|
theme | RDark | title | Manual Steps on K8S Nodes |
---|
|
iptables -N HEKETI
iptables -A HEKETI -p tcp -m state --state NEW -m tcp --dport 24007 -j ACCEPT
iptables -A HEKETI -p tcp -m state --state NEW -m tcp --dport 24008 -j ACCEPT
iptables -A HEKETI -p tcp -m state --state NEW -m tcp --dport 2222 -j ACCEPT
iptables -A HEKETI -p tcp -m state --state NEW -m multiport --dports 49152:49251 -j ACCEPT
service iptables save
modprobe dm_snapshot
modprobe dm_mirror
modprobe dm_thin_pool
lsmod |egrep 'dm_snapshot|dm_mirror|dm_thin_pool'
|
...
Code Block |
---|
language | bash |
---|
theme | RDark | title | Validation |
---|
|
kubectl get pods --namespace onap
kubectl describe sc --namespace onap
kubectl get service --namespace onap |
...
Code Block |
---|
language | bash |
---|
theme | Confluence | title | Validation |
---|
|
NAME READY STATUS RESTARTS AGE
glusterfs-cxqc2 1/1 Running 0 4d
glusterfs-djq4x 1/1 Running 0 4d
glusterfs-t7cj5 1/1 Running 0 4d
glusterfs-z4vk6 1/1 Running 0 4d
heketi-5876bd4875-hzw2d 1/1 Running 0 4d
Name: glusterfs-sc
IsDefaultClass: No
Annotations: <none>
Provisioner: kubernetes.io/glusterfs
Parameters: resturl=http://10.43.185.167:8080,restuser=,restuserkey=
Events: <none>
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
heketi ClusterIP 10.43.185.167 <none> 8080/TCP 4d
heketi-storage-endpoints ClusterIP 10.43.227.203 <none> 1/TCP 4d |
...
Code Block |
---|
language | bash |
---|
theme | Confluence |
---|
title | Validation |
---|
|
global:
# Change to an unused port prefix range to prevent port conflicts
...snip...
# default mount path root directory referenced
# by persistent volumes and log files
persistence:
storageClass: glusterfs-sc
mountPath: /dockerdata-nfs |
Enable any components you want to deploy. In the values_global_gluster.yaml file, they are disabled by default. E.g. to enable APPC:
Code Block |
---|
language | bash |
---|
theme | Confluence |
---|
|
aaf:
enabled: false
aaf-sms:
aai:
enabled: false
appc:
enabled: true
config:
openStackType: OpenStackProvider
openStackName: OpenStack
openStackKeyStoneUrl: http://localhost:8181/apidoc/explorer/index.html
openStackServiceTenantName: default
openStackDomain: default
openStackUserName: admin
openStackEncryptedPassword: admin
clamp:
enabled: false
cli:
enabled: false |
Once you have properly edited your values file, deploy ONAP:
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Validation |
---|
|
cd ~/oom/kubernetes
helm upgrade -i dev local/onap --namespace onap -f onap/resources/environments/values_global_gluster.yaml
|
Wait until components are up, and validate that your persistent volumes are using your persistent storageClass:
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Validation |
---|
|
kubectl get pvc --namespace onap |
You should see "glusterfs-sc" (or whatever storageClass name you chose) under the STORAGECLASS column:
Code Block |
---|
language | bash |
---|
theme | Confluence |
---|
|
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
dev-appc-data-dev-appc-0 Bound pvc-472a9868-b5e7-11e8-ab3b-028b3e95b074 2Gi RWO glusterfs-sc 2h
dev-appc-db-mysql-dev-appc-db-0 Bound pvc-4724df2b-b5e7-11e8-ab3b-028b3e95b074 2Gi RWO glusterfs-sc 2h |