Makefile and YAML templates for automating the use of AWS Elastic Container Registry with Kubernetes.
Based off of this awesome Redsaid blog post.
- Amazon ECR, along with your AWS account ID and the region your ECR is in
- AWS CLI
Makefile and YAML templates for automating the use of AWS Elastic Container Registry with Kubernetes.
Based off of this awesome Redsaid blog post.
rm -rf /var/lib/cloud/instance && rm -rf /var/lib/cloud/instances/* && rm -rf /var/lib/cloud/sem/* | |
cloud-init init && cloud-init modules --mode config && cloud-init modules --mode final |
#!/bin/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |
worker_processes 1; | |
daemon off; | |
error_log /dev/stdout; | |
events { | |
worker_connections 1024; | |
} | |
http { |
#!/usr/bin/sudo ruby | |
# | |
# revealer.rb -- Deobfuscate GHE .rb files. | |
# | |
# This is simple: | |
# Every obfuscated file in the GHE VM contains the following code: | |
# | |
# > require "ruby_concealer.so" | |
# > __ruby_concealer__ "..." |
-- Tit Petric, Monotek d.o.o., Tue 03 Jan 2017 06:54:56 PM CET | |
-- | |
-- Delete nginx cached assets with a PURGE request against an endpoint | |
-- supports extended regular expression PURGE requests (/upload/.*) | |
-- | |
function file_exists(name) | |
local f = io.open(name, "r") | |
if f~=nil then io.close(f) return true else return false end | |
end |
import boto3 | |
import base64 | |
if __name__ == '__main__': | |
session = boto3.session.Session() | |
kms = session.client('kms') | |
encrypted_password = 'AQECAHjgTiiE7TYRGp5Irf8jQ3HzlaQaHGYgsUJDaavnHcFm0gAAAGswaQYJKoZIhvcNAQcGoFwwWgIBADBVBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDDwxVQuG0oVwpkU7nQIBEIAoVGk1/wpserb+GVUOzE7PiL/Nr9fTDFKZfpKpF0ip2ct4B2q0Wn6ZZw==' | |
binary_data = base64.b64decode(encrypted_password) |
worker_processes 1; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
init_worker_by_lua_block { | |
redis = require("resty.redis") | |
} | |
server { |
ASG name = frigga.group = app-stack-detail(-options)-push | |
frigga.cluster = app-stack-detail | |
frigga.push = v<sequence) | |
options: | |
- c0<value> = countries | |
- d0<value = devPhase | |
- h0<value> = hardware |