# ECE RAM to Storage Ratio with Restful API

**URL:** <https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [May 19, 2019, 9:11am UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706 "2019-05-19T09:11:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [May 19, 2019, 9:11am UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/1 "2019-05-19T09:11:51Z")

</div>

Hi,

my question was partly answered already in [ECE RAM to Storage Ratio](https://discuss.elastic.co/t/ece-ram-to-storage-ratio/101878)

Adding this in advanced configuration **via UI it works fine**

```
"overrides": {
    "quota": {
    "fs_multiplier": 16
    }
    }
}

```

But trying to set the same **via Restful API doesn't work** - obviously I use the wrong syntax or the wrong place to define it.

My "data" overrides-setting is ignored.

This is my json file:

```
{
    "cluster_name" : "MYCluster",
    "plan" : {
        "elasticsearch" : {
          "version" : "6.6.0"
        },
        "cluster_topology" : [
          {
            "memory_per_node" : 2048,
            "node_count_per_zone" : 1,
            "node_type" : {
                "data" : true,
                "ingest" : true,
                "master" : true
            },
            "zone_count" : 1
          }
        ],
        "deployment_template": {
          "id": "c7159de3c438493b9925474390a8a6a0"
      }
    },
	"data" : {
	  "overrides": {
        "quota": {
          "fs_multiplier": 16
        }
      }
    }
}

```

TIA,  
Agnes

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [May 20, 2019, 1:20pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/2 "2019-05-20T13:20:22Z")

</div>

The way of changing the FS:RAM quota fromECE 2.x is to create an instance configuration and then use that - see [https://www.elastic.co/guide/en/cloud-enterprise/current/ece-getting-started-templates.html](https://www.elastic.co/guide/en/cloud-enterprise/current/ece-getting-started-templates.html)

(To respond to the original question, for completeness -

There isn't a `data` section in the `POST` (create) cluster call.

Instead there is a [`settings` object](https://www.elastic.co/guide/en/cloud-enterprise/current/definitions.html#ElasticsearchClusterSettings) at the top level which contains all the parameters we allow users to change via the v1 API ... note this does not include the FS:RAM override, which should be handled as above, though it remains in our "internal API" which is what the advanced cluster data editor exposes)

---

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [May 20, 2019, 8:21pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/3 "2019-05-20T20:21:28Z")

</div>

So I'am a little bit confused.

1. I have a template which uses an instance configuration with wanted "storage\_multiplier" 16.

2. I can reference this template in my cluster deployment json file.

3. During Cluster Deployment neither template nor instance configuration are used.

4. The resulting cluster has the default "storage\_multiplier" 32.

5. So far only the advice to put the following lines into advanced configuration into "Data" Windows worked:

"overrides": {  
"quota": {  
"fs\_multiplier": 16  
}  
}

But this is working with UI, not API.

**I can't put these puzzle pieces together.**

This is my instance configuration "myInstanceConfig", used by "myTemplate\_1".

**INSTANCE CONFIGURATION**

```
 {
  "name": "myInstanceConfig",
  "description": "Ratio 1 GB Ram = 16 GB Storage",
  "storage_multiplier": 16.0,
  "discrete_sizes": {
    "sizes": [1024, 2048, 4096, 8192, 16384, 32768, 65536],
    "default_size": 1024,
    "resource": "memory"
  },
  "id": "46c871a88f4145b89e6f1d2602999354",
  "node_types": ["data", "master", "ingest"],
  "instance_type": "elasticsearch"
}

```

**TEMPLATE**

```
{
  "name": "myTemplate_1",
...
  "description": "1 Zone, 2GB RAM, xpack aktiviert",
  "id": "c7159de3c438493b9925474390a8a6a0",
  "cluster_template": {
    "plan": {
      "cluster_topology": [{
        "size": {
          "value": 1024,
          "resource": "memory"
        },
        "node_type": {
          "master": true,
          "data": false,
          "ingest": false
        },
        "instance_configuration_id": "master",
        "elasticsearch": {
          "user_settings_yaml": "# Note that the syntax for ..."
        },
        "zone_count": 1
      }, {
        "size": {
          "value": 2048,
          "resource": "memory"
        },
        "node_type": {
          "master": true,
          "data": true,
          "ingest": true
        },
        "instance_configuration_id": "46c871a88f4145b89e6f1d2602999354",
        "elasticsearch": {
          "user_settings_yaml": "# Note that the syntax for ..."
          "node_attributes": {

          }
        },
        "zone_count": 1
      }],
...	  
    "settings": {
      "dedicated_masters_threshold": 3
    },
...
  "system_owned": false
}

```

**CLUSTER DEPLOYMENT**

```
curl -k -X POST -u admin ... clusters/elasticsearch -H 'content-type: application/json' -d '{
"cluster_name" : "MyCluster",
  "plan" : {
  "elasticsearch" : {
      "version" : "6.6.0"
  },
  "cluster_topology" : [
   {
      "memory_per_node" : 2048,
      "node_count_per_zone" : 1,
      "node_type" : {
         "data" : true,
         "ingest" : true,
          "master" : true
    },
    "zone_count" : 1
    }
    ],
   "deployment_template": {
   "id": "c7159de3c438493b9925474390a8a6a0"
   }
  }
}'
```

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [May 20, 2019, 8:48pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/4 "2019-05-20T20:48:29Z")

</div>

The templates are currently just so that the _UI_ knows how to render the cluster create page

If creating clusters via the API then you just need to specify the `instance_configuration_id` ... ie `POST` the `plan` and `settings` sub-objects from template you created (ie under `plan` and `settings` in the [top-level create model](https://www.elastic.co/guide/en/cloud-enterprise/current/definitions.html#CreateElasticsearchClusterRequest); you can also add `kibana` here as discussed in a different thread), and optionally adding the `deployment_template` sub-object (which helps the UI render the cluster but is otherwise unused)

(Or if not using templates at all, you can just add `instance_configuration_id` under the `cluster_topology` entries in a simpler plan like the one you had last)

Apologies for the confusion, you're not the only person to have asked this question when using the API, seems like we need to add some docs for this specific case

Alex

---

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [May 21, 2019, 5:41am UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/5 "2019-05-21T05:41:26Z")

</div>

Works! 🙂

```
   "cluster_name" : "MYCluster",
   "plan" : {
   		"elasticsearch" : {
        	"version" : "6.6.0"
            },
      "cluster_topology" : [
        { 
            "memory_per_node" : 2048,
            "node_count_per_zone" : 1,
            "node_type" : {
               "data" : true,
               "ingest" : true,
               "master" : true
        },
        "instance_configuration_id": "46c871a88f4145b89e6f1d2602999354",
        "elasticsearch": {
          "user_settings_yaml": " ...",
          "node_attributes": {

          }
        },
        "zone_count": 1
         }
      ]
   }

```

Thank you!

---

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [June 3, 2019, 4:02pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/6 "2019-06-03T16:02:18Z")

</div>

Additional question:

How can I change the disk-ram-rate in my now existing deployment with this API-deployed cluster, referencing  
"instance\_configuration\_id": "46c871a88f4145b89e6f1d2602999354".

I've tried to edit the instance configuration, but there is no opertunity to do that over UI:

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c83c2bb0c177f4a34e2bbcee0487fc4eefc4b76b.png)

![image](https://us1.discourse-cdn.com/elastic/original/3X/6/7/67e26ace46640787167a755de2d3740e2f4579d0.png)

TIA,

Best regards,  
Agnes

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [June 3, 2019, 4:47pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/7 "2019-06-03T16:47:16Z")

</div>

I believe you have to create a new instance config id and migrate over to that.

I hadn't realized that was the case until recently, but it appears some fields are non-editable with existing instance configs

---

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [June 3, 2019, 7:20pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/8 "2019-06-03T19:20:01Z")

</div>

So I would:

a) create a new instance configuration with id "xyz"  
b) edit the Advanced cluster configuration --\> Plan --\> change the id to new instance\_configuration\_id": "xyz"

Is it as easy as this?

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [June 3, 2019, 8:44pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/9 "2019-06-03T20:44:03Z")

</div>

For clusters that aren't tied to deployment templates, it's that simple

The UI uses deployment templates to decide which sliders to render, so if you just change the instance config id you might run into trouble there

I _think_ (I haven't played with this yet) you'd have to do the following:

- Create the new instance config
- Create a new deployment template with the new instance config id
- Edit the cluster from the advanced view, changing the deployment template id and instance config id

I'm not sure what will happen if you just edited (would need to be via the API) the deployment template to include the new instance config id - I worry it would break the basic edit UI (but the advanced editor should be fine, then once you'd changed instance config id over the basic edit UI would work again)

---

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [June 3, 2019, 9:14pm UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/10 "2019-06-03T21:14:22Z")

</div>

> [@apaulsen](#):
>
> "cluster\_name" : "MYCluster",

Perhaps it's not so complicated, because in my example cluster above I used only an instance configuration but not a template. So I would not have to change an instance id inside a template.  
So it looks as if the remaining part is a) create a new instance config b) change the id in the advanced editor

---

<div class="post-metadata">

**Author:** ![apaulsen](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@apaulsen](https://discuss.elastic.co/u/apaulsen)\
**Post date:** [June 4, 2019, 7:04am UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/11 "2019-06-04T07:04:13Z")

</div>

Worked for me. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 18, 2019, 7:11am UTC](https://discuss.elastic.co/t/ece-ram-to-storage-ratio-with-restful-api/181706/12 "2019-06-18T07:11:31Z")

</div>

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