Skip to content

Instantly share code, notes, and snippets.

View drnic's full-sized avatar
🏆
Platinum Status Level

Dr Nic Williams drnic

🏆
Platinum Status Level
View GitHub Profile

To reproduce:

  1. Create an AWS EC2 (not VPC) microbosh, say with bosh-bootstrap (1 command, a few minutes)
  2. Upload consul release: (as an example only)
git clone https://github.com/cloudfoundry-community/consul-boshrelease.git
cd consul-boshrelease
bosh upload release releases/consul-3.yml
@drnic
drnic / gems-with-uuids.txt
Created May 23, 2014 00:21
versions can't just be replaced with UUIDs
bosh-director-core (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80)
bosh-gen (013ef2a9e-7fe3-4d94-a325-39ab111ed7bc)
bosh-registry (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80)
bosh-stemcell (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80)
bosh_aws_cpi (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80)
bosh_cli (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80)
bosh_cli_plugin_consul (f527e847-bed0-4bcd-87ad-a38f07410c97)
bosh_cli_plugin_micro (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80)
bosh_common (902420be-9e7f-4853-9483-83e0da0f8397, 22a0bc3c-6c70-4fc1-b6ad-bd2bcc938e0c, 032eb34c-7abc-4a8c-a6ee-6e07d3a87c80, 1.244
@drnic
drnic / public_buckets.rb
Created June 24, 2014 20:50
public buckets
# Paste this into a fog terminal
buckets = Storage[:aws].directories.map {|d| d.key}
buckets.each_with_index do |bucket, index|
policy = <<-EOS
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AddPerm",
@drnic
drnic / README.md
Created July 23, 2014 02:42
Script to bulk delete apps from Cloud Foundry that have the same name (via regexp) - useful for cleaning up training environments
$ chmod +x apps_bulk_delete.sh
$ ./apps_bulk_delete.sh
USAGE: ./apps_bulk_delete.sh NAME_FILTER

$ ./apps_bulk_delete.sh spork
Deleting sporks-v1... done.
Deleting sporks... done.
Deleting sporks-v2... done.
Deleting sporks-v1... done.
@drnic
drnic / filename.rb
Created July 25, 2008 01:27
Filename class for Ruby
##
# Simple class that makes File.* class methods available on a
# Filename object
#
# doctest: Can call File’s class methods on a Filename object
# >> Filename.new ("/tmp/myfile.png").dirname
# => "/tmp"
#
# doctest: Can create a Filename from another Filename object
# >> path = "/tmp/myfile.png"
@drnic
drnic / manifest-example.yml
Last active August 29, 2015 14:05
configure docker broker to add gnatsd service
- id: 'b9310aba-2fa4-11e4-b626-a6c5e4d22fb7'
name: 'nats'
description: 'NATS is a lightweight cloud messaging system'
bindable: true
tags:
- 'nats'
- 'mbus'
- 'pubsub'
metadata:
displayName: 'NATS'
@drnic
drnic / catalog.json
Created September 24, 2014 21:15
Example Cloud Foundry service catalog for GET /v2/catalog
{
"services": [
{
"id": "2fd814ac-d1f7-4d4a-a4f7-d386cd8fd8e3",
"name": "postgresql93",
"description": "PostgreSQL 9.3 service for application development and testing",
"bindable": true,
"tags": [
"postgresql93",
"postgresql",
@drnic
drnic / airspace-changes.md
Last active August 29, 2015 14:10
Airspace changes since September 18, 2014 (comparing last two NASR subscriptions from https://nfdc.faa.gov/xwiki/bin/view/NFDC/56+Day+NASR+Subscription)

Class B: no changes

Class C: no changes

Class D, additional:

  • KS, WICHITA, WICHITA, MCCONNELL AFB CLASS D

Class D, updated:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drnic
drnic / bastion-ssh.sh
Last active August 29, 2015 14:13
Terraform an AWS account where the target folder has a fog-api.yml fog file containing one set of user credentials
#!/bin/bash
# USAGE: ./bastion-ssh account-folder
TERRAFORM_DIR=${TERRAFORM_DIR:-terraform-aws-cf-install}
account_folder=$1
if [[ "${account_folder}X" = "X" || ! -d $account_folder ]]; then
echo "USAGE: bastion-ssh account-folder"
exit 1