Skip to content

Instantly share code, notes, and snippets.

View frjaraur's full-sized avatar

Javier Ramirez frjaraur

View GitHub Profile
@frjaraur
frjaraur / README.md
Last active September 26, 2020 10:11 — forked from rickbassham/README.md
Step by Step Instructions to create an Open Source Astro-Imaging Computer

Instructions (works on amd64 and arm64)

A copy/paste guide to getting a full working astro-imaging computer running on Ubuntu 20.04 LTS. Installs latest stable versions of gpsd, KStars, INDI, OACapture, SkyChart, ASTAP, and Astrometry.net.

It uses the lightweight XFCE4 desktop, and allows you to VNC in, running everything locally on the astro-imaging pc.

Install Ubuntu Server 20.04.1

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
@frjaraur
frjaraur / README.md
Created March 4, 2019 18:58 — forked from StefanWallin/README.md
nginx ssl config with multiple SNI vhosts and A+ SSL Labs score as of 2014-11-05

Configuring nginx for SSL SNI vhosts

Gotchas

Remarks

  • My version of konklones SSL config does not have SPDY support(my nginx+openssl does not support it)
  • You need a default ssl server (example.org-default.conf).
  • Some SSL-options have to be unique across your instance, so it's easier to have them in a common file(ssl.conf).
@frjaraur
frjaraur / haproxy-www.tf
Created October 24, 2018 17:16 — forked from mvasilenko/haproxy-www.tf
How To Use Terraform with DigitalOcean
resource "digitalocean_droplet" "haproxy-www" {
image = "ubuntu-14-04-x64"
name = "haproxy-www"
region = "nyc2"
size = "512mb"
private_networking = true
ssh_keys = [
"${var.ssh_fingerprint}"
]
connection {

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from Feb

@frjaraur
frjaraur / setup-win10docker.ps1
Created April 23, 2018 14:23 — forked from TerribleDev/setup-win10docker.ps1
install hyper-v, containers, and beta docker on windows so you can use windows containers
# allow scripts to run
set-executionpolicy unrestricted -Force
Get-WindowsOptionalFeature -Online | where {$_.FeatureName -like "*Hyper*" -or $_.FeatureName -like "containers" } | Enable-WindowsOptionalFeature -Online -NoRestart
(new-object net.webclient).DownloadFile('https://download.docker.com/win/beta/InstallDocker.msi','docker.msi')
Start-Process 'docker.msi' /qn -Wait

Docker Swarm with Macvlan, Consul and Autoscaling

TL;DR:

This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.

Bonus: We add an autoscaling API called Orbiter (https://gianarb.it/blog/orbiter-the-swarm-autoscaler-moves).

I just want to run containers, like now, on my existing infrastructure and networks!

So you have an existing environment. You use Consul for service discovery. Life is good. Containers are now a thing and you want to work them in without having to worry about overlay networking or reverse proxies. You also don't want to add extra latency (as some naysayers could use it as fuel to kill your hopes and dreams). Lastly, you don't have a lot of time to invest in a complex orchestration tool, such a

@frjaraur
frjaraur / luks_crypt.md
Created January 16, 2018 18:08
create a simple LUKS partition on a single physical volume

LUKS crypt

In this guide, I'm going to setup a keyfile-encrypted LUKS partition. I will be using a single, max-size partition on a single physical device. My physical device is located at /dev/sde

partition the physical device

parted /dev/sde
@frjaraur
frjaraur / docker-compose.yml
Created March 25, 2017 21:31 — forked from ajeetraina/docker-compose.yml
Docker Compose v3.1 file for Secret Management under Docker 1.13
version: "3.1"
services:
db:
image: "mysql:latest"
networks:
collabnet:
aliases: ["db"]
volumes:
- "db_data:/var/lib/mysql"
secrets:

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started