From d11e7f434d35e2577599c25fbfd7a56f72e52918 Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Wed, 13 Dec 2017 11:02:58 +1100 Subject: [PATCH 1/7] Adding selenium hub with basic config --- templates/selenium/0/docker-compose.yml | 8 + templates/selenium/0/rancher-compose.yml | 31 +++ templates/selenium/catalogIcon-selenium.svg | 269 ++++++++++++++++++++ templates/selenium/config.yml | 8 + 4 files changed, 316 insertions(+) create mode 100644 templates/selenium/0/docker-compose.yml create mode 100644 templates/selenium/0/rancher-compose.yml create mode 100644 templates/selenium/catalogIcon-selenium.svg create mode 100644 templates/selenium/config.yml diff --git a/templates/selenium/0/docker-compose.yml b/templates/selenium/0/docker-compose.yml new file mode 100644 index 0000000..eed4021 --- /dev/null +++ b/templates/selenium/0/docker-compose.yml @@ -0,0 +1,8 @@ +version: '2' +services: + seleniumhub: + image: selenium/hub:${SELENIUM_VERSION} + environment: + GRID_TIMEOUT: '300000' + labels: + io.rancher.container.pull_image: always diff --git a/templates/selenium/0/rancher-compose.yml b/templates/selenium/0/rancher-compose.yml new file mode 100644 index 0000000..679b871 --- /dev/null +++ b/templates/selenium/0/rancher-compose.yml @@ -0,0 +1,31 @@ +version: '2' +catalog: + name: selenium + version: 3.8.1-bohrium + minimum_rancher_version: v1.5.0 + questions: + - variable: "SELENIUM_VERSION" + label: + description: | + type: enum + options: + - 3.8.1-bohrium + - 3.8.1-aluminum + - 3.7.1-cadmium + - 3.7.1-beryllium + - 3.7.1-argon + - 3.7.0-arsenic + - 3.6.0-darmstadtium + - 3.6.0-copper + - 3.6.0-bromine + - 3.6.0-americium + - 3.5.3-boron + - 3.5.3-astatine + - 3.5.2-antimony + - 3.5.1-aluminum + - 3.5.0-argon + - 3.4.0-francium + - 3.4.0-einsteinium + - 3.4.0-dysprosium + - 3.4.0-chromium + - 3.4.0-bismuth diff --git a/templates/selenium/catalogIcon-selenium.svg b/templates/selenium/catalogIcon-selenium.svg new file mode 100644 index 0000000..d646631 --- /dev/null +++ b/templates/selenium/catalogIcon-selenium.svg @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/selenium/config.yml b/templates/selenium/config.yml new file mode 100644 index 0000000..379ff72 --- /dev/null +++ b/templates/selenium/config.yml @@ -0,0 +1,8 @@ +name: selenium +description: | + selenium hub and nodes +version: 0 +category: Test Automation +maintainer: "ramz " +license: "Apache License 2.0" +projectURL: http://www.seleniumhq.org/ From 31b2bff463c716e735463e96feef021ddcb46797 Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Wed, 13 Dec 2017 11:44:13 +1100 Subject: [PATCH 2/7] Adding support for chrome and firefox nodes --- templates/selenium/0/docker-compose.yml | 8 -- templates/selenium/0/docker-compose.yml.tpl | 26 ++++++ templates/selenium/0/rancher-compose.yml | 93 ++++++++++++++++++++- 3 files changed, 115 insertions(+), 12 deletions(-) delete mode 100644 templates/selenium/0/docker-compose.yml create mode 100644 templates/selenium/0/docker-compose.yml.tpl diff --git a/templates/selenium/0/docker-compose.yml b/templates/selenium/0/docker-compose.yml deleted file mode 100644 index eed4021..0000000 --- a/templates/selenium/0/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '2' -services: - seleniumhub: - image: selenium/hub:${SELENIUM_VERSION} - environment: - GRID_TIMEOUT: '300000' - labels: - io.rancher.container.pull_image: always diff --git a/templates/selenium/0/docker-compose.yml.tpl b/templates/selenium/0/docker-compose.yml.tpl new file mode 100644 index 0000000..3215870 --- /dev/null +++ b/templates/selenium/0/docker-compose.yml.tpl @@ -0,0 +1,26 @@ +version: '2' +services: + {{- if eq .Values.DEPLOY_SELENIUM_HUB "true"}} + seleniumhub: + image: selenium/hub:${SELENIUM_HUB_VERSION} + environment: + GRID_TIMEOUT: ${GRID_TIMEOUT} + labels: + io.rancher.container.pull_image: always + {{- end}} + {{- if eq .Values.DEPLOY_SELENIUM_CHROME "true"}} + selenium-chrome: + image: selenium/node-chrome:${SELENIUM_CHROME_VERSION} + links: + - seleniumhub:hub + labels: + io.rancher.container.pull_image: always + {{- end}} + {{- if eq .Values.DEPLOY_SELENIUM_FIREFOX "true"}} + selenium-firefox: + image: selenium/node-firefox:${SELENIUM_FIREFOX_VERSION} + links: + - seleniumhub:hub + labels: + io.rancher.container.pull_image: always + {{- end}} diff --git a/templates/selenium/0/rancher-compose.yml b/templates/selenium/0/rancher-compose.yml index 679b871..65908b5 100644 --- a/templates/selenium/0/rancher-compose.yml +++ b/templates/selenium/0/rancher-compose.yml @@ -1,12 +1,97 @@ version: '2' catalog: name: selenium - version: 3.8.1-bohrium + version: 0 minimum_rancher_version: v1.5.0 questions: - - variable: "SELENIUM_VERSION" - label: - description: | + - variable: DEPLOY_SELENIUM_HUB + description: Deploy Selenium Hub + label: Deploy Selenium Hub + required: true + type: enum + default: true + options: + - true + - false + - variable: DEPLOY_SELENIUM_CHROME + description: Deploy Selenium Chrome Node + label: Deploy Selenium Chrome Node + required: true + type: enum + default: true + options: + - true + - false + - variable: DEPLOY_SELENIUM_FIREFOX + description: Deploy Selenium Firefox Node + label: Deploy Selenium Firefox Node + required: true + type: enum + default: true + options: + - true + - false + - variable: SELENIUM_HUB_VERSION + label: Selenium Hub Version + description: Selenium Hub Version + required: true + type: enum + options: + - 3.8.1-bohrium + - 3.8.1-aluminum + - 3.7.1-cadmium + - 3.7.1-beryllium + - 3.7.1-argon + - 3.7.0-arsenic + - 3.6.0-darmstadtium + - 3.6.0-copper + - 3.6.0-bromine + - 3.6.0-americium + - 3.5.3-boron + - 3.5.3-astatine + - 3.5.2-antimony + - 3.5.1-aluminum + - 3.5.0-argon + - 3.4.0-francium + - 3.4.0-einsteinium + - 3.4.0-dysprosium + - 3.4.0-chromium + - 3.4.0-bismuth + - variable: GRID_TIMEOUT + label: Hub Configuration + description: Grid Timeout (in seconds) + type: int + default: 30 + - variable: SELENIUM_CHROME_VERSION + label: Selenium Chrome Version + description: Selenium Chrome Version + required: true + type: enum + options: + - 3.8.1-bohrium + - 3.8.1-aluminum + - 3.7.1-cadmium + - 3.7.1-beryllium + - 3.7.1-argon + - 3.7.0-arsenic + - 3.6.0-darmstadtium + - 3.6.0-copper + - 3.6.0-bromine + - 3.6.0-americium + - 3.5.3-boron + - 3.5.3-astatine + - 3.5.2-antimony + - 3.5.1-aluminum + - 3.5.0-argon + - 3.4.0-francium + - 3.4.0-einsteinium + - 3.4.0-dysprosium + - 3.4.0-chromium + - 3.4.0-bismuth + - variable: SELENIUM_FIREFOX_VERSION + label: Selenium Firefox Version + description: Selenium Firefox Version + required: true type: enum options: - 3.8.1-bohrium From df7555a2bb138fd7fda69dab522878144e74f1df Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Wed, 13 Dec 2017 11:55:59 +1100 Subject: [PATCH 3/7] Adding port to be published --- templates/selenium/0/docker-compose.yml.tpl | 2 + templates/selenium/0/rancher-compose.yml | 41 ++++++++++++--------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/templates/selenium/0/docker-compose.yml.tpl b/templates/selenium/0/docker-compose.yml.tpl index 3215870..04ece7c 100644 --- a/templates/selenium/0/docker-compose.yml.tpl +++ b/templates/selenium/0/docker-compose.yml.tpl @@ -5,6 +5,8 @@ services: image: selenium/hub:${SELENIUM_HUB_VERSION} environment: GRID_TIMEOUT: ${GRID_TIMEOUT} + ports: + - ${PUBLISH_PORT}:4444 labels: io.rancher.container.pull_image: always {{- end}} diff --git a/templates/selenium/0/rancher-compose.yml b/templates/selenium/0/rancher-compose.yml index 65908b5..43a69ec 100644 --- a/templates/selenium/0/rancher-compose.yml +++ b/templates/selenium/0/rancher-compose.yml @@ -13,24 +13,6 @@ catalog: options: - true - false - - variable: DEPLOY_SELENIUM_CHROME - description: Deploy Selenium Chrome Node - label: Deploy Selenium Chrome Node - required: true - type: enum - default: true - options: - - true - - false - - variable: DEPLOY_SELENIUM_FIREFOX - description: Deploy Selenium Firefox Node - label: Deploy Selenium Firefox Node - required: true - type: enum - default: true - options: - - true - - false - variable: SELENIUM_HUB_VERSION label: Selenium Hub Version description: Selenium Hub Version @@ -62,6 +44,20 @@ catalog: description: Grid Timeout (in seconds) type: int default: 30 + - variable: PUBLISH_PORT + label: Publish Port + description: Port to expose for external access + type: int + default: 4444 + - variable: DEPLOY_SELENIUM_CHROME + description: Deploy Selenium Chrome Node + label: Deploy Selenium Chrome Node + required: true + type: enum + default: true + options: + - true + - false - variable: SELENIUM_CHROME_VERSION label: Selenium Chrome Version description: Selenium Chrome Version @@ -88,6 +84,15 @@ catalog: - 3.4.0-dysprosium - 3.4.0-chromium - 3.4.0-bismuth + - variable: DEPLOY_SELENIUM_FIREFOX + description: Deploy Selenium Firefox Node + label: Deploy Selenium Firefox Node + required: true + type: enum + default: true + options: + - true + - false - variable: SELENIUM_FIREFOX_VERSION label: Selenium Firefox Version description: Selenium Firefox Version From 28b4bb3e30a40d7790ce6252d8c07b89ec09f762 Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Wed, 13 Dec 2017 12:11:53 +1100 Subject: [PATCH 4/7] Adding support for scale in firefox and chrome containers --- templates/selenium/0/rancher-compose.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/templates/selenium/0/rancher-compose.yml b/templates/selenium/0/rancher-compose.yml index 43a69ec..432ee39 100644 --- a/templates/selenium/0/rancher-compose.yml +++ b/templates/selenium/0/rancher-compose.yml @@ -84,6 +84,11 @@ catalog: - 3.4.0-dysprosium - 3.4.0-chromium - 3.4.0-bismuth + - variable: SELENIUM_CHROME_SCALE + label: Number of chrome container + description: Number of chrome container + type: int + default: 1 - variable: DEPLOY_SELENIUM_FIREFOX description: Deploy Selenium Firefox Node label: Deploy Selenium Firefox Node @@ -119,3 +124,24 @@ catalog: - 3.4.0-dysprosium - 3.4.0-chromium - 3.4.0-bismuth + - variable: SELENIUM_FIREFOX_SCALE + label: Number of firefox container + description: Number of firefox container + type: int + default: 1 +services: + selenium-chrome: + scale: ${SELENIUM_CHROME_SCALE} + retain_ip: true + selenium-firefox: + scale: ${SELENIUM_FIREFOX_SCALE} + retain_ip: true + seleniumhub: + scale: 1 + health_check: + port: 4444 + interval: 5000 + unhealthy_threshold: 3 + request_line: '' + healthy_threshold: 2 + response_timeout: 5000 From 0c6ff13de0ff492ba52a85b69b11ce67e39f4f68 Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Wed, 13 Dec 2017 12:35:05 +1100 Subject: [PATCH 5/7] Updating the maintainer --- templates/selenium/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/selenium/config.yml b/templates/selenium/config.yml index 379ff72..2ba1e85 100644 --- a/templates/selenium/config.yml +++ b/templates/selenium/config.yml @@ -3,6 +3,6 @@ description: | selenium hub and nodes version: 0 category: Test Automation -maintainer: "ramz " +maintainer: "ramz sivagurunathan " license: "Apache License 2.0" projectURL: http://www.seleniumhq.org/ From 098609735394575fd41ecc87d7a127253d3b50d9 Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Wed, 13 Dec 2017 12:45:18 +1100 Subject: [PATCH 6/7] Adding version to config and catalog --- templates/selenium/0/rancher-compose.yml | 2 +- templates/selenium/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/selenium/0/rancher-compose.yml b/templates/selenium/0/rancher-compose.yml index 432ee39..2d46b2e 100644 --- a/templates/selenium/0/rancher-compose.yml +++ b/templates/selenium/0/rancher-compose.yml @@ -1,7 +1,7 @@ version: '2' catalog: name: selenium - version: 0 + version: v0.0.1 minimum_rancher_version: v1.5.0 questions: - variable: DEPLOY_SELENIUM_HUB diff --git a/templates/selenium/config.yml b/templates/selenium/config.yml index 2ba1e85..4deac89 100644 --- a/templates/selenium/config.yml +++ b/templates/selenium/config.yml @@ -1,7 +1,7 @@ name: selenium description: | selenium hub and nodes -version: 0 +version: v0.0.1 category: Test Automation maintainer: "ramz sivagurunathan " license: "Apache License 2.0" From 83005a8fde58b9a8557adcdaee1ee6b9ccbe6a16 Mon Sep 17 00:00:00 2001 From: ageekymonk Date: Tue, 6 Feb 2018 11:50:47 +1100 Subject: [PATCH 7/7] Incorporating review comments. 1. Removing label to pull always 2. Making all hub, firefox and chrome version to be consistent 3. Make hub deploy to be mandatory --- templates/selenium/0/docker-compose.yml.tpl | 14 +---- templates/selenium/0/rancher-compose.yml | 68 ++------------------- 2 files changed, 7 insertions(+), 75 deletions(-) diff --git a/templates/selenium/0/docker-compose.yml.tpl b/templates/selenium/0/docker-compose.yml.tpl index 04ece7c..ce05a23 100644 --- a/templates/selenium/0/docker-compose.yml.tpl +++ b/templates/selenium/0/docker-compose.yml.tpl @@ -1,28 +1,20 @@ version: '2' services: - {{- if eq .Values.DEPLOY_SELENIUM_HUB "true"}} seleniumhub: - image: selenium/hub:${SELENIUM_HUB_VERSION} + image: selenium/hub:${SELENIUM_VERSION} environment: GRID_TIMEOUT: ${GRID_TIMEOUT} ports: - ${PUBLISH_PORT}:4444 - labels: - io.rancher.container.pull_image: always - {{- end}} {{- if eq .Values.DEPLOY_SELENIUM_CHROME "true"}} selenium-chrome: - image: selenium/node-chrome:${SELENIUM_CHROME_VERSION} + image: selenium/node-chrome:${SELENIUM_VERSION} links: - seleniumhub:hub - labels: - io.rancher.container.pull_image: always {{- end}} {{- if eq .Values.DEPLOY_SELENIUM_FIREFOX "true"}} selenium-firefox: - image: selenium/node-firefox:${SELENIUM_FIREFOX_VERSION} + image: selenium/node-firefox:${SELENIUM_VERSION} links: - seleniumhub:hub - labels: - io.rancher.container.pull_image: always {{- end}} diff --git a/templates/selenium/0/rancher-compose.yml b/templates/selenium/0/rancher-compose.yml index 2d46b2e..fbb89a2 100644 --- a/templates/selenium/0/rancher-compose.yml +++ b/templates/selenium/0/rancher-compose.yml @@ -4,20 +4,12 @@ catalog: version: v0.0.1 minimum_rancher_version: v1.5.0 questions: - - variable: DEPLOY_SELENIUM_HUB - description: Deploy Selenium Hub - label: Deploy Selenium Hub - required: true - type: enum - default: true - options: - - true - - false - - variable: SELENIUM_HUB_VERSION - label: Selenium Hub Version - description: Selenium Hub Version + - variable: SELENIUM_VERSION + label: Selenium Version for Hub and Nodes + description: Selenium Hub and Node Version required: true type: enum + default: 3.8.1-bohrium options: - 3.8.1-bohrium - 3.8.1-aluminum @@ -58,32 +50,6 @@ catalog: options: - true - false - - variable: SELENIUM_CHROME_VERSION - label: Selenium Chrome Version - description: Selenium Chrome Version - required: true - type: enum - options: - - 3.8.1-bohrium - - 3.8.1-aluminum - - 3.7.1-cadmium - - 3.7.1-beryllium - - 3.7.1-argon - - 3.7.0-arsenic - - 3.6.0-darmstadtium - - 3.6.0-copper - - 3.6.0-bromine - - 3.6.0-americium - - 3.5.3-boron - - 3.5.3-astatine - - 3.5.2-antimony - - 3.5.1-aluminum - - 3.5.0-argon - - 3.4.0-francium - - 3.4.0-einsteinium - - 3.4.0-dysprosium - - 3.4.0-chromium - - 3.4.0-bismuth - variable: SELENIUM_CHROME_SCALE label: Number of chrome container description: Number of chrome container @@ -98,32 +64,6 @@ catalog: options: - true - false - - variable: SELENIUM_FIREFOX_VERSION - label: Selenium Firefox Version - description: Selenium Firefox Version - required: true - type: enum - options: - - 3.8.1-bohrium - - 3.8.1-aluminum - - 3.7.1-cadmium - - 3.7.1-beryllium - - 3.7.1-argon - - 3.7.0-arsenic - - 3.6.0-darmstadtium - - 3.6.0-copper - - 3.6.0-bromine - - 3.6.0-americium - - 3.5.3-boron - - 3.5.3-astatine - - 3.5.2-antimony - - 3.5.1-aluminum - - 3.5.0-argon - - 3.4.0-francium - - 3.4.0-einsteinium - - 3.4.0-dysprosium - - 3.4.0-chromium - - 3.4.0-bismuth - variable: SELENIUM_FIREFOX_SCALE label: Number of firefox container description: Number of firefox container