Skip to content

Instantly share code, notes, and snippets.

View sudheerchamarthi's full-sized avatar

Sudheer Chamarthi sudheerchamarthi

View GitHub Profile
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"CloudTrail": {
"Type": "AWS::CloudTrail::Trail",
"Properties": {
"EnableLogFileValidation": "True",
"IncludeGlobalServiceEvents": "True",
"IsLogging": "True",
"IsMultiRegionTrail": "True",
spec:
containers:
- name: mycontainer
image: yourimage
ports:
- containerPort: 3000
env:
- name: USERNAME
value: "bob"
$ sudo mkdir -p
$ sudo mkdir -p /var/log/kolide/
$ sudo openssl genrsa -out server.key 4096
$ sudo openssl req -new -key server.key -out server.csr
$ sudo openssl x509 -req -days 366 -in server.csr -signkey server.key -out server.cert
import json
def lambda_handler(event, context):
import boto3
import time
import random
import string
print(event)
kinesis = boto3.client('kinesis')
kineses_stream_name = "cloudvary"
from __future__ import print_function
import base64
print('Loading function')
def lambda_handler(event, context):
output = []
print(event)
@sudheerchamarthi
sudheerchamarthi / Dockerfile
Created December 20, 2019 19:51
RsyslogdDockerfile
FROM ubuntu
RUN apt update && apt install rsyslog -y
RUN echo '$ModLoad imudp \n\
$UDPServerRun 514 \n\
$ModLoad imtcp \n\
$InputTCPServerRun 514 \n\
$template RemoteStore, "/var/log/remote/%$year%/%$Month%/%$Day%/%$Hour%.log" \n\
:source, !isequal, "localhost" -?RemoteStore \n\
:source, isequal, "last" ~ ' > /etc/rsyslog.conf
ENTRYPOINT ["rsyslogd", "-n"]
version: "3.7"
# USAGE:
# Create and start the cluster: docker-compose up -d
# Tear down the cluster: docker-compose down
# Reove everything including the volumes: docker-compose down -v
services:
# 1. Syslog server
syslogserver:
@sudheerchamarthi
sudheerchamarthi / namespace.yaml
Created December 21, 2019 17:18
SeparateNamespace for Rsyslog
kind: Namespace
apiVersion: v1
metadata:
name: rsyslog
apiVersion: v1
kind: PersistentVolume
metadata:
name: efs
namespace: "rsyslog"
spec:
capacity:
storage: 500Gi
volumeMode: Filesystem
accessModes:
apiVersion: apps/v1
kind: Deployment
metadata:
name: rsyslog-deployment
namespace: rsyslog
labels:
app: rsyslog
spec:
replicas: 3
selector: