This repository was archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 425
koding: configuration fixes and improvements #1427
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
3a97aa0 to
53348fe
Compare
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]>
Contributor
Author
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": [
{ |
Contributor
Author
|
@ryadav88 I've made the changes you have requested. Could you take another look, please? |
Contributor
Author
|
dcos/examples#83 and dcos/examples#184 can be closed after these changes are accepted. |
ryadav88
approved these changes
Oct 5, 2017
Contributor
ryadav88
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.