Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
network: Add script to install weave net
Browse files Browse the repository at this point in the history
This commit removes the routes and adds a script to install
weave net as the overlay network for the cluster created this way.

Signed-off-by: Suraj Deshmukh <[email protected]>
  • Loading branch information
surajssd committed Sep 12, 2018
1 parent 0f71d84 commit 54c395f
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 101 deletions.
3 changes: 0 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,12 @@ Vagrant.configure("2") do |config|
c.vm.hostname = "worker-#{n}"
c.vm.network "private_network", ip: "192.168.199.2#{n}"

c.vm.provision :shell, :path => "scripts/vagrant-setup-routes.bash"
c.vm.provision :shell, :path => "scripts/vagrant-setup-hosts-file.bash"
end
end

config.vm.define "traefik-0", autostart: false do |c|
c.vm.hostname = "traefik-0"
c.vm.network "private_network", ip: "192.168.199.30"

c.vm.provision :shell, :path => "scripts/vagrant-setup-routes.bash"
end
end
15 changes: 0 additions & 15 deletions config/worker-0-10-bridge.conf

This file was deleted.

1 change: 0 additions & 1 deletion config/worker-0-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ExecStart=/usr/local/bin/kubelet \
--image-service-endpoint=unix:///var/run/crio/crio.sock \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--network-plugin=cni \
--pod-cidr=10.20.0.0/16 \
--register-node=true \
--runtime-request-timeout=10m \
--tls-cert-file=/var/lib/kubelet/worker-0.pem \
Expand Down
15 changes: 0 additions & 15 deletions config/worker-1-10-bridge.conf

This file was deleted.

1 change: 0 additions & 1 deletion config/worker-1-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ExecStart=/usr/local/bin/kubelet \
--image-service-endpoint=unix:///var/run/crio/crio.sock \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--network-plugin=cni \
--pod-cidr=10.21.0.0/16 \
--register-node=true \
--runtime-request-timeout=10m \
--tls-cert-file=/var/lib/kubelet/worker-1.pem \
Expand Down
15 changes: 0 additions & 15 deletions config/worker-2-10-bridge.conf

This file was deleted.

1 change: 0 additions & 1 deletion config/worker-2-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ExecStart=/usr/local/bin/kubelet \
--image-service-endpoint=unix:///var/run/crio/crio.sock \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--network-plugin=cni \
--pod-cidr=10.22.0.0/16 \
--register-node=true \
--runtime-request-timeout=10m \
--tls-cert-file=/var/lib/kubelet/worker-2.pem \
Expand Down
25 changes: 0 additions & 25 deletions scripts/generate-cni-config

This file was deleted.

1 change: 0 additions & 1 deletion scripts/generate-kubelet-service-file
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ExecStart=/usr/local/bin/kubelet \\
--image-service-endpoint=unix:///var/run/crio/crio.sock \\
--kubeconfig=/var/lib/kubelet/kubeconfig \\
--network-plugin=cni \\
--pod-cidr=10.2${i}.0.0/16 \\
--register-node=true \\
--runtime-request-timeout=10m \\
--tls-cert-file=/var/lib/kubelet/worker-${i}.pem \\
Expand Down
1 change: 1 addition & 0 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ vagrant up
./scripts/setup-kubelet-api-cluster-role
./scripts/setup-worker-services
./scripts/configure-kubectl-on-host
./scripts/setup-networking
echo -e "\033[1mFinished. Cluster should be healthy and soon in state ready:\033[0m"
kubectl get componentstatuses
kubectl get nodes
6 changes: 6 additions & 0 deletions scripts/setup-networking
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -euo pipefail

# As mentioned in https://www.weave.works/docs/net/latest/kubernetes/kube-addon/#install
kubectl apply -f https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')
1 change: 0 additions & 1 deletion scripts/setup-worker-services
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ cp /vagrant/tools/{conmon,pause} /usr/local/libexec/crio/
cp /vagrant/tools/{crio.conf,seccomp.json} /etc/crio/
cp /vagrant/tools/policy.json /etc/containers/
cp "/vagrant/config/$(hostname)-10-bridge.conf" /etc/cni/net.d/10-bridge.conf
cp /vagrant/config/99-loopback.conf /etc/cni/net.d
cp "/vagrant/config/$(hostname)-crio.service" /etc/systemd/system/crio.service
Expand Down
23 changes: 0 additions & 23 deletions scripts/vagrant-setup-routes.bash

This file was deleted.

0 comments on commit 54c395f

Please sign in to comment.