NOTE: This document has now been added to the nginx-sso wiki, here. Any further updates will be made there.
- Docker
- Nginx
- nginx-sso
for NODE in $(docker node ls --format '{{.Hostname}}'); do | |
echo -e "${NODE} - $(docker node inspect --format '{{.Status.Addr}}' "${NODE}")"; | |
done |
openssl genrsa -out self-ssl.key
openssl req -new -key self-ssl.key -out self-ssl.csr -config csr.conf
openssl x509 -req -days 365 -in self-ssl.csr -signkey self-ssl.key -out self-ssl.crt -extensions req_ext -extfile csr.conf
Sign from Root CA:
openssl x509 -req -days 365 -extensions req_ext -extfile csr.conf -CA RootCA.crt -CAkey RootCA.key -in self-ssl.csr -out self-ssl.crt
create or replace package app_error_pkg | |
as | |
-- | |
-- Function: apex_error_handling | |
-- Purpose: Try to elegantly handle errors that occur while using the application. | |
-- | |
function apex_error_handling ( | |
p_error in apex_error.t_error ) | |
return apex_error.t_error_result; | |
-- |
This guide explains how to create a simple multi cloud Docker cluster using Docker Swarm, Docker Machine and the three top cloud providers nowadays - Google Compute Engine, Microsoft Azure and AWS.
This guide assumes you have a Linux host with Docker CE installed. If you are using Docker for Mac or Docker for Windows you can avoid the Docker Machine set up since it comes included.
1) Login to Cloud Key | |
2) Cloud Key ssh: `curl https://get.acme.sh | sh` | |
3) Cloud Key ssh: `acme.sh --upgrade --auto-upgrade --accountemail "[email protected]"` | |
4) Cloud Key ssh: Add `cloudkey-renew-hook.sh` file to `/root/.acme.sh` | |
5) Create free CloudFlare account (if not already member) | |
6) Login to CloudFlare | |
7) On CloudFlare: Create a zone for a domain you own (can add a cheap domain with namecheap.com or any number of alternatives) | |
8) On CloudFlare: Create an A record for your Cloud Key; ie: unifi.CHANGE.ME, 192.168.1.10 | |
9) On UniFi Controller: Go to Settings; Click "Controller"; Change "Controller Hostname/IP" to the name entered in step 8. | |
10) On CloudFlare: go to Overview for your zone; click "Get your API key" |
This is based on a guide on the Ubnt forums.
Log into your Edgerouter and run the following - sudo -i && vi /config/user-data/update-adblock-dnsmasq.sh
This will switch you to the root user and open up vi
.
#!/bin/bash
This is a little helper script to regulary back up your data using the Borg backup tool. I wrote this as I was frustrated with Deja-Dup, which does not allow me to exclude directories by pattern, hence I ended up with backups that were very large and took a really long time to create because they contained many directories with non-essential files (e.g. node modules or Python virtual environments). Borg backup is a simple tool that offers everything that Deja-Dup does and is easier to customize.
/etc/crontab
- this will call the script every hour). Please note that the script will perform its own checking to see# The MIT License | |
# SPDX short identifier: MIT | |
# Further resources on the MIT License | |
# Copyright 2017 Denis Gladkikh (https://www.outcoldman.com/en/archive/2017/07/19/dbhist/) | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
#!/bin/bash | |
# set -x | |
MANAGER=${1:-3} | |
WORKER=${2:-0} | |
#========================= | |
# Creating cluster members | |
#========================= |