From df07077974d3af161184ba3f768e9e37deefeb6f Mon Sep 17 00:00:00 2001 From: Guo Ruijing Date: Wed, 13 Jun 2018 05:05:04 -0400 Subject: rebase onap oom to beijing release Change-Id: I9f3d755764a194068c2f3f128eb6d0861fcda555 Signed-off-by: Guo Ruijing --- src/vagrant/kubeadm_onap/Vagrantfile | 21 ++-- src/vagrant/kubeadm_onap/host_setup.sh | 20 ++-- src/vagrant/kubeadm_onap/master_setup.sh | 21 ++-- src/vagrant/kubeadm_onap/onap_setup.sh | 52 +++------- src/vagrant/kubeadm_onap/registry_setup.sh | 30 ++++++ src/vagrant/kubeadm_onap/setup_swap.sh | 5 + src/vagrant/kubeadm_onap/values.yaml | 149 +++++++++++++++++++++++++++++ src/vagrant/kubeadm_onap/worker_setup.sh | 12 +-- 8 files changed, 237 insertions(+), 73 deletions(-) create mode 100644 src/vagrant/kubeadm_onap/registry_setup.sh create mode 100644 src/vagrant/kubeadm_onap/setup_swap.sh create mode 100644 src/vagrant/kubeadm_onap/values.yaml (limited to 'src') diff --git a/src/vagrant/kubeadm_onap/Vagrantfile b/src/vagrant/kubeadm_onap/Vagrantfile index fe24252..73c442d 100644 --- a/src/vagrant/kubeadm_onap/Vagrantfile +++ b/src/vagrant/kubeadm_onap/Vagrantfile @@ -1,17 +1,17 @@ -$num_workers=1 +$num_workers=3 Vagrant.require_version ">= 1.8.6" Vagrant.configure("2") do |config| - config.vm.box = "yk0/ubuntu-xenial" - config.vm.provision "shell", path: "host_setup.sh", privileged: false + config.vm.box = "ceph/ubuntu-xenial" config.vm.define "master" do |config| config.vm.hostname = "master" + config.vm.provision "shell", path: "host_setup.sh", privileged: false config.vm.provision "shell", path: "master_setup.sh", privileged: false config.vm.network :private_network, ip: "192.168.0.10" config.vm.provider :libvirt do |libvirt| - libvirt.memory = 4096 + libvirt.memory = 8192 libvirt.cpus = 4 end end @@ -19,23 +19,14 @@ Vagrant.configure("2") do |config| (1 .. $num_workers).each do |i| config.vm.define vm_name = "worker%d" % [i] do |config| config.vm.hostname = vm_name + config.vm.provision "shell", path: "host_setup.sh", privileged: false config.vm.provision "shell", path: "worker_setup.sh", privileged: false config.vm.network :private_network, ip: "192.168.0.#{i+20}" config.vm.provider :libvirt do |libvirt| - libvirt.memory = 81920 + libvirt.memory = 51200 libvirt.cpus = 32 end end end - config.vm.define "onap" do |config| - config.vm.hostname = "onap" - config.vm.provision "shell", path: "onap_setup.sh", privileged: false - config.vm.network :private_network, ip: "192.168.0.5" - config.vm.provider :libvirt do |libvirt| - libvirt.memory = 2048 - libvirt.cpus = 1 - end - end - end diff --git a/src/vagrant/kubeadm_onap/host_setup.sh b/src/vagrant/kubeadm_onap/host_setup.sh index 64e1733..7778e3d 100755 --- a/src/vagrant/kubeadm_onap/host_setup.sh +++ b/src/vagrant/kubeadm_onap/host_setup.sh @@ -4,13 +4,20 @@ set -ex cat << EOF | sudo tee /etc/hosts 127.0.0.1 localhost -192.168.0.5 onap 192.168.0.10 master 192.168.0.21 worker1 192.168.0.22 worker2 192.168.0.23 worker3 EOF +cat << EOF | sudo tee /etc/resolv.conf +search svc.cluster.local cluster.local +nameserver 10.96.0.10 +nameserver 8.8.8.8 +nameserver 8.8.4.4 +options ndots:5 timeout:1 attempts:1 +EOF + sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D sudo apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D cat << EOF | sudo tee /etc/apt/sources.list.d/docker.list @@ -22,18 +29,17 @@ cat < ~/.kube/config || true - r=$(kubectl get pods -n kube-system | grep "tiller-deploy.*Run" | wc -l) -done +kubectl create clusterrolebinding --user system:serviceaccount:kube-system:default kube-system-cluster-admin --clusterrole cluster-admin +wget https://storage.googleapis.com/kubernetes-helm/helm-v2.8.2-linux-amd64.tar.gz +tar xzvf helm-v2.8.2-linux-amd64.tar.gz +sudo mv linux-amd64/helm /usr/local/bin/ +helm init +helm serve & +helm repo remove stable +helm repo add local http://127.0.0.1:8879 -curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash git clone http://gerrit.onap.org/r/oom -cd oom; git checkout amsterdam -source /vagrant/openstack/openrc -cat < ~/.kube/config +sudo apt-get install nfs-common -y +sudo mkdir /dockerdata-nfs +sudo chmod 777 /dockerdata-nfs +sudo mount master:/dockerdata-nfs /dockerdata-nfs -- cgit 1.2.3-korg