Skip to content

Instantly share code, notes, and snippets.

View exequielrafaela's full-sized avatar
💭
☕ if(infra == code){return true}

Exequiel Barrirero exequielrafaela

💭
☕ if(infra == code){return true}
View GitHub Profile
@exequielrafaela
exequielrafaela / README.md
Created August 25, 2017 22:57 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@exequielrafaela
exequielrafaela / nginx.conf
Created September 24, 2018 21:20 — forked from kmjones1979/nginx.conf
Example NGINX configuration to route based on country code using GeoIP
# load dynamic modules
load_module /etc/nginx/modules/ngx_http_geoip_module.so;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
@exequielrafaela
exequielrafaela / DEVELOPMENT_WORKFLOW_A.md
Last active June 28, 2019 22:52
CI/CD Development Workflow w/ Spinnaker + Jenkins

Workflow implementation example A

Jenkins as 1ry executor with dev/stg/prod docker image tags prefix

DEV

  1. Scm-github / scm-bitbucket: git push / PR to develop branch.
  2. Jenkins webhook automatically/manual triggers job which will build docker image w/ unit tests (optional can be in a separate pre-dependency Jenkins / CircleCI job) adding dev-build# tag -> If OK.
  3. Push docker image to AWS ECR.
  4. New docker image with tag dev-* detected by Spinnaker hook that auto triggers a deployment pipeline with DB migrations + ENV vars secret mgmt
@exequielrafaela
exequielrafaela / .gitignore
Last active July 6, 2019 20:20
Reference .gitignore
# Hidden files #
################
.*
#
# Except
#
!*.env.example
!*.dockeringnore
!*.hosts
!/.gitignore
@exequielrafaela
exequielrafaela / prometheus.yml
Created October 17, 2019 23:21 — forked from reachlin/prometheus.yml
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "MultiServiceFullAccessCustom",
"Effect": "Allow",
"Action": [
"ec2:*",
"rds:*"
],
@exequielrafaela
exequielrafaela / gh-pages-deploy.md
Created August 5, 2020 18:36 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@exequielrafaela
exequielrafaela / aws_s3_storage_bucket.tf
Last active October 6, 2020 15:34
AWS S3 Secure Multipurpose Storage Bucket
#
## Examples
# - Complete | https://github.com/binbashar/terraform-aws-s3-bucket/tree/master/examples/complete
# - Replication | https://github.com/binbashar/terraform-aws-s3-bucket/tree/master/examples/s3-replication
#
#=============================#
# Module Instanciation #
#=============================#
module "s3_bucket" {
@exequielrafaela
exequielrafaela / aws-s3api-delete-objects-from-aws-s3api-list.sh
Last active October 6, 2020 15:39
aws s3api delete-objects from aws s3api list
AWS_SHARED_CREDENTIALS_FILE="/home/user/.aws/test/credentials" \
AWS_CONFIG_FILE="/home/user/.aws/test/config" \
aws s3api delete-objects \
--profile test-shared-devops \
--bucket test-shared-gdrive-backup \
--delete \
"$(AWS_SHARED_CREDENTIALS_FILE="/home/user/.aws/test/credentials" AWS_CONFIG_FILE="/home/user/.aws/test/config" aws s3api list-object-versions \
--profile test-shared-devops \
--bucket test-shared-gdrive-backup | jq '{Objects: [.Versions[] | {Key:.Key, VersionId : .VersionId}], Quiet: false}')"
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
"AWS Services","Key Points"
"AWS Backup","AWS Backup is a centralised backup service that makes it easy and cost-effective for you to backup your application data across AWS services in the AWS Cloud, helping you meet your business and regulatory backup compliance requirements.You should use AWS Backup to manage and monitor backups across the AWS services you use, from a single place.Services supported:EBS (it leverages EBS Snapshots)RDS (it supports RDS Aurora Automated Backups and RDS Snapshots)EFS (transition to cold storage is supported for this service)DynamoDBFSxStorage Gateway.You pay for the amount of backup storage you use and the amount of backup data you restore in the month. [*]"
"AWS Data Lifecycle Manager","DLM provides a simple way to manage the lifecycle of EBS resources, such as volume snapshots.You should use DLM when you want to automate the creation, retention, and deletion of EBS snapshots.It is simple to implement. Once set up, it can be monitored easily through CloudWatch.Pricing is mod