Missing "Upload Elastic Stack Pack" Option

Running ECE 1.0.0 on trial license. Trying to follow the directions to update to 5.4.1 using the cloud UI here: https://www.elastic.co/guide/en/cloud-enterprise/current/ece-manage-elastic-stack.html#ece-manage-elastic-stack-add.

  • I have downloaded the 5.4.1.zip file to my workstation.
  • I am logged in to ECE web UI as root.
  • I click on "Platform".
  • I have the following tabs across the top: Allocators, Runners, Proxies, Versions, Admin, Repositories, Settings. Defaulted to "Allocators"

I do not see an option to "Upload Elastic Stack Pack" anywhere and no indication as to why this might not be available.

Any clues as to why this is the case?

@John_Zimmerman,

I spoke to the UI team working on ECE and it seems the UI functionality will not arrive until a future release. For now, you can use the command line steps we document, see https://www.elastic.co/guide/en/cloud-enterprise/current/ece-manage-elastic-stack.html#ece-manage-elastic-stack-add.

I will push a documentation change shortly to remove the UI steps. I apologize that you ran into this problem.

Nik

Additional issues:

  • Using the elastic-cloud-enterprise.sh I get "Could not add stack version" with no additional explanation. Adding --debug to that gives unknown argument.
  • When using the "curl -X PUT" option to add the stack pack I get: "HTTP method not allowed, supported methods: [GET, POST]".

I opted to use POST in the curl command instead and I now successfully have 5.4.1 listed under "Platform -> Versions" in the Elastic Cloud Enterprise UI.

Hi @John_Zimmerman

Can you provide the full elastic-cloud-enterprise.sh command that failed so unhelpfully? We'll look into that, thanks.

PUT is indeed not supported, only POST. The full API documentation is here

Alex

Apologies on the PUT/POST mixup. I was reading from the "update" section rather than the "add" section of the elastic stack document. The "add" section indeed specifies POST after double checking.

Using a fresh download of "elastic-cloud-enterprise.sh" (as of yesterday) the command I used to attempt installation was:

./elastic-cloud-enterprise.sh add-stack-version --version 5.4.1 --user root --pass <my_root_password>

@John_Zimmerman

Thanks for that, we'll have a look and update the docs, the script .. or both! :slight_smile:

Alex

@John_Zimmerman

could you please try to run

./elastic-cloud-enterprise.sh add-stack-version --version 5.4.1

on the host where you installed the master node (the first ECE node you installed)?

Note:
If you specified a custom storage path (an argument --host-storage-path) during installation, then you need to find a file bootstrap-secrets.json in a sub-directory bootstrap-state of that path and append an argument --secrets <absolutePathToSecretsFile> to the command above.

If this command works, then I guess that the problem is in your password.
Does it contain any symbols other than number or characters?

If it does not work, could you please run the script

bash -x ./elastic-cloud-enterprise.sh add-stack-version --version 5.4.1

and provide the line that starts with

+ docker run --env USER=root --env PASS= --env SECRETS_FILE_NAME...

Thanks,
Yuri

I did specify a custom storage path. This is our initial testing install and is currently still just everything on one node. The root password being used is still the one generated by default on initial install and has no special characters. I'm able to use the same password copy/pasted to login to the web interface.

I've tested using the --secret option a bit with no success. I first tried with 5.4.1 specified and then tried some previous versions that weren't already installed, but I'm not sure older versions not installed already are offered as packs.

So the command with the secret file specified is:

./elastic-cloud-enterprise.sh add-stack-version --version 5.3.3 --user root --pass <my_root_password> --secrets /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json

When running with the same with bash -x prepended the the docker run line looks like this....

+ docker run --env USER=root --env PASS= --env SECRETS_FILE_NAME=/secrets.json --env VERSION=5.3.3 --add-host containerhost:<my_ip_address> -v /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json:/secrets.json:ro -v /mnt/data/elastic/logs:/app/logs --rm -it docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0 bash -c 'wget -qO /tmp/${VERSION}.zip https://download.elastic.co/cloud-enterprise/versions/${VERSION}.zip && wget -q --header "Content-Type: application/zip" --user $USER --password ${PASS:-$(jq -r .adminconsole_root_password $SECRETS_FILE_NAME)} --post-file=/tmp/${VERSION}.zip http://containerhost:12400/api/v1/stack/versions'

Which appears to indicate the password is not being passed in. Manually running the docker run command with the password specified in the PASS= parameter completes without error. Looking into the script/pass parameter now.

@John_Zimmerman, thank you for helping me.

Unfortunately. we do not provide older version of stack packs. However, if you submit 5.4.1 again, ECE will process it and just overwrite the existing one.
So, please try 5.4.1 again.

If you specify an argument --secrets you can omit --pass because it is ignored.

Thanks!

Thanks. That explains the empty password.

Full output of both scenarios will be included in posts to follow...

I have the following stacks already installed: 5.4.1, 5.4.0, and 2.4.5. If there is another version I can attempt to install this way I can try that. Otherwise I'm not sure if the existence of the stack is what is causing the "Could not add stack version" error message or not. If that's the case I can wait until a new stack is released and report back.

Just specifying the secrets path.

[elastic@xx-xx-mgece01 installer]$ bash -x ./elastic-cloud-enterprise.sh add-stack-version --version 5.4.1  --secrets /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ set -e
+ CLOUD_ENTERPRISE_VERSION=1.0.1
+ HOST_STORAGE_PATH=/mnt/data/elastic
+ COMMAND=
+ YELLOW='\033[0;33m'
+ RED='\033[0;31m'
+ NC='\033[0m'
+ GENERAL_ERROR_EXIT_CODE=1
+ UNKNOWN_COMMAND_EXIT_CODE=2
+ INVALID_ARGUMENT_EXIT_CODE=3
+ COMMAND=help
+ '[' 5 -gt 0 ']'
+ COMMAND=add-stack-version
+ case $COMMAND in
+ shift
+ main --version 5.4.1 --secrets /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ '[' add-stack-version == install ']'
+ '[' add-stack-version == reset-adminconsole-password ']'
+ '[' add-stack-version == add-stack-version ']'
+ parseStackVersionArguments --version 5.4.1 --secrets /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ SOURCE_CONTAINER_NAME=frc-runners-runner
+ USER=root
+ PASS=
+ VERSION=
+ SECRETS_RELATIVE_PATH=/bootstrap-state/bootstrap-secrets.json
+ '[' --version '!=' '' ']'
+ case $1 in
+ setArgument VERSION --version 5.4.1
+ [[ 5.4.1 == --* ]]
+ [[ -z 5.4.1 ]]
+ local __resultvar=VERSION
+ eval 'VERSION='\''5.4.1'\'''
++ VERSION=5.4.1
+ shift
+ shift
+ '[' --secrets '!=' '' ']'
+ case $1 in
+ setArgument BOOTSTRAP_SECRETS --secrets /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ [[ /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json == --* ]]
+ [[ -z /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json ]]
+ local __resultvar=BOOTSTRAP_SECRETS
+ eval 'BOOTSTRAP_SECRETS='\''/srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json'\'''
++ BOOTSTRAP_SECRETS=/srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+++ dirname /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
++ cd /srv/elastic/var/elastic/bootstrap-state
++ pwd
++ basename /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ BOOTSTRAP_SECRETS=/srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ shift
+ shift
+ '[' '' '!=' '' ']'
+ DEFAULT_BOOTSTRAP_SECRETS=/mnt/data/elastic/bootstrap-state/bootstrap-secrets.json
+ [[ -z /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json ]]
+ [[ ! -e /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json ]]
+ test '!' -r /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json
+ PASS=
+ [[ -z '' ]]
+ [[ -z /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json ]]
+ addStackVersion
++ docker inspect -f '{{ .Config.Image }}' frc-runners-runner
+ CLOUD_IMAGE=docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0
+ [[ ! -z /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json ]]
+ SECRETS_FILE_NAME=/secrets.json
+ MNT='-v /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json:/secrets.json:ro'
+ [[ ! -z docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0 ]]
++ docker inspect -f '{{ range .HostConfig.ExtraHosts }} --add-host {{.}} {{ end }}' frc-runners-runner
+ docker run --env USER=root --env PASS= --env SECRETS_FILE_NAME=/secrets.json --env VERSION=5.4.1 --add-host containerhost:<my_ip_address> -v /srv/elastic/var/elastic/bootstrap-state/bootstrap-secrets.json:/secrets.json:ro -v /mnt/data/elastic/logs:/app/logs --rm -it docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0 bash -c 'wget -qO /tmp/${VERSION}.zip https://download.elastic.co/cloud-enterprise/versions/${VERSION}.zip && wget -q --header "Content-Type: application/zip" --user $USER --password ${PASS:-$(jq -r .adminconsole_root_password $SECRETS_FILE_NAME)} --post-file=/tmp/${VERSION}.zip http://containerhost:12400/api/v1/stack/versions'
+ echo -e '\033[0;31mCould' not add stack 'version\033[0m'
Could not add stack version

Just specifying the username and password

[elastic@xx-xx-mgece01 installer]$ bash -x ./elastic-cloud-enterprise.sh add-stack-version --version 5.4.1 --user root --pass <my_root_password>
+ set -e
+ CLOUD_ENTERPRISE_VERSION=1.0.1
+ HOST_STORAGE_PATH=/mnt/data/elastic
+ COMMAND=
+ YELLOW='\033[0;33m'
+ RED='\033[0;31m'
+ NC='\033[0m'
+ GENERAL_ERROR_EXIT_CODE=1
+ UNKNOWN_COMMAND_EXIT_CODE=2
+ INVALID_ARGUMENT_EXIT_CODE=3
+ COMMAND=help
+ '[' 7 -gt 0 ']'
+ COMMAND=add-stack-version
+ case $COMMAND in
+ shift
+ main --version 5.4.1 --user root --pass <my_root_password>
+ '[' add-stack-version == install ']'
+ '[' add-stack-version == reset-adminconsole-password ']'
+ '[' add-stack-version == add-stack-version ']'
+ parseStackVersionArguments --version 5.4.1 --user root --pass <my_root_password>
+ SOURCE_CONTAINER_NAME=frc-runners-runner
+ USER=root
+ PASS=
+ VERSION=
+ SECRETS_RELATIVE_PATH=/bootstrap-state/bootstrap-secrets.json
+ '[' --version '!=' '' ']'
+ case $1 in
+ setArgument VERSION --version 5.4.1
+ [[ 5.4.1 == --* ]]
+ [[ -z 5.4.1 ]]
+ local __resultvar=VERSION
+ eval 'VERSION='\''5.4.1'\'''
++ VERSION=5.4.1
+ shift
+ shift
+ '[' --user '!=' '' ']'
+ case $1 in
+ setArgument USER --user root
+ [[ root == --* ]]
+ [[ -z root ]]
+ local __resultvar=USER
+ eval 'USER='\''root'\'''
++ USER=root
+ shift
+ shift
+ '[' --pass '!=' '' ']'
+ case $1 in
+ setArgument PASS --pass <my_root_password>
+ [[ <my_root_password> == --* ]]
+ [[ -z <my_root_password> ]]
+ local __resultvar=PASS
+ eval 'PASS='\''<my_root_password>'\'''
++ PASS=<my_root_password>
+ shift
+ shift
+ '[' '' '!=' '' ']'
+ DEFAULT_BOOTSTRAP_SECRETS=/mnt/data/elastic/bootstrap-state/bootstrap-secrets.json
+ [[ -z '' ]]
+ [[ -e /mnt/data/elastic/bootstrap-state/bootstrap-secrets.json ]]
+ [[ -z <my_root_password> ]]
+ addStackVersion
++ docker inspect -f '{{ .Config.Image }}' frc-runners-runner
+ CLOUD_IMAGE=docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0
+ [[ ! -z '' ]]
+ [[ ! -z docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0 ]]
++ docker inspect -f '{{ range .HostConfig.ExtraHosts }} --add-host {{.}} {{ end }}' frc-runners-runner
+ docker run --env USER=root --env PASS=<my_root_password> --env SECRETS_FILE_NAME= --env VERSION=5.4.1 --add-host containerhost:<my_ip_address> -v /mnt/data/elastic/logs:/app/logs --rm -it docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:1.0.0 bash -c 'wget -qO /tmp/${VERSION}.zip https://download.elastic.co/cloud-enterprise/versions/${VERSION}.zip && wget -q --header "Content-Type: application/zip" --user $USER --password ${PASS:-$(jq -r .adminconsole_root_password $SECRETS_FILE_NAME)} --post-file=/tmp/${VERSION}.zip http://containerhost:12400/api/v1/stack/versions'
+ echo -e '\033[0;31mCould' not add stack 'version\033[0m'
Could not add stack version

No, the existence of a stack pack should not cause the error. I will add some diagnostic logs to the script and provide the updated script to you.

Again, thanks for helping us!

Yuri

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.