Skip to content

Instantly share code, notes, and snippets.

View swamirara's full-sized avatar
😃
Focusing

swamirara

😃
Focusing
View GitHub Profile
@swamirara
swamirara / installation.txt
Created July 14, 2022 17:10 — forked from yogin/installation.txt
Script to mute or unmute and resolve a Datadog monitor
vagrant@kratos:~$ chmod +x manage_monitor.sh
vagrant@kratos:~$ sudo cp manage_monitor.sh /etc/init.d/manage_monitor
vagrant@kratos:~$ sudo update-rc.d manage_monitor defaults
@swamirara
swamirara / README.md
Created March 10, 2022 14:02 — forked from mhausenblas/README.md
Fluent Bit log forwarding to CloudWatch

Set Up Fluent Bit as a DaemonSet to Send Logs to CloudWatch

Create a new 1.13 or 1.14 EKS cluster called container-insights.

Enable IRSA:

eksctl utils associate-iam-oidc-provider \
               --name container-insights \
               --approve
#Install IIS Feature
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
#Install FTP feature
Install-WindowsFeature -Name Web-Ftp-Server -IncludeAllSubFeature -IncludeManagementTools -Verbose
#Creating new FTP site
$SiteName = "Demo FTP Site"
$RootFolderpath = "C:\DemoFTPRoot"
$PortNumber = 21
@swamirara
swamirara / AWSDevOpsStudyNotes
Created March 1, 2020 00:29
AWS DevOps Engineer Professional Study Notes
CI & CD:
========
2 core software development processes
CI process of automating regular code commits followed by an automated build and test process designed to highlight intergration issues early.
Additional tooling and functionality provided by Bamboo, CruiseControl, Jenkins, Go and TeamCity etc.
workflow based
CD takes the form of a workflow based process which accepts a tested software build payload from a CI server. Automates the deployment into a working QA, Pre-prod or Prod environment.
AWS CodeDeploy and CodePipeline provide CI/CD services
Elasticbeanstalk and CFN provide functionality which can be utilized by CI/CD servers.
@swamirara
swamirara / auto-sqlalchemy.py
Created August 8, 2019 05:31 — forked from kennethreitz/auto-sqlalchemy.py
Some code for using schemas as your declarative base with SQL-Alchemy, along with support for Celery's forking.
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from multiprocessing.util import register_after_fork
Base = declarative_base()
@swamirara
swamirara / get_layer_packages.sh
Created August 7, 2019 04:30 — forked from qtangs/get_layer_packages.sh
Get packages for AWS Lambda Layer
#!/bin/bash
export PKG_DIR="python"
rm -rf ${PKG_DIR} && mkdir -p ${PKG_DIR}
docker run --rm -v $(pwd):/foo -w /foo lambci/lambda:build-python3.6 \
pip install -r requirements.txt --no-deps -t ${PKG_DIR}
@swamirara
swamirara / sqlalchemy_conftest.py
Created August 6, 2019 06:01 — forked from kissgyorgy/sqlalchemy_conftest.py
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
@pytest.fixture(scope='session')
def engine():
return create_engine('postgresql://localhost/test_database)