Browser-based Volume / template upload to Cloud Platform

10:30 AM
Browser-based Volume / template upload to Cloud Platform -

A new feature introduced in 4.5.1 Cloud Platform (CCP) allows the user to work directly with a volume / template invite standard Web browser use of local system CCP. Earlier, the same volume / template should be hosted on a web server. Thus, the upload process is now as it facilitates is not dependent on web servers.

The following diagram explains the steps involved in the volume / template upload browser.

image2014-2-19 12:59:26

A. Management Server generates a unique pre-shared key (PSK) and shares it with the agent on SSVM runs.

as to register a new API request "getUploadParamsForVolume / Template" to Management Server from the volume / template metadata. Request parameters include name, format, etc.

C. Management Server response to (B) provides URL volume / template file, encrypted metadata required to upload the file to the secondary storage VM (SSVM) to handle and SHA1 signature PSK generated with the request to check authenticity.

D. The volume / template file is uploaded via HTTPS POST to the obtained in (C) URL. The metadata and signature in (C) should be back as passed.

E. The website (Apache) on SSVM receives the request and forwards it to the SSVM means as a simple HTTP. The SSVM Agent checks the signature and decrypts metadata PSK. Once the request is verified, the volume / template is copied in the metadata to the secondary storage location.

F. Once the upload is complete, the MD5 checksum is compared (if available from C). At this point, the volume / template can be used for regular operation.

1.1 UI screens

The UI screens for uploading volume / template is shown below. The various input parameters is SSVM assigned part of the metadata with the POST request. UI internally calls the next section describes APIs.

image001

image002

1.2 New APIs

A few new APIs added to use the function to can .: GetUploadParamsForVolume GetUploadParamsForTemplate

1.2.1 Volume upload API example

the following are the API -Anforderung and response sequence a volume for uploading. For presentation, the flow remains the same, only the API will be replaced with getUploadParamsForTemplate along with some additional input parameters.

1. Request to MS

http://managementip:8080/client/api?command=getUploadParamsForVolume&response=json&sessionkey=TW1GLzPclNGgKtoYN5Xznbw8Nds%3D&name=windows&zoneId=c2bcad2f-1eb1-45ba-bebe-1c21873831b7&format=VHD&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D

2. Answer in JSON format of MS. Observe the POST URL, it has the public IP (replaced with ''. '-') Des SSVM followed by a domain name (as in the global configuration 'indicated secstorage.ssl.cert.domain'). The DNS must be configured correctly so that the domain name can be resolved. details see https://cwiki.apache.org/confluence/display/CLOUDSTACK/Procedure+to+Replace+realhostip.com+with+Your+Own+Domain+Name.

{

PostURL : https://1-2-3-4.xyz.com/upload/C7D351D2-F167-4CC8-A9FF-3BECB0A625C4,

metadata : TKPFeuz2nHmE/kcREEu24mnj1MrLdzOeJIHXR9HLIGgk56bkRJHaD0RRL2lds1rKKhrro4/PuleEh4YhRinhxaAmPpU4e55eprG8gTCX0ItyFAtlZViVdKXMew5Dfp4Qg8W9I1/IsDJd2Kas9/ftDQLiemAlPt0uS7Ou6asOCpifnBaKvhM4UGEjHSnni1KhBzjgEyDW3Y42HKJSSv58Sgmxl9LCewBX8vtn9tXKr+j4afj7Jlh7DFhyo9HOPC5ogR4hPBKqP7xF9tHxAyq6YqfBzsng3Xwe+Pb8TU1kFHg1l2DM4tY6ooW2h8lOhWUkrJu4hOAOeTeRtCjW3H452NKoeA1M8pKWuqMo5zRMti2u2hNZs0YY2yOy8oWMMG+lG0hvIlajqEU=,

signature : de7c9b85b8b78aa6bc8a7a36f70a0701c9db4d9

expired : 2014-10-17T12: 00: 00 + 0530

id : C7D351D2-F167-4CC8-A9FF-3BECB0A625C4

}

3. Volume upload request to SSVM. Note that the metadata, runs and signature are passed when be uploaded along with the volume.

curl -X POST "https://1-2-3-4.xyz.com/upload/C7D351D2 -F167-4CC8-A9FF-3BECB0A625C4" -H "X Signature: de7c9b85b8b78aa6bc8a7a36f70a0701c9db4d9" -H “X-metadata:TKPFeuz2nHmE/kcREEu24mnj1MrLdzOeJIHXR9HLIGgk56bkRJHaD0RRL2lds1rKKhrro4/PuleEh4YhRinhxaAmPpU4e55eprG8gTCX0ItyFAtlZViVdKXMew5Dfp4Qg8W9I1/IsDJd2Kas9/ftDQLiemAlPt0uS7Ou6asOCpifnBaKvhM4UGEjHSnni1KhBzjgEyDW3Y42HKJSSv58Sgmxl9LCewBX8vtn9tXKr+j4afj7Jlh7DFhyo9HOPC5ogR4hPBKqP7xF9tHxAyq6YqfBzsng3Xwe+Pb8TU1kFHg1l2DM4tY6ooW2h8lOhWUkrJu4hOAOeTeRtCjW3H452NKoeA1M8pKWuqMo5zRMti2u2hNZs0YY2yOy8oWMMG+lG0hvIlajqEU=” -H 'X-expires: 2014-10-17T12: 00: 00 + 0530 "-F" file=@volume.vhd "-v

4. Volume Reply SSVM in a successful scenario

0 OK -. (Uploading is successful)

Previous
Next Post »
0 Komentar