SlideShare uma empresa Scribd logo
1 de 52
Alex Amies, Solution Architect, IBM
May 2012




IBM SmartCloud Enterprise
Storage Availability Areas and Dynamic Disk Attach /
Detach Demo
www.ibm.com/cloud/enterprise/




                                                   © 2011 IBM Corporation
Agenda



• Concepts and Scenarios

• Demos

    • UI




    • Command line




    • Java API



2                          © 2011 IBM Corporation
Agenda



• Concepts and Scenarios

• Demos

    • UI




    • Command line




    • Java API



3                          © 2011 IBM Corporation
Concepts

The demo illustrates the use of storage availability areas and dynamic attach / detach features
in an end-to-end data back-up and verification scenario.

A storage volume in SmartCloud Enterprise is a virtualized block storage unit. It can be
mounted to a virtual machine as a storage device and formatted with a file system to store data.
Other terms sometimes used to refer to the same concept in SCE are storage unit or just
volume. Cloud users can use storage availability areas to store data in different areas within
the same data center for the back-up purposes.

When creating a storage volume a storage availability area can optionally be chosen for the
volume to be provisioned to. If no storage availability is chosen then one will be assigned by
the system. When cloning a storage volume it may be cloned to a different data center.

A storage volume may be attached to a virtual machine instance after creation using dynamic
attach. This is in contrast to static attach where a storage volume is attached to a disk during
the virtual machine creation time. The storage volume may be detached without deleting the
virtual machine instance using dynamic detach.



4                                                                                  © 2011 IBM Corporation
Scenarios for Data Backup

Whole volume backup
2.Create a storage volume – choose a storage area or accept the default
3.Create a virtual machine
4.Attach the volume to the virtual machine (separate step, i.e. dynamically)
5.Add data to the volume
6.Detach the volume
7.Backup the data by cloning the volume
8.Re-attach the volume and continue using it
9.Note: you must dynamically attach and detach for this scenario to work

Data backup
12.Create two volumes each on different availability areas
13.Create a virtual machine attaching both volumes (single step or two steps, i.e. either
statically or dynamically)
14.Use one volume for active data storage and retrieval
15.Back-up data by copying to the other volume
16.Note: need to manage your own data with mounted volumes in this case
5                                                                                   © 2011 IBM Corporation
Scenarios for Image Import / Copy

Image Import
2.Create a storage volume
3.Create a virtual machine
4.Attach the volume to the virtual machine (separate step, i.e. dynamically)
5.Upload a virtual machine image OVF bundle to the volume using the native tools in the virtual
machine
6.Detach the volume
7.Import the image to the cloud using the image import API or command line

Image Copy
10.Create a storage volume
11.Copy a virtual machine image OVF bundle to the volume from the cloud image repository
using the SCE image copy command or API
12.Create a virtual machine
13.Attach the volume to the virtual machine (i.e. dynamically)
14.Copy the image OVF bundle from the volume to a location outside the cloud using the native
tools of the virtual machine

6                                                                                 © 2011 IBM Corporation
Agenda



• Concepts and Scenarios

• Demos

    • UI




    • Command line




    • Java API



7                          © 2011 IBM Corporation
User Interface in web portal



The storage availability area options appear in the storage volume provisioning wizard, in the
storage volume table, and in the clone storage volume dialog.

Dynamic attach and detach are not available in the user interface. However, the changes in
state for triggered by their use via the command line tool and API are apparent in the user
interface.




8                                                                                  © 2011 IBM Corporation
Create Storage Volume
Storage availability areas are displayed for the supported data centers in the storage volume
provisioning wizard.




9                                                                                 © 2011 IBM Corporation
Detailed View of Storage Volume
After a storage volume is provisioned then the availability area that the volume is provisioned to
will be displayed.




10                                                                                  © 2011 IBM Corporation
Clone Storage Volume
When cloning a storage volume you will be presented the choice of availability area for
supported data centers.




11                                                                                © 2011 IBM Corporation
Agenda



• Concepts and Scenarios

• Demos

     • UI




     • Command line




     • Java API



12                         © 2011 IBM Corporation
Demo – backup storage volume to a different availability area

1.Create a volume in a known storage availability area
    a)Query to discover existing availability areas
    b)Find storage volume offering ID, available sizes, and supported formats
    c) Create storage volume on a selected availability area
    d)Check status, wait until provisioning is complete
2.Use the volume to store data
    a)Find supported sizes and check support for dynamic attach / detach for selected virtual machine
       image
    b)Determine SSH key to use for new virtual machine instance
    c) Create an instance with selected image and supported size
    d)Check state of instance - wait for instance to be created
    e)Dynamically attach storage volume to instance
    f) SSH to instance, partition, format, and mount the volume. Now that it is ready to use, save data to it.
3.Back the volume up
    a)Detach the volume
    • Clone the volume to another availability area to back up the data
    c) Dynamically attach the cloned storage volume to the instance to verify that the data has been backed
       up successfully


13                                                                                             © 2011 IBM Corporation
Demo with Command line tool
Use Windows for demo, Linux is similar
Step 1a: create password file and list storage availability areas

# Create a password file
> ic-create-password.cmd -u a.user@example.com -p *** -w unlock -g mykey.ext


# Find storage availability areas with the describe locations command
> ic-describe-locations.cmd -u a.user@example.com -w unlock -g mykey.ext
ID: 41
Location: RTP
Name: Raleigh, U.S.A
State: ONLINE
Description: This data center is located in Raleigh, North Carolina, U.S.A. The
services provided are: Guest Instances, Image Capture, Persistent Storage, Reser
ved IP, Private VLAN/VPN.
Available Storage Areas :
      Storage Area Id: 2
      Storage Area Name: Area2
      ...............
      Storage Area Id: 1
      Storage Area Name: Area1
...


14                                                                                 © 2011 IBM Corporation
Demo with Command line tool
Step 1b: Find storage volume offering information
Use data found in the create volume command, step 1c

>ic-describe-volume-offerings.cmd -u a.user@example.com -w unlock -g mykey.ext
...
ID: 20035200 ## Note for create volume command
Name: Storage
Label: Storage
Location: 41 ## Data is for RTP, other locations will be listed but output is not shown here
Supported sizes in Gib: 60,256,512,1024,2048,4112,8224,10240 ## Use offering ID with list of numeric sizes
Price: $0/GHR
CurrencyCode: USD
CountryCode: SPT
PricePerQuantity: 1
UnitOfMeasure: GHR
Supported Format :
~~~~~~
Format : EXT3
Format : RAW ## In upper case, note for create volume command
...




15                                                                                                       © 2011 IBM Corporation
Demo with Command line tool
Step 1c: Create storage volume on a given availability area
Use the input parameters from steps 1a and 1b, note the volume ID for step 2e

>ic-create-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -n"Storage Demo" -s 60 -f RAW -L 41 -O 20035200 -A
1
Executing action: CreateVolume ...
The request has been submitted successfully.
ID: 31854 ## Used later
Name: Storage Demo
Owner: a.user@example.com
Size: 60
Format : raw
InstanceId:
OfferingID: 20035200
Storage Area Id: 1
Storage Area Name: Area1
CreatedTime: May 18, 2012 2:55:30 PM CST
Executing CreateVolume finished




16                                                                                                   © 2011 IBM Corporation
Demo with Command line tool
Step 1d: Check status of new volume, wait for provisioning to complete
If the status is NEW or PROVISIONING wait for a few minutes and try again

>ic-describe-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -v 31854
Executing action: DescribeVolume ...
ID: 31854
Name: Storage Demo
Owner: a.user@example.com
Size: 60 Gib
Format : raw
InstanceId:
State: UNMOUNTED
Location: 41
Storage Area Id: 1
Storage Area Name: Area1
I/O operation price: $0.11/million
CreatedTime: May 18, 2012 2:55:30 PM CST
Platform Version: 2
Executing DescribeVolume finished




17                                                                              © 2011 IBM Corporation
Demo with Command line tool
Step 2a: Find supported sizes and check support for dynamic attach / detach for selected
virtual machine image
>ic-describe-image.cmd -u a.user@example.com -w unlock -g mykey.ext -k 20025206
Executing action: DescribeImage ...
ID: 20025206
Name: Red Hat Enterprise Linux 6.2 (64-bit)(RTP)
Visibility: PUBLIC
State: AVAILABLE
Owner: SYSTEM
Platform: Red Hat Enterprise Linux/6
Platform Version: 1.2 ## OK
Location: 41
Image Size: 5.781006 Gib
----------------------------------
InstanceType ID: COP64.2/4096/60 ## Needed in the ic-create-instance command
Label: Copper 64 bit
Detail: Copper - 64 bit (vCPU: 2, RAM: 4 GiB, Disk: 60 GiB)
Price: $0.3/UHR
CurrencyCode: USD
CountryCode: SPT
PricePerQuantity: 1
UnitOfMeasure: UHR
...
18                                                                                © 2011 IBM Corporation
Demo with Command line tool
Step 2b: Determine SSH key to use for new virtual machine instance
Use for create instance, step 2c

>ic-describe-keypairs.cmd -u a.user@example.com -w unlock -g mykey.ext
Executing action: DescribeKeyPairs ...
10 keys
----------------------------------
Name: july26 ## Needed in the ic-create-instance command
Default Key: true
Material: ***
LastModifiedTime: August 28, 2011 9:39:05 PM CST
1 instances related.
     Instance ID: 210671
...




19                                                                       © 2011 IBM Corporation
Demo with Command line tool
Step 2c: Create an instance with selected image and supported size
The primary purpose of the instance is to access data on the storage volume

>ic-create-instance.cmd -u a.user@example.com -w unlock -g mykey.ext -t "COP64.2/4096/60" -n "Storage Demo VM" -k
20025206 -c july26 -L 41
Executing action: CreateInstance ...
The request has been submitted successfully.
1 instances!
----------------------------------
ID: 234165 ## Needed later in multiple commands
Name: Storage Demo VM
Hostname:
InstanceType: COP64.2/4096/60
IP:
KeyName: july26
Owner: a.user@example.com
RequestID: 234465
RequestName: Storage Demo VM
Status: NEW ## Need to wait for the status to change to ACTIVE
Volume IDs:
----------------------------------
Executing CreateInstance finished


20                                                                                                   © 2011 IBM Corporation
Demo with Command line tool
Step 2d: Check state of instance - wait for instance to be created
We are looking for an ACTIVE state to move to the next step
>ic-describe-instance.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165
Executing action: DescribeInstance ...
ID: 234165
Name: Storage Demo VM
Image ID: 20025206
Hostname: vhost1772.site1.compute.ihost.com
InstanceType: COP64.2/4096/60
IP: 170.224.166.242
KeyName: july26
Owner: aamies@cn.ibm.com
RequestID: 234465
RequestName: Storage Demo VM
Status: ACTIVE
Location: 41
Volume IDs:
Disk Size: 60
Minimal local disk: false
Expiration Time: May 18, 2014 5:36:30 PM CST
Executing DescribeInstance finished



21                                                                                 © 2011 IBM Corporation
Demo with Command line tool
Step 2e: Dynamically attach storage volume to instance
Get the volume and instance ID's from previous steps 1c and 2c

>ic-attach-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165 -v 31854
Executing action: AttachVolume ...
The request has been submitted successfully.
Executing AttachVolume finished


## Virtual machine status will go ATTACHING. Check status as in previous step to wait for state to return to ACTIVE.
>ic-describe-instance.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165
...
Status: ATTACHING
...
>ic-describe-instance.cmd -u aamies@cn.ibm.com -w unlock -g mykey.ext -l 234165
...
Status: ACTIVE
...




22                                                                                                          © 2011 IBM Corporation
Demo with Command line tool
Step 2f: Log onto the instance and use the attached volume to store data
Check presence of volume (vdc) and partition it (Bash commands)
Log onto instance with SSH and change to root
$ sudo /bin/bash
# /sbin/fdisk -l ## List partitions
Disk /dev/vda: 64.4 GB, 64425558016 bytes
...
Disk /dev/vdb: 4294 MB, 4294967296 bytes
...
Disk /dev/vdc: 64.4 GB, 64424509440 bytes ## Newly attached partition
...
Disk /dev/vdc doesn't contain a valid partition table ## Not partitioned


# /sbin/fdisk /dev/vdc ## Partition the new volume, follow the menu
...
# mkfs -t ext3 /dev/vdc1 ## Format the partition to ext3
...
# mkdir /volume1 ## Create mount point
# /bin/mount /dev/vdc1 /volume1 ## Mount the file system
# cd /volume1 ## Write data to the volume
# vi my_data.txt
...
# umount /volume1 ## unmount file system
# exit ## Log out of instance



23                                                                         © 2011 IBM Corporation
Demo with Command line tool
Step 3a: Detach the volume
The volume must be detached to clone it

>ic-detach-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165 -v 31854
Executing action: DetachVolume ...
The request has been submitted successfully.
Executing DetachVolume finished


## Volume status will go ATTACHING. Check status as in previous step to wait for state to return to UNMOUNTED.
>ic-describe-volume.cmd -u aamies@cn.ibm.com -w unlock -g mykey.ext -v 31854
...
State: DETACHING
...
>ic-describe-volume.cmd -u aamies@cn.ibm.com -w unlock -g mykey.ext -v 31854
...
State: UNMOUNTED




24                                                                                                     © 2011 IBM Corporation
Demo with Command line tool
Step 3b: Clone the volume to another availability area to back up the data
Get the source volume ID from step 1c

>ic-clone-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -n Backup -v 31854 -A 2
Executing action: CloneVolume ...
The request has been submitted successfully.
ID: 31872
Name: Backup
Owner: aamies@cn.ibm.com
Size: 60
Format : raw
InstanceId:
OfferingID: 20035200
Storage Area Id: 2
Storage Area Name: Area2
Data Center Location: 41
CreatedTime: May 18, 2012 6:18:52 PM CST
Executing CloneVolume finished




25                                                                                          © 2011 IBM Corporation
Demo with Command line tool
Step 3c: Verifying Backup



1.Attach the backup volume to the virtual machine instance
2.Mount the volume to the file system
3.List the files on the volume to make sure that they are the same as the source volume

# /bin/mount /dev/vdc1 /volume1
# ls -l /volume1
total 20
drwx------. 2 root root 16384 May 16 09:41 lost+found
-rw-r--r--. 1 root root   13 May 16 09:43 my_data.txt
# umount /volume1
# exit




26                                                                               © 2011 IBM Corporation
Agenda



• Concepts and Scenarios

• Demos

     • UI




     • Command line




     • Java API



27                         © 2011 IBM Corporation
Demo with Java API
Step 1a: Query to discover existing availability areas
Get sample code StorageDemo.java in RAM asset
All the examples that follow are methods that are added to the main program on the next page.


Classes and packages to import with the Java API examples


import com.ibm.cloud.api.rest.client.DeveloperCloud;
import com.ibm.cloud.api.rest.client.DeveloperCloudClient;
import com.ibm.cloud.api.rest.client.bean.*;




28                                                                                              © 2011 IBM Corporation
import java.util.List;
import com.ibm.cloud.api.rest.client.*;
import com.ibm.cloud.api.rest.client.bean.*;
// Class to list storage areas in a location
public class StorageDemo {
  public static final String USERNAME = "a.user@example.com";
  public static final String PASSWORD = "***";
  private DeveloperCloudClient client = DeveloperCloud.getClient();
  public StorageDemo() {
      client.setRemoteCredentials(USERNAME, PASSWORD);
  }
  // Method to list storage areas
  private void describeStorageAreas(String locationID) throws UnknownErrorException, IOException {
      List<Location> locations = client.describeLocations();
      for (Location l: locations) {
          if (locationID.equals(l.getId())) {
              List<StorageArea> storageAreas = l.getStorageAreas();
              for (StorageArea storageArea : storageAreas) {
                  System.out.println("Found storage area id " + storageArea.getId() + ", " +
                       storageArea.getName() + ", " + storageArea.getDescription());
              }
          }
      }
  }
  public static void main(String[] args) throws Exception {
      StorageDemo demo = new StorageDemo();
      demo.describeStorageAreas("41");
  }
}
29                                                                                                   © 2011 IBM Corporation
Java API Demo
List availability areas - program output

Found storage area id 1, Area1, gpfs1 of SONAS1
Found storage area id 2, Area2, gpfs2 of SONAS1




30                                                © 2011 IBM Corporation
Java API Demo
Step 1b: Find storage volume offering ID, available sizes, and supported formats
This method is part of the class in step 1a

private void describeStorageOfferings(String locationID) throws UnknownErrorException, IOException, UnauthorizedUserException {
    List<VolumeOffering> volumeOfferings = client.describeVolumeOfferings();
    for (VolumeOffering volumeOffering: volumeOfferings) {
        if (locationID.equals(volumeOffering.getLocation())) {
            System.out.println("Found offering for target location: " + volumeOffering.getId() +
                    ", " + volumeOffering.getName() + ", " + volumeOffering.getLabel());
            if ((volumeOffering.getSupportedSizes() != null) && (volumeOffering.getSupportedSizes().size() > 1)) {
                List<Long> sizes = volumeOffering.getSupportedSizes();
                System.out.print("Sizes: ");
                for (Long size : sizes) {
                    System.out.print(" " + size);
                }
                System.out.println();
            }
        }
    }
}




31                                                                                                                            © 2011 IBM Corporation
Java API Demo
List offering ID's and supported sizes - program output

Found offering for target location: 20001208, Small, 256 GiB
Found offering for target location: 20001209, Medium, 512 GiB
Found offering for target location: 20001210, Large, 2048 GiB
Found offering for target location: 20035200, Storage, Storage
Sizes: 60 256 512 1024 2048 4112 8224 10240




32                                                               © 2011 IBM Corporation
Java API Demo
Step 1c: Method to create a volume in a specific storage availability area
This method is also part of the class in step 1a

private void createVolume(String name, String locationID, String offeringId, String format,
      String size, String areaID) throws InsufficientResourcesException,
      InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException,
      UnknownErrorException, IOException {
    Volume volume = client.createVolume(name, locationID, offeringId, format, size, areaID);
    System.out.println("Volume ID: " + volume.getID());
}
...
// Invoke the method
demo.createVolume("My Disk", "41", "20035200", "RAW", "60", "1");




33                                                                                             © 2011 IBM Corporation
Java API Demo
Step 1d: Check status, wait until provisioning is complete
This method is a simple wrapper for the DeveloperCloudClient.describeVolumes method
that prints out some information about the volumes

private void describeVolumes() throws InsufficientResourcesException,
        InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException,
        UnknownErrorException, IOException, UnknownVolumeException {
    List<Volume> volumes = client.describeVolumes();
    for (Volume volume : volumes) {
        System.out.println("Volume ID: " + volume.getID());
        System.out.println("Name: " + volume.getName());
        System.out.println("State: " + volume.getState());
        System.out.println("Area: " + volume.getStorageArea().getId() + ", " +
             volume.getStorageArea().getName());
    }
}


…
demo.describeVolumes();




34                                                                                            © 2011 IBM Corporation
Java API Demo
Method to list storage availability area for individual volumes - program output

Volume ID: 31598
Name: My Disk
State: UNMOUNTED
Area: 1, Area1




35                                                                                 © 2011 IBM Corporation
Java API Demo
Step 2a: Find supported sizes and check support for dynamic attach / detach for selected
virtual machine image
Given by the platform version property, which must be at least 1.2
private Image getImage(String imageID) throws UnauthorizedUserException, UnknownImageException,
        UnknownErrorException, IOException {
    Image image = client.describeImage(imageID);
    System.out.println("Image ID: " + image.getID());
    System.out.println("Image name: " + image.getName());
    System.out.println("Image Platform Version: " + image.getPlatformVersion());
    List<InstanceType> supportedSizes = image.getSupportedInstanceTypes();
    for (InstanceType supportedSize : supportedSizes) {
        System.out.println("Size: " + supportedSize.getId() + ", " + supportedSize.getLabel());
    }
    return image;
}
...
Image image = demo.getImage("20025206");




36                                                                                                © 2011 IBM Corporation
Java API Demo
Step 2b: Determine if the image supports dynamic attach and detach - program output

Image ID: 20025206
Image name: Red Hat Enterprise Linux 6.2 (64-bit)(RTP)
Image Platform Version: 1.2
Size: COP64.2/4096/60, Copper 64 bit
Size: BRZ64.2/4096/60*500*350, Bronze 64 bit
Size: SLV64.4/8192/60*500*500, Silver 64 bit
Size: GLD64.8/16384/60*500*500, Gold 64 bit
Size: PLT64.16/16384/60*500*500*500*500, Platinum 64 bit
Size: PM264.16/32768/60*500*500*500*500, Platinum-M2 64 bit




37                                                                             © 2011 IBM Corporation
Java API Demo
Step 2c: Determine SSH key to use for virtual machine instance


private String getDefaultKey() throws UnauthorizedUserException, UnknownErrorException, IOException {
    String defaultKey = null;
    List<Key> keys = client.describeKeys();
    for (Key key: keys) {
        System.out.println("Found key with name " + key.getName());
        if (key.isDefaultKey()) {
            defaultKey = key.getName();
        }
    }
    System.out.println("Found default key " + defaultKey);
    return defaultKey;
}




38                                                                                                      © 2011 IBM Corporation
Java API Demo
Step 2d: Create an instance with selected image and supported size

private void createInstance(String instanceName, Image image, String instanceTypeIdStr,
        String keyName) throws UnauthorizedUserException, UnknownErrorException,
        IOException, InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException {
    System.out.println("Provisioning a new instance");
    String location = image.getLocation();
    String imageID = image.getID();
    Address address = null;
    Volume volume = null;
    // Create instance
    List<Instance> instances = client.createInstance(instanceName, location, imageID,
        instanceTypeIdStr, keyName, address, volume, new HashMap<String,Object>());


    // Check the status of the provisioning test
    for (Instance instance: instances) {
        System.out.println("New instance with id: " + instance.getID() + " status: " + instance.getStatus());
    }
}
...
Image image = demo.getImage("20025206");
String keyName = demo.getDefaultKey();
demo.createInstance("Java API Test Instance", image, "COP64.2/4096/60", keyName);




39                                                                                                               © 2011 IBM Corporation
Java API Demo
Method to create virtual machine instance - program output

Provisioning a new instance
New instance with id: 232906 status: NEW




40                                                           © 2011 IBM Corporation
Java API Demo
Step 2e: Check the state of instance - wait for instance to be created
This method is a simple wrapper for DeveloperCloudClient.describeInstance

private void describeInstance(String id) throws InsufficientResourcesException,
        InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException,
        UnknownErrorException, IOException, UnknownInstanceException {
    Instance instances = client.describeInstance(id);
    System.out.println("Name: " + instances.getName());
    System.out.println("Status: " + instances.getStatus());
    List<String> volumeIds = instances.getVolumeIds();
    System.out.println("Number of attached volumes: " + volumeIds.size());
    for (String volumeId : volumeIds) {
        System.out.println("VolumeId: " + volumeId);
    }
}
...
demo.describeInstance("232906");




41                                                                                            © 2011 IBM Corporation
Java API Demo
Method to check status of virtual machine instance - program output

Name: Java API Test Instance
Status: ACTIVE
Number of attached volumes: 0




42                                                                    © 2011 IBM Corporation
Java API Demo
Step 2f: Method to dynamically attach a volume
Call it from the main() method

private void attachVolume(String instanceID, String volumeID) throws UnauthorizedUserException, InvalidConfigurationException,
      InvalidStateException, UnknownErrorException, UnSupportFeatureException, IOException {
    client.attachStorage(instanceID, volumeID);
}
...
demo.attachVolume("232906", "31598");


// Check status as above or check in web portal as shown on the next page




43                                                                                                                               © 2011 IBM Corporation
Java API Demo
Status of virtual machine instance during attaching operation – web portal
The status changes to ATTACHING for a short period




44                                                                           © 2011 IBM Corporation
Java API Demo
Step 3a: Log onto the instance and use the attached volume to store data



Same as step 10 of the command line tool demo, which lists the Bash commands




45                                                                             © 2011 IBM Corporation
Java API Demo
Step 3b: Detach volume
Call it from the main method

private void dettachVolume(String instanceID, String volumeID) throws UnauthorizedUserException, InvalidConfigurationException,
      InvalidStateException, UnknownErrorException, UnSupportFeatureException, IOException {
    client.detachStorage(instanceID, volumeID);
}
...
demo.dettachVolume("232906", "31598");


// Check status as above or check in web portal as shown on the next page




46                                                                                                                                © 2011 IBM Corporation
Java API Demo
Status of virtual machine instance during detaching operation – web portal
Select the volume in the web portal to see the notifications for it




47                                                                           © 2011 IBM Corporation
Java API Demo
Step 3b: Status of volume during cloning operation – Java method
Clone volume with ID 31598, named My Disk, from availability area 1 to area 2

private void cloneVolume(String name, String volumeID, String targetAreaID) throws
      InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException,
      UnauthorizedUserException, UnknownErrorException, IOException {
    client.cloneVolume(name, volumeID, targetAreaID);
}
...
demo.cloneVolume("Backup", "31598", "2");




48                                                                                               © 2011 IBM Corporation
Java API Demo
Status of volume during cloning operation – web portal




49                                                       © 2011 IBM Corporation
Java API Demo
Step 3c: Verifying Backup



Same as step 13 of the command line tool demo




50                                              © 2011 IBM Corporation
Resources
Infrastructure as a service cloud development Blog
https://www.ibm.com/developerworks/mydeveloperworks/blogs/iaas_cloud/?lang=en

SCE Command Line Toolkit and Reference
https://www-147.ibm.com/cloud/enterprise/ram/assetDetail/generalDetails.faces?guid
={F1466F46-A4AB-3879-D883-1A26A43BF046}

SCE Java API and JavaDoc
https://www-147.ibm.com/cloud/enterprise/ram/search/_rlvid.jsp.faces?_rap=!assetDetails&_rvip=/s
={555C7964-F531-AECF-F8E9-F5F2D37B64D8}

SCE REST User Guide
https://www-147.ibm.com/cloud/enterprise/ram/artifact/%7B62ACBF96-CEF0-0B67-8529-14438806

Red Hat Enterprise Linux Storage Administration Guide
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guid



51                                                                             © 2011 IBM Corporation
Trademarks and notes


©IBM Corporation 2012

IBM, the IBM logo, ibm.com, Cognos, DB2, Informix, Lotus, Rational, SmartCloud, System x, Tivoli and
WebSphere are trademarks or registered trademarks of International Business Machines Corporation in the
United States, other countries, or both. If these and other IBM trademarked terms are marked on their first
occurrence in this information with the appropriate symbol (® or ™), these symbols indicate US registered or
common law trademarks owned by IBM at the time this information was published. Such trademarks may
also be registered or common law trademarks in other countries. A current list of IBM trademarks is
available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml
Intel is a trademark of Intel Corporation or its subsidiaries in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or
both.

Other company, product and service names may be trademarks or service marks of others.
References in this publication to IBM products or services do not imply that IBM intends to make them
available in all countries in which IBM operates.



52                                                                                           © 2011 IBM Corporation

Mais conteúdo relacionado

Mais procurados

Fulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It FitFulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It FitSteve Meek
 
XEN Server Magnus Wetterberg
XEN Server Magnus WetterbergXEN Server Magnus Wetterberg
XEN Server Magnus Wetterbergwebhostingguy
 
Abr11.5 what's new technical fa_qs
Abr11.5 what's new technical fa_qsAbr11.5 what's new technical fa_qs
Abr11.5 what's new technical fa_qsAPAC-Acronis
 
20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshopDigicomp Academy AG
 
IBM POWER Systems
IBM POWER SystemsIBM POWER Systems
IBM POWER Systemstcp cloud
 
Presentation power vm common 2012
Presentation   power vm common 2012Presentation   power vm common 2012
Presentation power vm common 2012solarisyougood
 
Memory Sizing for WebSphere Applications on System z Linux
Memory Sizing for WebSphere Applications on System z LinuxMemory Sizing for WebSphere Applications on System z Linux
Memory Sizing for WebSphere Applications on System z LinuxIBM India Smarter Computing
 
IBM SmartCloud Enterprise - A Secure Infrastructure for Test and Development
IBM SmartCloud Enterprise - A Secure Infrastructure for Test and DevelopmentIBM SmartCloud Enterprise - A Secure Infrastructure for Test and Development
IBM SmartCloud Enterprise - A Secure Infrastructure for Test and DevelopmentPiotr Pietrzak
 
Vsphere 4-partner-training180
Vsphere 4-partner-training180Vsphere 4-partner-training180
Vsphere 4-partner-training180Suresh Kumar
 
Cvc2009 Moscow Xd3 Fabian Kienle Final
Cvc2009 Moscow Xd3  Fabian Kienle FinalCvc2009 Moscow Xd3  Fabian Kienle Final
Cvc2009 Moscow Xd3 Fabian Kienle FinalLiudmila Li
 
Presentation cloud computing workshop - virtualization
Presentation   cloud computing workshop - virtualizationPresentation   cloud computing workshop - virtualization
Presentation cloud computing workshop - virtualizationxKinAnx
 
Virtualisation overview
Virtualisation overviewVirtualisation overview
Virtualisation overviewsagaroceanic11
 
VMware Performance for Gurus - A Tutorial
VMware Performance for Gurus - A TutorialVMware Performance for Gurus - A Tutorial
VMware Performance for Gurus - A TutorialRichard McDougall
 
Microsoft Windows Server 2012 Early Adopter Guide
Microsoft Windows Server 2012 Early Adopter GuideMicrosoft Windows Server 2012 Early Adopter Guide
Microsoft Windows Server 2012 Early Adopter GuideKingfin Enterprises Limited
 

Mais procurados (20)

Fulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It FitFulcrum Group Virtualization How does It Fit
Fulcrum Group Virtualization How does It Fit
 
XEN Server Magnus Wetterberg
XEN Server Magnus WetterbergXEN Server Magnus Wetterberg
XEN Server Magnus Wetterberg
 
Abr11.5 what's new technical fa_qs
Abr11.5 what's new technical fa_qsAbr11.5 what's new technical fa_qs
Abr11.5 what's new technical fa_qs
 
20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop20 christian ferber xen_server_6_workshop
20 christian ferber xen_server_6_workshop
 
IBM POWER Systems
IBM POWER SystemsIBM POWER Systems
IBM POWER Systems
 
Presentation power vm common 2012
Presentation   power vm common 2012Presentation   power vm common 2012
Presentation power vm common 2012
 
Memory Sizing for WebSphere Applications on System z Linux
Memory Sizing for WebSphere Applications on System z LinuxMemory Sizing for WebSphere Applications on System z Linux
Memory Sizing for WebSphere Applications on System z Linux
 
IBM SmartCloud Enterprise - A Secure Infrastructure for Test and Development
IBM SmartCloud Enterprise - A Secure Infrastructure for Test and DevelopmentIBM SmartCloud Enterprise - A Secure Infrastructure for Test and Development
IBM SmartCloud Enterprise - A Secure Infrastructure for Test and Development
 
Pivot3 case study
Pivot3 case studyPivot3 case study
Pivot3 case study
 
Vsphere 4-partner-training180
Vsphere 4-partner-training180Vsphere 4-partner-training180
Vsphere 4-partner-training180
 
Cvc2009 Moscow Xd3 Fabian Kienle Final
Cvc2009 Moscow Xd3  Fabian Kienle FinalCvc2009 Moscow Xd3  Fabian Kienle Final
Cvc2009 Moscow Xd3 Fabian Kienle Final
 
Xen RAS Status and Progress
Xen RAS Status and ProgressXen RAS Status and Progress
Xen RAS Status and Progress
 
Presentation cloud computing workshop - virtualization
Presentation   cloud computing workshop - virtualizationPresentation   cloud computing workshop - virtualization
Presentation cloud computing workshop - virtualization
 
Virtualisation overview
Virtualisation overviewVirtualisation overview
Virtualisation overview
 
VMware Performance for Gurus - A Tutorial
VMware Performance for Gurus - A TutorialVMware Performance for Gurus - A Tutorial
VMware Performance for Gurus - A Tutorial
 
Xen.org Overview 2009
Xen.org Overview 2009Xen.org Overview 2009
Xen.org Overview 2009
 
Xen io
Xen ioXen io
Xen io
 
Xen ATG case study
Xen ATG case studyXen ATG case study
Xen ATG case study
 
Microsoft Windows Server 2012 Early Adopter Guide
Microsoft Windows Server 2012 Early Adopter GuideMicrosoft Windows Server 2012 Early Adopter Guide
Microsoft Windows Server 2012 Early Adopter Guide
 
Xen community update
Xen community updateXen community update
Xen community update
 

Semelhante a IBM SmartCloud Enterprise Storage Backup Demo

JavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingJavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingChris Bailey
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSumanMitra22
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionColdFusionConference
 
Securing Containers - Sathyajit Bhat - Adobe
Securing Containers - Sathyajit Bhat - AdobeSecuring Containers - Sathyajit Bhat - Adobe
Securing Containers - Sathyajit Bhat - AdobeCodeOps Technologies LLP
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix Rohit Kelapure
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingPavan Kumar
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...Docker, Inc.
 
Weather data meets ibm cloud. part 2 storage and query of weather data - ib...
Weather data meets ibm cloud. part 2   storage and query of weather data - ib...Weather data meets ibm cloud. part 2   storage and query of weather data - ib...
Weather data meets ibm cloud. part 2 storage and query of weather data - ib...Einar Karlsen
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabricMark Ginnebaugh
 
IBM's Cloud Storage Options
IBM's Cloud Storage OptionsIBM's Cloud Storage Options
IBM's Cloud Storage OptionsTony Pearson
 
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixContinuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixFlorian Georg
 
Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?
Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?
Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?DataCore Software
 
PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14
PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14
PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14IBM Systems UKI
 
Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126Banking at Ho Chi Minh city
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...ColdFusionConference
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Shailendra Prasad
 
1040 ibm worklight delivering agility to mobile cloud deployments
1040 ibm worklight  delivering agility to mobile cloud deployments1040 ibm worklight  delivering agility to mobile cloud deployments
1040 ibm worklight delivering agility to mobile cloud deploymentsTodd Kaplinger
 
S104874 toe-pool-jburg-v1809e
S104874 toe-pool-jburg-v1809eS104874 toe-pool-jburg-v1809e
S104874 toe-pool-jburg-v1809eTony Pearson
 

Semelhante a IBM SmartCloud Enterprise Storage Backup Demo (20)

JavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingJavaOne 2014: Java Debugging
JavaOne 2014: Java Debugging
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
 
Securing Containers - Sathyajit Bhat - Adobe
Securing Containers - Sathyajit Bhat - AdobeSecuring Containers - Sathyajit Bhat - Adobe
Securing Containers - Sathyajit Bhat - Adobe
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using Caching
 
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
 
Weather data meets ibm cloud. part 2 storage and query of weather data - ib...
Weather data meets ibm cloud. part 2   storage and query of weather data - ib...Weather data meets ibm cloud. part 2   storage and query of weather data - ib...
Weather data meets ibm cloud. part 2 storage and query of weather data - ib...
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
 
IBM's Cloud Storage Options
IBM's Cloud Storage OptionsIBM's Cloud Storage Options
IBM's Cloud Storage Options
 
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixContinuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
 
Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?
Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?
Virtual SAN: It’s a SAN, it’s Virtual, but what is it really?
 
Deltacloud API
Deltacloud APIDeltacloud API
Deltacloud API
 
docker
dockerdocker
docker
 
PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14
PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14
PureSystems on the Public Cloud John Kaemmerer and Gerry Novan, 11th Sep 14
 
Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126Using the tivoli storage manager hsm client for windows redp4126
Using the tivoli storage manager hsm client for windows redp4126
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
1040 ibm worklight delivering agility to mobile cloud deployments
1040 ibm worklight  delivering agility to mobile cloud deployments1040 ibm worklight  delivering agility to mobile cloud deployments
1040 ibm worklight delivering agility to mobile cloud deployments
 
S104874 toe-pool-jburg-v1809e
S104874 toe-pool-jburg-v1809eS104874 toe-pool-jburg-v1809e
S104874 toe-pool-jburg-v1809e
 

Último

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

IBM SmartCloud Enterprise Storage Backup Demo

  • 1. Alex Amies, Solution Architect, IBM May 2012 IBM SmartCloud Enterprise Storage Availability Areas and Dynamic Disk Attach / Detach Demo www.ibm.com/cloud/enterprise/ © 2011 IBM Corporation
  • 2. Agenda • Concepts and Scenarios • Demos • UI • Command line • Java API 2 © 2011 IBM Corporation
  • 3. Agenda • Concepts and Scenarios • Demos • UI • Command line • Java API 3 © 2011 IBM Corporation
  • 4. Concepts The demo illustrates the use of storage availability areas and dynamic attach / detach features in an end-to-end data back-up and verification scenario. A storage volume in SmartCloud Enterprise is a virtualized block storage unit. It can be mounted to a virtual machine as a storage device and formatted with a file system to store data. Other terms sometimes used to refer to the same concept in SCE are storage unit or just volume. Cloud users can use storage availability areas to store data in different areas within the same data center for the back-up purposes. When creating a storage volume a storage availability area can optionally be chosen for the volume to be provisioned to. If no storage availability is chosen then one will be assigned by the system. When cloning a storage volume it may be cloned to a different data center. A storage volume may be attached to a virtual machine instance after creation using dynamic attach. This is in contrast to static attach where a storage volume is attached to a disk during the virtual machine creation time. The storage volume may be detached without deleting the virtual machine instance using dynamic detach. 4 © 2011 IBM Corporation
  • 5. Scenarios for Data Backup Whole volume backup 2.Create a storage volume – choose a storage area or accept the default 3.Create a virtual machine 4.Attach the volume to the virtual machine (separate step, i.e. dynamically) 5.Add data to the volume 6.Detach the volume 7.Backup the data by cloning the volume 8.Re-attach the volume and continue using it 9.Note: you must dynamically attach and detach for this scenario to work Data backup 12.Create two volumes each on different availability areas 13.Create a virtual machine attaching both volumes (single step or two steps, i.e. either statically or dynamically) 14.Use one volume for active data storage and retrieval 15.Back-up data by copying to the other volume 16.Note: need to manage your own data with mounted volumes in this case 5 © 2011 IBM Corporation
  • 6. Scenarios for Image Import / Copy Image Import 2.Create a storage volume 3.Create a virtual machine 4.Attach the volume to the virtual machine (separate step, i.e. dynamically) 5.Upload a virtual machine image OVF bundle to the volume using the native tools in the virtual machine 6.Detach the volume 7.Import the image to the cloud using the image import API or command line Image Copy 10.Create a storage volume 11.Copy a virtual machine image OVF bundle to the volume from the cloud image repository using the SCE image copy command or API 12.Create a virtual machine 13.Attach the volume to the virtual machine (i.e. dynamically) 14.Copy the image OVF bundle from the volume to a location outside the cloud using the native tools of the virtual machine 6 © 2011 IBM Corporation
  • 7. Agenda • Concepts and Scenarios • Demos • UI • Command line • Java API 7 © 2011 IBM Corporation
  • 8. User Interface in web portal The storage availability area options appear in the storage volume provisioning wizard, in the storage volume table, and in the clone storage volume dialog. Dynamic attach and detach are not available in the user interface. However, the changes in state for triggered by their use via the command line tool and API are apparent in the user interface. 8 © 2011 IBM Corporation
  • 9. Create Storage Volume Storage availability areas are displayed for the supported data centers in the storage volume provisioning wizard. 9 © 2011 IBM Corporation
  • 10. Detailed View of Storage Volume After a storage volume is provisioned then the availability area that the volume is provisioned to will be displayed. 10 © 2011 IBM Corporation
  • 11. Clone Storage Volume When cloning a storage volume you will be presented the choice of availability area for supported data centers. 11 © 2011 IBM Corporation
  • 12. Agenda • Concepts and Scenarios • Demos • UI • Command line • Java API 12 © 2011 IBM Corporation
  • 13. Demo – backup storage volume to a different availability area 1.Create a volume in a known storage availability area a)Query to discover existing availability areas b)Find storage volume offering ID, available sizes, and supported formats c) Create storage volume on a selected availability area d)Check status, wait until provisioning is complete 2.Use the volume to store data a)Find supported sizes and check support for dynamic attach / detach for selected virtual machine image b)Determine SSH key to use for new virtual machine instance c) Create an instance with selected image and supported size d)Check state of instance - wait for instance to be created e)Dynamically attach storage volume to instance f) SSH to instance, partition, format, and mount the volume. Now that it is ready to use, save data to it. 3.Back the volume up a)Detach the volume • Clone the volume to another availability area to back up the data c) Dynamically attach the cloned storage volume to the instance to verify that the data has been backed up successfully 13 © 2011 IBM Corporation
  • 14. Demo with Command line tool Use Windows for demo, Linux is similar Step 1a: create password file and list storage availability areas # Create a password file > ic-create-password.cmd -u a.user@example.com -p *** -w unlock -g mykey.ext # Find storage availability areas with the describe locations command > ic-describe-locations.cmd -u a.user@example.com -w unlock -g mykey.ext ID: 41 Location: RTP Name: Raleigh, U.S.A State: ONLINE Description: This data center is located in Raleigh, North Carolina, U.S.A. The services provided are: Guest Instances, Image Capture, Persistent Storage, Reser ved IP, Private VLAN/VPN. Available Storage Areas : Storage Area Id: 2 Storage Area Name: Area2 ............... Storage Area Id: 1 Storage Area Name: Area1 ... 14 © 2011 IBM Corporation
  • 15. Demo with Command line tool Step 1b: Find storage volume offering information Use data found in the create volume command, step 1c >ic-describe-volume-offerings.cmd -u a.user@example.com -w unlock -g mykey.ext ... ID: 20035200 ## Note for create volume command Name: Storage Label: Storage Location: 41 ## Data is for RTP, other locations will be listed but output is not shown here Supported sizes in Gib: 60,256,512,1024,2048,4112,8224,10240 ## Use offering ID with list of numeric sizes Price: $0/GHR CurrencyCode: USD CountryCode: SPT PricePerQuantity: 1 UnitOfMeasure: GHR Supported Format : ~~~~~~ Format : EXT3 Format : RAW ## In upper case, note for create volume command ... 15 © 2011 IBM Corporation
  • 16. Demo with Command line tool Step 1c: Create storage volume on a given availability area Use the input parameters from steps 1a and 1b, note the volume ID for step 2e >ic-create-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -n"Storage Demo" -s 60 -f RAW -L 41 -O 20035200 -A 1 Executing action: CreateVolume ... The request has been submitted successfully. ID: 31854 ## Used later Name: Storage Demo Owner: a.user@example.com Size: 60 Format : raw InstanceId: OfferingID: 20035200 Storage Area Id: 1 Storage Area Name: Area1 CreatedTime: May 18, 2012 2:55:30 PM CST Executing CreateVolume finished 16 © 2011 IBM Corporation
  • 17. Demo with Command line tool Step 1d: Check status of new volume, wait for provisioning to complete If the status is NEW or PROVISIONING wait for a few minutes and try again >ic-describe-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -v 31854 Executing action: DescribeVolume ... ID: 31854 Name: Storage Demo Owner: a.user@example.com Size: 60 Gib Format : raw InstanceId: State: UNMOUNTED Location: 41 Storage Area Id: 1 Storage Area Name: Area1 I/O operation price: $0.11/million CreatedTime: May 18, 2012 2:55:30 PM CST Platform Version: 2 Executing DescribeVolume finished 17 © 2011 IBM Corporation
  • 18. Demo with Command line tool Step 2a: Find supported sizes and check support for dynamic attach / detach for selected virtual machine image >ic-describe-image.cmd -u a.user@example.com -w unlock -g mykey.ext -k 20025206 Executing action: DescribeImage ... ID: 20025206 Name: Red Hat Enterprise Linux 6.2 (64-bit)(RTP) Visibility: PUBLIC State: AVAILABLE Owner: SYSTEM Platform: Red Hat Enterprise Linux/6 Platform Version: 1.2 ## OK Location: 41 Image Size: 5.781006 Gib ---------------------------------- InstanceType ID: COP64.2/4096/60 ## Needed in the ic-create-instance command Label: Copper 64 bit Detail: Copper - 64 bit (vCPU: 2, RAM: 4 GiB, Disk: 60 GiB) Price: $0.3/UHR CurrencyCode: USD CountryCode: SPT PricePerQuantity: 1 UnitOfMeasure: UHR ... 18 © 2011 IBM Corporation
  • 19. Demo with Command line tool Step 2b: Determine SSH key to use for new virtual machine instance Use for create instance, step 2c >ic-describe-keypairs.cmd -u a.user@example.com -w unlock -g mykey.ext Executing action: DescribeKeyPairs ... 10 keys ---------------------------------- Name: july26 ## Needed in the ic-create-instance command Default Key: true Material: *** LastModifiedTime: August 28, 2011 9:39:05 PM CST 1 instances related. Instance ID: 210671 ... 19 © 2011 IBM Corporation
  • 20. Demo with Command line tool Step 2c: Create an instance with selected image and supported size The primary purpose of the instance is to access data on the storage volume >ic-create-instance.cmd -u a.user@example.com -w unlock -g mykey.ext -t "COP64.2/4096/60" -n "Storage Demo VM" -k 20025206 -c july26 -L 41 Executing action: CreateInstance ... The request has been submitted successfully. 1 instances! ---------------------------------- ID: 234165 ## Needed later in multiple commands Name: Storage Demo VM Hostname: InstanceType: COP64.2/4096/60 IP: KeyName: july26 Owner: a.user@example.com RequestID: 234465 RequestName: Storage Demo VM Status: NEW ## Need to wait for the status to change to ACTIVE Volume IDs: ---------------------------------- Executing CreateInstance finished 20 © 2011 IBM Corporation
  • 21. Demo with Command line tool Step 2d: Check state of instance - wait for instance to be created We are looking for an ACTIVE state to move to the next step >ic-describe-instance.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165 Executing action: DescribeInstance ... ID: 234165 Name: Storage Demo VM Image ID: 20025206 Hostname: vhost1772.site1.compute.ihost.com InstanceType: COP64.2/4096/60 IP: 170.224.166.242 KeyName: july26 Owner: aamies@cn.ibm.com RequestID: 234465 RequestName: Storage Demo VM Status: ACTIVE Location: 41 Volume IDs: Disk Size: 60 Minimal local disk: false Expiration Time: May 18, 2014 5:36:30 PM CST Executing DescribeInstance finished 21 © 2011 IBM Corporation
  • 22. Demo with Command line tool Step 2e: Dynamically attach storage volume to instance Get the volume and instance ID's from previous steps 1c and 2c >ic-attach-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165 -v 31854 Executing action: AttachVolume ... The request has been submitted successfully. Executing AttachVolume finished ## Virtual machine status will go ATTACHING. Check status as in previous step to wait for state to return to ACTIVE. >ic-describe-instance.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165 ... Status: ATTACHING ... >ic-describe-instance.cmd -u aamies@cn.ibm.com -w unlock -g mykey.ext -l 234165 ... Status: ACTIVE ... 22 © 2011 IBM Corporation
  • 23. Demo with Command line tool Step 2f: Log onto the instance and use the attached volume to store data Check presence of volume (vdc) and partition it (Bash commands) Log onto instance with SSH and change to root $ sudo /bin/bash # /sbin/fdisk -l ## List partitions Disk /dev/vda: 64.4 GB, 64425558016 bytes ... Disk /dev/vdb: 4294 MB, 4294967296 bytes ... Disk /dev/vdc: 64.4 GB, 64424509440 bytes ## Newly attached partition ... Disk /dev/vdc doesn't contain a valid partition table ## Not partitioned # /sbin/fdisk /dev/vdc ## Partition the new volume, follow the menu ... # mkfs -t ext3 /dev/vdc1 ## Format the partition to ext3 ... # mkdir /volume1 ## Create mount point # /bin/mount /dev/vdc1 /volume1 ## Mount the file system # cd /volume1 ## Write data to the volume # vi my_data.txt ... # umount /volume1 ## unmount file system # exit ## Log out of instance 23 © 2011 IBM Corporation
  • 24. Demo with Command line tool Step 3a: Detach the volume The volume must be detached to clone it >ic-detach-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -l 234165 -v 31854 Executing action: DetachVolume ... The request has been submitted successfully. Executing DetachVolume finished ## Volume status will go ATTACHING. Check status as in previous step to wait for state to return to UNMOUNTED. >ic-describe-volume.cmd -u aamies@cn.ibm.com -w unlock -g mykey.ext -v 31854 ... State: DETACHING ... >ic-describe-volume.cmd -u aamies@cn.ibm.com -w unlock -g mykey.ext -v 31854 ... State: UNMOUNTED 24 © 2011 IBM Corporation
  • 25. Demo with Command line tool Step 3b: Clone the volume to another availability area to back up the data Get the source volume ID from step 1c >ic-clone-volume.cmd -u a.user@example.com -w unlock -g mykey.ext -n Backup -v 31854 -A 2 Executing action: CloneVolume ... The request has been submitted successfully. ID: 31872 Name: Backup Owner: aamies@cn.ibm.com Size: 60 Format : raw InstanceId: OfferingID: 20035200 Storage Area Id: 2 Storage Area Name: Area2 Data Center Location: 41 CreatedTime: May 18, 2012 6:18:52 PM CST Executing CloneVolume finished 25 © 2011 IBM Corporation
  • 26. Demo with Command line tool Step 3c: Verifying Backup 1.Attach the backup volume to the virtual machine instance 2.Mount the volume to the file system 3.List the files on the volume to make sure that they are the same as the source volume # /bin/mount /dev/vdc1 /volume1 # ls -l /volume1 total 20 drwx------. 2 root root 16384 May 16 09:41 lost+found -rw-r--r--. 1 root root 13 May 16 09:43 my_data.txt # umount /volume1 # exit 26 © 2011 IBM Corporation
  • 27. Agenda • Concepts and Scenarios • Demos • UI • Command line • Java API 27 © 2011 IBM Corporation
  • 28. Demo with Java API Step 1a: Query to discover existing availability areas Get sample code StorageDemo.java in RAM asset All the examples that follow are methods that are added to the main program on the next page. Classes and packages to import with the Java API examples import com.ibm.cloud.api.rest.client.DeveloperCloud; import com.ibm.cloud.api.rest.client.DeveloperCloudClient; import com.ibm.cloud.api.rest.client.bean.*; 28 © 2011 IBM Corporation
  • 29. import java.util.List; import com.ibm.cloud.api.rest.client.*; import com.ibm.cloud.api.rest.client.bean.*; // Class to list storage areas in a location public class StorageDemo { public static final String USERNAME = "a.user@example.com"; public static final String PASSWORD = "***"; private DeveloperCloudClient client = DeveloperCloud.getClient(); public StorageDemo() { client.setRemoteCredentials(USERNAME, PASSWORD); } // Method to list storage areas private void describeStorageAreas(String locationID) throws UnknownErrorException, IOException { List<Location> locations = client.describeLocations(); for (Location l: locations) { if (locationID.equals(l.getId())) { List<StorageArea> storageAreas = l.getStorageAreas(); for (StorageArea storageArea : storageAreas) { System.out.println("Found storage area id " + storageArea.getId() + ", " + storageArea.getName() + ", " + storageArea.getDescription()); } } } } public static void main(String[] args) throws Exception { StorageDemo demo = new StorageDemo(); demo.describeStorageAreas("41"); } } 29 © 2011 IBM Corporation
  • 30. Java API Demo List availability areas - program output Found storage area id 1, Area1, gpfs1 of SONAS1 Found storage area id 2, Area2, gpfs2 of SONAS1 30 © 2011 IBM Corporation
  • 31. Java API Demo Step 1b: Find storage volume offering ID, available sizes, and supported formats This method is part of the class in step 1a private void describeStorageOfferings(String locationID) throws UnknownErrorException, IOException, UnauthorizedUserException { List<VolumeOffering> volumeOfferings = client.describeVolumeOfferings(); for (VolumeOffering volumeOffering: volumeOfferings) { if (locationID.equals(volumeOffering.getLocation())) { System.out.println("Found offering for target location: " + volumeOffering.getId() + ", " + volumeOffering.getName() + ", " + volumeOffering.getLabel()); if ((volumeOffering.getSupportedSizes() != null) && (volumeOffering.getSupportedSizes().size() > 1)) { List<Long> sizes = volumeOffering.getSupportedSizes(); System.out.print("Sizes: "); for (Long size : sizes) { System.out.print(" " + size); } System.out.println(); } } } } 31 © 2011 IBM Corporation
  • 32. Java API Demo List offering ID's and supported sizes - program output Found offering for target location: 20001208, Small, 256 GiB Found offering for target location: 20001209, Medium, 512 GiB Found offering for target location: 20001210, Large, 2048 GiB Found offering for target location: 20035200, Storage, Storage Sizes: 60 256 512 1024 2048 4112 8224 10240 32 © 2011 IBM Corporation
  • 33. Java API Demo Step 1c: Method to create a volume in a specific storage availability area This method is also part of the class in step 1a private void createVolume(String name, String locationID, String offeringId, String format, String size, String areaID) throws InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException, UnknownErrorException, IOException { Volume volume = client.createVolume(name, locationID, offeringId, format, size, areaID); System.out.println("Volume ID: " + volume.getID()); } ... // Invoke the method demo.createVolume("My Disk", "41", "20035200", "RAW", "60", "1"); 33 © 2011 IBM Corporation
  • 34. Java API Demo Step 1d: Check status, wait until provisioning is complete This method is a simple wrapper for the DeveloperCloudClient.describeVolumes method that prints out some information about the volumes private void describeVolumes() throws InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException, UnknownErrorException, IOException, UnknownVolumeException { List<Volume> volumes = client.describeVolumes(); for (Volume volume : volumes) { System.out.println("Volume ID: " + volume.getID()); System.out.println("Name: " + volume.getName()); System.out.println("State: " + volume.getState()); System.out.println("Area: " + volume.getStorageArea().getId() + ", " + volume.getStorageArea().getName()); } } … demo.describeVolumes(); 34 © 2011 IBM Corporation
  • 35. Java API Demo Method to list storage availability area for individual volumes - program output Volume ID: 31598 Name: My Disk State: UNMOUNTED Area: 1, Area1 35 © 2011 IBM Corporation
  • 36. Java API Demo Step 2a: Find supported sizes and check support for dynamic attach / detach for selected virtual machine image Given by the platform version property, which must be at least 1.2 private Image getImage(String imageID) throws UnauthorizedUserException, UnknownImageException, UnknownErrorException, IOException { Image image = client.describeImage(imageID); System.out.println("Image ID: " + image.getID()); System.out.println("Image name: " + image.getName()); System.out.println("Image Platform Version: " + image.getPlatformVersion()); List<InstanceType> supportedSizes = image.getSupportedInstanceTypes(); for (InstanceType supportedSize : supportedSizes) { System.out.println("Size: " + supportedSize.getId() + ", " + supportedSize.getLabel()); } return image; } ... Image image = demo.getImage("20025206"); 36 © 2011 IBM Corporation
  • 37. Java API Demo Step 2b: Determine if the image supports dynamic attach and detach - program output Image ID: 20025206 Image name: Red Hat Enterprise Linux 6.2 (64-bit)(RTP) Image Platform Version: 1.2 Size: COP64.2/4096/60, Copper 64 bit Size: BRZ64.2/4096/60*500*350, Bronze 64 bit Size: SLV64.4/8192/60*500*500, Silver 64 bit Size: GLD64.8/16384/60*500*500, Gold 64 bit Size: PLT64.16/16384/60*500*500*500*500, Platinum 64 bit Size: PM264.16/32768/60*500*500*500*500, Platinum-M2 64 bit 37 © 2011 IBM Corporation
  • 38. Java API Demo Step 2c: Determine SSH key to use for virtual machine instance private String getDefaultKey() throws UnauthorizedUserException, UnknownErrorException, IOException { String defaultKey = null; List<Key> keys = client.describeKeys(); for (Key key: keys) { System.out.println("Found key with name " + key.getName()); if (key.isDefaultKey()) { defaultKey = key.getName(); } } System.out.println("Found default key " + defaultKey); return defaultKey; } 38 © 2011 IBM Corporation
  • 39. Java API Demo Step 2d: Create an instance with selected image and supported size private void createInstance(String instanceName, Image image, String instanceTypeIdStr, String keyName) throws UnauthorizedUserException, UnknownErrorException, IOException, InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException { System.out.println("Provisioning a new instance"); String location = image.getLocation(); String imageID = image.getID(); Address address = null; Volume volume = null; // Create instance List<Instance> instances = client.createInstance(instanceName, location, imageID, instanceTypeIdStr, keyName, address, volume, new HashMap<String,Object>()); // Check the status of the provisioning test for (Instance instance: instances) { System.out.println("New instance with id: " + instance.getID() + " status: " + instance.getStatus()); } } ... Image image = demo.getImage("20025206"); String keyName = demo.getDefaultKey(); demo.createInstance("Java API Test Instance", image, "COP64.2/4096/60", keyName); 39 © 2011 IBM Corporation
  • 40. Java API Demo Method to create virtual machine instance - program output Provisioning a new instance New instance with id: 232906 status: NEW 40 © 2011 IBM Corporation
  • 41. Java API Demo Step 2e: Check the state of instance - wait for instance to be created This method is a simple wrapper for DeveloperCloudClient.describeInstance private void describeInstance(String id) throws InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException, UnknownErrorException, IOException, UnknownInstanceException { Instance instances = client.describeInstance(id); System.out.println("Name: " + instances.getName()); System.out.println("Status: " + instances.getStatus()); List<String> volumeIds = instances.getVolumeIds(); System.out.println("Number of attached volumes: " + volumeIds.size()); for (String volumeId : volumeIds) { System.out.println("VolumeId: " + volumeId); } } ... demo.describeInstance("232906"); 41 © 2011 IBM Corporation
  • 42. Java API Demo Method to check status of virtual machine instance - program output Name: Java API Test Instance Status: ACTIVE Number of attached volumes: 0 42 © 2011 IBM Corporation
  • 43. Java API Demo Step 2f: Method to dynamically attach a volume Call it from the main() method private void attachVolume(String instanceID, String volumeID) throws UnauthorizedUserException, InvalidConfigurationException, InvalidStateException, UnknownErrorException, UnSupportFeatureException, IOException { client.attachStorage(instanceID, volumeID); } ... demo.attachVolume("232906", "31598"); // Check status as above or check in web portal as shown on the next page 43 © 2011 IBM Corporation
  • 44. Java API Demo Status of virtual machine instance during attaching operation – web portal The status changes to ATTACHING for a short period 44 © 2011 IBM Corporation
  • 45. Java API Demo Step 3a: Log onto the instance and use the attached volume to store data Same as step 10 of the command line tool demo, which lists the Bash commands 45 © 2011 IBM Corporation
  • 46. Java API Demo Step 3b: Detach volume Call it from the main method private void dettachVolume(String instanceID, String volumeID) throws UnauthorizedUserException, InvalidConfigurationException, InvalidStateException, UnknownErrorException, UnSupportFeatureException, IOException { client.detachStorage(instanceID, volumeID); } ... demo.dettachVolume("232906", "31598"); // Check status as above or check in web portal as shown on the next page 46 © 2011 IBM Corporation
  • 47. Java API Demo Status of virtual machine instance during detaching operation – web portal Select the volume in the web portal to see the notifications for it 47 © 2011 IBM Corporation
  • 48. Java API Demo Step 3b: Status of volume during cloning operation – Java method Clone volume with ID 31598, named My Disk, from availability area 1 to area 2 private void cloneVolume(String name, String volumeID, String targetAreaID) throws InsufficientResourcesException, InvalidConfigurationException, PaymentRequiredException, UnauthorizedUserException, UnknownErrorException, IOException { client.cloneVolume(name, volumeID, targetAreaID); } ... demo.cloneVolume("Backup", "31598", "2"); 48 © 2011 IBM Corporation
  • 49. Java API Demo Status of volume during cloning operation – web portal 49 © 2011 IBM Corporation
  • 50. Java API Demo Step 3c: Verifying Backup Same as step 13 of the command line tool demo 50 © 2011 IBM Corporation
  • 51. Resources Infrastructure as a service cloud development Blog https://www.ibm.com/developerworks/mydeveloperworks/blogs/iaas_cloud/?lang=en SCE Command Line Toolkit and Reference https://www-147.ibm.com/cloud/enterprise/ram/assetDetail/generalDetails.faces?guid ={F1466F46-A4AB-3879-D883-1A26A43BF046} SCE Java API and JavaDoc https://www-147.ibm.com/cloud/enterprise/ram/search/_rlvid.jsp.faces?_rap=!assetDetails&_rvip=/s ={555C7964-F531-AECF-F8E9-F5F2D37B64D8} SCE REST User Guide https://www-147.ibm.com/cloud/enterprise/ram/artifact/%7B62ACBF96-CEF0-0B67-8529-14438806 Red Hat Enterprise Linux Storage Administration Guide http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guid 51 © 2011 IBM Corporation
  • 52. Trademarks and notes ©IBM Corporation 2012 IBM, the IBM logo, ibm.com, Cognos, DB2, Informix, Lotus, Rational, SmartCloud, System x, Tivoli and WebSphere are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol (® or ™), these symbols indicate US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml Intel is a trademark of Intel Corporation or its subsidiaries in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Other company, product and service names may be trademarks or service marks of others. References in this publication to IBM products or services do not imply that IBM intends to make them available in all countries in which IBM operates. 52 © 2011 IBM Corporation