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
#!/usr/bin/env bash | |
# Waits for kubernetes ingress to get an IP | |
# Usage: | |
# wait-k8s-ip.sh <ingressName> <namespace> | |
# eg: wait-k8s-ip.sh ingress-name my-app-dev | |
# Will timeout after 5minutes (5 * 60 tries * 1 sec wait = 300 secs) | |
external_ip="" | |
times=0 |
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
kubectl create serviceaccount --namespace kube-system tiller | |
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller | |
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' |
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
function mainApp() { | |
libraryCode(input) | |
.then((data) => console.log("main output", formatForUserView(data))) | |
.catch((err) => { | |
console.error("error from library!", err); | |
display("user-friendly error message"); | |
}); | |
} |
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
'use strict'; | |
// https://aws.amazon.com/blogs/compute/implementing-a-serverless-aws-iot-backend-with-aws-lambda-and-amazon-dynamodb/ | |
console.log('Loading register function'); | |
var AWS = require('aws-sdk'); | |
AWS.config.region = 'us-east-1'; | |
var iot = new AWS.Iot(); | |
let policyName = 'Policy'; | |
let thingTypeName = 'Type'; |
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
'use strict'; | |
var AWS = require('aws-sdk'); | |
AWS.config.region = 'us-east-1'; | |
var iot = new AWS.Iot(); | |
function deleteThing(name, policyName) { | |
console.log('Deleting thing "' + name + '"'); | |
let params = {thingName: name}; |
NewerOlder