Skip to content

Instantly share code, notes, and snippets.

View evrardjp's full-sized avatar

Jean-Philippe Evrard evrardjp

View GitHub Profile
@evrardjp
evrardjp / br-vlan
Created June 10, 2016 17:56
veth example
auto br-vlan
iface br-vlan inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
address 172.29.248.100
netmask 255.255.252.0
offload-sg off
# Create veth pair, don't bomb if already exists
pre-up ip link add br-vlan-veth type veth peer name eth12 || true
acl clienthello req_ssl_hello_type 1
acl serverhello rep_ssl_hello_type 2
tcp-request inspect-delay 5s
tcp-request content accept if clienthello
tcp-response content accept if serverhello
@evrardjp
evrardjp / cobbler-osa-multi-aio.sh
Created June 14, 2016 14:46 — forked from cloudnull/cobbler-osa-multi-aio.sh
Full Multi-Node OpenStack deployment using a single OnMetal host from the Rackspace Public Cloud. Read more in the "About this script" comment.
#!/usr/bin/env bash
# Copyright [2016] [Kevin Carter]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@evrardjp
evrardjp / rabbitmq_restart.yml
Created June 24, 2016 08:30
rabbitmq_restart.yml
- name: Restart Rabbitmq containers
hosts: rabbitmq_all
serial: 1
tasks:
- name: Restart node
shell: reboot
- name: Wait for Rabbitmq aliveness
wait_for:
port: 5672
host: "{{ ansible_ssh_host }}"
@evrardjp
evrardjp / deploy.sh
Created July 1, 2016 13:56
deploy.sh
#!/usr/bin/env bash
set -e -u -x
set -o pipefail
export ADMIN_PASSWORD=${ADMIN_PASSWORD:-"secrete"}
export DEPLOY_AIO=${DEPLOY_AIO:-"no"}
export DEPLOY_HAPROXY=${DEPLOY_HAPROXY:-"no"}
export DEPLOY_OA=${DEPLOY_OA:-"yes"}
export DEPLOY_ELK=${DEPLOY_ELK:-"yes"}
@evrardjp
evrardjp / run_plugin_in_venv.sh.j2
Created July 12, 2016 18:22
run_plugin_in_venv.sh.j2
#!/usr/bin/env python
{% if maas_venv_enabled | bool %}
{{ maas_venv_bin }}/python $@
{% else %}
/usr/bin/python2.7 $@
{% endif %}
@evrardjp
evrardjp / gate-instance-testing.sh
Last active February 10, 2017 15:11
create instance for testing
#!/bin/bash
source /root/openrc
openstack project create --domain default accounting
openstack project create --domain default human_resources
openstack project create --domain default information_technology
openstack project create --domain default marketing
openstack role add --project accounting --user admin admin
openstack role add --project human_resources --user admin admin
openstack role add --project information_technology --user admin admin
$ ./osa-differ.py 57fa0b9235738e4b42801c90a72b56b7ab2c151e aec908fde --debug
2016-07-20 13:34:19,612 - DEBUG - Retrieving commit message from the older OSA commit
2016-07-20 13:34:20,810 - DEBUG - Retrieving commit message from the newer OSA commit
2016-07-20 13:34:20,987 - DEBUG - Generating initial report header for OpenStack-Ansible
2016-07-20 13:34:20,987 - DEBUG - Retrieving commits between 57fa0b9235738e4b42801c90a72b56b7ab2c151e and aec908fde in openstack/openstack-ansible
2016-07-20 13:34:21,275 - DEBUG - Retrieving OSA project list at commit 57fa0b9235738e4b42801c90a72b56b7ab2c151e
2016-07-20 13:34:23,219 - DEBUG - Retrieving OSA project list at commit aec908fde
2016-07-20 13:34:24,172 - DEBUG - Retrieving commits between 6f897a20bf56522e9b4d2490cf03de2312e47a9d and 6f897a20bf56522e9b4d2490cf03de2312e47a9d in openstack/aodh
2016-07-20 13:34:24,384 - DEBUG - Retrieving commits between b95710db063258e29abc00a3a6313b840b906b9d and b95710db063258e29abc00a3a6313b840b906b9d in openstack/ceilometer
2016-07-
---
- hosts: "{{ host }}"
tasks:
- apt:
update_cache: yes
- apt:
name: "{{ item }}"
state: present
with_items:
- git
alembic==0.8.4
amqp==1.4.9
anyjson==0.3.3
aodh==2.0.4
appdirs==1.4.0
argparse==1.4.0
automaton==1.2.0
babel==2.2.0
beautifulsoup4==4.4.1
boto==2.39.0