Skip to content

Instantly share code, notes, and snippets.

View stevelle's full-sized avatar
I may be slow to respond.

Steve Lewis stevelle

I may be slow to respond.
  • Vivante Health
  • Portland, Oregon
View GitHub Profile
neutron_lbaasv2_haproxy_driver: LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver
neutron_lbaasv2_octavia_driver: LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver
neutron_lbaasv2_service_drivers: "{{[ neutron_lbaasv2_haproxy_driver if neutron_lbaasv2_service_provider | bool, neutron_lbaasv2_octavia_driver if neutron_lbaas_octavia | bool ]}}"
neutron_lbaasv2_service_provider: "{{ neutron_lbaasv2_service_drivers | join(',') }}{% if neutron_lbaasv2_service_drivers | length > 0 %}:default{% endif %}"
# If it rejects the empty list entries here, or the join includes empty entries causing extra commas, we might be able
# to work around it as such:
# - use "neutron_lbaasv2_service_drivers | reject('none') | join(',')" on line 5
neutron_lbaasv2_service_providers:
- "{% if neutron_lbaasv2_service_provider | bool %}LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver{% endif %}"
- "{% if neutron_lbaas_octavia | bool %}LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver{% endif %}"
neutron_lbaasv2_service_provider: "{{ neutron_lbaasv2_service_providers | join(',') }}{% if neutron_lbaasv2_service_providers | length > 0 %}:default{% endif %}"
# If it rejects the empty string lines here, or the join includes empty lines causing extra commas, we might be able
# to work around it as such:
# - add "{% elseif %}None" or something in each providers line (2, 3)
# - use "neutron_lbaasv2_service_providers | reject('none')| join(',')" on line 5
@stevelle
stevelle / gist:2017bc22446661e8d1ee91c9bb927803
Created August 18, 2016 18:19
OpenStack-Ansible Mitaka: define the Ceilometer parameters *_time_to_live
ceilometer_ceilometer_conf_overrides:
database:
metering_time_to_live: 1814400
event_time_to_live: 1814400
@stevelle
stevelle / client.sh
Created November 17, 2015 23:21
set up an environment for glance client
apt-get update && apt-get install -y git vim tmux gcc python-dev
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install tox
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git clone https://github.com/openstack/python-glanceclient.git
diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py
index f746db5..10fcc82 100644
--- a/glanceclient/common/http.py
+++ b/glanceclient/common/http.py
@@ -21,6 +21,7 @@ from oslo_utils import importutils
from oslo_utils import netutils
import requests
try:
+ from requests.packages.urllib3.exceptions import NewConnectionError
from requests.packages.urllib3.exceptions import ProtocolError
@stevelle
stevelle / connection_local_repro.yml
Last active November 12, 2015 03:40
Ansible 1.9.4 bug -- use of connection: local in a play prevents delgate_to another host
---
#
# USAGE:
# ansible-playbook connection_local_repro.yml -e instance=SOME_HOST -v
# AFFECTS:
# ansible 1.9.4
# EXPECTED:
# Remote tasks should indicate remote hostname
# ACTUAL:
# Remote tasks indicate the local hostname
@stevelle
stevelle / neutron_l3_router_local_check.yaml.j2
Created October 19, 2015 17:19
MaaS L3 Router Check template, to be added at rpcd/playbooks/roles/rpc_maas/templates
type: agent.plugin
label: neutron_l3_router_local_check--{{ ansible_hostname }}
disabled : false
period : "{{ maas_check_period }}"
timeout : "{{ maas_check_timeout }}"
details :
file : neutron_l3_router_local_check.py
args : []
alarms :
neutron_l3_router_status :
---
- include: ensure_local_checks.yml
vars:
checks:
- { name: "cpu_check" group: "all" }
- { name: "memory_check" group: "all" }
@stevelle
stevelle / glance_api_local-j2.yaml
Last active October 1, 2015 00:26
prototype maas agent.plugin check templates
type: agent.plugin
label: glance_api_local_check
disabled : false
period : "{{ maas_check_period }}"
timeout : "{{ maas_check_timeout }}"
details :
file : glance_api_local_check.py
args : "{{ ansible_ssh_host }}"
alarms :
glance_api_local_status :