Skip to content

Instantly share code, notes, and snippets.

View frjaraur's full-sized avatar

Javier Ramirez frjaraur

View GitHub Profile
@frjaraur
frjaraur / gist:7bad30cedc484486efd3ba5d12362bec
Created October 4, 2020 17:02
Libvirt-KVM create Bridge Interface using nmcli
### Show Active Interfaces
```
$ nmcli con show --active
```
### Create a Bridge Interface
```
$ nmcli con add ifname br0 type bridge con-name br0
Connection 'br0' (892869fe-f8ac-4f17-ace9-b8aeeeee61a0) successfully added.
```
@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 / 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 {
@frjaraur
frjaraur / CephClusterOnOneNode.md
Last active September 25, 2018 14:00
Ceph Cluster on One Node

Ceph Cluster on One Node

Server Configurations

Host Specific Config

Ensure that "ceph" hostname's resolves to your IP

cat /etc/hosts
127.0.0.1	localhost

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