Roger Maitland | eb412c6 | 2018-05-31 14:09:09 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | DOCKER_VERSION=17.03 |
| 4 | KUBECTL_VERSION=1.8.10 |
| 5 | HELM_VERSION=2.8.2 |
| 6 | |
| 7 | # setup root access - default login: oom/oom - comment out to restrict access too ssh key only |
| 8 | sed -i 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config |
| 9 | sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config |
| 10 | service sshd restart |
| 11 | echo -e "oom\noom" | passwd root |
| 12 | |
| 13 | apt-get update |
| 14 | curl https://releases.rancher.com/install-docker/$DOCKER_VERSION.sh | sh |
| 15 | mkdir -p /etc/systemd/system/docker.service.d/ |
| 16 | cat > /etc/systemd/system/docker.service.d/docker.conf << EOF |
| 17 | [Service] |
| 18 | ExecStart= |
| 19 | ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry=nexus3.onap.org:10001 |
| 20 | EOF |
| 21 | systemctl daemon-reload |
| 22 | systemctl restart docker |
| 23 | apt-mark hold docker-ce |
| 24 | |
| 25 | IP_ADDY=`ip address |grep ens|grep inet|awk '{print $2}'| awk -F / '{print $1}'` |
| 26 | HOSTNAME=`hostname` |
| 27 | |
| 28 | echo "$IP_ADDY $HOSTNAME" >> /etc/hosts |
| 29 | |
| 30 | docker login -u docker -p docker nexus3.onap.org:10001 |
| 31 | |
| 32 | sudo apt-get install make -y |
| 33 | |
| 34 | sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl |
| 35 | sudo chmod +x ./kubectl |
| 36 | sudo mv ./kubectl /usr/local/bin/kubectl |
| 37 | sudo mkdir ~/.kube |
| 38 | wget http://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz |
| 39 | sudo tar -zxvf helm-v${HELM_VERSION}-linux-amd64.tar.gz |
| 40 | sudo mv linux-amd64/helm /usr/local/bin/helm |
| 41 | |
| 42 | # install nfs |
| 43 | sudo apt-get install nfs-common -y |
| 44 | |
| 45 | |
| 46 | exit 0 |