Skip to content

Instantly share code, notes, and snippets.

View valentin2105's full-sized avatar

Valentin Ouvrard valentin2105

View GitHub Profile
@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 \
@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 / letsencypt-ecsda-docker.sh
Last active November 10, 2017 01:59
Upgrade ECDSA Let's Encrypt on my Docker
#! /bin/bash
domain=your-domain.com
[email protected]
apt-get update; apt-get install git openssl
cd /srv
git clone https://github.com/letsencrypt/letsencrypt ; cd letsencrypt
mkdir -p live-ecdsa/$domain/lemp
cd live-ecdsa/$domain/
openssl ecparam -genkey -name secp384r1 > privkey-p384.pem
openssl req -new -sha256 -key privkey-p384.pem -subj "/CN=$domain" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:$domain")) -outform der -out >
@valentin2105
valentin2105 / install_salt.sh
Created April 14, 2016 20:23
Install Salt on Debian Jessie
wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -
echo "deb http://debian.saltstack.com/debian jessie-saltstack main" > /etc/apt/sources.list.d/salt.list
apt-get update ; apt-get -y install salt-master
@valentin2105
valentin2105 / DebianDocker.sh
Last active May 23, 2016 17:48
DebianDocker.sh
apt-get install -y apt-transport-https ca-certificates python-pip
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list
apt-get update ; apt-get -y install docker-engine
pip install docker-compose
@valentin2105
valentin2105 / DockerFile.sh
Last active April 12, 2016 03:48
DockerFile PHP-FPM
FROM php:7.0.5-fpm
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mysqli opcache
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
@valentin2105
valentin2105 / docker-compose.yml
Created April 11, 2016 10:58
docker-compose.yml LEMP PHP7.0
web_db:
image: mariadb:latest
restart: always
volumes:
- ./var/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: @Str0NgP@Ssw0rd
web_front:
image: nginx
@valentin2105
valentin2105 / owncloud-docker-compose.yml
Created March 23, 2016 21:42 — forked from MickaelBergem/ owncloud-docker-compose.yml
Docker Compose file for setting up an ownCloud server using a PostgreSQL database
# Composition of the containers
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;