Skip to content

Instantly share code, notes, and snippets.

ut[29]:
[u'cancel_spot_fleet_requests',
u'cancel_spot_instance_requests',
u'create_spot_datafeed_subscription',
u'delete_spot_datafeed_subscription',
u'describe_spot_datafeed_subscription',
u'describe_spot_fleet_instances',
u'describe_spot_fleet_request_history',
u'describe_spot_fleet_requests',
u'describe_spot_instance_requests',
@caiush
caiush / gist:b6fafeffeb6f927487bc
Created July 15, 2015 02:01
Basic tool to grab list of all floating IPs of all tenancies a user has access too
import os
import requests
import sys
import json
import datetime
import logging
#logging.basicConfig(level=logging.DEBUG)
def get_config():
rew search aptly
brew install aptly
brew install gpg
brew install wget
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys 437D05B5
aptly -architectures="amd64" -with-udebs=true mirror create precise-main-udeb http://us.archive.ubuntu.com/ubuntu precise
aptly mirror update precise-main-udeb
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys 17ED316D
aptly -architectures="amd64" mirror create ceph-firefly http://ceph.com/debian-firefly precise main
aptly -architectures="amd64" mirror create ceph-extras http://ceph.com/packages/ceph-extras/debian/ precise main
{
"name": "Test-Laptop",
"override_attributes": {
"bcpc": {
"virt_type" : "qemu",
"enabled": {
"logging": false,
"monitoring": false,
"metrics": false,
"dns": false
import os
import posixpath
import urllib
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
BASE_PATH = "/Users/caius/apt-mirror/mirror"
# modify this to add additional routes
ROUTES = (
@caiush
caiush / gist:00e169e6f621fa4ea704
Created March 28, 2015 02:54
apt-mirror config
################################################
#
# Generated by Chef
#
################################################
############# config ##################
#
set base_path /Users/caius/apt-mirror
@caiush
caiush / gist:33cc9b8f64812c1d4998
Created February 25, 2015 16:52
new test for config defs
def get_config(key)
init_config if $dbi.nil?
puts "------------ Fetching value for key \"#{key}\""
result = (node['bcpc']['enabled']['encrypt_data_bag']) ? $edbi[key] : $dbi[key]
raise "No config found for get_config(#{key})!!!" if result.nil?
return result
end
@caiush
caiush / gist:100bf2932f2ea19212f0
Created February 25, 2015 16:51
rgw optional keystone pass
[client.radosgw.gateway]
keyring = /var/lib/ceph/radosgw/$cluster-$id/keyring
log file = /var/log/ceph/radosgw.log
rgw enable ops log = false
rgw enable usage log = false
debug rgw = 0/0
<% if config_defined?('keystone-admin-token') %>
rgw keystone url = <%=node['bcpc']['management']['vip']%>:35358
rgw keystone admin token = <%=get_config('keystone-admin-token')%>
rgw keystone accepted roles = admin Member _member_