Last active
December 23, 2015 04:29
Cluster API implemenation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create cluster call | |
- Define specific stuff for each instance: security group/ruls, dns entry, floating IP etc. | |
- Connect node group into common network (VLAN, tunneling, flat network) | |
- Spin-up guestagent on each instance. | |
- Check statuses of each instance. Generate cluster status. | |
- Verify by updating cluster status at DВ. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List clusters call | |
- Collect clusters. | |
- Lookup over cluster nodes. | |
- Collect list of IDs | |
------------------------------------------------------------- | |
Detailed list cluster call | |
- Collect clusters. | |
- Lookup over cluster nodes. | |
- Retrieve instances information. | |
- Collect instance specific info. | |
------------------------------------------------------------- | |
* info could be defined by passing a dict of instance object attributes | |
** this could be the same function. Just pass flag detailed=True/False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drop instance | |
- Lookup for cluster. | |
- Lookup for instance. | |
- Check permissions for minimum nodes. | |
- If permissions allows to drop, than do. Update status at DB. | |
- Perform cluster lookup, redefine group of instances. ** | |
------------------------------------------------------------- | |
* this function could drop more than one instance at the same time, | |
if each drop process will be wrapped into single thread, just another task-to-do | |
** This mechanism is custom for each service engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add instance to cluster/replication | |
- Spin-up instance. | |
- Connect instance to cluster network | |
- Mark instance with cluster ID. | |
- Update clusters meta-data with new instance ID. | |
- Update cluster(next steps are based on implementation) ** | |
- Verify statuses. | |
------------------------------------------------------------- | |
** This mechanism is custom for each service engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promotion | |
- If cluster type allows to do that. | |
- If no master. | |
- Update cluster.** | |
- Spin-up cluster. | |
- Verify statuses. | |
------------------------------------------------------------- | |
** This mechanism is custom for each service engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Restart | |
- If cluster exists | |
- If status is not Busy/Error/Building etc. | |
- If each of nodes are not busy. | |
- Do restart of each instance. | |
- Collect statuses. | |
- Verify cluster status. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backup cluster | |
- If cluster exists. | |
- Discover instances. | |
- Mark cluster with Busy status. | |
- Do async backup of each instance. | |
- Create cluster backup DB entry. | |
- Verify backup statuses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Restore cluster from backup | |
- If backup. | |
- If backup of each instance. | |
- If new cluster size is the same as in backup. | |
- Create each instance from backup. | |
- Verify statuses. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment