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
#!/bin/bash | |
if [ "$#" -ne 1 ]; then | |
echo "please provide the comment as first argument" | |
exit 1 | |
fi | |
git add . | |
git commit -a -m "$1" | |
git push origin dev |
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
#!/bin/bash | |
projectName=$(gcloud config get-value project) | |
echo "Creating google cloud Kubernetes cluster" | |
gcloud beta container --project "$projectName" clusters create "standard-cluster-1" --zone "us-central1-a" --no-enable-basic-auth --cluster-version "1.12.8-gke.10" --machine-type "n1-standard-1" --image-type "COS" --disk-type "pd-standard" --disk-size "100" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --preemptible --num-nodes "3" --enable-cloud-logging --enable-cloud-monitoring --enable-ip-alias --network "projects/$projectName/global/networks/default" --subnetwork "projects/$projectName/regions/us-central1/subnetworks/default" --default-max-pods-per-node "110" --addons HorizontalPodAutoscaling, |
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
variable "project_name" { | |
default = "" | |
} | |
provider "google" { | |
credentials = "${file("terraformuser.json")}" | |
project = var.project_name | |
} | |
resource "google_container_cluster" "primary" { | |
name = "acme-banking-cluster" | |
network = "default" |
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: ServiceAccount | |
metadata: | |
name: tiller | |
namespace: kube-system | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: tiller-clusterrolebinding |
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
'use strict'; | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
// Constants | |
const port = process.env.PORT || 8080; | |
// App | |
const app = express(); |
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
'use strict'; | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
require('dotenv').config(); | |
const clientTwilio = require('twilio')(process.env.accountSid, process.env.authToken); | |
// Constants | |
const port = process.env.PORT || 8080; | |
// App |
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
require('dotenv').config(); | |
var AssistantV1 = require('ibm-watson/assistant/v1'); | |
const clientTwilio = require('twilio')(process.env.accountSid, process.env.authToken); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
// Constants | |
const port = process.env.PORT || 8080; | |
// App |
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
require('dotenv').config(); | |
var AssistantV1 = require('ibm-watson/assistant/v1'); | |
var TextToSpeechV1 = require('ibm-watson/text-to-speech/v1'); | |
const clientTwilio = require('twilio')(process.env.accountSid, process.env.authToken); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
var awsS3 = require('./aws_s3') | |
// Constants | |
const port = process.env.PORT || 8080; |
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
const AWS = require('aws-sdk'); | |
require('dotenv').config(); | |
module.exports = { | |
uploadToS3: function (file) { | |
let s3bucket = new AWS.S3({ | |
accessKeyId: process.env.IAM_USER_KEY, | |
secretAccessKey: process.env.IAM_USER_SECRET, | |
Bucket: process.env.BUCKET_NAME, |
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
# name: {{ template "fullname" . }} | |
name: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | |
labels: | |
draft: {{ default "draft-app" .Values.draft }} | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | |
spec: | |
replicas: {{ .Values.replicaCount }} |
OlderNewer