View gist:64fc8f70e419a953182e270f32647dfd
#!/bin/bash
#
# Slack Webhook notification for Turbonomic Action Scripts
#
# Use cURL to post to the Slack API
curl -X POST --data-urlencode 'payload={"channel": "#turbonomic", "username": "discohook", "text": "Move action created for "$VMT_TARGET_NAME" from "$VMT_CURRENT_NAME" to "$VMT_NEW_NAME" with action name = "$VMT_ACTION_NAME"", "icon_emoji": ":bear:"}' https://hooks.slack.com/services/YOURDEDICATEDWEBHOOKURL
# Log locally in the same folder as the action script (optional)
echo "$VMT_TARGET_NAME is moving" >> mylog.txt
View Bulk Green Circle User Follow using Jive API
#!/bin/bash
# USERID is the starting number for the users to follow
# LASTUSER is your upper bound user ID number
# JIVEUSER is your Jive username
# JIVEPASS is your plaintext password
USERID=38000
LASTUSER=38010
JIVEUSER=
View rancher-compose.yml
.catalog:
name: "GlusterFS"
version: "3.7.5-rancher1"
description: "Gluster FS (3x) replicated volume"
uuid: glusterfs-0
questions:
- variable: "VOLUME_NAME"
description: "Name to give the Gluster volume"
label: "Volume Name"
required: true
View docker-compose.yml
glusterfs-server:
image: rancher/glusterfs:v0.1.3
devices:
- /dev/fuse:/dev/fuse:rwm
cap_add:
- SYS_ADMIN
volumes_from:
- glusterfs-data
labels:
io.rancher.container.hostname_override: container_name
View gist:2a70427c77a6b02dae33
Out of the box build - command is "ceilometer meter-list"
results:
root@controller:/var/log/ceilometer# cat ceilometer-agent-central.log
2015-05-11 14:58:18.283 24053 ERROR ceilometer.agent [-] Unable to discover resources: 'AuthorizationFailure' object has no attribute 'tenants'
2015-05-11 14:58:18.283 24053 TRACE ceilometer.agent Traceback (most recent call last):
2015-05-11 14:58:18.283 24053 TRACE ceilometer.agent File "/usr/lib/python2.7/dist-packages/ceilometer/agent.py", line 233, in discover
2015-05-11 14:58:18.283 24053 TRACE ceilometer.agent discovered = discoverer.discover(self, param)
2015-05-11 14:58:18.283 24053 TRACE ceilometer.agent File "/usr/lib/python2.7/dist-packages/ceilometer/central/discovery.py", line 61, in discover
View gist:39045a714249ca7f771c
# Log in to MySQL command line as root
drop database keystone;
create database keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS';
exit
# now from the shell
sudo su -c "keystone-manage db_sync" keystone
View gist:8791513
people table fields:
id,first_name,last_name,login,manager_id
I need to get all the info, plus the login of the manager where manager_id references the record in the people table.
This is why I'm not a DBA
View C2OS - vagrant error starting at compute node
PS C:\users\ewright\Documents\GitHub\Couch_to_OpenStack> vagrant up
Bringing machine 'controller' up with 'virtualbox' provider...
Bringing machine 'compute' up with 'virtualbox' provider...
Bringing machine 'cinder' up with 'virtualbox' provider...
Bringing machine 'quantum' up with 'virtualbox' provider...
Bringing machine 'client' up with 'virtualbox' provider...
[controller] Importing base box 'precise64'...
←[0K[controller] Matching MAC address for NAT networking...
[controller] Setting the name of the VM...
[controller] Clearing any previously set forwarded ports...
View C2OS-Error-on-Windows-with-vagrant
PS C:\users\ewright\Documents\VirtualBoxProjects\Couch_to_OpenStack> vagrant up
Bringing machine 'controller' up with 'virtualbox' provider...
[controller] Importing base box 'precise64'...
←[0K[controller] Matching MAC address for NAT networking...
[controller] Setting the name of the VM...
[controller] Clearing any previously set forwarded ports...
[controller] Fixed port collision for 22 => 2222. Now on port 2200.
[controller] Creating shared folders metadata...
[controller] Clearing any previously set network interfaces...
[controller] Preparing network interfaces based on configuration...
View SplitLogs.ps1
#############################################
# Split a log/text file into smaller chunks #
#############################################
#
# WARNING: This will take a long while with extremely large files and uses lots of memory to stage the file
#
# Set the baseline counters
#
# Set the line counter to 0