From d755a32613c8345c407b552e8526d25f2a274385 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 10:59:53 -0500 Subject: [PATCH 01/11] Added Reaction Commerce --- templates/reactioncommerce/0/README.md | 17 +++++ .../reactioncommerce/0/docker-compose.yml | 36 +++++++++ .../reactioncommerce/0/rancher-compose.yml | 69 ++++++++++++++++++ templates/reactioncommerce/README.md | 3 + .../catalogIcon-reactioncommerce.png | Bin 0 -> 1721 bytes templates/reactioncommerce/config.yml | 5 ++ 6 files changed, 130 insertions(+) create mode 100644 templates/reactioncommerce/0/README.md create mode 100644 templates/reactioncommerce/0/docker-compose.yml create mode 100644 templates/reactioncommerce/0/rancher-compose.yml create mode 100644 templates/reactioncommerce/README.md create mode 100644 templates/reactioncommerce/catalogIcon-reactioncommerce.png create mode 100644 templates/reactioncommerce/config.yml diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md new file mode 100644 index 0000000..7f09fa4 --- /dev/null +++ b/templates/reactioncommerce/0/README.md @@ -0,0 +1,17 @@ +### Docs + +The Reaction Commerce official docs are +[here](https://docs.reactioncommerce.com/) + +This template implements the same method as found +[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) + +### Traefik + +For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate +labels will be set when you set the hostname and domain below + +### Support + +There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement +other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/0/docker-compose.yml b/templates/reactioncommerce/0/docker-compose.yml new file mode 100644 index 0000000..78f4a8b --- /dev/null +++ b/templates/reactioncommerce/0/docker-compose.yml @@ -0,0 +1,36 @@ +version: '2' +services: + reaction: + image: reactioncommerce/reaction:v1.4.0 + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + traefik.enable: true + traefik.alias: ${REACTION_HOST} + traefik.domain: ${REACTION_DOMAIN} + traefik.acme: true + traefik.port: 3000 + environment: + MONGO_URL: "mongodb://meango/reaction" + ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" + REACTION_EMAIL: ${REACTION_EMAIL} + REACTION_USER: ${REACTION_USER} + REACTION_AUTH: ${REACTION_AUTH} + + meango: + command: mongod --storageEngine=wiredTiger + restart: always + environment: + MONGO_SERVICE_NAME: meango + CATTLE_SCRIPT_DEBUG: ${debug} + tty: true + image: mongo:3.4 + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.hostname_override: container_name + volumes: + - meangodata:/data/db + +volumes: + meangodata: + driver: ${VOLUME_DRIVER} diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml new file mode 100644 index 0000000..05375ff --- /dev/null +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -0,0 +1,69 @@ +.catalog: + name: "reactiondemo" + version: 1.4.0-rancher1 + description: "E-commerce powered by reaction" + uuid: reaction-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "REACTION_HOST" + description: "Hostname to use for the reaction server" + label: "reaction Hostname" + required: true + default: "reaction" + type: "string" + - variable: "REACTION_DOMAIN" + description: "Domain to use for the reaction server" + label: "reaction Domain" + required: true + default: "" + type: "string" + - variable: host_label + label: "Host Label to reaction Tags" + description: | + Host label to use as reaction 'value' tag. + Example: 'reaction=true' + required: false + default: "private=true" + type: "string" + - variable: REACTION_EMAIL + label: "reaction Email" + required: true + default: "" + type: "string" + - variable: REACTION_USER + label: "reaction User" + required: true + default: "" + type: "string" + - variable: REACTION_AUTH + label: "reaction Auth" + required: true + default: "" + type: "password" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "local" + type: enum + options: + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + +reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 + +meango: + scale: 1 + retain_ip: true diff --git a/templates/reactioncommerce/README.md b/templates/reactioncommerce/README.md new file mode 100644 index 0000000..d507eac --- /dev/null +++ b/templates/reactioncommerce/README.md @@ -0,0 +1,3 @@ +#[ReactionCommerce](http://reactioncommerce.com/) + + diff --git a/templates/reactioncommerce/catalogIcon-reactioncommerce.png b/templates/reactioncommerce/catalogIcon-reactioncommerce.png new file mode 100644 index 0000000000000000000000000000000000000000..bd5e651a7a11fdc18b1941903c4287b903b4cbb0 GIT binary patch literal 1721 zcmV;q21fabP)Px*b4f%&R9Fe^n0agzbri?n`_0U5TUw;W8n1Sh+g*rJQW`uGhzd~=5RfC0D4^RS z#M^ivm=N&@NsUKnw+I@~ASx;;36OXrAcq>6wTf2SDp8uYXsp{n>*nskhW&Zgedn0`=-qg+(Ar?FRo`3?f0>4P=SAI|=G zPoIk__lU=(dK%>K?Eeqo!+b9 zievVDT4X(-ezZ(3@!?Fr(-Y^BvHdws(z;r-%wXoXvn^wG($!ZJ>WJ5ROmpWx8xH|& z3oxbwZ0X#x@RY8!UgWy^Ro_uP0(Va3S7RJUc8bs-B|KFHbDmfgi`R(gdztBl9)k;2 z+6!HBH#5mE0gFeIY1X>QPA?Izz;S0GM{e@rPMYQhZP*)3)~8lzlDP=uX3EQ*k?Lr_ zl-=};#N=S_9B=i>`m(7r{;m&qQoR_rPu@kxQ-)C#&H9NPxneHdW2Xph~Nqc%E<$2(om|co8u?||wC*s+s3?P3{I_RSl%A8#dxBKxo5 zimUAFQK#^-${jE;Q;8G;@?m7&CY&+EADc$bG*=QMB;{^ofkRkLlH8n+x3}0E5XNzs z^jxqwF#p@D1}6_u9sW3OI8WfIhSXCc5=F?iWRW?;DsY;@6n4L8{$^c*-G_wq&xIUb zdcd(40$@38*0E_#5=kp+YukZR5@N--HIzl3`aP82Kdyubt*kv4V4rwkp1=nTjf_c< zb8%Y>9oW`vf1fb)1r6ols1fY5tVzdL!B_=6w8;qOjAHE!6_>UN@hM7~iF0QmULDXZ( zkq@!B2et~^&1geXgVUOJBU}*(eCEI*;XB$}X-Qglt$~i7SB4eI7Hf#1WM@~}-G+G+ zvCabx<&hb?%KjP51I)l7^=q`Ir4aYpyaF!41#5px+t_{4@M2S`5%A;+!%(y4m4%~j zvSX1;v;lK}GL%^oG^{Okwe|-n8;h{!c?X9?2m*wtFe6e0wXK%?&?^46TI*sLjF=A=a16j7C{EP zQR&Y|;h4k0z(736+n93;LR*Eg1BPXkV%?hVLizLf(9bY@Gfag|IJ;ISJ6=GFUxN_T zK)5#g3t%7%Q`Td%9*ug|5B|P&ZZ!Pt>gxDn(X<2)_6_Dtg=gaa!d~K#%Oiq$*3;i! zKloRFygO%~DFdgJ8VTLKj-v>=y0@`BQZaN@ZJxtszf>yuBt(BLDt;X+bzP8*hJ>VF z1~>|+dbMwXM6q49cgJvd=J;@#Y(Y3l)Jm6>l2@lo4>i9I)6xdfDegz)& z_Vg3h{-ilry3yNaN(;_gw01h9j2&r*Vb*#hJpah}iS8ZIoTAAM(eOJBC)(mMte??b zV>I&4G2C}jre@$yinU`j@;}@$IxI82SN|uh@HSh9+V(>Rw>NYS|C|0Bq2bG+B<+Eb P00000NkvXXu0mjfGF)BE literal 0 HcmV?d00001 diff --git a/templates/reactioncommerce/config.yml b/templates/reactioncommerce/config.yml new file mode 100644 index 0000000..7719f54 --- /dev/null +++ b/templates/reactioncommerce/config.yml @@ -0,0 +1,5 @@ +name: Reaction Commerce +description: | + E-commerce powered by Reaction +version: 1.4.0-rancher1 +category: Repository From c8bc2f975ad37766c90fabe25691e8bfa6e94da1 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:02:55 -0500 Subject: [PATCH 02/11] version2yml --- .../reactioncommerce/0/rancher-compose.yml | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 05375ff..7d5e135 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -1,4 +1,5 @@ -.catalog: +version: '2' +catalog: name: "reactiondemo" version: 1.4.0-rancher1 description: "E-commerce powered by reaction" @@ -52,18 +53,19 @@ - rancher-efs - rancher-ebs -reaction: - scale: 1 - retain_ip: true - health_check: - healthy_threshold: 2 - response_timeout: 5000 - port: 3000 - unhealthy_threshold: 3 - interval: 5000 - strategy: recreate - request_line: GET / # HTTP/1.0 +services: + reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 -meango: - scale: 1 - retain_ip: true + meango: + scale: 1 + retain_ip: true From b041a2fa64121d20e9f917192eba108dc8933dba Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:04:31 -0500 Subject: [PATCH 03/11] Removed excess whitespace --- templates/reactioncommerce/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/reactioncommerce/README.md b/templates/reactioncommerce/README.md index d507eac..675e427 100644 --- a/templates/reactioncommerce/README.md +++ b/templates/reactioncommerce/README.md @@ -1,3 +1 @@ #[ReactionCommerce](http://reactioncommerce.com/) - - From d81544c93bca5fdd38293cd60031ce38f23c1620 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:29:34 -0500 Subject: [PATCH 04/11] Changing meango to mongo, not exactly a meanstack here --- templates/reactioncommerce/0/docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/reactioncommerce/0/docker-compose.yml b/templates/reactioncommerce/0/docker-compose.yml index 78f4a8b..0dd55e8 100644 --- a/templates/reactioncommerce/0/docker-compose.yml +++ b/templates/reactioncommerce/0/docker-compose.yml @@ -11,17 +11,17 @@ services: traefik.acme: true traefik.port: 3000 environment: - MONGO_URL: "mongodb://meango/reaction" + MONGO_URL: "mongodb://mongo/reaction" ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" REACTION_EMAIL: ${REACTION_EMAIL} REACTION_USER: ${REACTION_USER} REACTION_AUTH: ${REACTION_AUTH} - meango: + mongo: command: mongod --storageEngine=wiredTiger restart: always environment: - MONGO_SERVICE_NAME: meango + MONGO_SERVICE_NAME: mongo CATTLE_SCRIPT_DEBUG: ${debug} tty: true image: mongo:3.4 @@ -29,8 +29,8 @@ services: io.rancher.scheduler.affinity:host_label: ${host_label} io.rancher.container.hostname_override: container_name volumes: - - meangodata:/data/db + - mongodata:/data/db volumes: - meangodata: + mongodata: driver: ${VOLUME_DRIVER} From 7e1f4f1cd78348967eb5aa3177100c908662adc1 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:33:12 -0500 Subject: [PATCH 05/11] mongo --- templates/reactioncommerce/0/rancher-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 7d5e135..3ad84f6 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -66,6 +66,6 @@ services: strategy: recreate request_line: GET / # HTTP/1.0 - meango: + mongo: scale: 1 retain_ip: true From 4f2223d74013bc3318bfb822a83887937c33df25 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 12:13:42 -0500 Subject: [PATCH 06/11] header --- templates/reactioncommerce/0/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md index 7f09fa4..95b9406 100644 --- a/templates/reactioncommerce/0/README.md +++ b/templates/reactioncommerce/0/README.md @@ -1,3 +1,5 @@ +# [ReactionCommerce](http://reactioncommerce.com/) + ### Docs The Reaction Commerce official docs are From 00b8adbcf7b7f6358b2b08abd1f7346584e33209 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 14:15:32 -0500 Subject: [PATCH 07/11] ommitted all the mongodb containers and added a question to set an external link in the next version --- templates/reactioncommerce/0/README.md | 6 ++ templates/reactioncommerce/1/README.md | 22 ++++++ .../reactioncommerce/1/docker-compose.yml | 20 ++++++ .../reactioncommerce/1/rancher-compose.yml | 70 +++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 templates/reactioncommerce/1/README.md create mode 100644 templates/reactioncommerce/1/docker-compose.yml create mode 100644 templates/reactioncommerce/1/rancher-compose.yml diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md index 95b9406..8bd15d0 100644 --- a/templates/reactioncommerce/0/README.md +++ b/templates/reactioncommerce/0/README.md @@ -8,6 +8,12 @@ The Reaction Commerce official docs are This template implements the same method as found [here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) +### MongoDB + +This initial version pulls up its own mongodb just like the official +docker-compose.yml, if you have a mongo stack already running try the +`1.4.0-rancher2` version + ### Traefik For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate diff --git a/templates/reactioncommerce/1/README.md b/templates/reactioncommerce/1/README.md new file mode 100644 index 0000000..dd9a400 --- /dev/null +++ b/templates/reactioncommerce/1/README.md @@ -0,0 +1,22 @@ +### Docs + +The Reaction Commerce official docs are +[here](https://docs.reactioncommerce.com/) + +This template implements the same method as found +[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) + +### MongoDB + +You'll need a mongodb stack running, choose it in the external link +question below + +### Traefik + +For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate +labels will be set when you set the hostname and domain below + +### Support + +There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement +other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/1/docker-compose.yml b/templates/reactioncommerce/1/docker-compose.yml new file mode 100644 index 0000000..8c80e37 --- /dev/null +++ b/templates/reactioncommerce/1/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' +services: + reaction: + image: reactioncommerce/reaction:v1.4.0 + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + traefik.enable: true + traefik.alias: ${REACTION_HOST} + traefik.domain: ${REACTION_DOMAIN} + traefik.acme: true + traefik.port: 3000 + environment: + MONGO_URL: ${MONGO_URL} + ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" + REACTION_EMAIL: ${REACTION_EMAIL} + REACTION_USER: ${REACTION_USER} + REACTION_AUTH: ${REACTION_AUTH} + external_links: + - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/1/rancher-compose.yml b/templates/reactioncommerce/1/rancher-compose.yml new file mode 100644 index 0000000..7c7864a --- /dev/null +++ b/templates/reactioncommerce/1/rancher-compose.yml @@ -0,0 +1,70 @@ +version: '2' +catalog: + name: "reactiondemo" + version: 1.4.0-rancher2 + description: "E-commerce powered by reaction" + uuid: reaction-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "REACTION_HOST" + description: "Hostname to use for the reaction server" + label: "reaction Hostname" + required: true + default: "reaction" + type: "string" + - variable: "REACTION_DOMAIN" + description: "Domain to use for the reaction server" + label: "reaction Domain" + required: true + default: "" + type: "string" + - variable: host_label + label: "Host Label to reaction Tags" + description: | + Host label to use as reaction 'value' tag. + Example: 'reaction=true' + required: false + default: "private=true" + type: "string" + - variable: REACTION_EMAIL + label: "reaction Email" + required: true + default: "" + type: "string" + - variable: REACTION_USER + label: "reaction User" + required: true + default: "" + type: "string" + - variable: REACTION_AUTH + label: "reaction Auth" + required: true + default: "" + type: "password" + - variable: "mongo_link" + description: | + MongoDB external service link + cluster. + label: "External stack/service" + default: "" + required: true + type: "service" + - variable: "MONGO_URL" + default: "mongodb://mongo/reaction" + description: "The mongodb url to associate with this server. !!Do not change!! if you are setting the external link above!" + label: "mongo_url" + required: true + type: "string" + +services: + reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 From 2ea779c878d3fe9d861af942f9bccf7fd58515a2 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 12:42:43 -0500 Subject: [PATCH 08/11] simplification with selectable db name --- templates/reactioncommerce/2/README.md | 22 ++++++ .../reactioncommerce/2/docker-compose.yml | 20 ++++++ .../reactioncommerce/2/rancher-compose.yml | 70 +++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 templates/reactioncommerce/2/README.md create mode 100644 templates/reactioncommerce/2/docker-compose.yml create mode 100644 templates/reactioncommerce/2/rancher-compose.yml diff --git a/templates/reactioncommerce/2/README.md b/templates/reactioncommerce/2/README.md new file mode 100644 index 0000000..dd9a400 --- /dev/null +++ b/templates/reactioncommerce/2/README.md @@ -0,0 +1,22 @@ +### Docs + +The Reaction Commerce official docs are +[here](https://docs.reactioncommerce.com/) + +This template implements the same method as found +[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) + +### MongoDB + +You'll need a mongodb stack running, choose it in the external link +question below + +### Traefik + +For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate +labels will be set when you set the hostname and domain below + +### Support + +There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement +other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/2/docker-compose.yml b/templates/reactioncommerce/2/docker-compose.yml new file mode 100644 index 0000000..1caf367 --- /dev/null +++ b/templates/reactioncommerce/2/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' +services: + reaction: + image: reactioncommerce/reaction:v1.4.0 + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + traefik.enable: true + traefik.alias: ${REACTION_HOST} + traefik.domain: ${REACTION_DOMAIN} + traefik.acme: true + traefik.port: 3000 + environment: + MONGO_URL: "mongodb://mongo/${MONGO_DB}" + ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" + REACTION_EMAIL: ${REACTION_EMAIL} + REACTION_USER: ${REACTION_USER} + REACTION_AUTH: ${REACTION_AUTH} + external_links: + - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/2/rancher-compose.yml b/templates/reactioncommerce/2/rancher-compose.yml new file mode 100644 index 0000000..47ded12 --- /dev/null +++ b/templates/reactioncommerce/2/rancher-compose.yml @@ -0,0 +1,70 @@ +version: '2' +catalog: + name: "reactiondemo" + version: 1.4.0-rancher3 + description: "E-commerce powered by reaction" + uuid: reaction-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "REACTION_HOST" + description: "Hostname to use for the reaction server" + label: "reaction Hostname" + required: true + default: "reaction" + type: "string" + - variable: "REACTION_DOMAIN" + description: "Domain to use for the reaction server" + label: "reaction Domain" + required: true + default: "" + type: "string" + - variable: host_label + label: "Host Label to reaction Tags" + description: | + Host label to use as reaction 'value' tag. + Example: 'reaction=true' + required: false + default: "private=true" + type: "string" + - variable: REACTION_EMAIL + label: "reaction Email" + required: true + default: "" + type: "string" + - variable: REACTION_USER + label: "reaction User" + required: true + default: "" + type: "string" + - variable: REACTION_AUTH + label: "reaction Auth" + required: true + default: "" + type: "password" + - variable: "mongo_link" + description: | + MongoDB external service link + cluster. + label: "External stack/service" + default: "" + required: true + type: "service" + - variable: "MONGO_DB" + default: "reaction" + description: "The mongodb name to associate with this server." + label: "mongo_db" + required: true + type: "string" + +services: + reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 From e6c8359e0d42426756db0829726b3f4d00685dd7 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 13:01:38 -0500 Subject: [PATCH 09/11] templatized --- templates/reactioncommerce/0/README.md | 7 +- ...ker-compose.yml => docker-compose.yml.tpl} | 11 ++- .../reactioncommerce/0/rancher-compose.yml | 28 ++++---- templates/reactioncommerce/1/README.md | 22 ------ .../reactioncommerce/1/docker-compose.yml | 20 ------ .../reactioncommerce/1/rancher-compose.yml | 70 ------------------- templates/reactioncommerce/2/README.md | 22 ------ .../reactioncommerce/2/docker-compose.yml | 20 ------ .../reactioncommerce/2/rancher-compose.yml | 70 ------------------- 9 files changed, 25 insertions(+), 245 deletions(-) rename templates/reactioncommerce/0/{docker-compose.yml => docker-compose.yml.tpl} (82%) delete mode 100644 templates/reactioncommerce/1/README.md delete mode 100644 templates/reactioncommerce/1/docker-compose.yml delete mode 100644 templates/reactioncommerce/1/rancher-compose.yml delete mode 100644 templates/reactioncommerce/2/README.md delete mode 100644 templates/reactioncommerce/2/docker-compose.yml delete mode 100644 templates/reactioncommerce/2/rancher-compose.yml diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md index 8bd15d0..dd9a400 100644 --- a/templates/reactioncommerce/0/README.md +++ b/templates/reactioncommerce/0/README.md @@ -1,5 +1,3 @@ -# [ReactionCommerce](http://reactioncommerce.com/) - ### Docs The Reaction Commerce official docs are @@ -10,9 +8,8 @@ This template implements the same method as found ### MongoDB -This initial version pulls up its own mongodb just like the official -docker-compose.yml, if you have a mongo stack already running try the -`1.4.0-rancher2` version +You'll need a mongodb stack running, choose it in the external link +question below ### Traefik diff --git a/templates/reactioncommerce/0/docker-compose.yml b/templates/reactioncommerce/0/docker-compose.yml.tpl similarity index 82% rename from templates/reactioncommerce/0/docker-compose.yml rename to templates/reactioncommerce/0/docker-compose.yml.tpl index 0dd55e8..1015358 100644 --- a/templates/reactioncommerce/0/docker-compose.yml +++ b/templates/reactioncommerce/0/docker-compose.yml.tpl @@ -11,12 +11,17 @@ services: traefik.acme: true traefik.port: 3000 environment: - MONGO_URL: "mongodb://mongo/reaction" + MONGO_URL: "mongodb://mongo/${MONGO_DB}" ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" REACTION_EMAIL: ${REACTION_EMAIL} REACTION_USER: ${REACTION_USER} REACTION_AUTH: ${REACTION_AUTH} - +{{- if ne .Values.mongo_link ""}} + REACTION_TEST: ${REACTION_AUTH} + external_links: + - ${mongo_link}:mongo + tty: true +{{- else}} mongo: command: mongod --storageEngine=wiredTiger restart: always @@ -30,7 +35,7 @@ services: io.rancher.container.hostname_override: container_name volumes: - mongodata:/data/db - volumes: mongodata: driver: ${VOLUME_DRIVER} +{{- end}} diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 3ad84f6..31de063 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -16,7 +16,7 @@ catalog: description: "Domain to use for the reaction server" label: "reaction Domain" required: true - default: "" + default: "local" type: "string" - variable: host_label label: "Host Label to reaction Tags" @@ -29,7 +29,7 @@ catalog: - variable: REACTION_EMAIL label: "reaction Email" required: true - default: "" + default: "test@local" type: "string" - variable: REACTION_USER label: "reaction User" @@ -41,17 +41,20 @@ catalog: required: true default: "" type: "password" - - variable: "VOLUME_DRIVER" - description: "The VOLUME driver to associate with this server" - label: "VOLUME Driver" + - variable: "mongo_link" + description: | + MongoDB external service link + cluster. + label: "External stack/service" + default: "" + required: false + type: "service" + - variable: "MONGO_DB" + default: "reaction" + description: "The mongodb name to associate with this server." + label: "mongo_db" required: true - default: "local" - type: enum - options: - - local - - rancher-nfs - - rancher-efs - - rancher-ebs + type: "string" services: reaction: @@ -65,7 +68,6 @@ services: interval: 5000 strategy: recreate request_line: GET / # HTTP/1.0 - mongo: scale: 1 retain_ip: true diff --git a/templates/reactioncommerce/1/README.md b/templates/reactioncommerce/1/README.md deleted file mode 100644 index dd9a400..0000000 --- a/templates/reactioncommerce/1/README.md +++ /dev/null @@ -1,22 +0,0 @@ -### Docs - -The Reaction Commerce official docs are -[here](https://docs.reactioncommerce.com/) - -This template implements the same method as found -[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) - -### MongoDB - -You'll need a mongodb stack running, choose it in the external link -question below - -### Traefik - -For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate -labels will be set when you set the hostname and domain below - -### Support - -There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement -other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/1/docker-compose.yml b/templates/reactioncommerce/1/docker-compose.yml deleted file mode 100644 index 8c80e37..0000000 --- a/templates/reactioncommerce/1/docker-compose.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2' -services: - reaction: - image: reactioncommerce/reaction:v1.4.0 - restart: always - labels: - io.rancher.scheduler.affinity:host_label: ${host_label} - traefik.enable: true - traefik.alias: ${REACTION_HOST} - traefik.domain: ${REACTION_DOMAIN} - traefik.acme: true - traefik.port: 3000 - environment: - MONGO_URL: ${MONGO_URL} - ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" - REACTION_EMAIL: ${REACTION_EMAIL} - REACTION_USER: ${REACTION_USER} - REACTION_AUTH: ${REACTION_AUTH} - external_links: - - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/1/rancher-compose.yml b/templates/reactioncommerce/1/rancher-compose.yml deleted file mode 100644 index 7c7864a..0000000 --- a/templates/reactioncommerce/1/rancher-compose.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: '2' -catalog: - name: "reactiondemo" - version: 1.4.0-rancher2 - description: "E-commerce powered by reaction" - uuid: reaction-0 - minimum_rancher_version: v0.51.0 - questions: - - variable: "REACTION_HOST" - description: "Hostname to use for the reaction server" - label: "reaction Hostname" - required: true - default: "reaction" - type: "string" - - variable: "REACTION_DOMAIN" - description: "Domain to use for the reaction server" - label: "reaction Domain" - required: true - default: "" - type: "string" - - variable: host_label - label: "Host Label to reaction Tags" - description: | - Host label to use as reaction 'value' tag. - Example: 'reaction=true' - required: false - default: "private=true" - type: "string" - - variable: REACTION_EMAIL - label: "reaction Email" - required: true - default: "" - type: "string" - - variable: REACTION_USER - label: "reaction User" - required: true - default: "" - type: "string" - - variable: REACTION_AUTH - label: "reaction Auth" - required: true - default: "" - type: "password" - - variable: "mongo_link" - description: | - MongoDB external service link - cluster. - label: "External stack/service" - default: "" - required: true - type: "service" - - variable: "MONGO_URL" - default: "mongodb://mongo/reaction" - description: "The mongodb url to associate with this server. !!Do not change!! if you are setting the external link above!" - label: "mongo_url" - required: true - type: "string" - -services: - reaction: - scale: 1 - retain_ip: true - health_check: - healthy_threshold: 2 - response_timeout: 5000 - port: 3000 - unhealthy_threshold: 3 - interval: 5000 - strategy: recreate - request_line: GET / # HTTP/1.0 diff --git a/templates/reactioncommerce/2/README.md b/templates/reactioncommerce/2/README.md deleted file mode 100644 index dd9a400..0000000 --- a/templates/reactioncommerce/2/README.md +++ /dev/null @@ -1,22 +0,0 @@ -### Docs - -The Reaction Commerce official docs are -[here](https://docs.reactioncommerce.com/) - -This template implements the same method as found -[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) - -### MongoDB - -You'll need a mongodb stack running, choose it in the external link -question below - -### Traefik - -For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate -labels will be set when you set the hostname and domain below - -### Support - -There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement -other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/2/docker-compose.yml b/templates/reactioncommerce/2/docker-compose.yml deleted file mode 100644 index 1caf367..0000000 --- a/templates/reactioncommerce/2/docker-compose.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2' -services: - reaction: - image: reactioncommerce/reaction:v1.4.0 - restart: always - labels: - io.rancher.scheduler.affinity:host_label: ${host_label} - traefik.enable: true - traefik.alias: ${REACTION_HOST} - traefik.domain: ${REACTION_DOMAIN} - traefik.acme: true - traefik.port: 3000 - environment: - MONGO_URL: "mongodb://mongo/${MONGO_DB}" - ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" - REACTION_EMAIL: ${REACTION_EMAIL} - REACTION_USER: ${REACTION_USER} - REACTION_AUTH: ${REACTION_AUTH} - external_links: - - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/2/rancher-compose.yml b/templates/reactioncommerce/2/rancher-compose.yml deleted file mode 100644 index 47ded12..0000000 --- a/templates/reactioncommerce/2/rancher-compose.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: '2' -catalog: - name: "reactiondemo" - version: 1.4.0-rancher3 - description: "E-commerce powered by reaction" - uuid: reaction-0 - minimum_rancher_version: v0.51.0 - questions: - - variable: "REACTION_HOST" - description: "Hostname to use for the reaction server" - label: "reaction Hostname" - required: true - default: "reaction" - type: "string" - - variable: "REACTION_DOMAIN" - description: "Domain to use for the reaction server" - label: "reaction Domain" - required: true - default: "" - type: "string" - - variable: host_label - label: "Host Label to reaction Tags" - description: | - Host label to use as reaction 'value' tag. - Example: 'reaction=true' - required: false - default: "private=true" - type: "string" - - variable: REACTION_EMAIL - label: "reaction Email" - required: true - default: "" - type: "string" - - variable: REACTION_USER - label: "reaction User" - required: true - default: "" - type: "string" - - variable: REACTION_AUTH - label: "reaction Auth" - required: true - default: "" - type: "password" - - variable: "mongo_link" - description: | - MongoDB external service link - cluster. - label: "External stack/service" - default: "" - required: true - type: "service" - - variable: "MONGO_DB" - default: "reaction" - description: "The mongodb name to associate with this server." - label: "mongo_db" - required: true - type: "string" - -services: - reaction: - scale: 1 - retain_ip: true - health_check: - healthy_threshold: 2 - response_timeout: 5000 - port: 3000 - unhealthy_threshold: 3 - interval: 5000 - strategy: recreate - request_line: GET / # HTTP/1.0 From b95ec9762b451d7031ecd4d9e36ca98796ef7b49 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 13:02:50 -0500 Subject: [PATCH 10/11] delete mongo service in rancher-compose --- templates/reactioncommerce/0/rancher-compose.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 31de063..e295a7a 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -68,6 +68,3 @@ services: interval: 5000 strategy: recreate request_line: GET / # HTTP/1.0 - mongo: - scale: 1 - retain_ip: true From 82bcb770a29efd383f9629e8ccb987893654f682 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 13:47:33 -0500 Subject: [PATCH 11/11] TEST removed --- templates/reactioncommerce/0/docker-compose.yml.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/reactioncommerce/0/docker-compose.yml.tpl b/templates/reactioncommerce/0/docker-compose.yml.tpl index 1015358..4ca7e1f 100644 --- a/templates/reactioncommerce/0/docker-compose.yml.tpl +++ b/templates/reactioncommerce/0/docker-compose.yml.tpl @@ -17,7 +17,6 @@ services: REACTION_USER: ${REACTION_USER} REACTION_AUTH: ${REACTION_AUTH} {{- if ne .Values.mongo_link ""}} - REACTION_TEST: ${REACTION_AUTH} external_links: - ${mongo_link}:mongo tty: true