- Updated on May 29 to accommodate etcd container not having
/bin/sh
available anymore.
curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.
nginx -V
for the following:
...
TLS SNI support enabled
# Install Kubernetes Cluster | |
# Targets: Master + Workers | |
# Prepare system | |
# Disable SELinuw | |
setenforce 0 | |
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config | |
# Disable Swap |
#!/bin/sh | |
# Backup your data | |
# Use at your own risk | |
# Usage ./extended-cleanup-rancher2.sh | |
# Include clearing all iptables: ./extended-cleanup-rancher2.sh flush | |
docker rm -f $(docker ps -qa) | |
docker rmi -f $(docker images -q) | |
docker volume rm $(docker volume ls -q) | |
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done | |
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico" |
#!/bin/bash | |
# Script origin @ https://gist.github.com/delphym/687927bf521f598714e27804304ceca4 | |
# Setup | |
# | |
# - Create a new Jenkins Job | |
# - Mark "None" for Source Control Management | |
# - Select the "Build Periodically" build trigger | |
# - configure to run as frequently as you like | |
# - Add a new "Execute Shell" build step |
#!/bin/sh | |
# OUTDATED: please refer to the link below for the latest version: | |
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |
#!/usr/bin/env python3 | |
import struct | |
import re | |
import socket | |
import sys | |
MAC = '1c:5a:6b:b8:93:c0' | |
def wake_on_lan(mac): |
[ | |
{ country: 'Australia', code: 'AU' }, | |
{ country: 'Austria', code: 'AT' }, | |
{ country: 'Belgium', code: 'BE' }, | |
{ country: 'Brazil', code: 'BR' }, | |
{ country: 'Bulgaria', code: 'BG' }, | |
{ country: 'Canada', code: 'CA' }, | |
{ country: 'Croatia', code: 'HR' }, | |
{ country: 'Cyprus', code: 'CY' }, | |
{ country: 'Czech Republic', code: 'CZ' }, |
This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.
I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/
in my Dockerfiles, and also work from
isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/
.
At the end of the day, vendoring (and committing vendor/
) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:
#!/bin/bash | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |