Database SChema - CloudStack

Document Sample
Database SChema - CloudStack Powered By Docstoc
					Cloud Database Schema – 2.2.14

       - Praveen Kumar
            Virtual machines
• Guest VMs
• System VMs
  – Console Proxy
  – Secondary Storage VM
  – Router VM
VM Tables
             Cloud Infrastructure Tables
• One or more hosts
  grouped into a cluster
                                                                         Seconda
• One or more clusters        Manageme
                                 nt
                                                                            ry
                                                                         Storage
  grouped into a pod           Server

• One or more pods
  grouped into a zone            MySQL
                                 Cloud_d
• One or more zones                 b

  controlled by one
  management server                                                Pod
                                                                            Zone
                                                                           Zone
                                                                          Zone

                         Citrix Confidential - Do Not Distribute
                    Cluster_details
              Stores additional info for VMWare cluster




Host Tables
        Primary Storage Tables
• Storage Pools
  – Map to Hosts
  – Container for volumes
  – Storage Tags
  – Primary storage maintenance
Storage pools
              Snapshot tables
• Snapshots
  – Define snapshot policy
  – Schedule snapshots
Snapshots
               Network Tables
•   Public IP addresses
•   Network Offerings
•   Networks
•   NICs
•   Port forwarding
•   Load Balancer
•   VPN
Public IP Address
Account_network_ref   Domain_network_ref

         Network tables
                   port_forwarding_rules



Firewall & Port Forwardings
Security Groups
             Template Tables
• Templates in
  – Secondary Storage
  – Primary Storage
Template Tables
       Resource Limits & counts
• Limits
  – Account Limits
  – Domain Limits
Resource limits & Counts
Guest OS
Hypervisor supported OSes




                  Guest OS
                VPN tables


• Enable VPN for public IP
• Manage VPN users
VPNs
      VLANs

• Guest VLANs
• Public VLANs
VLANs
Usage
Alerts & Events
Queues
NetApp Tables
Host capacity & others
OVS tables
        Cluster management
• Mshost
• Mshost_peer
                Offerings
• Service_offerings
• Disk_offerings
• Network_offerings
           Miscellaneous tables
•   Configuration – Global settings
•   Instance_group & instance_group_vm_map
•   Keystore - certificates
•   launch_permission – template permissions
•   Sequence
•   Stack_maid
•   version
APIs
             Cloud-stack API


               Access Roles

Root Admin       Domain Admin   USer
                   Sample API
1. http://localhost:8080/client/api
2. ?command=deployVirtualMachine
3. &serviceOfferingId=1
4. &diskOfferingId=1
5. &templateId=2
6. &zoneId=4
7.
&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXqjB8CG20YI3yaxXcgpyuaI
RmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ
8. &signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
  How to generate the signature.
1. For each field-value pair (as separated by a ‘&’) in the Command String, URL
encode each value so that it can be safely sent via HTTP GET.
NOTE: Make sure all spaces are encoded as “%20” rather than “+”.

2. Lower case the entire Command String and sort it alphabetically via the field
for each field-value pair. The result of this step would look like the following.

apikey=mivr6x7u6bn_sdahobpjnejpgest35exq-
jb8cg20yi3yaxxcgpyuairmfi_ejtvwz0nukkjbpmy3y2bcikwfq&command=deployvir
tualmachine&diskofferingid=1&serviceofferingid=1&templateid=2&zoneid=4
• 3. Take the sorted Command String and run it through the HMAC
  SHA-1 hashing algorithm (most programming languages offer a
  utility method to do this) with the user’s Secret Key. Base64 encode
  the resulting byte array in UTF-8 so that it can be safely transmitted
  via HTTP. The final string produced after Base64 encoding should be
  “Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D”.

• By reconstructing the final URL in the format Base URL+API
  Path+Command String+Signature, the final URL should look like:
• http://localhost:8080/client/api?command=deployVirtualMachine&
  serviceOfferingId=1&diskOfferingId=1&templateId=2&zoneId=4&ap
  iKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-
  jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&sig
  nature
• =Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D
  Response Formats: XML and JSON

  XML response                            JSON response
<listipaddressesresponse>               { "listipaddressesresponse" :
<allocatedipaddress>                    { "allocatedipaddress" :
<ipaddress>192.168.10.141</ipaddress>   [
<allocated>2009-09-18T13:16:10-         {
0700</allocated>                        "ipaddress" : "192.168.10.141",
<zoneid>4</zoneid>                      "allocated" : "2009-09-18T13:16:10-0700",
<zonename>WC</zonename>                 "zoneid" : "4",
<issourcenat>true</issourcenat>         "zonename" : "WC",
</allocatedipaddress>                   "issourcenat" : "true"
</listipaddressesresponse>              }
                                        ]
                                        }
                                        }
                Job Status

• 0 - Job is still in progress. Continue to
  periodically poll for any status changes.
• 1 - Job has successfully completed. The job
  will return any successful response values
  associated with command that was originally
  executed.
• 2 - Job has failed
             Usage Types
Usage Type        Description
1                 RUNNING_VM
2                 ALLOCATED_VM
3                 IP_ADDRESS
4                 NETWORK_BYTES_SENT
5                 NETWORK_BYTES_RECEIVED
6                 VOLUME
7                 TEMPLATE
8                 ISO
9                 SNAPSHOT
11                LOAD_BALANCER_POLICY
12                PORT_FORWARDING_RULE
13                NETWORK_OFFERING
14                VPN_USERS

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:10
posted:2/25/2013
language:Latin
pages:41