Skip to content

Instantly share code, notes, and snippets.

View jtopjian's full-sized avatar

Joe Topjian jtopjian

View GitHub Profile
@jtopjian
jtopjian / local.conf
Created August 31, 2016 04:51
devstack lbaasv2 keystonev3
[[local|localrc]]
# OpenStack version
OPENSTACK_VERSION="mitaka"
# devstack password
DEVSTACK_PASSWORD="password"
# Configure passwords and the Swift Hash
MYSQL_PASSWORD=$DEVSTACK_PASSWORD
RABBIT_PASSWORD=$DEVSTACK_PASSWORD
SERVICE_TOKEN=$DEVSTACK_PASSWORD
ADMIN_PASSWORD=$DEVSTACK_PASSWORD
@jtopjian
jtopjian / main.go
Last active August 13, 2016 18:13
swauth test
package main
import (
"fmt"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/swauth"
)
@jtopjian
jtopjian / waffles-mysql.sh
Created July 17, 2016 16:07
Using Waffles to install MySQL
mysql_root_password="password"
source /etc/lsb-release
apt.key --name percona --keyserver keys.gnupg.net --key CD2EFD2A
apt.source --name percona --uri http://repo.percona.com/apt --distribution $DISTRIB_CODENAME --component main --include_src true
# Generate a mysql-compatible hostname
mysql_hostname=$(hostname | sed -e 's/_/\\\_/g')
# Set limits.conf for open files
@jtopjian
jtopjian / sync.kilo.py
Created January 5, 2016 18:05
Swift Container Sync Patches
--- sync.py.orig 2016-01-05 10:27:16.701367539 -0700
+++ sync.py 2016-01-05 10:27:09.457341736 -0700
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import errno
import os
import uuid
from swift import gettext_ as _
node 'puppet.example.com' {
contain site::roles::puppet_server
}
demo$ dig +short -t aaaa consul.example.com
1600:fd00:4:1000:f816:3eff:fe14:b41e
1600:fd00:4:1000:f816:3eff:fe8e:b885
1600:fd00:4:1000:f816:3eff:fea0:980d
1600:fd00:4:1000:f816:3eff:fea0:beef
@jtopjian
jtopjian / wsrep_sst_xtrabackup-v2.patch
Last active July 11, 2016 21:19
IPv6 patch for wsrep_sst_xtrabackup-v2
--- wsrep_sst_xtrabackup-v2.orig 2016-07-11 21:17:51.902461163 +0000
+++ wsrep_sst_xtrabackup-v2 2016-05-29 03:16:48.450461163 +0000
@@ -205,10 +205,10 @@
stagemsg+="-OpenSSL-Encrypted-2"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
wsrep_log_info "Decrypting with PEM $tpem, CA: $tcert"
- tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,cafile=${tcert}${sockopt} stdio"
+ tcmd="socat -6 -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,cafile=${tcert}${sockopt} stdio"
else
wsrep_log_info "Encrypting with PEM $tpem, CA: $tcert"
@jtopjian
jtopjian / keepalived.aug
Created July 18, 2015 20:50
updated keepalived lens
(*
Module: Keepalived
Parses /etc/keepalived/keepalived.conf
Author: Raphael Pinson <[email protected]>
About: Reference
This lens tries to keep as close as possible to `man 5 keepalived.conf` where possible.
About: License
2015-06-01 18:04:19,702 140437933276688 DEBUG log [-] API call failed: argument of type 'NoneType' is not iterable
2015-06-01 18:04:19,703 140437933276688 DEBUG log [-] Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pecan/core.py", line 625, in __call__
self.invoke_controller(controller, args, kwargs, state)
File "/usr/local/lib/python2.7/dist-packages/pecan/core.py", line 531, in invoke_controller
result = controller(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/st2common/models/api/base.py", line 160, in callfunction
result = f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/st2api/controllers/resource.py", line 200, in get_all
return self._get_all(**kwargs)
@jtopjian
jtopjian / config.php
Last active August 29, 2015 14:21
ownCloud Keystone Authentication
<?php
"user_backends" => array (
0 => array (
"class" => "OC_User_Keystone",
"arguments" => array (
0 => 'https://keystone.example.com:35357/v2.0'
),
),
),