This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM kong/kong-gateway:2.8-rhel | |
| USER root | |
| # -- BEGIN custom stuff | |
| RUN yum install -q -y autoconf automake libtool m4 make | |
| RUN mkdir /expat /rocks | |
| # Can be downloaded here: https://github.com/libexpat/libexpat/releases/tag/R_2_5_0 | |
| COPY R_2_5_0.tar.gz /expat | |
| # Rock files can be downloaded from https://luarocks.org/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ terraform apply | |
| random_id.cluster_name[0]: Refreshing state... [id=l6NFpxOl] | |
| azurerm_resource_group.rg[0]: Refreshing state... [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/resourceGroups/K8sRG1] | |
| data.azurerm_kubernetes_service_versions.current[0]: Reading... | |
| data.azurerm_kubernetes_service_versions.current[0]: Read complete after 1s [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/providers/Microsoft.ContainerService/locations/southindia] | |
| azurerm_kubernetes_cluster.aks[0]: Refreshing state... [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/resourceGroups/K8sRG1/providers/Microsoft.ContainerService/managedClusters/k8s-97a345a713a5] | |
| azurerm_public_ip.public_ip[0]: Refreshing state... [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/resourceGroups/MC_K8sRG1_k8s-97a345a713a5_southindia/providers/Microsoft.Network/publicIPAddresses/k8s-public-ip-97a345a713a5] | |
| local_file.kubeconfigaks[0]: Refreshing state... [id=d3b4d0d008bb4e373b42f22171bda5321281bf65] | |
| azurerm_kubernetes_cluster_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_kubernetes_cluster_node_pool" "aks_node_pool" { | |
| for_each = { | |
| for index, node_pool in local.node_pools : | |
| node_pool.name => node_pool | |
| } | |
| name = each.value.name | |
| kubernetes_cluster_id = azurerm_kubernetes_cluster.aks.id | |
| vm_size = each.value.vm_size | |
| node_count = each.value.node_count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ terraform apply | |
| random_id.cluster_name[0]: Refreshing state... [id=26Ak6SRX] | |
| azurerm_resource_group.rg[0]: Refreshing state... [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/resourceGroups/K8sRG1] | |
| data.azurerm_kubernetes_service_versions.current[0]: Reading... | |
| data.azurerm_kubernetes_service_versions.current[0]: Read complete after 1s [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/providers/Microsoft.ContainerService/locations/southindia] | |
| azurerm_kubernetes_cluster.aks[0]: Refreshing state... [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/resourceGroups/K8sRG1/providers/Microsoft.ContainerService/managedClusters/k8s-dba024e92457] | |
| azurerm_public_ip.public_ip[0]: Refreshing state... [id=/subscriptions/104e4289-6059-4afb-885a-982ba31991ee/resourceGroups/MC_K8sRG1_k8s-dba024e92457_southindia/providers/Microsoft.Network/publicIPAddresses/k8s-public-ip-dba024e92457] | |
| local_file.kubeconfigaks[0]: Refreshing state... [id=6d63d7a3898cbab172185eb9d0d1d56b753f4d3b] | |
| azurerm_kubernetes_cluster_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| locals { | |
| node_pools = yamldecode(file("${path.module}/node-pool.yaml")) | |
| } | |
| resource "azurerm_kubernetes_cluster_node_pool" "aks_node_pool" { | |
| count = length(local.node_pools) | |
| name = local.node_pools[count.index].name | |
| kubernetes_cluster_id = azurerm_kubernetes_cluster.aks.id | |
| vm_size = local.node_pools[count.index].vm_size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "random_id" "cluster_name" { | |
| byte_length = 6 | |
| } | |
| resource "azurerm_resource_group" "rg" { | |
| name = "K8sRG1" | |
| location = var.aks_region | |
| } | |
| data "azurerm_kubernetes_service_versions" "current" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: "nodepool1" | |
| vm_size: "Standard_D2_v2" | |
| node_count: 1 | |
| tags: | |
| - project: foo | |
| - environment: dev | |
| - name: "nodepool2" | |
| vm_size: "Standard_D2_v2" | |
| node_count: 2 | |
| tags: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4VlVBWFQ1U0VFeDB5VklqR1FLemxjaXZoanl4aDQwOEJHbzQ4dmItUG9NIn0.eyJleHAiOjE2NzU3NTQwNzksImlhdCI6MTY3NTc1NDAxOSwiYXV0aF90aW1lIjoxNjc1NzU0MDE5LCJqdGkiOiI5ODUzYWEyOS05YzM3LTQzYjgtOWI2Ni1iYzE0ZjhjZjE2MzQiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL21hc3RlciIsInN1YiI6IjZmMDhlNzFlLTE5MWEtNDc4ZS04ZTIyLWVmZDU4OTE1OGQ5MCIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFjY291bnQiLCJzZXNzaW9uX3N0YXRlIjoiNTc0NTBmYTctZDgwNS00NmM0LWIxMjctNzNmMmQ2YzMzNmUwIiwiYWNyIjoiMSIsInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6Im9wZW5pZCBlbWFpbCBwcm9maWxlIiwic2lkIjoiNTc0NTBmYTctZDgwNS00NmM0LWIxMjctNzNmMmQ2YzMzNmUwIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhZG1pbiJ9.XFjPipVVJ6VR2FIPRAkGn-1tW6tHimHfhvncJ-Rl_3N9vK3Ty4dZYMtyZvrghG03Sbj9NdFuli4JHXbfWWZmsmUBN5fCixzvO0KkGIbYqKzixV2gAqBXCwVMCvYTSprvD_jXZldoR4TqAtnEdrqfwI87VVf5MHrKaCQqkF9oCLz31naarpg0fgzPDQAiZtCufpyY2o9PM75uSW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: kong-api-gateway | |
| labels: | |
| istio.io/rev: asm-1153-6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import paho.mqtt.client as mqtt | |
| from random import randrange, uniform | |
| import time | |
| mqttBroker ="vernemq.itransz.in" | |
| client = mqtt.Client("Temperature_Inside") | |
| client.connect(mqttBroker, 443) | |
| while True: |