From 7ea6440f258820ff81be11703b90d55c37214226 Mon Sep 17 00:00:00 2001 From: Ahmad Posten Date: Fri, 17 Mar 2017 18:13:43 +0200 Subject: [PATCH 1/2] Add dcos-autoscaler package --- repo/packages/D/dcos-autoscaler/0/config.json | 19 +++++++++++++++++++ .../dcos-autoscaler/0/marathon.json.mustache | 12 ++++++++++++ .../packages/D/dcos-autoscaler/0/package.json | 11 +++++++++++ .../D/dcos-autoscaler/0/resource.json | 14 ++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 repo/packages/D/dcos-autoscaler/0/config.json create mode 100644 repo/packages/D/dcos-autoscaler/0/marathon.json.mustache create mode 100644 repo/packages/D/dcos-autoscaler/0/package.json create mode 100644 repo/packages/D/dcos-autoscaler/0/resource.json diff --git a/repo/packages/D/dcos-autoscaler/0/config.json b/repo/packages/D/dcos-autoscaler/0/config.json new file mode 100644 index 000000000..4c08464b8 --- /dev/null +++ b/repo/packages/D/dcos-autoscaler/0/config.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "cpu": { + "type": "integer", + "description": "cpu to allocate to the container", + "minimum": 0.3, + "maximum": 16, + "default": 1 + }, + "memory": { + "type": "integer", + "description": "Memory to allocate", + "minimum": 500, + "maximum": 9999, + "default": 1024 + } + } +} diff --git a/repo/packages/D/dcos-autoscaler/0/marathon.json.mustache b/repo/packages/D/dcos-autoscaler/0/marathon.json.mustache new file mode 100644 index 000000000..82d7b4cfd --- /dev/null +++ b/repo/packages/D/dcos-autoscaler/0/marathon.json.mustache @@ -0,0 +1,12 @@ +{ + "id": "/dcos-autoscaler", + "cpus": "{{cpu}}", + "mem": "{{memory}}", + "instances": "1", + "container": { + "type": "DOCKER", + "docker": { + "image": "{{resource.assets.container.docker.23b1cfe8e04a}}" + } + } +} diff --git a/repo/packages/D/dcos-autoscaler/0/package.json b/repo/packages/D/dcos-autoscaler/0/package.json new file mode 100644 index 000000000..7923c927b --- /dev/null +++ b/repo/packages/D/dcos-autoscaler/0/package.json @@ -0,0 +1,11 @@ +{ + "packagingVersion": "3.0", + "name": "dcos-autoscaler", + "version": "1.0.0", + "maintainer": "ahmadhassan612@gmail.com", + "description": "Adds autoscaling to your application based on cpu and memory metrics", + "scm": "https://github.com/Ahmadposten/DC-OS-Marathon-autoscaling", + "framework": true, + "tags": ["autoscaling", "mesosphere", "dcos"], + "postInstallNotes": "Thank you for installing dcos autoscaler, Consult github.com/Ahmadposten/DC-OS-Marathon-autoscaling for more more info on usage and tuning configurations" +} diff --git a/repo/packages/D/dcos-autoscaler/0/resource.json b/repo/packages/D/dcos-autoscaler/0/resource.json new file mode 100644 index 000000000..fcf8a248f --- /dev/null +++ b/repo/packages/D/dcos-autoscaler/0/resource.json @@ -0,0 +1,14 @@ +{ + "images": { + "icon-small": "https://drive.google.com/open?id=0BxADtivbfBMNd0VBbThQNmtkcUE", + "icon-medium": "https://drive.google.com/open?id=0BxADtivbfBMNd0VBbThQNmtkcUE", + "icon-large": "https://drive.google.com/open?id=0BxADtivbfBMNd0VBbThQNmtkcUE" + }, + "assets": { + "container": { + "docker": { + "23b1cfe8e04a": "ahmadposten/dcos-autoscaler" + } + } + } +} From 98d8ec1050840e0b20d4480a4d9d7ae23bbb1823 Mon Sep 17 00:00:00 2001 From: Ahmad Posten Date: Sun, 28 May 2017 20:34:13 +0200 Subject: [PATCH 2/2] Use a tagged version of the image and add more metadata --- repo/packages/D/dcos-autoscaler/0/package.json | 8 +++++--- repo/packages/D/dcos-autoscaler/0/resource.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/repo/packages/D/dcos-autoscaler/0/package.json b/repo/packages/D/dcos-autoscaler/0/package.json index 7923c927b..0b718ca3a 100644 --- a/repo/packages/D/dcos-autoscaler/0/package.json +++ b/repo/packages/D/dcos-autoscaler/0/package.json @@ -1,11 +1,13 @@ { "packagingVersion": "3.0", + "preInstallNotes": "This DC/OS Service is currently in preview. There may be bugs, incomplete features, incorrect documentation, or other discrepancies. Preview packages should never be used in production!", "name": "dcos-autoscaler", "version": "1.0.0", "maintainer": "ahmadhassan612@gmail.com", - "description": "Adds autoscaling to your application based on cpu and memory metrics", + "description": "Autoscaling to your application based on cpu and memory metrics. Through marathon labels this package enables setting multiple rules to scale services up or down based on cpu/memory utilization.", "scm": "https://github.com/Ahmadposten/DC-OS-Marathon-autoscaling", - "framework": true, - "tags": ["autoscaling", "mesosphere", "dcos"], + "framework": false, + "tags": ["autoscaling", "dcos"], + "license": "BSD3", "postInstallNotes": "Thank you for installing dcos autoscaler, Consult github.com/Ahmadposten/DC-OS-Marathon-autoscaling for more more info on usage and tuning configurations" } diff --git a/repo/packages/D/dcos-autoscaler/0/resource.json b/repo/packages/D/dcos-autoscaler/0/resource.json index fcf8a248f..9b5368ac2 100644 --- a/repo/packages/D/dcos-autoscaler/0/resource.json +++ b/repo/packages/D/dcos-autoscaler/0/resource.json @@ -7,7 +7,7 @@ "assets": { "container": { "docker": { - "23b1cfe8e04a": "ahmadposten/dcos-autoscaler" + "23b1cfe8e04a": "ahmadposten/dcos-autoscaler:1.0.0" } } }