Elastic Cloud Control (ecctl) v1.0.0

edit

Elastic Cloud Control (ecctl) v1.0.0

edit

What’s new | Bug fixes | Breaking changes | Changelog

Welcome to the v1.0.0 release of Elastic Cloud Control. This version brings new features, some breaking changes, and bug fixes.

Elastic Cloud Control (ecctl) is Elastic’s CLI to manage Elasticsearch Service (ESS) and Elastic Cloud Enterprise (ECE).

Download the release binaries:

ecctl_1.0.0_darwin_amd64.tar.gz
ecctl_1.0.0_linux_32-bit.deb
ecctl_1.0.0_linux_32-bit.rpm
ecctl_1.0.0_linux_386.tar.gz
ecctl_1.0.0_linux_64-bit.deb
ecctl_1.0.0_linux_64-bit.rpm
ecctl_1.0.0_linux_amd64.tar.gz

What’s new

edit
  • Deployment create command now supports flag-based actions. Instance definition flags for the ecctl deployment create command are now available. Using a predefined deployment definition JSON file is still optional with the --file flag.
  • Deployment show command can now generate payload to update a deployment. With the addition of a new --generate-update-payload flag for the ecctl deployment show command, you can obtain a valid update payload from an existing deployment. This payload can be manually edited to be used in conjunction with the ecctl deployment update command.
  • Enterprise Search support All relevant commands now support Enterprise Search as a resource kind.

    $ ecctl deployment plan cancel --kind enterprise_search
  • New Elasticsearch keystore commands. The following commands have been added:

    ecctl deployment elasticsearch keystore show
    Shows the settings from the Elasticsearch resource keystore.
    ecctl deployment elasticsearch keystore update
    Updates the contents of an Elasticsearch resource keystore.
  • New User-Agent header. API calls made through ecctl now use ecctl/<version> instead of cloud-sdk-go/<version>.
  • Command-layer testing It is now possible to write tests for commands using the new testutils.RunCmdAssertion() testing function:

    func Test_showCmd(t *testing.T) {
    <...>
            {
            	name: "succeeds with JSON format",
            	args: testutils.Args{
            		Cmd: showCmd,
            		Args: []string{
            			"show", util.ValidClusterID, "--ref-id=main-elasticsearch",
            		},
            		Cfg: testutils.MockCfg{
            			OutputFormat: "json",
            			Responses: []mock.Response{
            				mock.New200ResponseAssertion(
            					reqAssertion, mock.NewByteBody(showRawResp),
            				),
            			},
            		},
            	},
            	want: testutils.Assertion{
            		Stdout: string(showJSONOutput) + "\n",
            	},
            },
        <...>
        for _, tt := range tests {
        		t.Run(tt.name, func(t *testing.T) {
        			testutils.RunCmdAssertion(t, tt.args, tt.want)
        		})
        	}

Bug fixes

edit
  • Inability to create or update deployments through Ansible. ecctl should behave in the same manner when executed from the terminal or any automation tool. A bug which showed os.Stdin as always populated when coupled with Ansible has been fixed.
  • Allocator vacate flag parsing has been fixed The --target flag was being ignored due to using GetStringSlice() when the flag declaration is Array. Flag parsing for allocator vacate operations now works as documented.

Breaking changes

edit
  • All APIs have been removed. The APIs that ecctl consumes are useful to other projects. These have now been moved to cloud-sdk-go. If you have any code consuming these APIs, make sure to import the packages from cloud-sdk-go/pkg/api instead.
  • Changes with commands and subcommands. In order to maintain feature parity with the Elastic Cloud API endpoints, the following commands have changed:

    • ecctl platform stack is now ecctl stack.
    • ecctl platform deployment-template is now ecctl deployment template.
  • Renamed API key functionality. To keep ecctl in sync with our documentation, the following items were renamed:

    • The --apikey command line flag is now --api-key.
    • The environment variable EC_APIKEY is now EC_API_KEY.
    • The setting apikey used in configuration files is now api_key.

Changelog

edit

efd9082 cmd: Rename apikey to api-key and EC_API_KEY (#363)
73b6452 release: Update changelog to include latest commits (#362)
34cc776 cmd: Fix deployment note commands (#360)
17d6a8a cmd: Add region parameter to allocator metadata (#361)
c575b64 release: v1.0.0 release notes and changelog (#350)
ae1ff8f release: Update cloud-sdk-go@v1.0.0 module (#358)
2158d38 deployment: Support memory in GB for create command (#357)
6290cc0 deployment: Add --generate-update-payload to show (#355)
b7bde30 deployment: Change of terminology for create command (#356)
3ed0a08 create: Use standard enterprise_search instead of enterprise-search (#354)
1eb24df docs: specify all ECE specific commands and add icons to .adoc files (#352)
0fab35b deployment: Fix create command against ESS (#348)
b86710c build(deps): bump github.com/go-openapi/runtime from 0.19.19 to 0.19.20 (#345)
42ce7af docs: Update to reflect the current state of the project (#347)
500e04a allocator: Fix Array parsing to slice parsing (#346)
1e9d805 deployment: Add elasticsearch keystore commands (#344)
f5d478e deployment: Add template v2 and remove platform commands (#343)
982db38 deployment: create flags reenabled and Enterprise Search support (#341)
d0ba552 enterprise_search: Support and refactor (#342)
1f8bd04 useragent: Add ecctl/<version> UserAgent header (#340)
d90a277 docs: Add all vacate kinds to --kind flag (#339)
162f918 mod: Update cobra, crypto and Go required verisons (#338)
33d2c5c cmd: Remove sdkcmdutil.FileOrStdin use (#337)
21c5b18 deployment-template: Adds a new --template-format flag to command (#332)
bef41cf cmd: fix testutil.newConfig ignored region (#336)
fa7fc09 instance-configuration: Add region to commands (#331)
feb03d0 cmd/util/testutils: Add RunCmdAssertion test function (#330)
d64b9fe user: remove user api and update with sdk imports (#328)
32f8c70 stack: Move stack command and subcommands up one level (#329)
404fcfc stack: Move stack command and subcommands up one level (#329)
cbf843f deployment create: Remove region value on non-ESS (#326)
8c635e1 deb: Add missing maintainer vendor and description (#323)
e6f2ae0 proxy: Populate Region field API calls (#321)
d722f45 platform: Update info command with region (#320)
f67d497 proxy filtered-groups: Populate Region field API calls (#315)
cf61c87 build(deps): bump github.com/go-openapi/runtime from 0.19.15 to 0.19.19 (#314)
374ec52 deployment-template: Update commands with region (#316)
f09b075 role: Populate Region field API calls (#309)
4bbcb35 runner: Populate Region field API calls (#308)
1088cdf enrollment-token: Populate Region field API calls (#307)
b555750 misc: Removes files related to clusters API (#311)
3883b55 Update vendors
bf35dd0 allocator: Remove the last hashicorp/go-multierror (#306)
acd442f repository: Populate snaprepoapi Region field (#304)
4dbbf68 constructor: Populate constructorapi Region field (#305)
8d38d56 stack: Populate stackapi Region field (#303)
cc3415a allocator: Populate allocatorapi Region parameter (#302)
ed92f72 api: Removes all platform apis and imports the from cloud-sdk-go (#299)
72362f3 docs: Add --track flag to the deployment examples (#300)
84cc91a mod: Update vendor to 60b0cbb commit (#294)
882a69a release: Fix git config and changelog format (#287)
c64d740 pkg/deployment: Remove package from ecctl (#285)
7c145c9 build(deps): bump github.com/spf13/viper from 1.6.3 to 1.7.0 (#286)

Release date: August 18, 2020