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

Allow allocator capacity configuration #147

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ The following variables are avaible:
- Default: `/mnt/data`
- `ece_roles`: Elastic Cloud Enterprise roles that successive hosts should assume
- Default: [director, coordinator, proxy, allocator]
- `capacity`: [Amount of memory to grant to the allocator](https://www.elastic.co/guide/en/cloud-enterprise/current/ece-manage-capacity.html#ece-alloc-memory)
- Default: left empty, installer default behavior will be applied
- `availability_zone`: The availability zone this group of hosts belongs to
- `ece_version`: The Elastic Cloud Enterprise version that should get installed
- Default: 2.8.1
Expand Down
6 changes: 5 additions & 1 deletion tasks/ece-bootstrap/secondary/install_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
ece_roles: [director, coordinator, proxy, allocator]
when: ece_roles is undefined

- name: Set empty capacity if not defined
set_fact:
capacity: "{{ capacity | default('') }}"

- name: Get the roles token
uri:
url: "https://{{primary_hostname}}:12443/api/v1/platform/configuration/security/enrollment-tokens"
Expand All @@ -20,7 +24,7 @@
register: roles_token

- name: Execute installation
shell: /home/elastic/elastic-cloud-enterprise.sh --coordinator-host {{ primary_hostname }} --roles-token '{{ roles_token.json.token }}' --roles '{{ ece_roles | join(',') }}' --availability-zone {{ availability_zone }} --cloud-enterprise-version {{ ece_version }} --docker-registry {{ ece_docker_registry }} --ece-docker-repository {{ ece_docker_repository }} --host-storage-path {{ data_dir }}/elastic --memory-settings '{{ memory_settings }}' --runner-id {{ ece_runner_id }}
shell: /home/elastic/elastic-cloud-enterprise.sh --coordinator-host {{ primary_hostname }} --roles-token '{{ roles_token.json.token }}' --roles '{{ ece_roles | join(',') }}' --availability-zone {{ availability_zone }} --cloud-enterprise-version {{ ece_version }} --docker-registry {{ ece_docker_registry }} --ece-docker-repository {{ ece_docker_repository }} --host-storage-path {{ data_dir }}/elastic --memory-settings '{{ memory_settings }}' --runner-id {{ ece_runner_id }} {{ '--capacity ' + capacity if capacity }}
become: yes
become_method: sudo
become_user: elastic
Expand Down