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 |
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 Azure CLI
$ brew install azure-cli
$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
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
- Change the domain name defined in the following yaml file to your own domain:
- inventories/aks/group_vars/aks.yml
- target:
dns.domain
- target:
- inventories/aks/group_vars/aks.yml
- Change the email address defined in the following yaml file to your own email:
- inventories/aks/group_vars/aks.yml
- target:
dns.email
- target:
- inventories/aks/group_vars/aks.yml
- Change the SSH key path defined in the following yaml file to your own public key:
- inventories/aks/host_vars/azure.yml
- target:
resources.ssh_key_file_path
- target:
- inventories/aks/host_vars/azure.yml
- If necessary, update the variables in the following yaml file such as the number of worker nodes or the size of VM:
- If necessary, update the variables in the following yaml file such as the number of pod replicas:
-
Generate Azure Credentials which are used to operate Azure from ansible by executing following shell script:
$ ./tools/generate_azure_credentials.sh
-
Start "pipenv shell"
$ pipenv shell
-
Start RoboticBase/core on Azure AKS using ansible
$ ansible-playbook -i inventories/aks --extra-vars="ansible_python_interpreter=$(which python)" aks.yml
-
After starting ansible-playbook, you will be prompted to log in Azure
- Access grafana (
https://grafana.{{ your domain }}
) - 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 Azure AKS