Skip to content

Instantly share code, notes, and snippets.

@gecampbell
gecampbell / xlerb.md
Last active August 29, 2015 14:04
Running the Xlerb.PP blivet

The Xlerb.PP blivet is the simplest way to migrate your spanzel from trogo to blivet.

  1. export the spanzel in the default XML format
  2. run xmllint and fix any errors that occur
  3. install the blivet package and any required dependencies:
    • blivet-markdown
    • blivet-rst
    • blivet-unittest
    • java 6.1
  • java 8.0 (this will need to reside in a separate directory from java 6.1)
### Keybase proof
I hereby claim:
* I am gecampbell on github.
* I am glenc (https://keybase.io/glenc) on keybase.
* I have a public key whose fingerprint is 0690 2D98 41AF 1864 EB08 A4C5 3F00 40CD D3A5 4EAC
To claim this, I am signing this object:
@gecampbell
gecampbell / php-collection.php
Created June 28, 2012 14:56
Example collection handling
<?php
# create a collection of objects
$objlist = $container->list_objects();
while ($obj = $objlist->next()) {
# do something with $obj
}
@gecampbell
gecampbell / raxobjstore.php
Created June 29, 2012 17:36
Object Storage Sample Code
<?php
define('RAXSDK_OBJSTORE_NAME','cloudFiles');
define('RAXSDK_OBJSTORE_REGION','DFW');
require_once( 'lib/raxconnection.inc' );
require_once( 'lib/objectstore.inc' );
// create a connection to rackspace
$conn = new RaxConnection(
'https://identity.api.rackspacecloud.com/v2.0/',
array(
'username' => ' YOUR USERNAME ',
@gecampbell
gecampbell / cloud-db-migrate.sh
Created July 11, 2012 21:22
Migrating from plain MySQL to Rackspace Cloud Databases
# unload old database
mysqldump -h {hostname} -u {user} -p{password} {database} >tempfile.dump
# load the new one
mysql -h {clouddbhost} -u {user} -p{password} {database} <tempfile.dump
{
"auth": {
"RAX-KSKEY:apiKeyCredentials": {
"username": "username",
"apiKey": "some-api-key-value",
"tenantName": "9099293"
}
}
}
@gecampbell
gecampbell / gist:4733642
Created February 7, 2013 19:53
Sample OpenStack credentials
{
"auth": {
"passwordCredentials": {
"username": "Foo",
"password": "Bar"
},
"tenantName": "666999"
}
}
@gecampbell
gecampbell / dnsupdate.php
Last active December 14, 2015 13:18
Sample code for updating Rackspace Cloud DNS
<?php
require '/path/to/rackspace.php';
$DOMAIN_EMAIL = 'something@example.com';
// establish our credentials
$cloud = new OpenCloud\Rackspace(RACKSPACE_US,
array('username' => $USERNAME, 'apiKey' => $APIKEY ));
// connect to the DNS service
$dns = $cloud->DNS();
// get a list of domains
$dlist = $dns->DomainList();
@gecampbell
gecampbell / keystone-catalog.json
Last active December 15, 2015 06:39
Keystone Service Catalog
{
"access": {
"token": {
"id": "25aa39d9-a823-4e37-8036-5e9XX7ae9015",
"expires": "2012-06-05T11:26:53.000-05:00",
"tenant": {
"id": "555111",
"name": "555111"
}
},
@gecampbell
gecampbell / service-element.json
Created March 22, 2013 01:44
Service Element
{
"endpoints": [
{
"region": "DFW",
"tenantId": "555111",
"publicURL": "https:\/\/dfw.servers.api.rackspacecloud.com\/v2\/555111",
"versionInfo": "https:\/\/dfw.servers.api.rackspacecloud.com\/v2",
"versionList": "https:\/\/dfw.servers.api.rackspacecloud.com\/",
"versionId": "2"
}