This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[local|localrc]] | |
# Credentials | |
DATABASE_PASSWORD=devstack | |
ADMIN_PASSWORD=devstack | |
SERVICE_PASSWORD=devstack | |
SERVICE_TOKEN=devstack | |
RABBIT_PASSWORD=devstack | |
# Services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rackspace; | |
import java.lang.Thread.UncaughtExceptionHandler; | |
import org.jclouds.ContextBuilder; | |
import org.jclouds.compute.ComputeServiceContext; | |
import org.jclouds.compute.domain.NodeMetadata; | |
import org.jclouds.compute.domain.NodeMetadata.Status; | |
import org.jclouds.compute.domain.NodeMetadataBuilder; | |
import org.jclouds.enterprise.config.EnterpriseConfigurationModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir jclouds-test | |
$ cd jcloud-test | |
$ curl -o lein.sh https://raw.github.com/technomancy/leiningen/stable/bin/lein | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 9905 100 9905 0 0 13005 0 --:--:-- --:--:-- --:--:-- 31444 | |
$ chmod u+x lein.sh | |
$ echo '(defproject deps "1" :dependencies [[org.jclouds/jclouds-all "1.5.1"] [org.jclouds.driver/jclouds-sshj "1.5.1"]])' > project.clj | |
$ ./lein.sh deps | |
<output omitted> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Set; | |
import java.lang.Thread.UncaughtExceptionHandler; | |
import org.jclouds.ContextBuilder; | |
import org.jclouds.compute.ComputeService; | |
import org.jclouds.compute.ComputeServiceContext; | |
import org.jclouds.compute.domain.ComputeMetadata; | |
public class JCloudsTest { | |
private ComputeService compute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pwd | |
/Users/phymata/test/jclouds-test | |
$ ls | |
JCloudsTest.java lein.sh lib project.clj | |
$ javac -cp ".:lib/*" JCloudsTest.java | |
$ ls | |
JCloudsTest$1.class JCloudsTest.class JCloudsTest.java lein.sh lib project.clj | |
$ java -cp ".:lib/*" JCloudsTest | |
Calling listNodes... | |
Total Number of Nodes = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ TOKEN=`curl -s -X POST https://identity.api.rackspacecloud.com/v2.0/tokens -d '{"auth": {"passwordCredentials": {"username":"MY_USERNAME", "password":"MY_PASSWORD"}}}' -H "Content-type: application/json" | python -c 'import json,sys; response=json.loads(sys.stdin.read()); print response["access"]["token"]["id"]'` | |
$ echo $TOKEN | |
9d1dc8da-d306-4e39-b9c2-f39a127341f1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.Thread.UncaughtExceptionHandler; | |
import java.util.Set; | |
import org.jclouds.ContextBuilder; | |
import org.jclouds.compute.ComputeService; | |
import org.jclouds.compute.ComputeServiceContext; | |
import org.jclouds.compute.domain.ComputeMetadata; | |
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule; | |
import com.google.common.collect.ImmutableSet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ javac -cp ".:lib/*" JCloudsLoggingExample.java | |
$ java -cp ".:lib/*" JCloudsLoggingExample | |
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". | |
SLF4J: Defaulting to no-operation (NOP) logger implementation | |
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. | |
Calling listNodes... | |
Total Number of Nodes = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<configuration scan="false"> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>- %m%n</pattern> | |
</encoder> | |
</appender> | |
<logger name="jclouds.wire"> | |
<level value="DEBUG" /> |