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 Zlib = require('zlib'); | |
const Logstash = require('logstash-client'); | |
const lambdaVersion = function (logStream) { | |
let start = logStream.indexOf('['); | |
let end = logStream.indexOf(']'); | |
return logStream.substring(start+1, end); | |
} | |
exports.handler = async (event, context) => { |
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
input { | |
udp { | |
type => lambda | |
port => 7000 | |
} | |
gelf { | |
type => docker | |
port => 5000 | |
} |
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
{ | |
"Statement": { | |
"Effect": "Allow", | |
"Principal": { "Service": "logs.AWS_REGION.amazonaws.com" }, | |
"Action": "sts:AssumeRole" | |
} | |
} |
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
{ | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "kinesis:PutRecord", | |
"Resource": "arn:aws:kinesis:AWS_REGION:ACOUNT_ID:stream/cloudwatch-logs" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": "iam:PassRole", |
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
{ | |
"Records": [ | |
{ | |
"kinesis": { | |
"partitionKey": "partitionKey-03", | |
"kinesisSchemaVersion": "1.0", | |
"data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=", | |
"sequenceNumber": "49545115243490985018280067714973144582180062593244200961", | |
"approximateArrivalTimestamp": 1428537600 | |
}, |
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
{ | |
"roleName": "LogsConsumerRole", | |
"policies": [ | |
{ | |
"document": { | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", |
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
aws kinesis create-stream --stream-name cloudwatch-logs --shard-count 10 |
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
import org.sonatype.nexus.blobstore.api.BlobStoreManager; | |
import org.sonatype.nexus.repository.storage.WritePolicy; | |
repository.createDockerHosted('mlabouardy', 5000, 443, BlobStoreManager.DEFAULT_BLOBSTORE_NAME, true, true, WritePolicy.ALLOW) |
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 | |
NEXUS_USERNAME="admin" | |
NEXUS_PASSWORD="admin123" | |
echo "Install Java JDK 8" | |
yum update -y | |
yum install -y java-1.8.0-openjdk wget | |
echo "Install Nexus OSS" |
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
{ | |
"variables" : { | |
"zone" : "YOUR ZONE", | |
"project" : "YOUR PROJECT ID", | |
"source_image" : "centos-7-v20181210", | |
"ssh_username" : "packer", | |
"credentials_path" : "PATH/account.json" | |
}, | |
"builders" : [ | |
{ |