Skip to content

Latest commit

 

History

History
99 lines (77 loc) · 2.39 KB

README.md

File metadata and controls

99 lines (77 loc) · 2.39 KB

gce-openebs

OpenEBS (Dedicated) Setup on Google Cloud Platform

Requirements

Usage

  1. Prepare virtual machines and private network.
./prepare-vms.sh

After running script you should have 4 running VM's,

 $ gcloud compute instances list
NAME           ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP      STATUS
kubemaster-01  us-central1-f  n1-standard-2               10.240.0.10  x.x.x.x          RUNNING
kubeminion-01  us-central1-f  n1-standard-2               10.240.0.20  x.x.x.x          RUNNING
omm-01         us-central1-f  n1-standard-2               10.240.0.30  x.x.x.x          RUNNING
osh-01         us-central1-f  n1-standard-2               10.240.0.40  x.x.x.x          RUNNING
  1. Copy required files on each node,
./copy-setup-files.sh
  1. Run individual setup files,

You can ssh to a particular node using gcloud compute ssh <name>. Execute following steps to complete setup,

  • kubemaster-01
$ ~/setup_k8s_master.sh
  • kubeminion-01

Get token from kubemaster-01,

$ sudo kubeadm token list
TOKEN                     TTL         EXPIRES   USAGES                   DESCRIPTION
8d957d.55b14b6a44eadbce   <forever>   <never>   authentication,signing   The default bootstrap token generated by 'kubeadm init'.
kubectl get svc kubernetes -o json | jq -r '.spec.clusterIP'

Get cluster IP from kubemaster-01,

$ source ~/.profile
$ kubectl get svc kubernetes -o json | jq -r '.spec.clusterIP'

Run setup script,

$ #Example: ~/setup_k8s_host.sh -i <master_ip> -t <token> -c <cluster_ip>
$ ~/setup_k8s_host.sh -i 10.240.0.10 -t 8d957d.55b14b6a44eadbce -c 10.96.0.1
  • omm-01
$ ~/setup_omm.sh
  • osh-01
$ ~/setup_osh.sh -i <osh_ip>
$ ~/setup_osh.sh -i 10.240.0.30
  1. If you want to cleanup all setup(GCE resources) later,
$ ./cleanup.sh

Verification

  1. Kubernetes Setup
  • Node status
$ source ~/.profile
$ kubectl get nodes
NAME            STATUS         AGE
kubemaster-01   Ready,master   1h
kubeminion-01   Ready          57m
  1. OpenEBS Setup
  • OpenEBS Node status
$ source ~/.profile
$ maya omm-status
$ maya osh-status