Difference between revisions of "Trove-Guest-Agent-Upgrades"
Dan Nguyen (talk | contribs) m (→Trove Management REST API) |
Dan Nguyen (talk | contribs) m (→Trove RPC API) |
||
Line 81: | Line 81: | ||
"method": "upgrade", | "method": "upgrade", | ||
"db_instance": '<UUID>' | "db_instance": '<UUID>' | ||
− | " | + | "trove_guest_version": "v1.0.1", |
"strategy": "swift", | "strategy": "swift", | ||
"location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" | "location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" | ||
Line 102: | Line 102: | ||
"method": "upgrade", | "method": "upgrade", | ||
"db_instance": '<UUID>' | "db_instance": '<UUID>' | ||
− | " | + | "trove_guest_version": "v1.0.1", |
"strategy": "swift", | "strategy": "swift", | ||
"location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" | "location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" | ||
} | } | ||
</pre> | </pre> |
Revision as of 01:04, 28 February 2014
TODO: draft up the design here DN 2014-02-27
Contents
Introduction
This article describes the design for the Guest Agent upgrades in Trove. Currently Guest Agent upgrades are implemented through external deployment tools that push new code to each guest instance. Usually the same deployment tools for upgrading the control plane handle guest agent upgrades. This can create a bottle neck on the deployment infrastructure.
Goals
- Version the RPC API and tie it to the API version (see nova for examples)
- This is to help prevent non-backward compatibility between the Trove API and the guest
- Implement a notification based upgrade path for guest agent
- Allow for different upgrade strategies (swift, jenkins, local disk, rysnc, etc)
- Avoid upgrading during times when guest agents are doing other work (i.e. backups, resize, restart)
- Reduce overall downtime during upgrade cycles
Description
Configuration
New properties will be added to the trove configs to allow:
- Enabling/Disabling Guest Agent Upgrades
guest_automatic_updates: False
- Specifying an upgrade strategy
guest_upgrade_strategy: swift
Affected Trove Components
- python-troveclient (optional)
- trove admin API
- guest agent
Workflow
- An external process will create a upgrade package or artifact
- An Admin user will notify a Guest Agent through the Trove Management API
- The Guest Agent will process the RPC message created by the API call and handle the upgrade accordingly
Trove Management REST API
Create a notification request to upgrade an trove guest agent
Relative URL: /v1.0/{admin_tenant_id}/mgmt/upgrades HTTP Method: Post HTTP Headers: Accept: application/json Content-Type: application/json User-Agent: python-troveclient X-Auth-Project-Id: tenant_name X-Auth-Token: HPAuth10_xxxx HTTP Post Body { "db_instance": '<UUID>' "trove_guest_version": "v1.0.1", "strategy": "swift", "location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" }
Trove RPC API
raw message
"_msg_id": "237aaf3ba5964f4f8d4e1c732f0bb57a", "args": { }, "_context_request_id": "req-9b45479c-3fe4-4ce6-9e41-c599e96a19a5", "_context_tenant": "<SANITIZED>", "_context_auth_token": "<SANITIZED>", "_context_show_deleted": False, "namespace": None, "_unique_id": "25a7c3ed333a4829ae038ed75b742bd5", "_context_is_admin": True, "version": "1.0", "_context_marker": None, "_context_read_only": False, "_reply_q": "reply_b451dd46d3374902999963ea44c9df64", "_context_user": "<SANITIZED>", "method": "upgrade", "db_instance": '<UUID>' "trove_guest_version": "v1.0.1", "strategy": "swift", "location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" "_context_limit": None }
unpacked context
{ "read_only": False, "show_deleted": False, "auth_token": "<SANITIZED>", "limit": None, "user": "<SANITIZED>", "request_id": "req-9b45479c-3fe4-4ce6-9e41-c599e96a19a5", "marker": None, "is_admin": True, "tenant":"<SANITIZED>", "method": "upgrade", "db_instance": '<UUID>' "trove_guest_version": "v1.0.1", "strategy": "swift", "location": "http: //swift/tenant/container/trove-guestagent-v1.0.1.tar.gz" }