Implements Imperative Deployment for ScaleIO #111
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature implements PR #82 Imperative approach to deploying ScaleIO. This is a significant feature and therefore required a lot of restructuring to the code base. If the declarative approach is not used, the prior method for adding ScaleIO nodes to the cluster is still supported (but has been enhanced - explained further down in this PR).
Imperative Deployment:
To declare what Block/Storage Devices (if any) contributes to what StoragePools and what StoragePools contribute to which ProtectionDomains, the following Mesos Agent nodes attributes (read: http://mesos.apache.org/documentation/latest/attributes-resources/) must be defined: scaleio-sds-domains, scaleio-sds-[domain], and scaleio-sds-[pool]. An example of this is given below:
/etc/mesos-slave/attributes/scaleio-sds-domains = mydomain,myotherdomain
/etc/mesos-slave/attributes/scaleio-sds-mydomain1 = mypool
/etc/mesos-slave/attributes/scaleio-sds-myotherdomain = saltwaterpool
/etc/mesos-slave/attributes/scaleio-sds-mypool = /dev/xvdf
/etc/mesos-slave/attributes/scaleio-sds-saltwaterpool = /dev/xvdg
To declare what Mesos Agent nodes consume storage out of which ProtectionDomain/StoragePool combination, the following Mesos Agent nodes attributes must be defined: scaleio-sdc-domains and scaleio-sdc-[domain]. (Note the sds vs sdc difference). IMPORTANT: There is a limitation currently in rexray such that you can only consume a single ProtectionDomain/StoragePool combination. What ever the first attribute pair discover by the Mesos Agent will be the pair selected. If no sdc is defined, the first attribute pair from the sds attributes will be used. Else the default in the Configuration flag will be used (default values are both default for ProtectionDomain and StoragePool). Example below:
/etc/mesos-slave/attributes/scaleio-sdc-domains = mydomain
/etc/mesos-slave/attributes/scaleio-sdc-mydomain1 = mypool
Other Enhancements
In order to implement this feature, state of the ScaleIO cluster and the nodes had to be introduced and therefore libkv is being used to store ScaleIO metadata. The configuration of this metadata store by default uses the zookeeper configuration which happens to be picked up automatically. Otherwise an external KeyValue store can be used (consul, zookeeper, etcd).
Another feature that has been enhanced is that when new nodes are brought online, storage devices will be add to the ScaleIO cluster based on the method being used.