Skip to content

Instantly share code, notes, and snippets.

View mreferre's full-sized avatar

Massimo Re Ferrè mreferre

View GitHub Profile
# This should work on Kubernetes deployments on AWS that have an ALB ingress controller as well as App Mesh components deployed.
apiVersion: appmesh.k8s.aws/v1beta1
kind: Mesh
metadata:
name: MESH_NAME
---
apiVersion: appmesh.k8s.aws/v1beta1
kind: VirtualNode
metadata:
name: nginx-v1
@mreferre
mreferre / Yelb-EC2-Postgres-Redis.yaml
Last active February 11, 2020 20:00
Yelb Plumbing
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'EC2 Postgres and EC2 Redis deployments for Yelb backends'
Parameters:
KeyName:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
(where applicable)
Type: AWS::EC2::KeyPair::KeyName
ConstraintDescription: Can contain only ASCII characters.
InstanceType:
@mreferre
mreferre / nginx.conf
Created May 21, 2020 09:02
/etc/nginx/nginx.conf (sample of reverse proxy config)
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
@mreferre
mreferre / yelb-k8s-appmesh-gateway.yaml
Created May 21, 2020 09:05
Yelb YAML for AppMesh GW
apiVersion: v1
kind: Service
metadata:
name: redis-server
labels:
app: redis-server
tier: cache
spec:
type: ClusterIP
ports:
args: {
scale_ui: 2
scale_appserver: 3
}
containers: {
"yelb-ui": {
image: "mreferre/yelb-ui:0.7"
scale: args.scale_ui
ports:
@mreferre
mreferre / user-data-alex
Created October 24, 2022 07:19
user-data-alex
#!/bin/bash
set -e -x
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get upgrade -y
echo Building and installing the amazon-efs-utils #(reference: https://gist.github.com/ryanmaclean/c873c9a86f0bc3ee3a260882e73edecb)
apt-get -y install git binutils
git clone https://github.com/aws/efs-utils
cd efs-utils
./build-deb.sh