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: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
labels: | |
app: alb-ingress-controller | |
name: alb-ingress-controller | |
rules: | |
- apiGroups: | |
- "" | |
- extensions |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:AuthorizeSecurityGroupIngress", | |
"elasticloadbalancing:ModifyListener", | |
"ec2:DescribeInstances", |
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
2018-10-15T11:04:04-03:00 [ℹ] using region us-east-1 | |
2018-10-15T11:04:05-03:00 [▶] role ARN for the current session is "arn:aws:iam::832293009740:user/matias.desanti" | |
2018-10-15T11:04:06-03:00 [▶] resolving AMI using StaticGPUResolver for region us-east-1 and instanceType m5.large | |
2018-10-15T11:04:06-03:00 [▶] can't resolve AMI using StaticGPUResolver as instance type m5.large is non-GPU | |
2018-10-15T11:04:06-03:00 [▶] resolving AMI using StaticDefaultResolver for region us-east-1 and instanceType m5.large | |
2018-10-15T11:04:07-03:00 [ℹ] using "ami-0440e4f6b9713faf6" for nodes | |
2018-10-15T11:04:07-03:00 [▶] cfg = &api.ClusterConfig{Region:"us-east-1", Profile:"", Tags:map[string]string{}, ClusterName:"floral-monster-1539612246", NodeAMI:"ami-0440e4f6b9713faf6", NodeType:"m5.large", Nodes:2, MinNodes:0, MaxNodes:0, NodeVolumeSize:0, MaxPodsPerNode:0, NodePolicyARNs:[]string(nil), NodeSSH:false, SSHPublicKeyPath:"~/.ssh/id_rsa.pub", SSHPublicKey:[]uint8(nil), SSHPublicKeyName:"", WaitTimeout:1200000000000, Se |
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
@Library('wolox-ci') _ | |
node { | |
checkout scm | |
woloxCi('.woloxci/config.yml'); | |
} |
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
config: | |
dockerfile: .woloxci/Dockerfile | |
project_name: some-project-name | |
services: | |
- postgresql | |
- redis | |
steps: | |
analysis: |
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
# sample Jenkinsfile. Might not compile | |
node { | |
checkout scm | |
withEnv(['MYTOOL_HOME=/usr/local/mytool']) { | |
docker.image("postgres:9.2").withRun() { db -> | |
withEnv(['DB_USERNAME=postgres', 'DB_PASSWORD=', "DB_HOST=db", "DB_PORT=5432"]) { | |
docker.image("redis:X").withRun() { redis -> | |
withEnv(["REDIS_URL=redis://redis"]) { | |
docker.build(imageName, "--file .woloxci/Dockerfile .").inside("--link ${db.id}:postgres --link ${redis.id}:redis") { | |
sh "rake db:create" |
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
# Store Puma Application Logs in Cloudwatch | |
Mappings: | |
CWLogs: | |
PumaLogGroup: | |
LogFile: "/var/log/puma/puma.log" | |
TimestampFormat: "" | |
Outputs: | |
PumaCWLogGroup: | |
Description: "Puma Application Logs" |
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 winston = require('winston'), | |
moment = require('moment'), | |
config = require('../../config/config').config, | |
getNamespace = require('cls-hooked').getNamespace; | |
exports.logger = new winston.Logger({ | |
transports: [ | |
new winston.transports.Console({ | |
formatter: (options) => { | |
const ns = getNamespace('application'); |
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
LogStashLogger.configure do |config| | |
config.customize_event do |event| | |
hash = event.to_hash | |
tags = hash['tags'] | |
event['requestId'] = tags.present? ? tags[0] : RequestStore.store[:request_id] | |
event['subId'] = RequestStore.store[:sub_id] | |
event['service'] = 'Microservice A' | |
event['logLevel'] = hash['severity'] | |
event['timestamp'] = Time.now.utc.iso8601(3) | |
end |
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
console.log(cognitoUser) | |
AWS.config.region = 'us-east-1'; | |
if (cognitoUser != null) { | |
cognitoUser.getSession(function(err, result) { | |
if (result) { | |
console.log('You are now logged in.'); | |
// Add the User's Id Token to the Cognito credentials login map. |