version | |
---|---|
OS | macOS Mojave 10.14.6 Ubuntu 16.04 |
pyenv | 1.2.16 |
pipenv | 2018.11.26 |
kubectl | 1.17.3 |
helm | 3.1.1 |
VirtualBox | 6.1.2 r135662 |
minikube | 1.7.3 |
Install pyenv and pipenv
$ brew install pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ source ~/.bashrc
$ brew install pipenv
$ sudo apt install -y build-essential libffi-dev libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev git python3-pip
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ source ~/.bashrc
$ pip3 install pipenv
Install kubectl
$ curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.17.3/bin/darwin/amd64/kubectl"
$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl
$ curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.17.3/bin/linux/amd64/kubectl"
$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl
Install helm
$ curl -LO "https://get.helm.sh/helm-v3.1.1-darwin-amd64.tar.gz"
$ tar xvfz helm-v3.1.1-darwin-amd64.tar.gz
$ sudo mv darwin-amd64/helm /usr/local/bin/helm
$ curl -LO "https://get.helm.sh/helm-v3.1.1-linux-amd64.tar.gz"
$ tar xvfz helm-v3.1.1-linux-amd64.tar.gz
$ sudo mv linux-amd64/helm /usr/local/bin/helm
Install Oracle VM VirtualBox
$ curl -Lo ~/Downloads/VirtualBox-6.1.2-135662-OSX.dmg https://download.virtualbox.org/virtualbox/6.1.2/VirtualBox-6.1.2-135662-OSX.dmg
$ open ~/Downloads/VirtualBox-6.1.2-135662-OSX.dmg
$ open /Applications/VirtualBox.app
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian xenial contrib"
$ sudo apt-get update
$ sudo apt-get install -y virtualbox-6.1
Install minikube
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.7.3/minikube-darwin-amd64
$ chmod +x ./minikube
$ sudo mv ./minikube /usr/local/bin/minikube
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.7.3/minikube-linux-amd64
$ chmod +x ./minikube
$ sudo mv ./minikube /usr/local/bin/minikube
Clone RoboticBase/core
$ git clone https://github.com/RoboticBase/core.git
$ cd core
Install ansible and related libraries
$ cd ansible
$ pipenv install
- Set the password of MQTT user (
iotagent
) in the following yaml file:- group_vars/all.yml
- target:
mqtt.users[?name==`iotagent`].password
- target:
- group_vars/all.yml
- If necessary, update the variables in the following yaml file such as the number of pod replicas:
- If necessary, update the variables in the following yaml file such as the number of CPUs or the size of memories which are granted to minikube:
-
Start "pipenv shell"
$ pipenv shell
-
Start RoboticBase/core on minikube using ansible
$ ansible-playbook -i inventories/minikube --extra-vars="ansible_python_interpreter=$(which python)" minikube.yml
-
Forward 3000 port to grafana
$ kubectl -n monitoring port-forward svc/po-grafana 3000:80
-
Input "admin" to email or username and "prom-operator" to password, and push Log In
-
Select Change Password from Preferences, and change the password of admin
-
Confirm the dashboards which were installed for monitoring the resources of minikube
-
Finish port-forwarding by pressing Ctrl-C