blob: 919d14806e589c3b8a732b556efed90ffe7065f6 [file] [log] [blame]
Sudhakar Reddyd10ae122018-08-16 17:40:56 +05301#!/bin/bash
2
3DOCKER_VERSION=17.03
4KUBECTL_VERSION=1.8.10
5HELM_VERSION=2.9.1
6
7# setup root access - default login: oom/oom - comment out to restrict access too ssh key only
8sed -i 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
9sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
10service sshd restart
11echo -e "oom\noom" | passwd root
12
13apt-get update
14curl https://releases.rancher.com/install-docker/$DOCKER_VERSION.sh | sh
15mkdir -p /etc/systemd/system/docker.service.d/
16cat > /etc/systemd/system/docker.service.d/docker.conf << EOF
17[Service]
18ExecStart=
19ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry=nexus3.onap.org:10001
20EOF
21systemctl daemon-reload
22systemctl restart docker
23apt-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
30docker login -u docker -p docker nexus3.onap.org:10001
31
32sudo apt-get install make -y
33
34sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl
35sudo chmod +x ./kubectl
36sudo mv ./kubectl /usr/local/bin/kubectl
37sudo mkdir ~/.kube
38wget http://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz
39sudo tar -zxvf helm-v${HELM_VERSION}-linux-amd64.tar.gz
40sudo mv linux-amd64/helm /usr/local/bin/helm
41
42# install nfs
43sudo apt-get install nfs-common -y
44
45MASTER_IP=$1
46
47#Create NFS directory
48sudo mkdir -p /dockerdata-nfs
49
50#Mount the remote NFS directory to the local one
51sudo mount $MASTER_IP:/dockerdata-nfs /dockerdata-nfs/
52echo "$MASTER_IP:/dockerdata-nfsĀ /dockerdata-nfs nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0" | sudo tee -a /etc/fstab
53
54exit 0