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/sh | |
set -o errexit | |
# create registry container unless it already exists | |
reg_name='kind-registry' | |
reg_port='5000' | |
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" | |
if [ "${running}" != 'true' ]; then | |
docker run \ | |
-d --restart=always -p "${reg_port}:5000" --name "${reg_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: autoscaling/v2beta2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: ace-dev-hpa | |
namespace: default | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: my-ace-dev-ibm-ace-server-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
APP=ace-dev | |
VERSION=v1.0 | |
DOCKER_REGISTRY=registry.local.tld:5000 | |
CURL_DIGEST:=$(shell curl -v --silent -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' \ | |
-X GET http://$(DOCKER_REGISTRY)/v2/$(APP)/manifests/$(VERSION) 2>&1 | grep Docker-Content-Digest | awk '{print $$3}') | |
.PHONY: build | |
build: | |
docker build --rm -t $(DOCKER_REGISTRY)/$(APP):$(VERSION) . |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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: ConfigMap | |
metadata: | |
name: prometheus-server-conf | |
labels: | |
name: prometheus-server-conf | |
namespace: monitoring | |
data: | |
prometheus.rules: |- | |
groups: |
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 Prometheus = require('prom-client') | |
const client = require('prom-client'); | |
const bodyParser = require('body-parser'); | |
var mongo = require('./mongo.js'); | |
//Prometheus | |
const counterProductAll = new client.Counter({ |
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 }} |
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
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
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 |
NewerOlder