Skip to content

Commit 8768285

Browse files
merge ech and ece api example
1 parent c8269b1 commit 8768285

File tree

5 files changed

+225
-280
lines changed

5 files changed

+225
-280
lines changed

deploy-manage/autoscaling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You can also have a look at our [autoscaling example](./autoscaling/ece-autoscal
4949
:::
5050

5151
:::{tab-item} {{ece}}
52-
You can also have a look at our [autoscaling example](./autoscaling/ece-autoscaling-example.md), as well as a sample request to [create an autoscaled deployment through the API](./autoscaling/ece-autoscaling-api-example.md).
52+
You can also have a look at our [autoscaling example](./autoscaling/ece-autoscaling-example.md), as well as a sample request to [create an autoscaled deployment through the API](./autoscaling/autoscaling-api-example.md).
5353
:::
5454

5555
:::{tab-item} {{ecloud}} - Heroku

deploy-manage/autoscaling/ec-hosted-autoscaling-api-example.md renamed to deploy-manage/autoscaling/autoscaling-api-example.md

Lines changed: 221 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ mapped_pages:
44
applies_to:
55
deployment:
66
ess: ga
7+
ece: ga
78
---
89

9-
# {{ech}} autoscaling through the API [ec-autoscaling-api-example]
10+
# Autoscaling through the API [ec-autoscaling-api-example]
1011

1112
This example demonstrates how to use the {{ecloud}} RESTful API to create a deployment with autoscaling enabled.
1213

13-
The example deployment has a hot data and content tier, warm data tier, cold data tier, and a machine learning node, all of which will scale within the defined parameters. To learn about the autoscaling settings, check [Deployment autoscaling](../autoscaling.md) and [Autoscaling example](ece-autoscaling-example.md). For more information about using the {{ecloud}} API in general, check [RESTful API](asciidocalypse://docs/cloud/docs/reference/cloud-hosted/ec-api-restful.md).
14+
The example deployment has a hot data and content tier, warm data tier, cold data tier, and a machine learning node, all of which will scale within the defined parameters. To learn about the autoscaling settings, check [Deployment autoscaling](../autoscaling.md) and [Autoscaling example](ece-autoscaling-example.md).
15+
16+
To learn more about the {{ece}} API, see the [RESTful API](asciidocalypse://docs/cloud/docs/reference/cloud-enterprise/restful-api.md) documentation. For details on the {{ech}} API, check [RESTful API](asciidocalypse://docs/cloud/docs/reference/cloud-hosted/ec-api-restful.md).
1417

1518
## Requirements [ec_requirements]
1619

@@ -28,9 +31,9 @@ Note the following requirements when you run this API request:
2831
* On data tiers only upward scaling is currently supported.
2932
* On machine learning nodes both upward and downward scaling is supported.
3033
* On all other components autoscaling is not currently supported.
34+
* On {{ece}}, autoscaling is supported for custom deployment templates on version 2.12 and above. To learn more, refer to [Updating custom templates to support `node_roles` and autoscaling](../deploy/cloud-enterprise/ce-add-support-for-node-roles-autoscaling.md).
3135

32-
33-
$$$ec-autoscaling-api-example-requirements-table$$$
36+
$$$ece-autoscaling-api-example-requirements-table$$$
3437

3538
| | | | |
3639
| --- | --- | --- | --- |
@@ -42,18 +45,223 @@ $$$ec-autoscaling-api-example-requirements-table$$$
4245
| APM ||||
4346

4447
* ✓ = Include the property.
45-
4648
* ✕ = Do not include the property.
4749

48-
* These rules match the behavior of the {{ecloud}} Console.
49-
50-
* `*` The `elasticsearch` object must contain the property `"autoscaling_enabled": true`.
50+
* These rules match the behavior of the {{ech}} and {{ece}} user console.
5151

52+
* The `elasticsearch` object must contain the property `"autoscaling_enabled": true`.
5253

5354
## API request example [ec_api_request_example]
5455

5556
Run this example API request to create a deployment with autoscaling:
5657

58+
::::{tab-set}
59+
60+
:::{tab-item} {{ece}}
61+
62+
```sh
63+
curl -k -X POST -H "Authorization: ApiKey $ECE_API_KEY" https://$COORDINATOR_HOST:12443/api/v1/deployments -H 'content-type: application/json' -d '
64+
{
65+
"name": "my-first-autoscaling-deployment",
66+
"resources": {
67+
"elasticsearch": [
68+
{
69+
"ref_id": "main-elasticsearch",
70+
"region": "ece-region",
71+
"plan": {
72+
"autoscaling_enabled": true,
73+
"cluster_topology": [
74+
{
75+
"id": "hot_content",
76+
"node_roles": [
77+
"master",
78+
"ingest",
79+
"remote_cluster_client",
80+
"data_hot",
81+
"transform",
82+
"data_content"
83+
],
84+
"zone_count": 1,
85+
"elasticsearch": {
86+
"node_attributes": {
87+
"data": "hot"
88+
},
89+
"enabled_built_in_plugins": []
90+
},
91+
"instance_configuration_id": "data.default",
92+
"size": {
93+
"value": 4096,
94+
"resource": "memory"
95+
},
96+
"autoscaling_max": {
97+
"value": 2097152,
98+
"resource": "memory"
99+
}
100+
},
101+
{
102+
"id": "warm",
103+
"node_roles": [
104+
"data_warm",
105+
"remote_cluster_client"
106+
],
107+
"zone_count": 1,
108+
"elasticsearch": {
109+
"node_attributes": {
110+
"data": "warm"
111+
},
112+
"enabled_built_in_plugins": []
113+
},
114+
"instance_configuration_id": "data.highstorage",
115+
"size": {
116+
"value": 0,
117+
"resource": "memory"
118+
},
119+
"autoscaling_max": {
120+
"value": 2097152,
121+
"resource": "memory"
122+
}
123+
},
124+
{
125+
"id": "cold",
126+
"node_roles": [
127+
"data_cold",
128+
"remote_cluster_client"
129+
],
130+
"zone_count": 1,
131+
"elasticsearch": {
132+
"node_attributes": {
133+
"data": "cold"
134+
},
135+
"enabled_built_in_plugins": []
136+
},
137+
"instance_configuration_id": "data.highstorage",
138+
"size": {
139+
"value": 0,
140+
"resource": "memory"
141+
},
142+
"autoscaling_max": {
143+
"value": 2097152,
144+
"resource": "memory"
145+
}
146+
},
147+
{
148+
"id": "coordinating",
149+
"node_roles": [
150+
"ingest",
151+
"remote_cluster_client"
152+
],
153+
"zone_count": 1,
154+
"instance_configuration_id": "coordinating",
155+
"size": {
156+
"value": 0,
157+
"resource": "memory"
158+
},
159+
"elasticsearch": {
160+
"enabled_built_in_plugins": []
161+
}
162+
},
163+
{
164+
"id": "master",
165+
"node_roles": [
166+
"master"
167+
],
168+
"zone_count": 1,
169+
"instance_configuration_id": "master",
170+
"size": {
171+
"value": 0,
172+
"resource": "memory"
173+
},
174+
"elasticsearch": {
175+
"enabled_built_in_plugins": []
176+
}
177+
},
178+
{
179+
"id": "ml",
180+
"node_roles": [
181+
"ml",
182+
"remote_cluster_client"
183+
],
184+
"zone_count": 1,
185+
"instance_configuration_id": "ml",
186+
"autoscaling_min": {
187+
"value": 0,
188+
"resource": "memory"
189+
},
190+
"autoscaling_max": {
191+
"value": 2097152,
192+
"resource": "memory"
193+
},
194+
"elasticsearch": {
195+
"enabled_built_in_plugins": []
196+
}
197+
}
198+
],
199+
"elasticsearch": {
200+
"version": "8.13.1"
201+
},
202+
"deployment_template": {
203+
"id": "default"
204+
}
205+
},
206+
"settings": {
207+
"dedicated_masters_threshold": 6
208+
}
209+
}
210+
],
211+
"kibana": [
212+
{
213+
"ref_id": "main-kibana",
214+
"elasticsearch_cluster_ref_id": "main-elasticsearch",
215+
"region": "ece-region",
216+
"plan": {
217+
"zone_count": 1,
218+
"cluster_topology": [
219+
{
220+
"instance_configuration_id": "kibana",
221+
"size": {
222+
"value": 1024,
223+
"resource": "memory"
224+
},
225+
"zone_count": 1
226+
}
227+
],
228+
"kibana": {
229+
"version": "8.13.1"
230+
}
231+
}
232+
}
233+
],
234+
"apm": [
235+
{
236+
"ref_id": "main-apm",
237+
"elasticsearch_cluster_ref_id": "main-elasticsearch",
238+
"region": "ece-region",
239+
"plan": {
240+
"cluster_topology": [
241+
{
242+
"instance_configuration_id": "apm",
243+
"size": {
244+
"value": 512,
245+
"resource": "memory"
246+
},
247+
"zone_count": 1
248+
}
249+
],
250+
"apm": {
251+
"version": "8.13.1"
252+
}
253+
}
254+
}
255+
],
256+
"enterprise_search": []
257+
}
258+
}
259+
'
260+
```
261+
262+
:::
263+
264+
:::{tab-item} {{ech}}
57265

58266
```sh
59267
curl -XPOST \
@@ -258,8 +466,10 @@ curl -XPOST \
258466
'
259467
```
260468

261-
::::{note}
262-
Although autoscaling can scale some tiers by CPU, the primary measurement of tier size is memory. Limits on tier size are in terms of memory.
263-
::::
469+
:::
264470

471+
::::
265472

473+
::::{note}
474+
Although autoscaling can scale some tiers by CPU, the primary measurement of tier size is memory. Limits on tier size are in terms of memory.
475+
::::

0 commit comments

Comments
 (0)