Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Latest commit

 

History

History
226 lines (178 loc) · 6.15 KB

install_guide_aks.en.md

File metadata and controls

226 lines (178 loc) · 6.15 KB

Installation Guide of RoboticBase Core (Microsoft Azure AKS)

Requirements

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
openssl 2.6.5
azure cli 2.1.0

Preparation

Install tools

Install pyenv and pipenv

macOS

$ 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

ubuntu

$ 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

macOS

$ 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

ubuntu

$ 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

macOS

$ 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

ubuntu

$ 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 openssl

macOS

$ brew install openssl

ubuntu

$ sudo apt install -y openssl

Install Azure CLI

macOS

$ brew install azure-cli

ubuntu

$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Prepare ansible

Clone RoboticBase/core

$ git clone https://github.com/RoboticBase/core.git
$ cd core

Install ansible and related libraries

$ cd ansible
$ pipenv install

Installation of RoboticBase/core

Set your variables (mandatory)

  1. Set the password of MQTT user (iotagent) in the following yaml file:
  2. Change the domain name defined in the following yaml file to your own domain:
  3. Change the email address defined in the following yaml file to your own email:
  4. Change the SSH key path defined in the following yaml file to your own public key:

Update your variables (optional)

  1. If necessary, update the variables in the following yaml file such as the number of worker nodes or the size of VM:
  2. If necessary, update the variables in the following yaml file such as the number of pod replicas:

Generate Azure Credentials

  1. Generate Azure Credentials which are used to operate Azure from ansible by executing following shell script:

    $ ./tools/generate_azure_credentials.sh
    

Start RoboticBase/core

  1. Start "pipenv shell"

    $ pipenv shell
    
  2. Start RoboticBase/core on Azure AKS using ansible

    $ ansible-playbook -i inventories/aks --extra-vars="ansible_python_interpreter=$(which python)" aks.yml
    
  3. After starting ansible-playbook, you will be prompted to log in Azure azure_login_01.png

Configure grafana

  1. Access grafana (https://grafana.{{ your domain }}) grafana_01.png
  2. Input "admin" to email or username and "prom-operator" to password, and push Log In grafana_02.png
  3. Select Change Password from Preferences, and change the password of admin grafana_03.png
  4. Confirm the dashboards which were installed for monitoring the resources of Azure AKS grafana_04.png

Configure kibana

  1. Confirm the username and password of kibana

    $ ./tools/show_kibana_credentials.py
    
  2. Access kibana (https://kibana.{{ your domain }}) kibana_00.png

  3. Input the username and password of kibana, and Log in kibana kibana_01.png

  4. Show Home view by clicking Explore on my own kibana_02.png

  5. Show Management view by clicking Management kibana_03.png

  6. Click Index Patterns kibana_04.png

  7. Click Create Index Patterns kibana_05.png

  8. Input "logstash-*" to Index pattern, and click Next Step kibana_06.png

  9. Select "@timestamp" at Time Filter field name, click Create Index pattern kibana_07.png

  10. The Index of log messages is created automatically kibana_08.png

  11. Click Discover, and confirm the log messages gathered from Pods kibana_09.png