This file contains hidden or 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
/ip cloud | |
set ddns-enabled=yes | |
/interface ipip | |
add allow-fast-path=no ipsec-secret=REPLACE local-address=REPLACE_SITE_2_IP name=msk-spb remote-address=REPLACE_SITE_1_IP | |
/ip address | |
add address=192.168.99.1/30 interface=msk-spb network=192.168.99.0 |
This file contains hidden or 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
/system script | |
add dont-require-permissions=no name=allyouneed owner=root policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":do {\ | |
\n :do {\ | |
\n /file remove \"/allyouneed.rsc\";\ | |
\n } on-error={}\ | |
\n \ | |
\n :put \"Downloading allyouneed.rsc...\";\ | |
\n :do {\ | |
\n /tool fetch url=\"https://antifilter.download/list/allyouneed.rsc\" dst-path=\"/allyouneed.rsc\"\ |
This file contains hidden or 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
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.14.0/cert-manager.crds.yaml | |
helm install cert-manager jetstack/cert-manager --namespace cert-manager --version v0.14.0 --set installCRDs=true | |
cat << EOF | kubectl apply -n cert-manager -f - | |
apiVersion: cert-manager.io/v1alpha2 | |
kind: Issuer | |
metadata: | |
name: letsencrypt-prod | |
namespace |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# kubectl get ing --all-namespaces -o yaml > /tmp/ing.yaml | |
import yaml | |
data = yaml.load( | |
open("/tmp/ing.yaml").read() | |
) |
This file contains hidden or 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
kubectl proxy | |
finalize () { | |
kubectl get namespace "$1" -o json > tmp.json | |
sed -i 's/ "kubernetes"//g' tmp.json | |
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json "http://127.0.0.1:8001/api/v1/namespaces/$1/finalize" | |
rm tmp.json | |
} | |
finalize olm |
This file contains hidden or 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 | |
# docker run -it --rm --network host -v /tmp/packages:/packages debian | |
# docker run -it --rm --network host -v /tmp/packages:/packages -v ${PWD}/nginx.sh:/nginx.sh:ro debian /nginx.sh | |
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list | |
apt-get update -q | |
apt-get install -yq build-essential curl git dh-autoreconf zlib1g-dev wget libssl-dev libxml2-dev libxslt-dev libgd-dev libgeoip-dev libpcre++-dev checkinstall libmaxminddb0 libmaxminddb-dev | |
This file contains hidden or 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
kubectl -n backup delete job/kubespray | |
cat << EOF | kubectl apply -f - | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
labels: | |
app: kubespray | |
name: kubespray | |
namespace: backup |
This file contains hidden or 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
export DOCKER_CLI_EXPERIMENTAL=enabled | |
export TAG=0.32.0 | |
export _PULL_BASE_REF="master" | |
export REGISTRY=egeneralov | |
go get -v k8s.io/ingress-nginx | |
cd ~/go/src/k8s.io/ingress-nginx | |
git checkout controller-0.32.0 | |
sed -i -e 's/^ALL_ARCH.*/ALL_ARCH = amd64/g' Makefile | |
sed -i 's/amd64 arm arm64/amd64/g' images/nginx/Makefile |
This file contains hidden or 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 | |
apt-get install -yq md5deep wget fakeroot | |
[ -z "${GO_VERSION}" ] && GO_VERSION=1.17 | |
mkdir -p /tmp/golang/{DEBIAN,usr/local} | |
cd /tmp/golang/ | |
wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz |
This file contains hidden or 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
variables: | |
PAT: "" | |
stages: | |
- check | |
- build | |
kernel: | |
stage: build | |
image: debian:10 |