上QQ阅读APP看书,第一时间看更新
How to do it…
Before installing ECE, the following prerequisities are to be checked:
- Your user must be a Docker enabled one. In the case of an error due to a non-Docker user, add your user with sudo usermod -aG docker $USER.
- In the case of an error when you try to access /mnt/data, give your user permission to access this directory.
- You need to add the following line to your /etc/sysctl.conf (a reboot is required): vm.max_map_count = 262144.
- To be able to use the ECE, it must initially be installed on the first host, as follows:
bash <(curl -fsSL https://download.elastic.co/cloud/elastic-cloud-enterprise.sh) install
The installation process should manage these steps automatically, as shown in the following screenshot:
At the end, the installer should provide your credentials so that you can access your cluster in a similar output, as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elastic Cloud Enterprise installation completed successfully
Ready to copy down some important information and keep it safe?
Now you can access the Cloud UI using the following addresses:
http://192.168.1.244:12400
https://192.168.1.244:12443
Admin username: admin
Password: OCqHHqvF0JazwXPm48wfEHTKN0euEtn9YWyWe1gwbs8
Read-only username: readonly
Password: M27hoE3z3v6x5xyHnNleE5nboCDK43X9KoNJ346MEqO
Roles tokens for adding hosts to this installation:
Basic token (Don't forget to assign roles to new runners in the Cloud UI after installation.)
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiZDI3NjZjZi1iNWExLTQ4YTYtYTRlZi1iYzE4NTlkYjQ5ZmEiLCJyb2xlcyI6W10sImlzcyI6ImN1cnJlbnQiLCJwZXJzaXN0ZW50Ijp0cnVlfQ.lbh9oYPiJjpy7gI3I-_yFBz9T0blwNbbwtWF_-c_D3M
Allocator token (Simply need more capacity to run Elasticsearch clusters and Kibana? Use this token.)
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjYTk4ZDgyNi1iMWYwLTRkZmYtODBjYS0wYWYwMTM3M2MyOWYiLCJyb2xlcyI6WyJhbGxvY2F0b3IiXSwiaXNzIjoiY3VycmVudCIsInBlcnNpc3RlbnQiOnRydWV9.v9uvTKO3zgaE4nr0SDfg6ePrpperIGtvcGVfZHtmZmY
Emergency token (Lost all of your coordinators? This token will save your installation.)
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI5N2ExMzg5Yi1jZWE4LTQ2MGItODM1ZC00MDMzZDllNjAyMmUiLCJyb2xlcyI6WyJjb29yZGluYXRvciIsInByb3h5IiwiZGlyZWN0b3IiXSwiaXNzIjoiY3VycmVudCIsInBlcnNpc3RlbnQiOnRydWV9._0IvJrBQ7RkqzFyeFGhSAQxyjCbpOO15qZqhzH2crZQ
To add hosts to this Elastic Cloud Enterprise installation, include the following parameters when you install the software
on additional hosts: --coordinator-host 192.168.1.244 --roles-token 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiZDI3NjZjZi1iNWExLTQ4YTYtYTRlZi1iYzE4NTlkYjQ5ZmEiLCJyb2xlcyI6W10sImlzcyI6ImN1cnJlbnQiLCJwZXJzaXN0ZW50Ijp0cnVlfQ.lbh9oYPiJjpy7gI3I-_yFBz9T0blwNbbwtWF_-c_D3M'
These instructions use the basic token, but you can substitute one of the other tokens provided. You can also generate your own tokens. For example:
curl -H 'Content-Type: application/json' -u
admin: OCqHHqvF0JazwXPm48wfEHTKN0euEtn9YWyWe1gwbs8 http://192.168.1.244:12300/api/v1/platform/configuration/security/enrollment-tokens -d '{ "persistent": true, "roles": [ "allocator"] }'
To learn more about generating tokens, see Generate Role Tokens in the documentation.
System secrets have been generated and stored in /mnt/data/elastic/bootstrap-state/bootstrap-secrets.json.
Keep the information in the bootstrap-secrets.json file secure by removing the file and placing it into secure storage, for example.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- In my case, I can access the installed interface at http://192.168.1.244:12400.
After logging into the admin interface, you will see your actual cloud state, as follows:
- You can now press on Create Deployment to fire your first Elasticsearch cluster, as follows:
- You need to define a name (that is, a book-cluster). Using standard options for this is okay. After pressing Create Deployment, ECE will start to build your cluster, as follows:
- After a few minutes, the cluster should be up and running, as follows: