Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 1.57 KB

README.md

File metadata and controls

36 lines (22 loc) · 1.57 KB

Ansible scripts for settings up AKS and managing EMQX deployments

How to provision AKS

Create an env file

  • az_environment defines name of the environment (used for naming resources in Azure)
  • az_aks_node_count defines number of nodes in the AKS cluster

Run ansible-playbook play_setup_aks.yml -e @env/<name of the env file>

Deploy kubernetes manifests

Applying all manifests into an environment

  • Run ansible-playbook play_apply_manifests.yml -e @env/dev.yml

Applying a specific manifest into an environment

  • Run ansible-playbook play_apply_manifests.yml -e @env/dev.yml -e service=<filename without .yml postfix>

ConfigMaps and secrets

certificates

Certificates are added as kubernetes secrets by running kubectl create secret generic <secret name> --from-file=<filename with path>

mqtt broker username and password

These are defined in a secret called admin-us-ps where the password is defined with key 'passwrod.txt' and username with key 'username.txt'

emqx node cookie

Node cookie is defined in a ConfigMap called emqx-config under key cookie

realtime feed URLs

Certain realtime feed URLs are hidden because they contain authentication info. These can be found in feed-urls ConfigMap where each city has its own key

haproxy config file

haproxy config file is defined in a ConfigMap named haproxy-config. The file itself also resides here) in this repository. New ConfigMap, with hash postfix name, can be generated by running kubectl apply -k roles/aks-apply/files/assets/haproxy-dev.