VMware vCloud Suite SDK Java: samples README |
|
vCloud Suite Provider SDK Java README
This document describes about the sample backup provider service. This provider runs external to the vCenter Server deployment and gets registered as a vAPI service with Lookup Service in the context of a vCenter Server. After the registration, clients can consume this external vAPI service as any other service via the vAPI endpoint specific to that vCenter Server.
How to run the sample
Pre-Requisite
- Make sure you have JDK 1.7 or higher for the vAPI Java Provider
- Make sure you vCenter Server deployed which is up and running
Import Eclipse Project
- Import the backup provider eclipse project by pointing to D:\VMware-vCloud-Suite-SDK-Java\provider\samples\backup-provider
- Make sure the project builds fine
vCenter Server deployment models
- vCenter Server with embedded platform service controller, In this model, the vCenter Server and the platform service controller are deployed on a single virtual machine or physical host. This model is suitable for smaller environments
- Since the same VM or host contains both the platform service controller and the vCenter Server.
- The lookupservice.url and the mgmt.instance.name will point to the same VM or host's FQDN
- In this model, since there is only one vCenter Server. Only one instance of the external backup vAPI provider is needed to serve the embedded vCenter Server.
- Perform steps 1,2,3,4 once in the context of the embedded platform service controller and vCenter Server
- vCenter Server with external platform service controller, In this model, the vCenter Server and the platform service controller are deployed on separate virtual machines or physical hosts. This configuration type is suitable for larger environments. If you have more than one platform service controllers, you can set up the platform service controllers to replicate data with each other all the time, so that the data from each platform service controller is shared
- Since the platform service controller and the vCenter Server are deployed on separate VM's or hosts. The lookupservice.url and the mgmt.instance.name FQDN will be different
- There can also be more than one platform service controller. Since the platform service controller's data is replicated across. The lookupservice.url can be pointed to any of the platform service controller.
- There can also be more than one vCenter Server. Depending on the number of vCenter Server's. There needs to be one-one mapping of the external backup vAPI provider instances with the vCenter Server's
- For simplicity/testing purposes. Perform steps 1,2,3,4 as many times as the number of vCenter Server's. By just changing the mgmt.instance.name(matching the vCenter Server's FQDN), backup.ip(use the same box) & backup.vapi.port(just change the port number)
1. Change backup.properties
- Open backup.properties under backup-provider\resources
- Change the lookupservice.url to point to the lookup service API url Ex: https://hostname/lookupservice/sdk
- Change the mgmt.instance.name to point to the vCenter Server's FQDN
- Change the root.certificate.path to point to the root certificate. This certificate is needed by the provider to verify the token. This certificate can be downloaded using the vecs-cli. Refer to the vSphere product documentation on how to use the vecs-cli in order to get/download the root certificates. Specifically under vSphere Security > vSphere Security Certificates > Managing Certificates and Services with CLI Commands
- Change the backup.ip to point to the system on which you are running the backup provider
- Change the backup.vapi.port accordingly
2. Start the backup vAPI provider
- Run BackupServer.java. This should start a local backup java provider, backup java metadata service and backup health service
- The java provider, java metadata service and backup health service runs in the context of the vCenter Server specified in the mgmt.instance.name property as part of the backup.properties
3. Register the backup vAPI provider metadata
- Run BackupProviderRegister.java.
- This registers backup java provider, backup health service, backup metadata
provider information with lookup service in the context of the vCenter Server specified in the mgmt.instance.name property as part of the backup.properties
4. Run the client
- Wait for atleast 4 mins for the registered information to be picked up by the vAPI Endpoint or you can restart the vAPI endpoint as part of the vCenter Server (Login to the vSphere client as an administrator, goto Administration -> System Configuration -> From the Nodes select the appropriate vCenter Server Management Node. Goto the Related Objects tab and you can see a vAPI Endpoint service)
    Once this happens, you can start to make the backup API calls(using Static stubs, DCLI, REST)
- Run the BackupClient.java. This should
    Create a backup.
    Retrieve the created backup.
    Creates categories/tags for the created backup. Associates the backup with tag
- SSH to the vCenter Management Node.
    Run dcli com. You shoud should be able to see the new acme namespace.
    You can also interact with the shell in interactive mode.
    Run dcli +i and start to use the new backup provider interactively.
Copyright © 2015 VMware, Inc. All rights not expressly granted herein are reserved.
|
Last updated: 26th Jan 2015 | VMware vCloud Suite SDK Java |
|