Skip to content

Instantly share code, notes, and snippets.

View odyssey4me's full-sized avatar

Jesse Pretorius odyssey4me

  • Red Hat
  • United Kingdom
View GitHub Profile
@odyssey4me
odyssey4me / gateparse.py
Last active January 8, 2022 17:08
OpenStack-Ansible Gate console.html analyzer - thanks to Logan Vig/Jimmy McRory for this!
#!/usr/bin/env python
import argparse
import json
import re
import sys
import yaml
from datetime import datetime
from datetime import timedelta
@odyssey4me
odyssey4me / constraints.txt
Last active November 24, 2016 00:34
pip wheel does not respect requirements when given constraints - it appears to take the packages to build from requirements.txt, but ignores the version spec in requirements.txt and uses the one in constraints.txt
setuptools<=25.1.3
@odyssey4me
odyssey4me / 00-setup.sh
Created August 7, 2016 21:42
Ansible lxc_container module: A bug related to logging for LXC containers
#!/bin/bash
apt-get update && \
apt-get purge -y nano && \
apt-get install -y git vim tmux fail2ban \
build-essential python2.7 python-dev \
libssl-dev libffi-dev
apt-get -t trusty-backports install -y lxc lxc-dev
0:
name: Clone the role ansible-role-requirements
tasks:
- {id: 0, name: setup, role: null, time: '0:00:02.475200'}
- {id: 1, name: Remove target directory if required, role: null, time: '0:00:02.591165'}
- {id: 2, name: Clone git repos, role: null, time: '0:01:07.587316'}
time: '0:01:12.653681'
1:
name: localhost
tasks:
@odyssey4me
odyssey4me / user_variables.yml
Created August 16, 2016 19:48
OpenStack-Ansible Public SSL endpoint configuration (using haproxy SSL offloading) [newton]
---
#
# Important required settings
#
# configure the SSL certificates for haproxy
# these file paths are on the deployment host
haproxy_user_ssl_cert: /root/test1.pigeonbrawl.net_ssl.crt
haproxy_user_ssl_key: /root/test1.pigeonbrawl.net_ssl.key
haproxy_user_ssl_ca_cert: /root/test1.pigeonbrawl.net_ssl_ca-bundle.pem
@odyssey4me
odyssey4me / dns-config.sh
Last active August 17, 2016 15:50
DNS resolver config producer
#!/bin/bash
INPUTFILE=${INPUTFILE:-'/etc/resolv.conf'}
DEBUG=${DEBUG:-false}
FALLBACK_NAMESERVERS_IPV4='8.8.8.8 8.8.4.4'
FALLBACK_NAMESERVERS_IPV6='2001:4860:4860::8888 2001:4860:4860::8844'
HOST_ADDRESSES_IPV4=$(ip a | awk '/inet / {print $2}' | grep -v '^127\.' | cut -d/ -f1 | paste -d' ' -s)
HOST_ADDRESSES_IPV6=$(ip a | awk '/inet6 / {print $2}' | grep -v '^::' | cut -d/ -f1 | paste -d' ' -s)
HOST_NAMESERVERS_NOLOCAL_IPV4=$(awk '/^nameserver/ {print $2}' ${INPUTFILE} | grep -v '^127\.\|^::' | grep '\.' | paste -d' ' -s)
0:
name: Clone the role ansible-role-requirements
tasks:
- {id: 0, name: setup, role: null, time: '0:00:03.596750'}
- {id: 1, name: Remove target directory if required, role: null, time: '0:00:03.788172'}
- {id: 2, name: Clone git repos, role: null, time: '0:01:01.403255'}
time: '0:01:08.788177'
1:
name: localhost
tasks:
@odyssey4me
odyssey4me / setup-network.sh
Created August 22, 2016 08:51
Setup vxlan tunneling between multiple AIO's - warning, this is old and was purpose specific
###
### adjust the AIO config for a standalone Keystone deployment
###
# change the network configuration to suit the needs of an identity-only deployment
for i in $(awk '/^iface/ {print $2}' /etc/network/interfaces.d/aio_interfaces.cfg); do
/sbin/ifdown $i || true
done
rm -f /etc/network/interfaces.d/aio_interfaces.cfg
BR_INTERFACE=$(ip addr list | awk '/192.168.4/ {print $7}')
@odyssey4me
odyssey4me / 00-setup.sh
Created August 25, 2016 15:50
Testing group var precedence
#!/bin/bash
apt-get update && \
apt-get purge -y nano && \
apt-get install -y git vim tmux fail2ban build-essential python2.7 python-dev libssl-dev libffi-dev
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
pip install ansible==2.1.1
@odyssey4me
odyssey4me / 0-setup-procedure.sh
Last active November 21, 2016 14:20
Test openstack-ansible multi-node using cloud instances
# Ensure that your cloud account has an ssh key configured
# which you are prepared to use on an instance in the cloud.
# Create network for inter-host communication:
# name: 'internal-net'
# CIDR: '192.168.3.0/24'
# Create instances for your environment (make sure that the extra network is selected):
# infra1
# g1-8 flavor (8CPU, 8RAM, 160GB HDD)