This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
wget https://github.com/grafana/loki/releases/download/v2.0.0/promtail-linux-amd64.zip | |
unzip promtail-linux-amd64.zip | |
mv promtail-linux-amd64 /usr/local/bin/promtail | |
cat << EOF > /etc/systemd/system/promtail.service | |
[Unit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import yaml | |
# CURRENT NAME CLUSTER AUTHINFO NAMESPACE | |
# group1-cluster1@kubernetes group1-cluster1 group1-cluster1 | |
# group1-cluster2@group1-cluster2 group1-cluster2 group1-cluster2 | |
# group2-cluster1@group2-cluster1 group2-cluster1 group2-cluster1 | |
# * group2-cluster2@group2-cluster2 group2-cluster2 group2-cluster2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
from email.mime.text import MIMEText | |
from email.mime.multipart import MIMEMultipart | |
import email.utils | |
message = MIMEMultipart('alternative') | |
message['From'] = 'Sender Name <${USER}@${DOMAIN}>' | |
message['To'] = 'Receiver Name <${TO}>' | |
message['Subject'] = 'Any subject' | |
message['Message-Id'] = email.utils.make_msgid() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xec | |
apt-get install -yq libsasl2-modules postfix sasl2-bin | |
cat << EOF > /etc/postfix/sasl/smtpd.conf | |
pwcheck_method: saslauthd | |
mech_list: PLAIN LOGIN | |
EOF | |
cp /etc/default/saslauthd /etc/default/saslauthd-postfix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[runners]] | |
name = "${NAME}" | |
url = "https://git.${DOMAIN}/" | |
token = "" | |
executor = "docker" | |
environment = ["DOCKER_TLS_CERTDIR=", "DOCKER_DRIVER=overlay2"] | |
[runners.custom_build_dir] | |
[runners.docker] | |
tls_verify = false | |
image = "docker:18.09.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geo $rfc6890 { | |
default 0; | |
10.0.0.0/8 1; | |
172.16.0.0/12 1; | |
192.168.0.0/16 1; | |
100.64.0.0/10 1; | |
127.0.0.0/8 1; | |
} | |
geo $allowed_ips { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
kubectl create ns cert-manager | |
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.0.2/cert-manager.crds.yaml | |
helm -n cert-manager upgrade --install cert-manager jetstack/cert-manager --version v1.0.2 --set installCRDs=false | |
cat << EOF | kubectl apply -n cert-manager -f - | |
apiVersion: cert-manager.io/v1 | |
kind: ClusterIssuer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd / | |
cat << EOF > .gitignore | |
dev/ | |
proc/ | |
sys/ | |
tmp/ | |
run/ | |
mnt/ | |
media/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: d-1 | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app.kubernetes.io/instance: d-1 |