Skip to content

Instantly share code, notes, and snippets.

View etoews's full-sized avatar

Everett Toews etoews

View GitHub Profile
import com.google.common.collect.ImmutableSet;
import com.google.inject.Module;
import org.jclouds.ContextBuilder;
import org.jclouds.blobstore.BlobStore;
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
import org.jclouds.openstack.swift.v1.blobstore.RegionScopedBlobStoreContext;
import org.jclouds.rackspace.cloudfiles.v1.CloudFilesApi;
import java.io.IOException;
@etoews
etoews / devstack-txlf.sh
Last active August 29, 2015 14:02
DevStack for TXLF 2014
# Login
ssh -i .ssh/id_rsa.rackspace root@my.ip.v4.address
# Install OpenStack Icehouse with DevStack
apt-get -y update
apt-get -y install curl git vim
git clone https://github.com/openstack-dev/devstack.git -b stable/icehouse devstack/
devstack/tools/create-stack-user.sh
su stack
cd
@etoews
etoews / local.conf
Created June 11, 2014 20:20
local.conf for TXLF 2014
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
# Comment on a pull request (issue)
import os
from github import Github
github = Github(os.environ['GITHUB_USERNAME'], os.environ['GITHUB_PASSWORD'])
repo = github.get_user(os.environ['GITHUB_ORG']).get_repo(os.environ['GITHUB_REPO'])
issue = repo.get_issue(int(os.environ['GITHUB_PR_NUMBER']))
issue.create_comment(os.environ['GITHUB_PR_MESSAGE'])
# Comment on the pull request to let the user know where to go to review the jclouds site
#!/bin/bash
# Setup the env vars needed by the comment script
source $WORKSPACE/triggering-build.rc
export GITHUB_USERNAME=my-github-username
export GITHUB_PASSWORD=my-github-password
export GITHUB_PR_MESSAGE=$(cat $WORKSPACE/cdn-upload.log | grep "Go to")
export GITHUB_PR_MESSAGE+=" to review your changes."
export GITHUB_ORG='jclouds'
# Upload the jclouds site to a staging container for review by the user
#!/bin/bash
export RACKSPACE_USERNAME=my-rackspace-username
export RACKSPACE_APIKEY=my-rackspace-apikey
# Move the console log of the triggering build to prevent it from being uploaded
mv $WORKSPACE/_site/triggering-build.rc $WORKSPACE/triggering-build.rc
# Delete the release note text files only because they're too bulky to upload every time
gem install jekyll -v '1.5.1' --no-rdoc --no-ri --conservative --user-install
gem install rdiscount --no-rdoc --no-ri --conservative --user-install
jekyll build --safe
# Save the GitHub PR number for the downstream build
curl -sO $BUILD_URL/consoleText
GITHUB_PR_NUMBER=$(head -1 consoleText | sed 's/.*pull request #\([0-9]*\) to.*/\1/')
echo "export GITHUB_PR_NUMBER=$GIT_PR_NUMBER" > $WORKSPACE/_site/triggering-build.rc
@etoews
etoews / local.conf
Created April 18, 2014 20:40
DevStack local.conf for OpenStack Icehouse
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
@etoews
etoews / localrc
Created April 18, 2014 13:37
localrc for OpenStack Icehouse DevStack with Compute, Object Storage, and Networking
# Credentials
ADMIN_PASSWORD=devstack
MYSQL_PASSWORD=devstack
RABBIT_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=token
# Services
disable_service n-net
enable_service q-svc
@etoews
etoews / instructions.md
Last active August 29, 2015 13:59
Instructions to create a milestone-proposed DevStack