Skip to content

Instantly share code, notes, and snippets.

View valentin2105's full-sized avatar

Valentin Ouvrard valentin2105

View GitHub Profile
@valentin2105
valentin2105 / Ganet_Xen_install.md
Last active January 19, 2021 12:53
Install Xen and Ganeti on a Debian server

HOW-TO Install Ganeti/Xen/DRBD ?

You need a Volum Group on your server (LVM) named "vgganeti" for store VMs.
apt-get update && apt-get dist-upgrade
apt-get install git vim aptitude sudo htop screen curl openssh-server locales
apt-get -y install xen-linux-system xen-tools
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
sed -i '/TOOLSTACK/s/=.*/=xl/' /etc/default/xen
echo 'GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M,max:1024M \
  dom0_max_vcpus=1 dom0_vcpus_pin"' > /etc/default/grub
@valentin2105
valentin2105 / Ganeti_Cheasheet.md
Last active July 6, 2018 10:16
Manage a Ganeti Cluster
Add a VM in plain disk:
gnt-instance add plain --disk 0:size=20G --disk 1:size=200M \
-B memory=2G,vcpus=2 -o debootstrap+jessie --no-ip-check \ 
--no-name-check vm.domain.com
Add a VM in DRBD (fully-sharred between two servers) :
gnt-instance add drbd --disk 0:size=20G --disk 1:size=200M \
-B memory=2G,vcpus=2 -o debootstrap+jessie --no-ip-check \
docker run -it --rm -p 443:443 -p 80:80 --name letsencrypt \
-v "./etc/letsencrypt:/etc/letsencrypt" \
-v "./var/lib/letsencrypt:/var/lib/letsencrypt" \
quay.io/letsencrypt/letsencrypt:latest auth
@valentin2105
valentin2105 / nginx_gogs.sh
Last active April 19, 2016 04:33
Nginx for Gogs
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
@valentin2105
valentin2105 / letsencrypt.sh
Created May 17, 2016 07:17 — forked from spalladino/letsencrypt.sh
Template for renewing a letsencrypt certificate in a docker nginx proxy via letsencrypt's docker image
#!/bin/sh
mkdir -p {{ proxy_dir }}/www/{{ domain }}
docker pull quay.io/letsencrypt/letsencrypt
docker run -it --rm --name letsencrypt \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
--volumes-from {{ proxy_docker_container }} \
@valentin2105
valentin2105 / docker-compose.yml
Last active May 21, 2016 17:50
A Flask Docker-compose example
version: '2'
services:
flask_front:
image: nginx:latest
restart: always
ports:
- 80:80
- 443:443
log_driver: syslog
links:

Keybase proof

I hereby claim:

  • I am valentin2105 on github.
  • I am valentinouvrard (https://keybase.io/valentinouvrard) on keybase.
  • I have a public key whose fingerprint is 44DD 00B3 53A7 A47C A6F0 6ED7 958D 7AB0 7735 2484

To claim this, I am signing this object:

@valentin2105
valentin2105 / install-docker-exp.sh
Last active May 9, 2018 01:37 — forked from katopz/install-docker-exp.sh
Install Docker on Ubuntu 16.04 x64
# Install Docker on Ubuntu 14.04.4 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@valentin2105
valentin2105 / docker-letsencrypt
Created July 17, 2016 08:42
Lets-encryptDocker
sudo docker run -it –rm -p 443:443 -p 80:80 –name letsencrypt \
-v „/mnt/letsencrypt:/etc/letsencrypt“ \
-v „/mnt/ssl:/var/lib/letsencrypt“ \
quay.io/letsencrypt/letsencrypt:latest certonly –rsa-key-size 4096 -d meinedomain.de
@valentin2105
valentin2105 / nginx.conf
Created September 11, 2016 23:48 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048