Skip to content

Instantly share code, notes, and snippets.

View andrei-dascalu's full-sized avatar
🎯
Focusing

Andrei Dascalu andrei-dascalu

🎯
Focusing
View GitHub Profile

HOWTO: Installing Vault On AWS Linux

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

@andrei-dascalu
andrei-dascalu / kube_pi3.sh
Created March 31, 2018 22:10
Script to install docker/kubeadm/kubelet for a Kubernetes master node on Raspberry Pi 3
#!/bin/bash
# sudo apt-get -y install \
# raspberrypi-kernel-headers \
# raspberrypi-kernel
#sudo apt-get -y install \
# linux-headers-4.9.0-4-rpi2 \
# linux-image-4.9.0-4-rpi2
#At this moment, kubeadm/kubelete 1.10 can't be installed on the current version
#!/bin/bash
sysctl -w net.core.netdev_max_backlog="150000"
sysctl -w net.core.rmem_max="16777216"
sysctl -w net.core.somaxconn="65535"
sysctl -w net.core.wmem_max="16777216"
sysctl -w net.ipv4.ip_local_port_range="1025 65535"
sysctl -w net.ipv4.tcp_fin_timeout="20"
sysctl -w net.ipv4.tcp_keepalive_time="30"
sysctl -w net.ipv4.tcp_max_syn_backlog="20480"
@andrei-dascalu
andrei-dascalu / allow-privileged-for-microk8s.md
Created July 27, 2019 18:57 — forked from antonfisher/allow-privileged-for-microk8s.md
MicroK8s add --allow-privileged=true flag

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

@andrei-dascalu
andrei-dascalu / resource.yml
Last active April 2, 2021 09:10
Kustomize - base
---
# deployment
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: main
name: mainapp
spec:
replicas: 1
@andrei-dascalu
andrei-dascalu / patch.yml
Created April 2, 2021 09:09
Kustomize - patch
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: main
name: mainapp
spec:
template:
spec:
containers:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: mainapp
nameSuffix: -web
commonLabels:
environment: web
customer: main
bases:
FROM php:8.0-cli-alpine
WORKDIR /app
ENV COMPOSER_VERSION="2.2.6"
RUN apk update && apk add --no-cache --no-progress --virtual .build-deps \
git \
make \
automake \
version: '3.9'
services:
app:
working_dir: /app
build:
dockerfile: Dockerfile
context: .
volumes:
- .:/app
command: ["/bin/sh", "-c", "composer install -o && php vendor/bin/rr get-binary -n && chmod +x ./rr && ./rr serve"]
######################################################################################
# THIS IS SAMPLE OF THE CONFIGURATION #
# IT'S NOT A DEFAULT CONFIGURATION, IT'S JUST A REFERENCE TO ALL OPTIONS AND PLUGINS #
# MORE DOCS CAN BE FOUND HERE: <https://roadrunner.dev/docs/intro-config> #
######################################################################################
# Production usage guide: https://roadrunner.dev/docs/beep-beep-production
# Hint: RR will replace any config options using reference to environment variables,
# eg.: `option_key: ${ENVIRONMENT_VARIABLE_NAME}`.