Skip to content

Instantly share code, notes, and snippets.

View allomov's full-sized avatar

Aliaksandr Lomau allomov

View GitHub Profile

Description

This scripts provide the way to convert your instance (or image) to BOSH stemcell (containing MicroBOSH release).

What you'll need

  1. A running instance that you want to convert to stemcell (it should run Ubuntu or CentOS with default package repositories).
  2. VMware OVF tool with version 3.0.
  3. Some Ubuntu host to run script that will generate stemcell.
docker rm `docker ps --no-trunc -aq`
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
# gem install sunspot_rails
class Foo
include MongoMapper::Document
include Sunspot::Rails::Searchable
key :title, String
searchable do
text :title
end
@thansmann
thansmann / 2000-bosh-vms-deployed
Created September 17, 2015 17:43
2000 VM test on AWS
± kx+kx gd |master U:2 ✗| → bosh vms
Deployment `dummy'
Director task 74
Task 74 done
+---------------+---------+---------------+------------+
| Job/index | State | Resource Pool | IPs |
+---------------+---------+---------------+------------+
@drnic
drnic / nats.sh
Created June 17, 2015 14:46
Target current BOSH's current CF manifest and run nats CLI on its nats configuration
#!/bin/bash
# Assumes using nats CLI from https://github.com/soutenniza/nats/releases
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR/..
bosh_target=$(cat .bosh_config | yaml2json | jq -r ".target")
manifest=$(cat .bosh_config | yaml2json | jq -r ".deployment[\"$bosh_target\"]")
mbus=$(cat $manifest | yaml2json | jq -r '.properties.nats | "nats://\(.user):\(.password)@\(.address):\(.port)"')
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDP9Injr2SI6vcLKwrtOqnVlA9gW+I5sfo3i5yYCJZvvwrGoz4EEwSyZ2j/Y97QIp+IwZbXgsDgmWlAiC642LFSJJ98GjvOV/GKCbwymB0XeLuSo68V+/7M6kt+rWLStHP5xX1GyjBHFtGRZ6SLLRioOpVbinLN9cgx3zV2GNCHbnDpmz48XICWD1tTtBSXQX2+WOqkeKLSfuEIvaFwo3smrRcXgAc/JCDbhSBqBT3nnC+Va/GIlnh9FwbVtI1MIm89qtLs+X/CcILvdYnR3www5UduTcbSVg+1toLBRy1njsyMHh+Pr7jSx+R+gllDp5vjcAecJlXKlLrnaFwoaIul lomov.as@gmail.com
[_webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"function a() { try { s } catch(err) { var errorFlag = 'ERROR'; return errorFlag; } }; a()"]]
[_webView stringByEvaluatingJavaScriptFromString:@"function a() { try { JSON.stringify(require('BatchedBridge').flushedQueue) } catch(err) { return err.message; } }; a()"]
@jrob00
jrob00 / gist:1350507
Created November 9, 2011 05:29
Installing RVM, Ruby, Heroku, Homebrew, Node.js, NPM
http://devcenter.heroku.com/articles/quickstart
http://martinciu.com/2011/11/deploying-hubot-to-heroku-like-a-boss.html
1. install RVM: https://rvm.beginrescueend.com/
2. install Ruby: rvm install 1.9.2 && rvm use 1.9.2 --default
3. install Heroku: sudo gem install heroku
4. install Homebrew: https://github.com/mxcl/homebrew/wiki/Installation
@jpmens
jpmens / graphite-req.txt
Last active October 12, 2015 19:08
Ansible playbook for installing Graphite in virtualenv on Lucid
Django==1.3
Flask==0.9
graphite-web
carbon==0.9.10
whisper
uwsgi
simplejson
django-tagging
@gramos
gramos / installing-cf-warden-on-debian.md
Last active December 19, 2015 15:38
Installing Cloud Foundry Warden on Debian

How warden installation works

First, lets try to understand what the rake setup does, it creates a basic linux system under /tmp/warden directory using 2 basic tools: debootstrap and chroot. Deboostrap is a tool that setup a basic debian OS, ubuntu is based on debian so that's the reason why we can use debootstrap to create ubuntu systems too, basically you run: debootstrap [OPTION...] SUITE TARGET [MIRROR [SCRIPT]] see (man deboostrap). After the installation you can use that system with chroot command to run commands or interactive shell with a special root directory (see man chroot).