You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ev...@apache.org on 2014/04/01 22:02:11 UTC

[1/2] git commit: Change example to use Ubuntu

Repository: jclouds-examples
Updated Branches:
  refs/heads/master 24cfa7336 -> 7963763ad


Change example to use Ubuntu


Project: http://git-wip-us.apache.org/repos/asf/jclouds-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-examples/commit/3473f574
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-examples/tree/3473f574
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-examples/diff/3473f574

Branch: refs/heads/master
Commit: 3473f5744df0f13e641a35f771a42974af6da30c
Parents: 24cfa73
Author: Everett Toews <ev...@rackspace.com>
Authored: Tue Apr 1 13:19:53 2014 -0500
Committer: Everett Toews <ev...@rackspace.com>
Committed: Tue Apr 1 15:01:48 2014 -0500

----------------------------------------------------------------------
 .../rackspace/cloudservers/CloudServersPublish.java       | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-examples/blob/3473f574/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
----------------------------------------------------------------------
diff --git a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
index e3bb19a..9b36a05 100644
--- a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
+++ b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
@@ -116,7 +116,7 @@ public class CloudServersPublish implements Closeable {
       ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(ZONE, "performance1-1");
       Template template = computeService.templateBuilder()
             .locationId(ZONE)
-            .osDescriptionMatches(".*CentOS 6.4.*")
+            .osDescriptionMatches(".*Ubuntu 12.04.*")
             .hardwareId(zoneAndId.slashEncode())
             .build();
 
@@ -147,10 +147,10 @@ public class CloudServersPublish implements Closeable {
          .append(" in ").append(nodeMetadata.getLocation().getParent().getId())
          .toString();
 
-         String script = new ScriptBuilder().addStatement(exec("yum -y install httpd"))
-               .addStatement(exec("/usr/sbin/apachectl start"))
-               .addStatement(exec("iptables -I INPUT -p tcp --dport 80 -j ACCEPT"))
-               .addStatement(exec("echo '" + message + "' > /var/www/html/index.html"))
+         String script = new ScriptBuilder()
+               .addStatement(exec("apt-get -q -y update"))
+               .addStatement(exec("apt-get -q -y install apache2"))
+               .addStatement(exec("echo '" + message + "' > /var/www/index.html"))
                .render(OsFamily.UNIX);
 
          RunScriptOptions options = RunScriptOptions.Builder.blockOnComplete(true);


[2/2] git commit: Change example to use Ubuntu and SSD

Posted by ev...@apache.org.
Change example to use Ubuntu and SSD


Project: http://git-wip-us.apache.org/repos/asf/jclouds-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-examples/commit/7963763a
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-examples/tree/7963763a
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-examples/diff/7963763a

Branch: refs/heads/master
Commit: 7963763adccd2568b687455d95a62116d3f70ee0
Parents: 3473f57
Author: Everett Toews <ev...@rackspace.com>
Authored: Tue Apr 1 15:00:24 2014 -0500
Committer: Everett Toews <ev...@rackspace.com>
Committed: Tue Apr 1 15:02:05 2014 -0500

----------------------------------------------------------------------
 .../rackspace/cloudblockstorage/CreateVolumeAndAttach.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-examples/blob/7963763a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
----------------------------------------------------------------------
diff --git a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
index 6a2ab68..00fafb9 100644
--- a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
+++ b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
@@ -131,7 +131,7 @@ public class CreateVolumeAndAttach implements Closeable {
       ZoneAndId zoneAndId = ZoneAndId.fromZoneAndId(ZONE, "performance1-1");
       Template template = computeService.templateBuilder()
             .locationId(ZONE)
-            .osDescriptionMatches(".*CentOS 6.*")
+            .osDescriptionMatches(".*Ubuntu 12.04.*")
             .hardwareId(zoneAndId.slashEncode())
             .build();
 
@@ -153,6 +153,7 @@ public class CreateVolumeAndAttach implements Closeable {
    private Volume createVolume() throws TimeoutException {
       CreateVolumeOptions options = CreateVolumeOptions.Builder
             .name(NAME)
+            .volumeType("SSD")
             .metadata(ImmutableMap.<String, String> of("key1", "value1"));
 
       System.out.format("Create Volume%n");