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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Configuration; | |
using System.Data; | |
using System.IO; | |
using System.Text; | |
using System.Threading; | |
using CodeMakerX.DataAbstraction.Evox; |
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
# forward request and error logs to docker log collector | |
RUN ln -sf /dev/stdout /var/log/nginx/access.log | |
RUN ln -sf /dev/stderr /var/log/nginx/error.log |
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
- name: Create secrets container | |
command: > | |
docker create -v /srv/secrets --name secrets likwid/alpine-ansible bash | |
sudo: no | |
when: has_secrets.rc > 0 | |
- name: Inspect secrets container | |
command: docker inspect secrets | |
register: secrets_raw_output |
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
{ | |
"Job": { | |
"Region": "us-east-1", | |
"ID": "placeholder", | |
"Name": "placeholder", | |
"Type": "service", | |
"Priority": 50, | |
"Datacenters": ["us-east-1a", "us-east-1b", "us-east-1c"], | |
"Constraints": [{ | |
"LTarget": "${attr.kernel.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
/ | |
testing/ | |
apps/ | |
playground/ | |
deploy/ | |
current => green | |
services/ | |
playground-green/ | |
app_name => playground | |
docker_tag => 22222222 |
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 R = require("ramda"); | |
const match = (field, value) => { | |
const matchContainer = R.objOf("match"), | |
fieldContainer = R.objOf(field), | |
matchAndField = R.compose(matchContainer, fieldContainer); | |
return matchAndField(value); | |
}; | |
const boolMatch = (field, operator, value) => { |
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
module.exports = (function (R, AWS, Promise) { | |
const ec2 = new AWS.EC2({region: "us-east-1"}), | |
iamInstanceProfile = { | |
IamInstanceProfile: { | |
Name: "pairing" | |
} | |
}, | |
keyName = { KeyName: "infrastructure" }, | |
securityGroups = ["sg-1233456"], | |
instanceType = { InstanceType: "m4.large" }, |
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
module.exports = { | |
extends: "eslint:recommended", | |
parserOptions: {ecmaVersion: 6}, | |
env: { | |
node: true, | |
es6: true, | |
mocha: true | |
}, | |
rules: { | |
//possible errors |
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
{{- $appKey := printf "prod/services/playground-blue" -}} | |
{{- $app := key $appKey -}} | |
{{- $container_count := key_or_default (printf "prod/apps/%s/container_count" $app) "0" -}} | |
{{- $docker_image := key (printf "prod/apps/%s/docker_image" $app) -}} | |
{{- $docker_tag := key (printf "prod/apps/%s/docker_tag" $app) -}} | |
{{- $container_port := key (printf "prod/apps/%s/container_port" $app) -}} | |
{{- $healthcheck_uri := key (printf "prod/apps/%s/healthcheck_uri" $app) -}} | |
{{- $cpu := key_or_default (printf "prod/apps/%s/cpu" $app) "500" -}} | |
{{- $memory := key_or_default (printf "prod/apps/%s/memory" $app) "256" -}} | |
job "playground-blue" { |
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
job "playground-blue" { | |
datacenters = ["prod"] | |
constraint { | |
attribute = "${attr.kernel.name}" | |
value = "linux" | |
} | |
update { | |
stagger = "10s" | |
max_parallel = 1 |