Skip to content

Instantly share code, notes, and snippets.

@Amit-PivotalLabs
Amit-PivotalLabs / README.md
Last active December 19, 2020 15:50
Spark on Cloud Foundry

Spark on Cloud Foundry

This document describes one means of running a simple Apache Spark cluster on Cloud Foundry. It makes heavy use of Cloud Foundry's container networking features.

You can see an example running at http://spark-ui-proxy.184.73.108.92.xip.io.

Deploy BOSH-Lite on AWS

This cluster was deployed using BOSH-Lite on AWS. Note, this Director cannot be targetted with the new BOSH CLI (see cloudfoundry-attic/bosh-lite#424), but you can use the "old" Ruby CLI just fine. You can use the new CLI for local workflows like manifest interpolation, and then the "old" CLI for remote workflows like deploying and SSH.

@Amit-PivotalLabs
Amit-PivotalLabs / bosh-links-why-and-how.md
Last active December 10, 2021 21:33
BOSH Links: Why and How
@Amit-PivotalLabs
Amit-PivotalLabs / sched.go
Created August 29, 2016 01:25
Golang scheduling DSL
package main
import . "time"
type Every Duration
type Do func()
func (schedule Every) Do(schedulable func()) {
go func() {
@Amit-PivotalLabs
Amit-PivotalLabs / workstation-setup.md
Last active July 11, 2017 03:01
Workstation Setup
  • install Homebrew
  • brew install things as you need them
  • copy the old ~/.gitconfig
  • copy the old ~/.bash_profile
  • copy the keys from the old ~/.ssh
  • copy the old ~/.kube/config
  • figure the rest out as you go, it's not worth over-engineering it...
@Amit-PivotalLabs
Amit-PivotalLabs / openstack-cf-stub.yml
Created November 10, 2015 17:05
OpenStack CF stub compatible with cf v223
---
director_uuid: DIRECTOR_UUID
compilation:
workers: 4
meta:
environment: cf-runtime-bb-1
stemcell:
@Amit-PivotalLabs
Amit-PivotalLabs / Cleanroom.md
Last active April 8, 2017 21:09
Run sandboxed experiments against a Cloud Foundry deployment

Cleanroom

  • Do you sometimes want to run performance benchmarks, stress/load tests, or security vulnerability probes against a shared integration environment, or even a production environment?
  • Do you worry about polluting these environments, or not leaving any audit trail when things go wrong?

Here are a couple scripts to setup, and later teardown, a cleanroom environment (user, org, space, quota) for doing just these kinds of experiments.

Example

@Amit-PivotalLabs
Amit-PivotalLabs / 0-prepare-deployments-specification.md
Last active October 22, 2015 00:01
specifications for prepare-deployments tool

WARNING: The MEGA team has made some changes to the behaviours and requirements of this tool, we should now consider the cf-deployment README to be the official spec.

This tool will generate manifest(s) referencing the appropriate releases and stemcell, and place manifest files in a given directory. It should have informative messaging to STDOUT and STDERR, but it's just for human convenience, it's not as though the output will be redirected to a file to form a deployment manifest, or anything like that.

Interface Specification

Usage and Inputs

./tools/prepare-deployments <aws|bosh-lite|vsphere|openstack> [path_to_config_file]
#!/bin/bash
export PYTHONPATH=/tmp
out=$(python -c "import test; test.update_db($1=$2)")
echo $out