Skip to content

Instantly share code, notes, and snippets.

View johnsom's full-sized avatar

Michael Johnson johnsom

  • Red Hat, Inc
  • Corvallis, Oregon
View GitHub Profile
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = .rnd
#!/bin/bash
set -e
mkdir testca
cd testca
mkdir newcerts private
chmod 700 private
#!/bin/bash
# set -x -e
echo "Warning: This script is purely for testing purposes!"
echo " It may/will cut corners and create insecure content."
echo ""
if [ -d "test-certs" ]; then
echo "ERROR: test-certs directory already exists. Exiting."
openstack project create --description "Project for testing barbican health" barbican-health-project
+-------------+-------------------------------------+
| Field | Value |
+-------------+-------------------------------------+
| description | Project for testing barbican health |
| domain_id | default |
| enabled | True |
| id | 3fc84df4d3334292b46a452d74cc96db |
#!/bin/sh
MYIP=$(/sbin/ifconfig eth0|grep 'inet addr'|awk -F: '{print $2}'| awk '{print $1}');
COUNT=0
while true; do
OUTPUT_STR="Welcome to $MYIP connection $COUNT\r"
OUTPUT_LEN=${#OUTPUT_STR}
echo -e "HTTP/1.0 200 OK\r\nContent-Length: ${OUTPUT_LEN}\r\n\r\n${OUTPUT_STR}" | sudo nc -l -p 80
if [ $? == 0 ]; then
let "COUNT++"
#!/bin/bash
# set -x
function wait_for_nova_active {
echo "Waiting for $1 to become ACTIVE..."
status=$(openstack server show -c status -f value $1)
while [ "$status" != "ACTIVE" ]
do
sleep 1
#!/bin/bash
function wait_for_lb_active {
echo "Waiting for $1 to become ACTIVE..."
status=$(openstack loadbalancer show $1 | awk '/provisioning_status/ {print $4}')
while [ "$status" != "ACTIVE" ]
do
sleep 1
status=$(openstack loadbalancer show $1 | awk '/provisioning_status/ {print $4}')
if [ $status == "ERROR" ]
[DEFAULT]
transport_url = rabbit://stackrabbit:password@10.1.1.140:5672/
api_handler = queue_producer
bind_host = 10.1.1.140
logging_exception_prefix = ERROR %(name)s ^[[01;35m%(instance)s^[[00m
logging_default_format_string = %(color)s%(levelname)s %(name)s [^[[00;36m-%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_context_format_string = %(color)s%(levelname)s %(name)s [^[[01;36m%(global_request_id)s %(request_id)s ^[[00;36m%(project_name)s %(user_name)s%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_debug_format_suffix = ^[[00;33m{{(pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d}}^[[00m
# Print debugging output (set logging level to DEBUG instead of default WARNING level).
# debug = False
@johnsom
johnsom / localrc
Last active February 12, 2020 23:44
GIT_BASE=http://opendev.org
# Load the external Octavia plugin.
enable_plugin octavia https://github.com/openstack/octavia.git
# Load the barbican devstack plugin:
enable_plugin barbican https://github.com/openstack/barbican.git
# Load the octavia-dashboard plugin for horizon
# enable_plugin octavia-dashboard https://github.com/openstack/octavia-dashboard.git
# OCTAVIA_AMP_BASE_OS=centos
sudo apt-get update
sudo apt-get dist-upgrade
<reboot>
mkdir .ssh
chmod 700 .ssh
vi .ssh/authorized_keys # Add your SSH key
chmod 700 .ssh/authorized_keys
sudo update-alternatives --config editor # Optional if you don't like nano
echo "michjohn ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/michjohn
sudo apt-get install gcc make git python-dev libffi-dev libssl-dev libjpeg-dev cifs-utils open-vm-tools jq python-yaml python3-dev python-pip