Skip to content
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

cmd: Move elasticsearch create to deployment API #67

Merged

Conversation

marclop
Copy link
Collaborator

@marclop marclop commented Nov 28, 2019

Description

This is a breaking change which breaks backwards compatibility with the
previously released behavior of deployment elasticsearch create since
the "--capacity" flag now disappears in favour of a "--size" flag.

Additionally the accepted ElasticsearchPayload from both stdin and the
"--file" flag might be different after this change. In any case there's
a very detailed help and examples section for this command.

Furthermore, specified a version through the "--version" flag is not
required anymore, this is caused by more user-friendly behavior which
now auto-discovers the latest Elastic Stack version for the platform and
uses that as a default.

To keep the ability to track creating deployments a new function called
depresource.TrackResources is introduced which has the caveat of not
supporting AppSearch change tracking since the structure is different
under th /deployments API. This is of course less than ideal but it's
also not the scope of that PR to introduce a fucntion which can track
AppSearch workloads. This will be done in a future PR.

Most importantly for this PR is underestanding that the user will now be
faced with a much larger set of configurable options, yet the basic user
won't have too know as much Deployment Templates and toplogies which can
form an Elasticsearch deployment and the its settings, since none of the
flags is required off the bat.

Last, an new function cmdutil.DecodeDefinition is introduced so it can
be re-used with commands that accept both a file flag and also a stdin
piping with the same contents as the file.

TODO

  • Write the unit tests (755a7e5)
  • Remove unused elasticsearch.Create code (ae757de)

Related Issues

Resolves #62

How Has This Been Tested?

Manually (See markdown examples)

Types of Changes

  • Breaking change (fix or feature that would cause existing functionality to change)

This is a breaking change which breaks backwards compatibility with the
previously released behavior of deployment elasticsearch create since
the "--capacity" flag now disappears in favour of a "--size" flag.

Additionally the accepted ElasticsearchPayload from both stdin and the
"--file" flag might be different after this change. In any case there's
a very detailed help and examples section for this command.

Furthermore, specified a version through the "--version" flag is not
required anymore, this is caused by more user-friendly behavior which
now auto-discovers the latest Elastic Stack version for the platform and
uses that as a default.

To keep the ability to track creating deployments a new function called
`depresource.TrackResources` is introduced which has the caveat of not
supporting AppSearch change tracking since the structure is different
under th /deployments API. This is of course less than ideal but it's
also not the scope of that PR to introduce a fucntion which can track
AppSearch workloads. This will be done in a future PR.

Most importantly for this PR is underestanding that the user will now be
faced with a much larger set of configurable options, yet the basic user
won't have too know as much Deployment Templates and toplogies which can
form an Elasticsearch deployment and the its settings, since none of the
flags is required off the bat.

Last, an new function `cmdutil.DecodeDefinition` is introduced so it can
be re-used with commands that accept both a file flag and also a stdin
piping with the same contents as the file.

Signed-off-by: Marc Lopez <marc5.12@outlook.com>
@marclop marclop added this to the 32: Nov 13 - Dec 03 milestone Nov 28, 2019
@marclop marclop requested a review from a team as a code owner November 28, 2019 10:50
@marclop marclop self-assigned this Nov 28, 2019
Signed-off-by: Marc Lopez <marc5.12@outlook.com>
Signed-off-by: Marc Lopez <marc5.12@outlook.com>
Copy link
Contributor

@ppapapetrou76 ppapapetrou76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find something wrong 😛

@marclop marclop added the breaking-change Breaks the previously defined contract label Dec 1, 2019
@marclop marclop merged commit ea03569 into elastic:master Dec 1, 2019
@marclop marclop deleted the f/move-elasticsearch-create-to-deployment-api branch December 1, 2019 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaks the previously defined contract
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move elasticsearch create to deployments API
2 participants