Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Conversation

@szkl
Copy link
Contributor

@szkl szkl commented Sep 15, 2017

No description provided.

@ryadav88
Copy link
Contributor

@szkl

@ryadav88 ryadav88 self-assigned this Sep 25, 2017
@szkl szkl force-pushed the koding branch 2 times, most recently from 3a97aa0 to 53348fe Compare September 27, 2017 17:40
Remove obsolete configuration properties
Remove default value of hostname option
Remove redundant `cmd` property
Add --hostname option to `args` property
Set volume host paths in the sandbox directory
Define a volume for generated files directory
Add residency property
Add initial health check
Reorder some properties
Configure with nginx real ip module
Update pre installation notes
Bump up minimum DC/OS release version
Bump up package version

Signed-off-by: Sonmez Kartal <[email protected]>
@szkl
Copy link
Contributor Author

szkl commented Sep 27, 2017

diff --git a/repo/packages/K/koding/0/config.json b/repo/packages/K/koding/0/config.json
index bb98bf1..e877317 100644
--- a/repo/packages/K/koding/0/config.json
+++ b/repo/packages/K/koding/0/config.json
@@ -38,29 +38,13 @@
       "description": "Configuration options for Koding's networking",
       "type": "object",
       "properties": {
-        "node": {
-          "description": "Which node to install Koding on",
-          "type": "string"
-        },
         "hostname": {
           "description": "The DNS name you intend to host your Koding instance at",
-          "type": "string",
-          "default": "koding.yourcompany.com"
-        },
-        "virtual-host": {
-          "description": "The virtual host address to configure for integration with Marathon-lb.",
           "type": "string"
-        },
-        "https-redirect": {
-          "description": "Whether Marathon-lb should redirect HTTP traffic to HTTPS. This requires 'virtual-host' to be set. By default, this is false.",
-          "type": "boolean",
-          "default": false
         }
       },
       "required": [
-        "node",
-        "hostname",
-        "virtual-host"
+        "hostname"
       ]
     }
   }
diff --git a/repo/packages/K/koding/0/marathon.json.mustache b/repo/packages/K/koding/0/marathon.json.mustache
index b47473e..514d50a 100644
--- a/repo/packages/K/koding/0/marathon.json.mustache
+++ b/repo/packages/K/koding/0/marathon.json.mustache
@@ -1,16 +1,17 @@
 {
   "id": "{{service.name}}",
-  "cmd": null,
   "cpus": {{koding.cpus}},
   "instances": 1,
   "mem": {{koding.mem}},
   "disk": 20000,
   "args": [
-    "-",
-    "--host",
-    "{{networking.hostname}}"
+    "--host", "{{networking.hostname}}",
+    "--hostname", "{{networking.hostname}}",
+    "--nginx.real_ip"
   ],
+  "requirePorts": true,
   "container": {
+    "type": "DOCKER",
     "docker": {
       "image": "{{resource.assets.container.docker.koding}}",
       "network": "BRIDGE",
@@ -22,31 +23,65 @@
         }
       ]
     },
-    "type": "DOCKER",
     "volumes": [
       {
-        "containerPath": "/var/lib/mongodb",
-        "hostPath": "/var/lib/koding/mongodb",
+        "containerPath": "generated-data",
+        "mode": "RW",
+        "persistent": {
+          "type": "root",
+          "size": 100
+        }
+      },
+      {
+        "containerPath": "/opt/koding/generated",
+        "hostPath": "generated-data",
         "mode": "RW"
       },
+      {
+        "containerPath": "postgresql-data",
+        "mode": "RW",
+        "persistent": {
+          "type": "root",
+          "size": 2048
+        }
+      },
       {
         "containerPath": "/var/lib/postgresql",
-        "hostPath": "/var/lib/koding/postgres",
+        "hostPath": "postgresql-data",
+        "mode": "RW"
+      },
+      {
+        "containerPath": "mongo-data",
+        "mode": "RW",
+        "persistent": {
+          "type": "root",
+          "size": 4096
+        }
+      },
+      {
+        "containerPath": "/var/lib/mongodb",
+        "hostPath": "mongo-data",
         "mode": "RW"
       }
     ]
   },
-  "requirePorts": true,
-  "constraints": [
-    [
-      "hostname",
-      "CLUSTER",
-      "{{networking.node}}"
-    ]
+  "residency": {
+    "taskLostBehavior": "WAIT_FOREVER"
+  },
+  "healthChecks": [
+    {
+      "gracePeriodSeconds": 180,
+      "intervalSeconds": 30,
+      "maxConsecutiveFailures": 3,
+      "path": "/",
+      "portIndex": 0,
+      "protocol": "HTTP",
+      "timeoutSeconds": 5
+    }
   ],
   "labels":{
     "HAPROXY_GROUP":"external",
-    "HAPROXY_0_VHOST":"{{networking.hostname}},{{networking.virtual-host}}",
+    "HAPROXY_0_VHOST":"{{networking.hostname}}",
     "HAPROXY_0_REDIRECT_TO_HTTPS": "{{networking.https-redirect}}",
     "HAPROXY_0_HTTP_FRONTEND_ACL": "  acl host_{cleanedUpHostname} hdr_end(host) -i {hostname}\n  use_backend {backend} if host_{cleanedUpHostname}\n",
     "HAPROXY_0_HTTPS_FRONTEND_ACL": "  use_backend {backend} if {{ ssl_fc_sni -m end .{hostname} }}\n",
diff --git a/repo/packages/K/koding/0/package.json b/repo/packages/K/koding/0/package.json
index 586b37e..8163982 100644
--- a/repo/packages/K/koding/0/package.json
+++ b/repo/packages/K/koding/0/package.json
@@ -1,8 +1,8 @@
 {
   "packagingVersion": "3.0",
   "name": "koding",
-  "minDcosReleaseVersion":"1.7",
-  "version": "1.0.0-0.0.1",
+  "minDcosReleaseVersion":"1.10",
+  "version": "1.0.0-0.0.2",
   "tags": ["koding", "IDE", "development"],
   "maintainer": "[email protected]",
   "description": "Koding is a web based collaborative software development tool. We bring code development off of localhost and into the cloud. Installation documentation: https://github.com/dcos/examples/tree/master/koding",
@@ -10,7 +10,7 @@
   "website": "http://www.koding.com",
   "framework": false,
   "postInstallNotes": "Happy Koding!",
-  "preInstallNotes": "This DC/OS Service is currently in preview. There may be bugs, incomplete features, incorrect documentation, or other discrepancies. Koding is a web based collaborative software development tool. We bring code development off of localhost and into your cloud environment. This package will install a single instance of Koding into your Mesosphere DCOS environment. Please note that Koding runs best with 8GB of RAM. Marathon-lb is also required for Koding to function properly. Please install Marathon-lb before installing Koding.",
+  "preInstallNotes": "This DC/OS Service is currently in preview. There may be bugs, incomplete features, incorrect documentation, or other discrepancies. Koding is a web based collaborative software development tool. We bring code development off of localhost and into your cloud environment. This package will install a single instance of Koding into your Mesosphere DCOS environment. Please note that Koding runs best with 8GB of RAM. Marathon-lb is also required for Koding to function properly. Please install Marathon-lb with HAProxy map option turned off before installing Koding.",
   "postUninstallNotes":"Thank you for using Koding. In order to persist data between restarts, Koding kept data locally on the node in which it was installed. If you reinstall Koding on this node, you will still see this data. To delete this data, remove the /tmp/koding directory on the node.",
   "licenses": [
     {

@szkl
Copy link
Contributor Author

szkl commented Sep 27, 2017

@ryadav88 I've made the changes you have requested. Could you take another look, please?

@szkl
Copy link
Contributor Author

szkl commented Sep 27, 2017

dcos/examples#83 and dcos/examples#184 can be closed after these changes are accepted.

Copy link
Contributor

@ryadav88 ryadav88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ryadav88 ryadav88 merged commit 1a45e93 into d2iq-archive:version-3.x Oct 5, 2017
@szkl szkl deleted the koding branch October 5, 2017 13:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants