Skip to content

Instantly share code, notes, and snippets.

View evrardjp's full-sized avatar

Jean-Philippe Evrard evrardjp

View GitHub Profile
#For a new components that has to be proxied by haproxy, just create the component here and add
newcomponent_hosts:
nameofthehost1:
ip: <ip>
container_vars:
haproxy_service_configs:
- newcomponent_haproxied1:
haproxy_service_name: first_config_file
haproxy_backend_nodes: "{{ [groups['newcomponent_hosts'] }}"
- newcomponent_haproxied2:
{% set processes = 0 %}
{% for host in groups['swift_hosts'] %}
{% if inventory_hostname in host %}
processid = {{ processes }}
{% else %}
{% set processes = processes + 1 %}
{% endif %}
@evrardjp
evrardjp / osa-bulk-job-doer.sh
Created April 17, 2016 12:53 — forked from cloudnull/osa-bulk-job-doer.sh
Do something special on everything the OSA project supports.
#!/usr/bin/env bash
# This is a simple script to do bulk operations on all projects we support
# Operation:
# The script clones project config from OpenStack infra then parses the gerrit
# projects for all of our known projects. Known projects are determined by the
# name using "openstack/openstack-ansible". Once all projects are discovered a
# string is built with the "<NAME>|<URL>" and printed. The script then clones
# all projects into the workspace and runs the ``bulk_function``. When complete
# the script commits the changes using the message provided and submits
@evrardjp
evrardjp / install_requirements.sh
Last active May 6, 2016 10:39
CI testing for ansible roles
apt-get update -qq
apt-get install -qq git git-core python2.7 python-dev python-apt python-pycurl libyaml-dev libpython2.7-dev build-essential libssl-dev libffi-dev
@evrardjp
evrardjp / keepalived_config.yml
Last active May 6, 2016 10:35
Keepalived testing
---
keepalived_sync_groups:
haproxy:
instances:
- internal
keepalived_instances:
internal:
interface: eth0
state: MASTER
@evrardjp
evrardjp / default_haproxy
Created May 25, 2016 13:05
/etc/default/haproxy after standard install
# Defaults file for HAProxy
#
# This is sourced by both, the initscript and the systemd unit file, so do not
# treat it as a shell script fragment.
# Change the config file location if needed
#CONFIG="/etc/haproxy/haproxy.cfg"
# Add extra flags here, see haproxy(1) for a few options
#EXTRAOPTS="-de -m 16"
@evrardjp
evrardjp / gist:f970315fb9094acb65c9e424f54273b0
Created May 25, 2016 16:44 — forked from cloudnull/gist:e81115119dddee5e2a06
Example network interface file using a single bonded interface
## The default networking requires several bridges. These bridges were named to be informative
## however they can be named what ever you like and is adaptable to any network infrastructure
## environment. This file serves as an example of how to setup basic networking and was ONLY
## built for the purpose of being an example of an environment with a single bonded interface.
# Physical interface
# ------------------
# All nodes will have some physical interface
auto eth0
@evrardjp
evrardjp / test.yml
Created June 2, 2016 12:36
with_first_found
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}.yml"
---
keystone_service_adminuri_insecure: true
keystone_service_internaluri_insecure: true
haproxy_ssl_self_signed_subject: "/C=US/ST=GA/L=Atlanta/O=IT/CN=haproxy.vlab.cso.att.com"
horizon_ssl_self_signed_regen: true
ceilometer_db_type: mongodb
ceilometer_db_ip: localhost
ceilometer_db_port: 27017
swift_ceilometer_enabled: True
heat_ceilometer_enabled: True
---
cidr_networks:
container: 10.2.31.0/24 # 172.29.236.0/22
tunnel: 172.22.1.0/24 # 172.29.240.0/22
storage: 172.20.98.0/24 # 172.29.244.0/22
used_ips:
- "172.20.98.1,172.20.98.149"
- "172.20.98.240,172.20.98.254"
- "10.2.31.1,10.2.31.149"
- "10.2.31.240,10.2.31.254"