Skip to content

Instantly share code, notes, and snippets.

View nacx's full-sized avatar

Ignasi Barrera nacx

View GitHub Profile
@nacx
nacx / aws-ec2-failures.txt
Created May 28, 2014 15:41
jclouds 1.7.3-rc1 live test failures
-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 194, Failures: 29, Errors: 0, Skipped: 13, Time elapsed: 1,298.666 sec <<< FAILURE!
testAmazonLinuxInstanceStore(org.jclouds.aws.ec2.compute.AWSEC2TemplateBuilderLiveTest) Time elapsed: 48.678 sec <<< FAILURE!
java.lang.AssertionError: expected [pv-2013.09.rc-1] but found [pv-2014.03.1]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:176)
@nacx
nacx / devstack-provision.sh
Last active August 29, 2015 13:57
Script to provision a DevStack instance
# Clone DevStack
apt-get -y update
apt-get -y install git
git clone https://github.com/openstack-dev/devstack.git -b stable/havana /opt/devstack
# Create the configuration file
cat >/opt/devstack/localrc <<EOF
# Credentials
ADMIN_PASSWORD=devstack
MYSQL_PASSWORD=devstack
@nacx
nacx / oauth.py
Last active December 20, 2018 08:49
Example webapp that uses OAuth to access the Abiquo API
#!/usr/bin/env python
from flask import Flask, redirect, request, session, url_for
from functools import wraps
from requests_oauthlib import OAuth1Session
import json
import os
# Application tokens (returned when the user registers an app)
@nacx
nacx / digitalocean.log
Created January 22, 2014 13:14
DigitalOcean provider live test output
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jclouds DigitalOcean Provider 1.8.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ digitalocean ---
[INFO] Deleting /home/ibarrera/src/asf/jclouds-labs/digitalocean/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.1.1:enforce (enforce-banned-dependencies) @ digitalocean ---
@nacx
nacx / RackspaceCompute.java
Last active January 3, 2016 22:19
jclouds basic compute failure
package com.abiquo.deployer.rackspace;
import java.io.File;
import org.jclouds.ContextBuilder;
import org.jclouds.compute.ComputeService;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.options.TemplateOptions;
@nacx
nacx / testrun1.txt
Created December 14, 2013 00:18
jclouds OkHttp initial implementation test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.349s
[INFO] Finished at: Sat Dec 14 01:15:52 CET 2013
[INFO] Final Memory: 32M/620M
[INFO] ------------------------------------------------------------------------
@nacx
nacx / DeployChef.java
Last active December 27, 2015 11:19
Install a Chef Server using ChefSolo and jclouds
package com.abiquo.jcloudstest;
import static com.google.common.collect.Iterables.getOnlyElement;
import static org.jclouds.compute.options.RunScriptOptions.Builder.overrideAuthenticateSudo;
import static org.jclouds.compute.options.TemplateOptions.Builder.inboundPorts;
import org.jclouds.ContextBuilder;
import org.jclouds.View;
import org.jclouds.aws.ec2.AWSEC2Api;
import org.jclouds.aws.ec2.domain.AWSRunningInstance;
@nacx
nacx / Makefile
Last active December 15, 2015 14:39
IRC bot to expose the transmission-remote command
# Rasptrans Makefile
# Copyright (c) 2013 Ignasi Barrera
# This file is released under the MIT License, see LICENSE file.
TARGETS = rasptrans
TREMOTE = $(shell which transmission-remote)
CC = gcc
LN = $(CC)
PREFIX ?= /usr/local
@nacx
nacx / vbox-bootstrap.sh
Created February 12, 2013 16:14
Bootstrap and configure a VirtualBox node for a concrete Abiquo version
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo "Usage ${0} abiquo <version>"
exit 1
fi
/etc/init.d/abiquo-aim stop
sed -i -e "s/\$releasever/${1}/g" /etc/yum.repos.d/Abiquo-Base.repo
yum clean all
@nacx
nacx / massive-post-volumes.sh
Last active December 11, 2015 22:48
Massive create iSCSI volumes in Abiquo
#!/bin/bash
HOST=localhost # The hostname or address of the target Abiquo api
NUM=20 # The number of volumes to create
DC=2 # The datacenter where the volumes will be created
TIER=1 # The tier where the volumes will be created
VDC=4 # The virtual datacenter where the volumes will be created
SIZE=32 # The size of the volumes to create in MB
LOGIN=admin:xabiquo # The credentials