Skip to content

Instantly share code, notes, and snippets.

View larsbutler's full-sized avatar

Lars Butler larsbutler

  • Amazon Web Services, Inc.
  • Switzerland
View GitHub Profile
@larsbutler
larsbutler / API
Last active August 29, 2015 14:06
snakebin
GET /snakebin:
Get an empty HTML form for uploading a script.
POST /snakebin:
Post file contents, get a /snakebin/:short URL back.
If a request specifies Accept: text/html, redirect to /snakebin/:short.
@larsbutler
larsbutler / Vagrantfile
Created September 15, 2014 09:18
devstack keystonemiddleware crash
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@larsbutler
larsbutler / A.txt
Last active August 29, 2015 14:05
12-4-1 map reduce zapp example
AAAAAAAAAA
@larsbutler
larsbutler / Vagrantfile
Last active August 29, 2015 14:05
ZeroVM Develop Environment Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@larsbutler
larsbutler / zvm_unified_command_line_tools.md
Last active August 29, 2015 14:03
ZeroVM unified command-line tools spec

Goals

  1. Unify command line tools functions from zvsh, zvapp, and zpm into a single executable: zvm.

  2. zpm can remain a separate project. The unified zvm will import zpmlib and use it as sort of a plug-in.

zapp.yaml updates

@larsbutler
larsbutler / zpa_spec.md
Last active August 29, 2015 14:03
ZeroVM Package Archive spec

Name

I propose ZPA (ZeroVM Package Archive).

Platform

The assumption so far is that we will build this on Swift+ZeroCloud, and many of the functions of the ZPA will be written as zapps. Dogfooding is one of the reasons for this. Another reason is the Swift provides a horizontally-scalable storage system that can store millions of files. Since the ZPA is intended to be the central repository for developers to publish their zapps, ZPA must be capable of operating at this kind of scale.

If one were to build the ZPA from scratch, probably ~80% of the work would be focused purely on storage. With a platform like Swift, a lot of that is solved for us.

@larsbutler
larsbutler / orgpulls.py
Created May 7, 2014 15:04
List all open pull requests for a GitHub organization
import getpass
import sys
from github import Github
if __name__ == '__main__':
org_name = sys.argv[1]
username = sys.argv[2]
password = getpass.getpass("Password for GitHub user '%s':" % username)
gh = Github(username, password)
@larsbutler
larsbutler / mapper.py
Last active August 29, 2015 13:58
ZeroVM Word Count
import os
# Word count:
with open('/dev/input') as fp:
data = fp.read()
with open('/dev/out/reducer', 'a') as fp:
path_info = os.environ['PATH_INFO']
# Split off the swift prefix
@larsbutler
larsbutler / release_cycles.md
Last active August 29, 2015 13:57
Draft for ZeroVM time-based releases and versioning

Time-based releases for zpm and zerovm-cli

Stable releases

  • A new "stable" version is released at the end/beginning of each month, denoted by an incremented version number.
    • If no code changes within a given month, there is no release for this month.
  • Version numbers are comprised of major.minor.bugfix. Example: 1.2.4.
@larsbutler
larsbutler / object-server.1.conf.patch
Last active August 29, 2015 13:57
ZeroCloud Swift middle configuration patches
--- /etc/swift/object-server/1.conf.~1~ 2014-03-08 16:21:03.000000000 +0000
+++ /etc/swift/object-server/1.conf 2014-03-20 16:24:21.000000000 +0000
@@ -57,8 +57,13 @@
# network_chunk_size = 65536
# disk_chunk_size = 65536
+[filter:object-query]
+use = egg:zerocloud#object_query
+zerovm_sysimage_devices = python2.7 /usr/share/zerovm/python.tar
+#zerovm_debug = True