This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"variables": { | |
"containerName": "", | |
"containerImage": "", | |
"imageRegistryLoginServer":"", | |
"imageRegistryUsername":"", | |
"imageRegistryPassword":"", | |
"dbConnectionString" : "" |
This file contains 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
export LOC=eastus | |
export RG=todoapp | |
export DB=tododb0708 | |
export REG=todoacr | |
# Test the app locally | |
docker run -d --name db mongo | |
docker run -d -p 80:3000 --link db:db --name todo janakiramm/todo | |
This file contains 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
az group create --name myResourceGroup --location westus | |
az container create --name mycontainer --image nginx --resource-group myResourceGroup --ip-address public |
This file contains 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: Pod | |
metadata: | |
name: web | |
labels: | |
name: web | |
app: todoapp | |
spec: | |
containers: | |
- image: janakiramm/todo |
This file contains 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
# Configure GKE | |
gcloud container clusters create gke-aci --zone us-west1-a | |
gcloud container clusters get-credentials gke-aci --zone us-west1-a | |
kubectl get nodes | |
# Create an Azure Resource Group & Service Principal | |
az group create --name gke-aci --location westus | |
az account list -o table | |
az ad sp create-for-rbac --role=Contributor --scopes /subscriptions/<subscriptionId>/resourceGroups/gke-aci | |
az provider register -n Microsoft.ContainerInstance |
This file contains 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: Service | |
metadata: | |
name: myapp | |
labels: | |
app: myapp | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 80 |
This file contains 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: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: app-gateway | |
spec: | |
selector: | |
istio: ingressgateway | |
servers: | |
- port: | |
number: 80 |
This file contains 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 numpy as np, cv2, sys | |
import memcache | |
import time | |
sys.path.append('../../../') | |
from hsapi import ObjectDetector | |
from grovepi import * | |
from twilio.rest import Client |
This file contains 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
exports.bulb = (event, callback) => { | |
const https = require('https') | |
// Access the payload | |
const msg = event.data; | |
const data = Buffer.from(msg.data, 'base64').toString(); | |
const token = 'Bearer <put your LiFX API token here>' | |
console.log(data); |
This file contains 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
cat <<EOF | sudo tee /etc/rancher/rke2/config.yaml | |
kube-controller-manager-arg: | |
- "cluster-signing-legacy-unknown-cert-file=/var/lib/rancher/rke2/server/tls/server-ca.crt" | |
- "cluster-signing-legacy-unknown-key-file=/var/lib/rancher/rke2/server/tls/server-ca.key" | |
write-kubeconfig-mode: "0644" | |
write-kubeconfig: "/root/.kube/config" | |
cni: "calico" | |
tls-san: | |
- triton | |
- 10.148.0.60 |
OlderNewer