-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-cluster Support for Elastic Agents #5538
Comments
Current Problems with EA plugins:
|
Proposed solution:
|
|
@bdpiparva My preference would be approach 2. Approach 1, beyond being more work, introduces a new concept and the settings will in three places: plugin-settings, cluster-settings and profile. Users have to (mostly manually) put it all together in their head. Approach 2 puts the onus of the settings and cluster support on the plugins. That could cause it to be inconsistent for sure, but given that endpoint provides enough flexibility to implement this, they should do it themselves. That way, if "cluster" is the wrong terminology for this in some plugin, then a user won't have to map that concept into "cluster" to understand what is happening. For instance: Consider the case mentioned by @GaneshSPatil above, where the cluster is the same, but the namespace is different. If we ask the k8s plugin to implement it, then it might use a term more appropriate than "cluster" and lead to less confusion. |
@bdpiparva @GaneshSPatil One other aspect to consider: Today, it's really hard for users to understand that the settings are broken up over profiles and plugin settings. They're not easily reachable from one another. The main reason is permissions/authorization. Only super admins can see plugin settings, since it can contain credentials, etc. If we provide authorization at the level of the settings, then we can bring the settings into the elastic profile screen itself, in case a user has permissions to see both. That will improve the user's experience and will allow them to change it in one place. We can continue to have two "Save" buttons, since they are separate sections and make separate calls. However, it'll be visible in one place, which I think is better. |
@arvindsv -- Regardless of permissions, Showing the cluster URL, the username used and basic configurations such as VPC, EC2 config should be OK? |
Elastic Agents Support for multi clusterCurrently, the plugin settings allows users to define only one cluster configuration. To allow defining multiple clusters, we are thinking of allowing users to define multiple plugin settings. An admin user will define multiple named plugin settings and each profile will be associated with one of the pre-defined plugin settings. Resolution of the associated plugin-settings with the elastic profile will be handled by GoCD core. Implementation Details:
Few points:
WHats the UX change?
Unknowns?
\cc: @gocd/committers @arvindsv @Smarker @varshavaradarajan |
I don't think this is necessarily the case. It should be possible to access the same host via different hostnames, in between different clusters. We ourselves do this. We use |
I think this should be a plugins capability whether the plugin will support the multiple settings or not. GoCD still does the migration even if the plugin doesn't support multiple configurations and associate it with all the profiles. Only the creation of the second config won't be allowed.
Leave this to the plugin author. We should provide all settings and let them figure out the view. @GaneshSPatil WDYT?
No need to handle this as there is server info processor for that. If plugin author really needs the server URL other then what server info is returning then that can be defined as part of the plugin settings. |
Yeah, make sense. As the settings fields are completely in control of the plugin, the plugin can decide if they want to support mutli-cluster via multiple plugin-settings or some other mechanism. |
Irrespective of where the cluster settings are stored I would prefer not going to multiple places to configure and view the cluster settings and the profile. Ideally if I am configuring an elastic agent plugin, I would prefer an option to configure a cluster and create multiple profiles for the same. The cluster configuration and the related profiles to should be grouped together which would make viewing the entire cluster + profile easier. |
EA Support for Multi Cluster using Cluster ConfigurationsGoCD introduces cluster as a new concept in GoCD core. All the elastic agent plugins will define a named cluster as part of cluster configurations instead of defining it using plugin settings. The named cluster config will be associated with the elastic agent profile. The users can define as many named clusters as they want. The newer elastic agent extension will stop supporting defining and consuming plugin settings. Tasks:
\cc: @gocd/committers @sheroy |
@arvindsv @maheshp @bdpiparva @ketan -- How about calling the cluster "Deployment Profile"? Deployment profile defines where the Elastic Agents will be deployed/run. |
@GaneshSPatil - this is what I understood from the above comments:
Is that right? I find that for EA, the amount of setup that is to be done seems to increase a lot. In order to avoid duplication of cluster related information, a new entity must now be configured. Its good that the cluster info that is currently in plugin settings will be migrated to the cluster-config global entity. But this still becomes a complex workflow, I think. Because it involves at least 3 levels of referencing. I may have misunderstood. This is just an idea. Maybe I haven't thought it out fully, please feel free to ignore it:
May be this is too complicated as well, I don't know. Just a suggestion. |
@varshavaradarajan -- Extremely sorry for the above response. We are NOT planning to keep 3 entities (plugin-settings, clusters, and profiles) to specify configurations of Elastic agents. We will get rid of So, Users can define multiple clusters and associate a cluster with the profile.
Defining the cluster configurations inline with the profile might cause followin issues:
This depends on the plugin as the view and the configuration properties are defined by the plugin. We can define this as a guideline but can't make it a restriction.
The real reason for introducing a new entity was to support multi-cluster support. The suggested approach would let users configure multiple clusters using field overrides, but this is still possible to do at the profile level (without a change in core). |
Sorry I'm late to the party. @varshavaradarajan I think your idea of a template based EA profile configuration yaml at a job level is interesting. I think it's a fresh take on configuring EAs, and I agree it reduces the number of levels of configuration. I feel that introducing the concept of named clusters as a separate concept is still valuable for the following reasons:
\cc: @arvindsv |
I like "Deployment Profile" or "Deployment Target" |
@sheroy I think deployment profile/target can be confusing, given the fact that "deployment" means something else to most people. They'll be thinking about their own apps' deployment. Cluster profile is also somewhat ambiguous in some cases. But, my preference is still that. |
@arvindsv, I agree, let's go with "Cluster Profile". |
gocd#5538) * Add clusterProfileId attribute on 'profile' tag * Define a default clusterProfile under elastic/clusterProfiles
* Mandate specifying cluster_profile_id field as part of Elastic Agent Profiles API v2 * Validate existence of referenced cluster profile. * Validate plugin id matches for elastic profile and referenced cluster profile. * Move API validation to entity validations for consistency.
* Always Show cluster profile id dropdown for elastic agent profiles modal. * Set first cluster profile id on model while creation/update of profile. * Fix elastic agent profiles usage
* Always Show cluster profile id dropdown for elastic agent profiles modal. * Set first cluster profile id on model while creation/update of profile. * Fix elastic agent profiles usage
Change following plugin api call: * 'get-profile-metadata' => 'get-elastic-agent-profile-metadata' * 'get-profile-view' => 'get-elastic-agent-profile-view' * 'validate-profile' => 'validate-elastic-agent-profile'
Change following plugin api call: * 'get-profile-metadata' => 'get-elastic-agent-profile-metadata' * 'get-profile-view' => 'get-elastic-agent-profile-view' * 'validate-profile' => 'validate-elastic-agent-profile'
…ocd#5538) * Perform a full config save validations to check: - Valid cluster profiles. - Valid elastic agent profiles. - Valid elastic agent profile reference from job config. * Mark plugin invalid in case if it fails to migrate the existing config.
…5538) * Perform a full config save validations to check: - Valid cluster profiles. - Valid elastic agent profiles. - Valid elastic agent profile reference from job config. * Mark plugin invalid in case if it fails to migrate the existing config.
* Config saves were failing will reason null when we have following setup: - Install a v4 extension based elastic agent plugin - Define a cluster profile with some properties belonging to that v4 elastic agent plugin. * In case of full config save, GoCD will try to encrypt secure value of plugin specified profiles using 'PluginProfile.encryptSecureConfigurations'. As the v4 EA plugin did not have the capability to read the cluster profile configurations, it was failing with null pointer exception. Fix: * Verify Configurations exists on cluster profiles, as v4 plugins will not support cluster profile configurations.
…erver ping request (gocd#5538) * Do not send all available cluster profiles from different plugins.
…erver ping request (#5538) * Do not send all available cluster profiles from different plugins.
…lugin status report (gocd#5538) * Do not send all available cluster profiles from different plugins.
…status report (gocd#5538) * Clicking on agent hostname used to render agent status report page for elastic agents. * With elastic agent extension v5, cluster profile properties being mandatory for agent status report request and there is no way to find the cluster profile properties for an elastic agent, render normal job run history page for all the agents. * This change will always cause all the hostname links to render job run history page regardless of agent being elastic or normal.
…status report (gocd#5538) * Clicking on agent hostname used to render agent status report page for elastic agents. * With elastic agent extension v5, cluster profile properties being mandatory for agent status report request and there is no way to find the cluster profile properties for an elastic agent, render normal job run history page for all the agents. * This change will always cause all the hostname links to render job run history page regardless of agent being elastic or normal.
…status report (#5538) * Clicking on agent hostname used to render agent status report page for elastic agents. * With elastic agent extension v5, cluster profile properties being mandatory for agent status report request and there is no way to find the cluster profile properties for an elastic agent, render normal job run history page for all the agents. * This change will always cause all the hostname links to render job run history page regardless of agent being elastic or normal.
Verified on 19.3.0 (8959-259d1f79e361875995072e5c1fcc9cbda7ccc600). Enhancing server health message to show deprecation warnings will be tracked by separate issue |
Issue Type
Tasks:
migrate-config
plugin api call.The text was updated successfully, but these errors were encountered: