mirror of https://github.com/apache/jclouds.git
parent
f83dce9469
commit
4d8050105a
|
@ -37,6 +37,9 @@
|
|||
<module>createlamp</module>
|
||||
<module>speedtest-sqs</module>
|
||||
<module>createandlistbuckets</module>
|
||||
<module>resize-ebs/jruby-client</module>
|
||||
<module>resize-ebs/resize-ebs-java</module>
|
||||
|
||||
</modules>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
This demo is used to show how to change volume size for EBS-backed instance. Basically, jclouds API is used to run a sequence of commands, as described in an excellent article: http://alestic.com/2009/12/ec2-ebs-boot-resize.
|
||||
|
||||
There are 2 directories:
|
||||
|
||||
First one, /resize-ebs-java, has all necessary classes for the demo (under org.jclouds.tools.ebsresize), and also a sample Java launcher (EbsResizeMain). Please change the variables in EbsResizeMain to run the demo.
|
||||
|
||||
Second directory, /jruby-client, has a JRuby launcher for the same Java libraries. Please change the variables in launcher.rb to run the demo.
|
||||
To manage the maven dependencies, run as:
|
||||
$ mvn jruby:run
|
||||
|
||||
Pre-requisites:
|
||||
- running EBS-backed instance at Amazon EC2
|
||||
- Ubuntu image
|
||||
- proper settings in place (EbsResizeMain or launcher.rb)
|
|
@ -1,3 +1,23 @@
|
|||
<!--
|
||||
|
||||
|
||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
|
||||
====================================================================
|
||||
Licensed 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
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
|
@ -24,14 +44,6 @@
|
|||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-aws-demo-ebsresize</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
=begin
|
||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
|
||||
====================================================================
|
||||
Licensed 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
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
=end
|
||||
|
||||
=begin
|
||||
For more information, refer to:
|
||||
http://alestic.com/2009/12/ec2-ebs-boot-resize
|
||||
=end
|
||||
class EbsVolumesJRuby
|
||||
|
||||
def initialize access_key_id, secret_key
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
=begin
|
||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
|
||||
====================================================================
|
||||
Licensed 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
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
=end
|
||||
|
||||
require "src/main/scripts/ebs_volumes_j_ruby.rb"
|
||||
|
||||
instance_id = "AMAZON_INSTANCE_ID (i-xxxxxx)"
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
<!--
|
||||
|
||||
|
||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
|
||||
====================================================================
|
||||
Licensed 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
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
====================================================================
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.io.*;
|
|||
*
|
||||
* @author Oleksiy Yarmula
|
||||
*/
|
||||
public class EbsImages {
|
||||
public class EbsResizeMain {
|
||||
|
||||
String accessKeyId = "YOUR_ACCESS_KEY_ID";
|
||||
String secretKey = "YOUR_SECRET_KEY";
|
||||
|
@ -42,7 +42,7 @@ public class EbsImages {
|
|||
String remotePassword = "";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new EbsImages().launch();
|
||||
new EbsResizeMain().launch();
|
||||
}
|
||||
|
||||
public void launch() throws Exception {
|
Loading…
Reference in New Issue