What is Orchestration?
From the Oracle docs (Bold/Italic) -
An orchestration defines the attributes and interdependencies of a collection of compute, networking, and storage resources in Oracle Compute Cloud Service. You can use orchestrations to automate the provisioning and lifecycle operations of an entire virtual compute topology.
For example, you can use orchestrations to create and manage a collection of instances hosting a multitiered application stack with all the necessary networking, storage, and security settings.
Some Terminology up front
oplan - Object plan, the primary building block of an orchestration.
An orchestration can have up to 10 oplans.
obj_type - An object type refers to the Oracle Compute Cloud Service resource that you want to create.
Here is the list of valid obj_types -
objects - The
objects
attribute defines the properties or characteristics of the the Oracle Compute Cloud Service resource that you want to create, as specified by the obj_type
attribute.For example, if you want to create a storage volume, the
obj_type
would be storage/volume
, and the objects
would include size
and bootable
. If you want to create an instance, the obj_type
would be launchplan,
and the objects
would include instances,
along with instance-specific attributes, such as imagelist
and shape.
You can create relationships between different oplans, e.g. one plan to create the instance, the other to create the storage volume.
Simple Example
This simple example will have 2 parts -
- Instance Orchestration to manage my VM instance
- Volume Orchestration to manage storage volumes
From what I said earlier, would could also include a master that ties the other 2 together via a relationship. The master will be detailed later.
So what does it look like?
Let's start with the volume orchestration -
I begin with a screenshot of the UI for creating Storage Volumes -
Here is the equivalent orchestration -
{
"relationships": [],
"status": "ready",
"account": "/YourIdentityDomain/default",
"description": "Creating a bootable storage volume for the nc-oel 1st disk",
"schedule": {
"start_time": "2016-03-16T22:07:55Z",
"stop_time": null
},
"uri": "https://YourRESTEndpoint/orchestration/Compute-YourIdentityDomain/yourUser/nc-oel-bootvolume",
"oplans": [
{
"status": "ready",
"info": {
"errors": {}
},
"obj_type": "storage/volume",
"ha_policy": "monitor",
"label": "nc-oel-bootvolume",
"objects": [
{
"status": "Online",
"account": "/Compute-YourIdentityDomain/default",
"managed": true,
"name": "/Compute-YourIdentityDomain/yourUser/nc-oel-bootvolume",
"tags": [],
"bootable": true,
"hypervisor": null,
"description": null,
"status_detail": "The storage volume is online.",
"quota": null,
"uri": null,
"imagelist_entry": 1,
"storage_pool": "/YourStoragePool/iscsi/thruput_1",
"machineimage_name": "/oracle/public/OL-6.6-20GB-x11-RD",
"status_timestamp": "2016-03-16T22:26:07Z",
"shared": false,
"imagelist": "/oracle/public/OL-6.6-20GB-x11-RD",
"writecache": false,
"properties": [
"/oracle/public/storage/default"
],
"size": "23622320128"
}
],
"status_timestamp": "2016-03-16T22:26:26Z"
}
],
"info": {
"errors": {}
},
"status_timestamp": "2016-03-16T22:26:26Z",
"name": "/YourIdentityDomain/yourUser/nc-oel-bootvolume",
"_paasResource": false,
"_personalResource": false
}
Now, let's look at the instance orchestration -
Again, here is the creation UI -
Here is the equivalent orchestration -
{
"relationships" : [ ],
"account" : "/YourIdentityDomain/default",
"description" : "Create instance that represents on OEL 6.6",
"schedule" : {
"start_time" : "2016-03-16T22:33:32Z",
"stop_time" : null
},
"oplans" : [ {
"obj_type" : "launchplan",
"ha_policy" : "active",
"label" : "nc-oel-instance",
"objects" : [ {
"instances" : [ {
"networking" : {
"eth0" : {
"dns" : [ "nc-oel" ],
"vethernet" : "/oracle/public/default",
"nat": "ippool:/oracle/public/ippool"
}
},
"name" : "/YourIdentityDomain/yourUser/nc-oel-instance/cfa3dfba-c071-46d4-8b10-247eec1ab3c9",
"boot_order" : [ 1 ],
"storage_attachments" : [ {
"volume" : "/YourIdentityDomain/yourUser/nc-oel-bootvolume",
"index" : 1
} ],
"label" : "nc-oel-instance",
"shape" : "oc3",
"imagelist" : "/oracle/public/OL-6.6-20GB-x11-RD",
"sshkeys" : [ "/YourIdentityDomain/yourUser/yourPublicKey" ],
"tags" : [ ]
} ]
} ]
} ],
"name" : "/Compute-YourIdentityDomain/yourUser/nc-oel-instance"
}
I added a master - Here we define the dependency between instance and volume creation.
Essentially, we need to create the volume before we can create the instance.
Essentially, we need to create the volume before we can create the instance.
{
"name": "/YourIdentityDomain/yourUser/master",
"oplans": [
{
"label": "instance",
"obj_type": "orchestration",
"ha_policy": "monitor",
"objects": [
{
"name": "/YourIdentityDomain/yourUser//nc-oel-instance"
}
]
},
{
"label": "volume",
"obj_type": "orchestration",
"ha_policy": "monitor",
"objects": [
{
"name": "/YourIdentityDomain/yourUser/nc-oel-bootvolume"
}
]
}
],
"relationships": [
{
"oplan": "instance",
"to_oplan": "volume",
"type": "depends"
}
]
}
Now, normally when I upload orchestrations they execute, creating the relevant
resources. They then appear with the status "Ready".
"name": "/YourIdentityDomain/yourUser/master",
"oplans": [
{
"label": "instance",
"obj_type": "orchestration",
"ha_policy": "monitor",
"objects": [
{
"name": "/YourIdentityDomain/yourUser//nc-oel-instance"
}
]
},
{
"label": "volume",
"obj_type": "orchestration",
"ha_policy": "monitor",
"objects": [
{
"name": "/YourIdentityDomain/yourUser/nc-oel-bootvolume"
}
]
}
],
"relationships": [
{
"oplan": "instance",
"to_oplan": "volume",
"type": "depends"
}
]
}
Now, normally when I upload orchestrations they execute, creating the relevant
resources. They then appear with the status "Ready".
Note, mine have the status stopped. I stopped these, via the context sensitive menu.
Stopping involves destroying the resources previously created.
Now I click on the menu for master -
No comments:
Post a Comment