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