This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --privileged -u ansible -v /etc/kolla//kolla-toolbox/:/var/lib/kolla/config_files/:ro -e KOLLA_SERVICE_NAME=kolla-toolbox -e ANSIBLE_LIBRARY=/usr/share/ansible -e ANSIBLE_NOCOLOR=1 -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS -e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -e KOLLA_BASE_DISTRO=centos -e KOLLA_INSTALL_TYPE=source -e KOLLA_INSTALL_METATYPE=mixed -ti beyondtheclouds/centos-source-kolla-toolbox:5.0.1 | |
INFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json | |
INFO:__main__:Validating config file | |
INFO:__main__:Kolla config strategy set to: COPY_ALWAYS | |
INFO:__main__:Copying service configuration files | |
INFO:__main__:Writing out command to execute | |
Running command: 'sleep infinity' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ip should be set on the br-ex bridge | |
ip addr del 192.168.143.127/32 dev eth2 | |
ip addr add 192.168.143.127/32 dev br-ex | |
ifconfig br-ex up | |
route add -net 192.168.143.0/24 br-ex | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(openvswitch-db)[root@paravance-3-kavlan-5 /]# ovs-vsctl show | |
de204f36-e5a5-4c79-b7be-15263abfe096 | |
Manager "ptcp:6640:10.24.72.3" | |
Bridge br-ex | |
Controller "tcp:127.0.0.1:6633" | |
is_connected: true | |
fail_mode: secure | |
Port phy-br-ex | |
Interface phy-br-ex | |
type: patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# simple, only delay | |
IF=eth0 | |
tc qdisc add dev $IF root netem delay 100ms | |
# complex with htb + delay + filtering | |
IF=eth0 | |
tc qdisc del dev $IF root | |
tc qdisc add dev $IF root handle 1: htb | |
tc class add dev $IF parent 1: classid 1:10 htb rate 1mbit | |
tc qdisc add dev $IF parent 1:10 handle 10: netem delay 200ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
DOCUMENTATION = ''' | |
--- | |
module: ham_json | |
short_description: Module for modifying json/yaml files | |
description: | |
- A module targeting at modifying json/yaml files | |
src: | |
description: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine | |
from sqlalchemy import Column, Integer, String, Table, Text, Date | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import ForeignKey | |
from sqlalchemy.orm import relationship, backref, sessionmaker, joinedload | |
from datetime import datetime | |
engine = create_engine('sqlite:///:memory:', echo=False) | |
Session = sessionmaker(bind=engine) | |
session = Session() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the iso | |
wget http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-server-amd64.iso | |
# create the image disk | |
qemu-img create -f qcow2 disk.qcow2 10G | |
# launch the creation | |
virsh create ubuntu.xml | |
# you can connect to using vnc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DISPLAY=:1 | |
Xvfb :1 -screen 0 1600x900x16 & | |
x11vnc -storepasswd "password" ~/.vnc_passwd | |
openbox-session & | |
x11vnc -scale 1 -display :1 -xkb -forever -rfbauth ~/.vnc_passwd & | |
# novnc support | |
# launch.sh --vnc localhost:5900 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
6 dés, 3 relances. | |
Quelle est la probabilité d'obtenir au moins 3 faces identiques. | |
choix : | |
* on décide a priori d'essayer dobtenir au moins 3 dés avec une face prédéfinie (par exemple 1) | |
* on décide après le premier lancer d'obtenir au moins 3 dés avec une face qui a déjà été obtenue au premier lancer | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import boto | |
import boto.s3.connection | |
import sys | |
import os | |
access_key = 'ZO9OYE6J48X3LPP5JIWZ' | |
secret_key = 'QlyDGOBkjHa+AmKauCswrEs3kltF7XkiZCNVZG+Y' |
NewerOlder