diff --git a/infra-templates/cloudflare/0/rancher-compose.yml b/infra-templates/cloudflare/0/rancher-compose.yml index 18053a4..9ca5703 100644 --- a/infra-templates/cloudflare/0/rancher-compose.yml +++ b/infra-templates/cloudflare/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.1.9-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/1/rancher-compose.yml b/infra-templates/cloudflare/1/rancher-compose.yml index 57749e1..5f8f265 100644 --- a/infra-templates/cloudflare/1/rancher-compose.yml +++ b/infra-templates/cloudflare/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.2.1-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/2/rancher-compose.yml b/infra-templates/cloudflare/2/rancher-compose.yml index 8753d40..cf90dba 100644 --- a/infra-templates/cloudflare/2/rancher-compose.yml +++ b/infra-templates/cloudflare/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.4.0-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/3/rancher-compose.yml b/infra-templates/cloudflare/3/rancher-compose.yml index 73ec3f3..50d766a 100644 --- a/infra-templates/cloudflare/3/rancher-compose.yml +++ b/infra-templates/cloudflare/3/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.0-rancher1" description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 questions: - variable: "CLOUDFLARE_EMAIL" label: "CloudFlare email address" diff --git a/infra-templates/cloudflare/4/README.md b/infra-templates/cloudflare/4/README.md new file mode 100644 index 0000000..84dba81 --- /dev/null +++ b/infra-templates/cloudflare/4/README.md @@ -0,0 +1,36 @@ +## CloudFlare DNS + +Rancher External DNS service powered by CloudFlare DNS + +#### Changelog + +##### v0.6.0 + +* Reduces the overall rate of API requests to the DNS provider +* Adds support for custom DNS naming convention +* Stack, service and environment names used in service DNS names are now sanitized to conform with RFC 1123. Characters other than `a-z`, `A-Z`, `0-9` or `dash` are replaced by dashes. +* For internal use the service creates TXT records to track the FQDNs it manages. These TXT records are named `external-dns-.` and should not be deleted. + +#### Usage + +##### Upgrade Notes +While upgrading from a version lower than v0.6.0 the TTL configuration value should not be changed. You may change it once the upgrade has been completed. + +##### Limitation when running the service on multiple Rancher servers + +When running multiple instances of the External DNS service configured to use the **same** domain name, then only one of them can run in the "Default" environment of a Rancher server instance. + +##### Custom DNS name template + +By default DNS entries are named `...`. +You can specify a custom name template used to construct the subdomain part (left of the domain name) of the DNS records. The following placeholders are supported: + +* `%{{service_name}}` +* `%{{stack_name}}` +* `%{{environment_name}}` + +**Example:** + +`%{{stack_name}}-%{{service_name}}.statictext` + +Make sure to only use characters in static text and separators that are allowed by your provider in DNS names. diff --git a/infra-templates/cloudflare/4/docker-compose.yml b/infra-templates/cloudflare/4/docker-compose.yml new file mode 100644 index 0000000..bc46199 --- /dev/null +++ b/infra-templates/cloudflare/4/docker-compose.yml @@ -0,0 +1,14 @@ +cloudflare: + image: rancher/external-dns:v0.6.0 + command: -provider=cloudflare + expose: + - 1000 + environment: + CLOUDFLARE_EMAIL: ${CLOUDFLARE_EMAIL} + CLOUDFLARE_KEY: ${CLOUDFLARE_KEY} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/cloudflare/4/rancher-compose.yml b/infra-templates/cloudflare/4/rancher-compose.yml new file mode 100644 index 0000000..40a4fdf --- /dev/null +++ b/infra-templates/cloudflare/4/rancher-compose.yml @@ -0,0 +1,48 @@ +# notemplating +.catalog: + name: "CloudFlare DNS" + version: "v0.6.0-rancher2" + description: "Rancher External DNS service powered by CloudFlare. Requires Rancher version v1.1.0" + minimum_rancher_version: v1.6.0-rc1 + questions: + - variable: "CLOUDFLARE_EMAIL" + label: "CloudFlare email address" + description: "Email address associated with your CloudFlare account" + type: "string" + required: true + - variable: "CLOUDFLARE_KEY" + label: "CloudFlare API key" + description: "API key for your CloudFlare account" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Domain Name" + description: "The domain name managed by CloudFlare." + type: "string" + required: true + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds (minimum 120)" + type: "int" + default: 120 + min: 120 + max: 3600 + required: false + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the domain) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +cloudflare: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/infra-templates/cloudflare/config.yml b/infra-templates/cloudflare/config.yml index 45af600..deb2170 100644 --- a/infra-templates/cloudflare/config.yml +++ b/infra-templates/cloudflare/config.yml @@ -1,7 +1,7 @@ name: CloudFlare DNS description: | Rancher External DNS service powered by CloudFlare -version: v0.6.0-rancher1 +version: v0.6.0-rancher2 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' diff --git a/infra-templates/digitalocean-dns/1/rancher-compose.yml b/infra-templates/digitalocean-dns/1/rancher-compose.yml index f3329e8..4666dd7 100644 --- a/infra-templates/digitalocean-dns/1/rancher-compose.yml +++ b/infra-templates/digitalocean-dns/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.3" description: "Rancher External DNS service powered by DigitalOcean" minimum_rancher_version: v1.5.0 + maximum_rancher_version: v1.5.0 questions: - variable: "DO_PAT" label: "DigitalOcean Personal Access Token" diff --git a/infra-templates/digitalocean-dns/2/rancher-compose.yml b/infra-templates/digitalocean-dns/2/rancher-compose.yml index 233510c..a7949fc 100644 --- a/infra-templates/digitalocean-dns/2/rancher-compose.yml +++ b/infra-templates/digitalocean-dns/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.4" description: "Rancher External DNS service powered by DigitalOcean" minimum_rancher_version: v1.5.0 + maximum_rancher_version: v1.5.99 questions: - variable: "DO_PAT" label: "DigitalOcean Personal Access Token" diff --git a/infra-templates/digitalocean-dns/3/README.md b/infra-templates/digitalocean-dns/3/README.md new file mode 100644 index 0000000..013559c --- /dev/null +++ b/infra-templates/digitalocean-dns/3/README.md @@ -0,0 +1,53 @@ +## DigitalOcean DNS + +Rancher External DNS service powered by DigitalOcean + +#### Changelog + +##### v0.6.4 + +* Adds support for overriding name template for specific services by setting io.rancher.service.external_dns_name_template label to it in docker-compose.yml + +#### Usage + +##### DigitalOcean DNS record TTL +The DigitalOcean API currently does not support per-record TTL setting. You should configure the global TTL setting for the domain manually and set it to a low value (e.g. 60). + +##### Limitation when running the service on multiple Rancher servers + +When running multiple instances of the External DNS service configured to use the same domain name, then only one of them can run in the "Default" environment of a Rancher server instance. + +##### Supported host labels + +`io.rancher.host.external_dns_ip` +Override the IP address used in DNS records for containers running on the host. Defaults to the IP address the host is registered with in Rancher. + +`io.rancher.host.external_dns` +Accepts 'true' (default) or 'false' +When this is set to 'false' no DNS records will ever be created for containers running on this host. + +##### Supported service labels + +`io.rancher.service.external_dns` +Accepts 'always', 'never' or 'auto' (default) +- `always`: Always create DNS records for this service +- `never`: Never create DNS records for this service +- `auto`: Create DNS records for this service if it exposes ports on the host + +`io.rancher.service.external_dns_name_template` +Custom DNS name template that overrides global custom DNS name template (see below) of default DNS name template for a specific service + +##### Custom DNS name template + +By default DNS entries are named `...`. +You can specify a custom name template used to construct the subdomain part (left of the domain/zone name) of the DNS records. The following placeholders are supported: + +* `%{{service_name}}` +* `%{{stack_name}}` +* `%{{environment_name}}` + +**Example:** + +`%{{stack_name}}-%{{service_name}}.statictext` + +Make sure to only use characters in static text and separators that your provider allows in DNS names. diff --git a/infra-templates/digitalocean-dns/3/docker-compose.yml b/infra-templates/digitalocean-dns/3/docker-compose.yml new file mode 100644 index 0000000..1564ee2 --- /dev/null +++ b/infra-templates/digitalocean-dns/3/docker-compose.yml @@ -0,0 +1,13 @@ +digitalocean: + image: rancher/external-dns:v0.6.4 + command: -provider=digitalocean + expose: + - 1000 + environment: + DO_PAT: ${DO_PAT} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: 300 + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/digitalocean-dns/3/rancher-compose.yml b/infra-templates/digitalocean-dns/3/rancher-compose.yml new file mode 100644 index 0000000..64d5f43 --- /dev/null +++ b/infra-templates/digitalocean-dns/3/rancher-compose.yml @@ -0,0 +1,35 @@ +# notemplating +.catalog: + name: "DigitalOcean DNS" + version: "v0.6.4.1" + description: "Rancher External DNS service powered by DigitalOcean" + minimum_rancher_version: v1.6.0-rc1 + questions: + - variable: "DO_PAT" + label: "DigitalOcean Personal Access Token" + description: "Enter your personal access token" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Domain Name" + description: "The domain name managed by DigitalOcean." + type: "string" + required: true + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the domain) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +digitalocean: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/infra-templates/digitalocean-dns/config.yml b/infra-templates/digitalocean-dns/config.yml index 2f29acd..315392e 100644 --- a/infra-templates/digitalocean-dns/config.yml +++ b/infra-templates/digitalocean-dns/config.yml @@ -1,7 +1,7 @@ name: DigitalOcean DNS description: | Rancher External DNS service powered by DigitalOcean -version: v0.6.4 +version: v0.6.4.1 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' diff --git a/infra-templates/dnsimple/0/rancher-compose.yml b/infra-templates/dnsimple/0/rancher-compose.yml index 43f9cab..7a1ff09 100644 --- a/infra-templates/dnsimple/0/rancher-compose.yml +++ b/infra-templates/dnsimple/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.1.9-rancher1" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "DNSIMPLE_EMAIL" label: "DNSimple account email address" diff --git a/infra-templates/dnsimple/1/rancher-compose.yml b/infra-templates/dnsimple/1/rancher-compose.yml index 65fe19f..1a9473b 100644 --- a/infra-templates/dnsimple/1/rancher-compose.yml +++ b/infra-templates/dnsimple/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.2.1-rancher1" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version 0.44.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "DNSIMPLE_EMAIL" label: "DNSimple account email address" diff --git a/infra-templates/dnsimple/2/rancher-compose.yml b/infra-templates/dnsimple/2/rancher-compose.yml index e2eb9ea..12a01d2 100644 --- a/infra-templates/dnsimple/2/rancher-compose.yml +++ b/infra-templates/dnsimple/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.0-rancher1" description: "Rancher External DNS service powered by DNSimple. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 questions: - variable: "DNSIMPLE_EMAIL" label: "DNSimple Account Email Address" diff --git a/infra-templates/dnsimple/3/README.md b/infra-templates/dnsimple/3/README.md new file mode 100644 index 0000000..97b1559 --- /dev/null +++ b/infra-templates/dnsimple/3/README.md @@ -0,0 +1,36 @@ +## DNSimple DNS + +Rancher External DNS service powered by DNSimple DNS + +#### Changelog + +##### v0.6.0 + +* Reduces the overall rate of API requests to the DNS provider +* Adds support for custom DNS naming convention +* Stack, service and environment names used in service DNS names are now sanitized to conform with RFC 1123. Characters other than `a-z`, `A-Z`, `0-9` or `dash` are replaced by dashes. +* For internal use the service creates TXT records to track the FQDNs it manages. These TXT records are named `external-dns-.` and should not be deleted. + +#### Usage + +##### Upgrade Notes +While upgrading from a version lower than v0.6.0 the TTL configuration value should not be changed. You may change it once the upgrade has been completed. + +##### Limitation when running the service on multiple Rancher servers + +When running multiple instances of the External DNS service configured to use the **same** domain name, then only one of them can run in the "Default" environment of a Rancher server instance. + +##### Custom DNS name template + +By default DNS entries are named `...`. +You can specify a custom name template used to construct the subdomain part (left of the domain/zone name) of the DNS records. The following placeholders are supported: + +* `%{{service_name}}` +* `%{{stack_name}}` +* `%{{environment_name}}` + +**Example:** + +`%{{stack_name}}-%{{service_name}}.statictext` + +Make sure to only use characters in static text and separators that your provider allows in DNS names. diff --git a/infra-templates/dnsimple/3/docker-compose.yml b/infra-templates/dnsimple/3/docker-compose.yml new file mode 100644 index 0000000..95041b7 --- /dev/null +++ b/infra-templates/dnsimple/3/docker-compose.yml @@ -0,0 +1,14 @@ +dnsimple: + image: rancher/external-dns:v0.6.0 + command: -provider=dnsimple + expose: + - 1000 + environment: + DNSIMPLE_TOKEN: ${DNSIMPLE_TOKEN} + DNSIMPLE_EMAIL: ${DNSIMPLE_EMAIL} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/dnsimple/3/rancher-compose.yml b/infra-templates/dnsimple/3/rancher-compose.yml new file mode 100644 index 0000000..462cc64 --- /dev/null +++ b/infra-templates/dnsimple/3/rancher-compose.yml @@ -0,0 +1,46 @@ +# notemplating +.catalog: + name: "DNSimple DNS" + version: "v0.6.0-rancher2" + description: "Rancher External DNS service powered by DNSimple. Requires Rancher version v1.1.0" + minimum_rancher_version: v1.6.0-rc1 + questions: + - variable: "DNSIMPLE_EMAIL" + label: "DNSimple Account Email Address" + description: "Email address associated with your DNSimple account" + type: "string" + required: true + - variable: "DNSIMPLE_TOKEN" + label: "DNSimple API Token" + description: "API token for your DNSimple account" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Root Domain" + description: "The domain name managed by DNSimple." + type: "string" + required: true + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds" + type: "int" + default: 60 + required: false + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the root domain name) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +dnsimple: + health_check: + port: 1000 + interval: 15000 + unhealthy_threshold: 2 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/infra-templates/dnsimple/config.yml b/infra-templates/dnsimple/config.yml index 0f1b5e0..ddb531e 100644 --- a/infra-templates/dnsimple/config.yml +++ b/infra-templates/dnsimple/config.yml @@ -1,7 +1,7 @@ name: DNSimple DNS description: | Rancher External DNS service powered by DNSimple -version: v0.6.0-rancher1 +version: v0.6.0-rancher2 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' diff --git a/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml index f22e043..d9f8fec 100644 --- a/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.5.0-rancher1" description: "Rancher External DNS service powered by any RFC2136 compatible DNS" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "RFC2136_HOST" label: "Domain Name Server IP" diff --git a/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml index fb43d3e..c57a32f 100644 --- a/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/1/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.0-rancher1" description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.2.0-pre4-rc1 questions: - variable: "RFC2136_HOST" label: "DNS Server IP" diff --git a/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml index a6e60dc..3e782ca 100644 --- a/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml +++ b/infra-templates/dnsupdate-rfc2136/2/rancher-compose.yml @@ -3,6 +3,7 @@ version: "v0.6.2-rancher1" description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" minimum_rancher_version: v1.2.0-pre4-rc1 + maximum_rancher_version: v1.5.99 questions: - variable: "RFC2136_HOST" label: "DNS Server IP" diff --git a/infra-templates/dnsupdate-rfc2136/3/README.md b/infra-templates/dnsupdate-rfc2136/3/README.md new file mode 100644 index 0000000..fdae2e7 --- /dev/null +++ b/infra-templates/dnsupdate-rfc2136/3/README.md @@ -0,0 +1,52 @@ +## DNS Update (RFC2136) + +Rancher External DNS service powered by any RFC2136 compatible DNS server + +#### Changelog + +##### v0.6.2 + +* Adds support for disabling/enforcing external DNS on the host and service level using labels +* Adds support for insecure DNS Updates +* Fixes an issue with lingering TCP keep-alive connections to the Rancher Metadata service + +#### Usage + +##### Upgrade Notes +While upgrading from a version lower than v0.6.0 the TTL configuration value should not be changed. You may change it once the upgrade has been completed. + +##### Limitation when running the service on multiple Rancher servers + +When running multiple instances of the External DNS service configured to use the same domain name, then only one of them can run in the "Default" environment of a Rancher server instance. + +##### Supported host labels + +`io.rancher.host.external_dns_ip` +Override the IP address used in DNS records for containers running on the host. Defaults to the IP address the host is registered with in Rancher. + +`io.rancher.host.external_dns` +Accepts 'true' (default) or 'false' +When this is set to 'false' no DNS records will ever be created for containers running on this host. + +##### Supported service labels + +`io.rancher.service.external_dns` +Accepts 'always', 'never' or 'auto' (default) +- `always`: Always create DNS records for this service +- `never`: Never create DNS records for this service +- `auto`: Create DNS records for this service if it exposes ports on the host + +##### Custom DNS name template + +By default DNS entries are named `...`. +You can specify a custom name template used to construct the subdomain part (left of the domain/zone name) of the DNS records. The following placeholders are supported: + +* `%{{service_name}}` +* `%{{stack_name}}` +* `%{{environment_name}}` + +**Example:** + +`%{{stack_name}}-%{{service_name}}.statictext` + +Make sure to only use characters in static text and separators that your provider allows in DNS names. diff --git a/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml new file mode 100644 index 0000000..b5d7215 --- /dev/null +++ b/infra-templates/dnsupdate-rfc2136/3/docker-compose.yml @@ -0,0 +1,17 @@ +rfc2136dns: + image: rancher/external-dns:v0.6.2 + command: -provider=rfc2136 + expose: + - 1000 + environment: + RFC2136_HOST: ${RFC2136_HOST} + RFC2136_PORT: ${RFC2136_PORT} + RFC2136_TSIG_KEYNAME: ${RFC2136_TSIG_KEYNAME} + RFC2136_TSIG_SECRET: ${RFC2136_TSIG_SECRET} + RFC2136_INSECURE: ${RFC2136_INSECURE} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml b/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml new file mode 100644 index 0000000..b3f2441 --- /dev/null +++ b/infra-templates/dnsupdate-rfc2136/3/rancher-compose.yml @@ -0,0 +1,63 @@ +# notemplating +.catalog: + name: "DNS Update (RFC2136)" + version: "v0.6.2-rancher2" + description: "Rancher External DNS service powered by any RFC2136 compatible DNS server. Requires Rancher version v1.1.0" + minimum_rancher_version: v1.6.0-rc1 + questions: + - variable: "RFC2136_HOST" + label: "DNS Server IP" + description: "Server IP or Hostname" + type: "string" + required: true + - variable: "RFC2136_PORT" + label: "DNS Server Port" + description: "Server port" + type: "string" + required: true + default: "53" + - variable: "RFC2136_INSECURE" + description: "Disables TSIG authentication for DNS Update requests" + label: "Insecure DNS Update" + required: true + default: false + type: "boolean" + - variable: "RFC2136_TSIG_KEYNAME" + label: "TSIG Key Name" + description: "Name of the TSIG key used for authenticating with the DNS server" + type: "string" + required: false + - variable: "RFC2136_TSIG_SECRET" + label: "TSIG Key" + description: "TSIG secret key used for authenticating with the DNS server (HMAC-MD5, base64 encoded)" + type: "string" + required: false + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds" + type: "int" + default: 60 + required: false + - variable: "ROOT_DOMAIN" + label: "Zone name" + description: "The name of an existing zone in which to create the records." + type: "string" + required: true + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the zone/domain name) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +rfc2136dns: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/infra-templates/dnsupdate-rfc2136/config.yml b/infra-templates/dnsupdate-rfc2136/config.yml index 38b9a9d..cfe0d5f 100644 --- a/infra-templates/dnsupdate-rfc2136/config.yml +++ b/infra-templates/dnsupdate-rfc2136/config.yml @@ -1,7 +1,7 @@ name: DNS Update (RFC2136) description: | Rancher External DNS service powered by any RFC2136 compatible DNS -version: v0.6.2-rancher1 +version: v0.6.2-rancher2 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' diff --git a/infra-templates/gandi-dns/0/docker-compose.yml b/infra-templates/gandi-dns/0/docker-compose.yml new file mode 100644 index 0000000..e0ce227 --- /dev/null +++ b/infra-templates/gandi-dns/0/docker-compose.yml @@ -0,0 +1,13 @@ +gandidns: + image: rancher/external-dns:v0.7.2 + command: -provider=gandi + expose: + - 1000 + environment: + GANDI_APIKEY: ${GANDI_APIKEY} + ROOT_DOMAIN: ${ROOT_DOMAIN} + NAME_TEMPLATE: ${NAME_TEMPLATE} + TTL: ${TTL} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" \ No newline at end of file diff --git a/infra-templates/gandi-dns/0/rancher-compose.yml b/infra-templates/gandi-dns/0/rancher-compose.yml new file mode 100644 index 0000000..0235be3 --- /dev/null +++ b/infra-templates/gandi-dns/0/rancher-compose.yml @@ -0,0 +1,43 @@ +# notemplating +.catalog: + name: "Gandi DNS" + version: "v0.1.0" + description: "Rancher External DNS service powered by Gandi. Requires Rancher version v1.1.0" + maintainer: "Frederic Leger " + minimum_rancher_version: v1.6.0-rc1 + #maximum_rancher_version: + questions: + - variable: "GANDI_APIKEY" + label: "Gandi API key" + description: "API key for your Gandi account" + type: "string" + required: true + - variable: "ROOT_DOMAIN" + label: "Root Domain" + description: "The domain name managed by Gandi." + type: "string" + required: true + - variable: "TTL" + label: "TTL" + description: "The resource record cache time to live (TTL), in seconds (minimum 300)" + type: "int" + default: 300 + required: false + - variable: "NAME_TEMPLATE" + label: "DNS Name Template" + description: | + Name template used to construct the subdomain part (left of the root domain name) of the DNS record names. + Supported placeholders: %{{service_name}}, %{{stack_name}}, %{{environment_name}}. + By default DNS entries will be named '...'. + type: "string" + default: "%{{service_name}}.%{{stack_name}}.%{{environment_name}}" + required: false + +gandidns: + health_check: + port: 1000 + interval: 15000 + unhealthy_threshold: 2 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/infra-templates/gandi-dns/catalogIcon-gandidns.jpg b/infra-templates/gandi-dns/catalogIcon-gandidns.jpg new file mode 100644 index 0000000..17d849f Binary files /dev/null and b/infra-templates/gandi-dns/catalogIcon-gandidns.jpg differ diff --git a/infra-templates/gandi-dns/config.yml b/infra-templates/gandi-dns/config.yml new file mode 100644 index 0000000..061b35b --- /dev/null +++ b/infra-templates/gandi-dns/config.yml @@ -0,0 +1,7 @@ +name: GANDI DNS +description: | + Rancher External DNS service powered by Gandi.net +version: v0.1.0 +category: External DNS +labels: + io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' \ No newline at end of file diff --git a/infra-templates/powerdns-external-dns/1/docker-compose.yml b/infra-templates/powerdns-external-dns/1/docker-compose.yml new file mode 100644 index 0000000..ec4e6c6 --- /dev/null +++ b/infra-templates/powerdns-external-dns/1/docker-compose.yml @@ -0,0 +1,14 @@ +powerdns: + image: rancher/external-dns:v0.7.1 + command: "-provider=powerdns" + expose: + - 1000 + environment: + POWERDNS_API_KEY: ${POWERDNS_API_KEY} + POWERDNS_URL: ${POWERDNS_URL} + ROOT_DOMAIN: ${ROOT_DOMAIN} + TTL: ${TTL} + labels: + io.rancher.container.pull_image: always + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/infra-templates/powerdns-external-dns/1/rancher-compose.yml b/infra-templates/powerdns-external-dns/1/rancher-compose.yml new file mode 100644 index 0000000..bbc1771 --- /dev/null +++ b/infra-templates/powerdns-external-dns/1/rancher-compose.yml @@ -0,0 +1,38 @@ +.catalog: + name: "PowerDNS External" + version: "v0.7.1" + description: Rancher External DNS service for PowerDNS. + minimum_rancher_version: v1.2.0-pre4-rc1 + uuid: powerdns-external-dns:v0.7.1 + questions: + - variable: POWERDNS_URL + label: PowerDNS URL + type: string + description: http[s] base url to PowerDNS + required: true + default: http://powerdns:8100 + - variable: POWERDNS_API_KEY + label: PowerDNS API Key + type: password + description: API Key for PowerDNS + required: true + - variable: TTL + label: TTL + description: "The resource record cache time to live (TTL), in seconds" + type: int + default: 299 + required: false + - variable: "ROOT_DOMAIN" + label: "Hosted zone name" + description: "Hosted zone name (zone has to be pre-created). DNS entries will be created for ..." + type: "string" + required: true + +powerdns: + health_check: + port: 1000 + interval: 30000 + unhealthy_threshold: 3 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/infra-templates/powerdns-external-dns/config.yml b/infra-templates/powerdns-external-dns/config.yml index bc3ae73..b7185c1 100644 --- a/infra-templates/powerdns-external-dns/config.yml +++ b/infra-templates/powerdns-external-dns/config.yml @@ -1,7 +1,7 @@ name: PowerDNS External description: | Rancher External DNS service for PowerDNS -version: v0.5.0-rancher1 +version: v0.7.1 category: External DNS labels: io.rancher.orchestration.supported: 'cattle,mesos,swarm,kubernetes' diff --git a/kubernetes-templates/MongoDB/0/mongo-controller.yaml b/kubernetes-templates/MongoDB/0/mongo-controller.yaml index f956a5e..ee6e38a 100644 --- a/kubernetes-templates/MongoDB/0/mongo-controller.yaml +++ b/kubernetes-templates/MongoDB/0/mongo-controller.yaml @@ -9,23 +9,42 @@ spec: template: spec: containers: + - image: husseingalal/mongo-k8s-config:v0.2.0 + name: mongo-config + volumeMounts: + - mountPath: /opt/rancher/bin + name: utility + stdin: true + tty: true - name: mongo-sec - image: husseingalal/mongo-k8s + image: mongo:3.4 ports: - containerPort: 27017 volumeMounts: - - name: mongo-ephermal-storage + - name: mongo-datadir mountPath: /data/db + - mountPath: /opt/rancher/bin + name: utility command: - - /run.sh + - /opt/rancher/bin/run.sh - mongod - "--replSet" - rs0 - "--smallfiles" - "--noprealloc" + env: + - name: PRIMARY + value: "false" + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP volumes: - - name: mongo-ephermal-storage - emptyDir: {} + - name: mongo-datadir + hostPath: + path: ${mongo_volume} + - name: utility + emptyDir: {} metadata: labels: secondary: "true" diff --git a/kubernetes-templates/MongoDB/0/mongo-master.yaml b/kubernetes-templates/MongoDB/0/mongo-master.yaml index 8e99fe1..437d9cb 100644 --- a/kubernetes-templates/MongoDB/0/mongo-master.yaml +++ b/kubernetes-templates/MongoDB/0/mongo-master.yaml @@ -9,33 +9,49 @@ spec: - port: 27017 targetPort: 27017 selector: - name: mongo-master + name: mongo-primary --- apiVersion: v1 kind: Pod metadata: labels: - name: mongo-master - name: mongo-master + name: mongo-primary + name: mongo-primary spec: containers: - - name: mongo-master - image: "husseingalal/mongo-k8s" + - name: mongo-config + image: husseingalal/mongo-k8s-config:v0.2.0 + volumeMounts: + - mountPath: /opt/rancher/bin + name: utility + stdin: true + tty: true + - name: mongo-primary + image: mongo:3.4 env: - - name: PRIMARY - value: "true" + - name: PRIMARY + value: "true" + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP ports: - containerPort: 27017 command: - - /run.sh + - /opt/rancher/bin/run.sh - mongod - "--replSet" - rs0 - "--smallfiles" - "--noprealloc" volumeMounts: + - mountPath: /opt/rancher/bin + name: utility - mountPath: /data/db - name: mongo-primary-ephermal-storage + name: mongo-datadir volumes: - - name: mongo-primary-ephermal-storage - emptyDir: {} + - name: mongo-datadir + hostPath: + path: ${mongo_volume} + - name: utility + emptyDir: {} diff --git a/kubernetes-templates/MongoDB/0/rancher-compose.yml b/kubernetes-templates/MongoDB/0/rancher-compose.yml index cc33791..0e1e90f 100644 --- a/kubernetes-templates/MongoDB/0/rancher-compose.yml +++ b/kubernetes-templates/MongoDB/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: MongoDB version: 3.2-rancher1 description: MongoDB Replica Set + maximum_rancher_version: v1.3.99 questions: - variable: "sec_no" label: "Number of Secondary nodes" @@ -9,3 +10,8 @@ type: int default: 2 description: "should be even number" + - variable: "mongo_volume" + label: "hostpath volume for mongodb" + required: true + type: string + default: "/data/db" diff --git a/kubernetes-templates/Prometheus/0/rancher-compose.yml b/kubernetes-templates/Prometheus/0/rancher-compose.yml index ab749f6..beeb6af 100644 --- a/kubernetes-templates/Prometheus/0/rancher-compose.yml +++ b/kubernetes-templates/Prometheus/0/rancher-compose.yml @@ -4,6 +4,7 @@ description: "Prometheus Monitoring Solution" uuid: prometheus-1 minimum_rancher_version: v0.56.0 + maximum_rancher_version: v1.3.99 questions: - variable: "cattle_config_url" label: "Rancher Server URL" diff --git a/kubernetes-templates/cassandra/0/rancher-compose.yml b/kubernetes-templates/cassandra/0/rancher-compose.yml index 17df724..13463bb 100644 --- a/kubernetes-templates/cassandra/0/rancher-compose.yml +++ b/kubernetes-templates/cassandra/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: "K8s Example Cassandra" version: "1.0.0" description: "" + maximum_rancher_version: v1.3.99 questions: - variable: "NODE_COUNT" label: "Initial number of Cassandra nodes" diff --git a/kubernetes-templates/cloud9/0/rancher-compose.yml b/kubernetes-templates/cloud9/0/rancher-compose.yml index f8ddeaa..fae9d2c 100644 --- a/kubernetes-templates/cloud9/0/rancher-compose.yml +++ b/kubernetes-templates/cloud9/0/rancher-compose.yml @@ -1,9 +1,10 @@ .catalog: name: Cloud9 description: | - (Experimental) Cloud 9 SDK + (Experimental) Cloud 9 SDK version: 3.0-k8s1 minimum_rancher_version: v1.0.0 + maximum_rancher_version: v1.3.99 maintainer: "Raul Sanchez " uuid: cloud9-0 questions: diff --git a/kubernetes-templates/ghost/0/rancher-compose.yml b/kubernetes-templates/ghost/0/rancher-compose.yml index 59e429a..04c0654 100644 --- a/kubernetes-templates/ghost/0/rancher-compose.yml +++ b/kubernetes-templates/ghost/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: Ghost version: 0.7.8-rancher1 description: Open source publishing platform + maximum_rancher_version: v1.3.99 questions: - variable: "mysql_root_pass" label: "MySQL root password" diff --git a/kubernetes-templates/guestbook/0/rancher-compose.yml b/kubernetes-templates/guestbook/0/rancher-compose.yml index 8ed50bd..db5627c 100644 --- a/kubernetes-templates/guestbook/0/rancher-compose.yml +++ b/kubernetes-templates/guestbook/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: "K8s Guestbook" version: "1.0.0" description: "It's a guestbook, I guess" + maximum_rancher_version: v1.3.99 questions: - variable: "SERVICE_NAME" label: "Service Name" diff --git a/kubernetes-templates/heapster/0/rancher-compose.yml b/kubernetes-templates/heapster/0/rancher-compose.yml index 48e770b..040d493 100644 --- a/kubernetes-templates/heapster/0/rancher-compose.yml +++ b/kubernetes-templates/heapster/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: Heapster Grafana InfluxDB version: canary-rancher1 description: A cluster-wide aggregator of monitoring and event data. + maximum_rancher_version: v1.3.99 questions: - variable: "GRAFANA_PORT" label: "Node port for Grafana" diff --git a/kubernetes-templates/kafka/0/rancher-compose.yml b/kubernetes-templates/kafka/0/rancher-compose.yml index 06fa8eb..258ceb8 100644 --- a/kubernetes-templates/kafka/0/rancher-compose.yml +++ b/kubernetes-templates/kafka/0/rancher-compose.yml @@ -4,6 +4,7 @@ description: | (Experimental) Apache Kafka cluster. minimum_rancher_version: v0.59.0 + maximum_rancher_version: v1.3.99 maintainer: "Raul Sanchez " uuid: kafka-0 questions: diff --git a/kubernetes-templates/minecraft/0/rancher-compose.yml b/kubernetes-templates/minecraft/0/rancher-compose.yml index bcbed8f..d285474 100644 --- a/kubernetes-templates/minecraft/0/rancher-compose.yml +++ b/kubernetes-templates/minecraft/0/rancher-compose.yml @@ -6,6 +6,7 @@ re-assembling of raw materials. It may be an elaborate parody of the Australian economy. maintainer: "Rancher" + maximum_rancher_version: v1.3.99 questions: - variable: REPLICAS default: 1 diff --git a/kubernetes-templates/rabbitmq/0/rancher-compose.yml b/kubernetes-templates/rabbitmq/0/rancher-compose.yml index 3cfc00e..1466228 100644 --- a/kubernetes-templates/rabbitmq/0/rancher-compose.yml +++ b/kubernetes-templates/rabbitmq/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: RabbitMQ version: 3.6.0-rancher1 description: A reliable, distributed messaging broker + maximum_rancher_version: v1.3.99 questions: - variable: REPLICAS default: 1 diff --git a/kubernetes-templates/redis/0/rancher-compose.yml b/kubernetes-templates/redis/0/rancher-compose.yml index 531b435..cc9fffc 100644 --- a/kubernetes-templates/redis/0/rancher-compose.yml +++ b/kubernetes-templates/redis/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: Redis version: 2.8.23-rancher1 description: A highly-available in-memory data structure store + maximum_rancher_version: v1.3.99 questions: - variable: "REDIS_REPLICAS" label: "Initial number of Redis nodes" diff --git a/kubernetes-templates/spark/0/rancher-compose.yml b/kubernetes-templates/spark/0/rancher-compose.yml index dc2a01a..7885398 100644 --- a/kubernetes-templates/spark/0/rancher-compose.yml +++ b/kubernetes-templates/spark/0/rancher-compose.yml @@ -3,6 +3,7 @@ version: 0.1.0-rancher1 description: "Spark cluster" maintainer: "Rancher" + maximum_rancher_version: v1.3.99 questions: - variable: "SPARK_WORKER_REPLICAS" type: "string" diff --git a/kubernetes-templates/sysdig-cloud/0/rancher-compose.yml b/kubernetes-templates/sysdig-cloud/0/rancher-compose.yml index 0ba053c..7490797 100644 --- a/kubernetes-templates/sysdig-cloud/0/rancher-compose.yml +++ b/kubernetes-templates/sysdig-cloud/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: "Sysdig Cloud" version: "0.1" description: "Container-Native Application and Infrastructure Monitoring" + maximum_rancher_version: v1.3.99 questions: - variable: "SDC_ACCESS_KEY" label: "Sysdig Cloud access key" diff --git a/kubernetes-templates/traefik/0/rancher-compose.yml b/kubernetes-templates/traefik/0/rancher-compose.yml index 898ede7..f7e6bed 100644 --- a/kubernetes-templates/traefik/0/rancher-compose.yml +++ b/kubernetes-templates/traefik/0/rancher-compose.yml @@ -4,6 +4,7 @@ description: | Traefik load balancer. minimum_rancher_version: v0.59.0 + maximum_rancher_version: v1.3.99 maintainer: "German Ramos " uuid: traefik-0 questions: diff --git a/kubernetes-templates/weave-cloud/0/rancher-compose.yml b/kubernetes-templates/weave-cloud/0/rancher-compose.yml index abb620f..1b94efa 100644 --- a/kubernetes-templates/weave-cloud/0/rancher-compose.yml +++ b/kubernetes-templates/weave-cloud/0/rancher-compose.yml @@ -3,6 +3,7 @@ description: | Weave Cloud is a add-on to Kubernetes which provides Continuous Delivery, along with hosted Prometheus Monitoring and a visual dashboard for exploring & debugging microservices version: "latest" + maximum_rancher_version: v1.3.99 questions: - variable: "WEAVE_CLOUD_SERVICE_TOKEN" description: "Service token for your Weave Cloud instance, get one at https://cloud.weave.works" diff --git a/kubernetes-templates/wordpress/0/rancher-compose.yml b/kubernetes-templates/wordpress/0/rancher-compose.yml index 626029e..2052deb 100644 --- a/kubernetes-templates/wordpress/0/rancher-compose.yml +++ b/kubernetes-templates/wordpress/0/rancher-compose.yml @@ -2,6 +2,7 @@ name: "K8s Example Wordpress" version: "1.0.0" description: "" + maximum_rancher_version: v1.3.99 questions: - variable: "WP_PASSWORD" label: "Mysql database password" diff --git a/kubernetes-templates/zookeeper/0/rancher-compose.yml b/kubernetes-templates/zookeeper/0/rancher-compose.yml index ca20b63..56e4103 100644 --- a/kubernetes-templates/zookeeper/0/rancher-compose.yml +++ b/kubernetes-templates/zookeeper/0/rancher-compose.yml @@ -4,6 +4,7 @@ description: | (Experimental) Apache Zookeeper cluster. minimum_rancher_version: v0.59.0 + maximum_rancher_version: v1.3.99 maintainer: "Raul Sanchez " uuid: zk-0 questions: diff --git a/kubernetes-templates/zookeeper/1/rancher-compose.yml b/kubernetes-templates/zookeeper/1/rancher-compose.yml index 5917aca..e8b8d53 100644 --- a/kubernetes-templates/zookeeper/1/rancher-compose.yml +++ b/kubernetes-templates/zookeeper/1/rancher-compose.yml @@ -4,6 +4,7 @@ description: | (Experimental) Apache Zookeeper cluster. minimum_rancher_version: v0.59.0 + maximum_rancher_version: v1.3.99 maintainer: "Raul Sanchez " uuid: zk-0 questions: diff --git a/machine-templates/ecl/0/checksum b/machine-templates/ecl/0/checksum new file mode 100644 index 0000000..45a4f67 --- /dev/null +++ b/machine-templates/ecl/0/checksum @@ -0,0 +1 @@ +ff59f432259784194a296837069154b7 diff --git a/machine-templates/ecl/0/rancher-compose.yml b/machine-templates/ecl/0/rancher-compose.yml new file mode 100644 index 0000000..9ad663b --- /dev/null +++ b/machine-templates/ecl/0/rancher-compose.yml @@ -0,0 +1,3 @@ +.catalog: + name: ecl + version: "v1.0.0" diff --git a/machine-templates/ecl/0/uiUrl b/machine-templates/ecl/0/uiUrl new file mode 100644 index 0000000..130fc85 --- /dev/null +++ b/machine-templates/ecl/0/uiUrl @@ -0,0 +1 @@ +https://mittz.github.io/rancher/uidbinary/v1.0.0/component.js diff --git a/machine-templates/ecl/0/url b/machine-templates/ecl/0/url new file mode 100644 index 0000000..4b851a0 --- /dev/null +++ b/machine-templates/ecl/0/url @@ -0,0 +1 @@ +https://github.com/mittz/docker-machine-driver-ecl/releases/download/v1.0.0/docker-machine-driver-ecl-v1.0.0-linux-amd64.tar.gz diff --git a/machine-templates/ecl/catalogIcon-ecl.svg b/machine-templates/ecl/catalogIcon-ecl.svg new file mode 100644 index 0000000..4bd2cbf --- /dev/null +++ b/machine-templates/ecl/catalogIcon-ecl.svg @@ -0,0 +1,159 @@ + + + + diff --git a/machine-templates/ecl/config.yml b/machine-templates/ecl/config.yml new file mode 100644 index 0000000..330bbbd --- /dev/null +++ b/machine-templates/ecl/config.yml @@ -0,0 +1,2 @@ +name: ecl +version: "v1.0.0" diff --git a/machine-templates/qingcloud/0/checksum b/machine-templates/qingcloud/0/checksum new file mode 100644 index 0000000..56017a0 --- /dev/null +++ b/machine-templates/qingcloud/0/checksum @@ -0,0 +1 @@ +6891ca3791f23264ac3ca6576e856349 diff --git a/machine-templates/qingcloud/0/rancher-compose.yml b/machine-templates/qingcloud/0/rancher-compose.yml new file mode 100644 index 0000000..d11ff45 --- /dev/null +++ b/machine-templates/qingcloud/0/rancher-compose.yml @@ -0,0 +1,3 @@ +.catalog: + name: qingcloud + version: "v1.0.1" diff --git a/machine-templates/qingcloud/0/uiUrl b/machine-templates/qingcloud/0/uiUrl new file mode 100644 index 0000000..cbce490 --- /dev/null +++ b/machine-templates/qingcloud/0/uiUrl @@ -0,0 +1 @@ +http://machine-driver.oss-cn-shanghai.aliyuncs.com/qingcloud/ui/v1.0.1/component.js diff --git a/machine-templates/qingcloud/0/url b/machine-templates/qingcloud/0/url new file mode 100644 index 0000000..5bedbd5 --- /dev/null +++ b/machine-templates/qingcloud/0/url @@ -0,0 +1 @@ +http://machine-driver.oss-cn-shanghai.aliyuncs.com/qingcloud/driver/v1.0.1/docker-machine-driver-qingcloud-linux-amd64.tar.gz diff --git a/machine-templates/qingcloud/catalogIcon-qingcloud.png b/machine-templates/qingcloud/catalogIcon-qingcloud.png new file mode 100644 index 0000000..f6741b1 Binary files /dev/null and b/machine-templates/qingcloud/catalogIcon-qingcloud.png differ diff --git a/machine-templates/qingcloud/config.yml b/machine-templates/qingcloud/config.yml new file mode 100644 index 0000000..5b700af --- /dev/null +++ b/machine-templates/qingcloud/config.yml @@ -0,0 +1,2 @@ +name: qingcloud +version: "v1.0.1" diff --git a/templates/MongoDB/2/docker-compose.yml b/templates/MongoDB/2/docker-compose.yml index 3f991d4..4819aa1 100644 --- a/templates/MongoDB/2/docker-compose.yml +++ b/templates/MongoDB/2/docker-compose.yml @@ -15,6 +15,8 @@ mongo-cluster: volumes_from: - mongo-datavolume - mongo-base + ports: + - 27017:27017/tcp mongo-base: restart: always net: none diff --git a/templates/artifactory-oss/README.md b/templates/artifactory-oss/README.md index 48420e8..bffd58a 100644 --- a/templates/artifactory-oss/README.md +++ b/templates/artifactory-oss/README.md @@ -1,4 +1,5 @@ # Artifactory + Artifactory is a universal Binary Repository Manager for use by build tools (like Maven and Gradle), dependency management tools (like Ivy and NuGet) and build servers (like Jenkins, Hudson, TeamCity and Bamboo). diff --git a/templates/aws-elbv1/1/README.md b/templates/aws-elbv1/1/README.md new file mode 100644 index 0000000..bc7a9c5 --- /dev/null +++ b/templates/aws-elbv1/1/README.md @@ -0,0 +1,15 @@ +AWS ELB Classic External LB Service +========== + +#### About ELB Classic Load Balancers +The [Classic Load Balancer](https://aws.amazon.com/elasticloadbalancing/classicloadbalancer/) option in AWS routes traffic based on application or network level information and is ideal for simple load balancing of traffic across multiple EC2 instances. + +#### About this service +Load balance Rancher services using Elastic Load Balancing. +This service keeps existing ELB Classic load balancers updated with the EC2 instances on which Rancher services that have one or more exposed ports and the label `io.rancher.service.external_lb.endpoint` are running on. + +#### Usage + +1. Deploy this stack +2. Using the AWS Console create a Classic ELB load balancer with one or more listeners and configure it according to your applications requirements. Configure the listener(s) with an instance protocol and port matching that of the Rancher service that you want to forward traffic to. +3. Create or update your service to expose host ports that match the configuration of the ELB listener(s). Add the service label `io.rancher.service.external_lb.endpoint` using as value the name of the ELB load balancer you created. diff --git a/templates/aws-elbv1/1/docker-compose.yml b/templates/aws-elbv1/1/docker-compose.yml new file mode 100644 index 0000000..6af3d03 --- /dev/null +++ b/templates/aws-elbv1/1/docker-compose.yml @@ -0,0 +1,14 @@ +elbv1: + image: rancher/external-lb:v0.3.0 + command: -provider=elbv1 + expose: + - 1000 + environment: + ELBV1_AWS_ACCESS_KEY: ${ELBV1_AWS_ACCESS_KEY} + ELBV1_AWS_SECRET_KEY: ${ELBV1_AWS_SECRET_KEY} + ELBV1_AWS_REGION: ${ELBV1_AWS_REGION} + ELBV1_AWS_VPCID: ${ELBV1_AWS_VPCID} + ELBV1_USE_PRIVATE_IP: ${ELBV1_USE_PRIVATE_IP} + labels: + io.rancher.container.create_agent: "true" + io.rancher.container.agent.role: "external-dns" diff --git a/templates/aws-elbv1/1/rancher-compose.yml b/templates/aws-elbv1/1/rancher-compose.yml new file mode 100644 index 0000000..a654e5b --- /dev/null +++ b/templates/aws-elbv1/1/rancher-compose.yml @@ -0,0 +1,41 @@ +.catalog: + name: ELB Classic Load Balancer + version: "v0.3.0-rancher1" + description: "External LB service powered by AWS Elastic Load Balancing" + minimum_rancher_version: v1.1.0 + questions: + - variable: "ELBV1_AWS_ACCESS_KEY" + label: "AWS Access Key ID" + description: "Access key ID for your AWS account" + type: "string" + required: false + - variable: "ELBV1_AWS_SECRET_KEY" + label: "AWS Secret Access Key" + description: "Secret access key for your AWS account" + type: "string" + required: false + - variable: "ELBV1_AWS_REGION" + label: "AWS Region (Optional)" + description: "The region for load balancers and EC2 instances in this Rancher environment. Defaults to the region of the instance the service will be running on." + type: "string" + required: false + - variable: "ELBV1_AWS_VPCID" + label: "AWS VPC ID (Optional)" + description: "The VPC for the load balancers and EC2 instances in this Rancher environment. Defaults to the VPC of the instance the service will be running on." + type: "string" + required: false + - variable: "ELBV1_USE_PRIVATE_IP" + label: "EC2 Private IP Lookup" + description: "If your EC2 instances are registered in Rancher with their private IP addresses, then this must be set to true." + required: true + type: "boolean" + default: false + +elbv1: + health_check: + port: 1000 + interval: 5000 + unhealthy_threshold: 2 + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 diff --git a/templates/aws-elbv1/config.yml b/templates/aws-elbv1/config.yml index f62d9e3..9aec5d1 100644 --- a/templates/aws-elbv1/config.yml +++ b/templates/aws-elbv1/config.yml @@ -1,5 +1,5 @@ name: ELB Classic Load Balancer description: | External LB service powered by AWS Elastic Load Balancing -version: v0.2.1-rancher1 +version: v0.3.0-rancher1 category: Load Balancing diff --git a/templates/bitbucket/0/docker-compose.yml b/templates/bitbucket/0/docker-compose.yml new file mode 100644 index 0000000..307ba36 --- /dev/null +++ b/templates/bitbucket/0/docker-compose.yml @@ -0,0 +1,24 @@ +version: '2' + +services: + + bitbucket: + image: atlassian/bitbucket-server:5.1 + volumes_from: + - bitbucket-data + ports: + - ${BITBUCKET_PORT}:7990 + labels: + io.rancher.sidekicks: bitbucket-data + io.rancher.container.hostname_override: container_name + + bitbucket-data: + image: atlassian/bitbucket-server:5.1 + entrypoint: + - /bin/true + volumes: + - /var/atlassian/application-data/bitbucket + labels: + io.rancher.container.start_once: 'true' + io.rancher.container.hostname_override: container_name + diff --git a/templates/bitbucket/0/rancher-compose.yml b/templates/bitbucket/0/rancher-compose.yml new file mode 100644 index 0000000..a72ea51 --- /dev/null +++ b/templates/bitbucket/0/rancher-compose.yml @@ -0,0 +1,24 @@ +version: '2' + +catalog: + + name: bitbucket + version: 0.0.1 + description: Git Server + questions: + - variable: BITBUCKET_PORT + label: Port + default: 80 + required: true + type: int + +services: + + bitbucket: + scale: 1 + start_on_create: true + + bitbucket-data: + scale: 1 + start_on_create: true + diff --git a/templates/bitbucket/README.md b/templates/bitbucket/README.md new file mode 100644 index 0000000..d9617f2 --- /dev/null +++ b/templates/bitbucket/README.md @@ -0,0 +1,4 @@ +# Bitbucket + +Read more in the official Bitbucket Docker [Documentation](https://bitbucket.org/atlassian/docker-atlassian-bitbucket-server). + diff --git a/templates/bitbucket/catalogIcon-bitbucket.svg b/templates/bitbucket/catalogIcon-bitbucket.svg new file mode 100644 index 0000000..77536e3 --- /dev/null +++ b/templates/bitbucket/catalogIcon-bitbucket.svg @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/bitbucket/config.yml b/templates/bitbucket/config.yml new file mode 100644 index 0000000..9799142 --- /dev/null +++ b/templates/bitbucket/config.yml @@ -0,0 +1,6 @@ +name: bitbucket +description: Git Server +version: 0.0.1 +category: Versioning +projectURL: https://github.com/ellerbrock/rancher-collection + diff --git a/templates/datadog/5/docker-compose.yml b/templates/datadog/5/docker-compose.yml index 48b7a64..268dac2 100755 --- a/templates/datadog/5/docker-compose.yml +++ b/templates/datadog/5/docker-compose.yml @@ -8,7 +8,7 @@ datadog-init: io.rancher.container.start_once: 'true' io.rancher.container.pull_image: always datadog-agent: - image: datadog/docker-dd-agent:11.0.5110 + image: datadog/docker-dd-agent:11.0.5123 entrypoint: /opt/rancher/entrypoint-wrapper.py command: - supervisord diff --git a/templates/datadog/5/rancher-compose.yml b/templates/datadog/5/rancher-compose.yml index 9dc37b4..c76b77a 100755 --- a/templates/datadog/5/rancher-compose.yml +++ b/templates/datadog/5/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: "Datadog" - version: "1.1.0-11.0.5110" + version: "1.1.0-11.0.5123" description: "Real-time performance tracking and visualization of your container-based application deployment" minimum_rancher_version: v1.2.0 questions: diff --git a/templates/datadog/config.yml b/templates/datadog/config.yml index 79ac921..4e682a4 100755 --- a/templates/datadog/config.yml +++ b/templates/datadog/config.yml @@ -1,7 +1,7 @@ name: Datadog description: | Real-time performance tracking and visualization of your container-based application deployment -version: 1.1.0-11.0.5110 +version: 1.1.0-11.0.5123 category: Monitoring maintainer: "Jan Bruder " license: The MIT License diff --git a/templates/drone/1/rancher-compose.yml b/templates/drone/1/rancher-compose.yml index 6c6c692..bbf3641 100644 --- a/templates/drone/1/rancher-compose.yml +++ b/templates/drone/1/rancher-compose.yml @@ -18,7 +18,7 @@ type: "password" required: true label: "Remote Config" - description: "Must be the full connection string. see http://readme.drone.io/setup/overview/ for more info" + description: "Must be the full connection string. See http://readme.drone.io/admin/ for more info" - variable: "public_port" type: "int" required: true @@ -38,7 +38,7 @@ label: "Database Config" type: "password" required: true - description: "Must be full db string. The hostname for the DB will be 'database'. See http://readme.drone.io/setup/overview/ for more info" + description: "Must be full db string. The hostname for the DB will be 'database'. See http://docs.drone.io/databases.html for more info" - variable: "database_service" type: "service" label: "Database Service" diff --git a/templates/drupal/0/docker-compose.yml b/templates/drupal/0/docker-compose.yml new file mode 100644 index 0000000..4030f32 --- /dev/null +++ b/templates/drupal/0/docker-compose.yml @@ -0,0 +1,15 @@ +version: '2' +services: + web: + image: drupal + ports: + - ${public_port}:80 + depends_on: + - db + db: + image: mysql + environment: + MYSQL_DATABASE: ${database} + MYSQL_ROOT_PASSWORD: ${mysql_root_password} + MYSQL_USER: ${mysql_newusr} + MYSQL_PASSWORD: ${mysql_newusr_password} diff --git a/templates/drupal/0/rancher-compose.yml b/templates/drupal/0/rancher-compose.yml new file mode 100644 index 0000000..12adc41 --- /dev/null +++ b/templates/drupal/0/rancher-compose.yml @@ -0,0 +1,40 @@ +.catalog: + name: "Drupal" + version: "v0.1" + description: "Drupal is an open source CMS powering millions of websites and applications." + uuid: Drupal-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: public_port + description: "public port to access the drupal site" + label: "Public Port" + required: true + default: "80" + type: "int" + + - variable: database + description: "database name" + label: "MYSQL_DATABASE" + required: true + type: "string" + + - variable: mysql_root_password + description: "password for root user" + label: "MYSQL_ROOT_PASSWORD" + required: true + type: "string" + + - variable: mysql_newusr + description: "new user name" + label: "MYSQL_USER" + required: false + type: "string" + + - variable: mysql_newusr_password + description: "new user password" + label: "MYSQL_USER_PASSWORD" + required: false + type: "string" + +drupal: + retain_ip: true diff --git a/templates/drupal/1/docker-compose.yml.tpl b/templates/drupal/1/docker-compose.yml.tpl new file mode 100644 index 0000000..39657db --- /dev/null +++ b/templates/drupal/1/docker-compose.yml.tpl @@ -0,0 +1,59 @@ +version: '2' +services: + drupal: + image: drupal:8.3.5-apache + labels: + io.rancher.container.hostname_override: container_name + links: + - db:db + volumes: + - drupal-modules:/var/www/html/modules + - drupal-profiles:/var/www/html/profiles + - drupal-themes:/var/www/html/themes + - drupal-sites:/var/www/html/sites + restart: always + + drupal-lb: + image: rancher/lb-service-haproxy:v0.6.4 + ports: + - ${PUBLIC_PORT}:${PUBLIC_PORT} + + db: + labels: + io.rancher.container.hostname_override: container_name + {{- if eq .Values.DB_TYPE "postgres"}} + image: postgres:9.6.3-alpine + environment: + POSTGRES_USER: ${DB_USER} + POSTGRES_PASSWORD: ${DB_PASS} + POSTGRES_DB: ${DB_NAME} + {{- end}} + {{- if eq .Values.DB_TYPE "mysql"}} + image: mysql:5.7.18 + environment: + MYSQL_DATABASE: ${DB_NAME} + MYSQL_ROOT_PASSWORD: ${DB_PASS} + MYSQL_USER: ${DB_USER} + MYSQL_PASSWORD: ${DB_PASS} + {{- end}} + volumes: + {{- if eq .Values.DB_TYPE "postgres"}} + - db-data:/var/lib/postgresql + {{- end}} + {{- if eq .Values.DB_TYPE "mysql"}} + - db-data:/var/lib/mysql + {{- end}} + restart: always + +volumes: + drupal-modules: + driver: local + drupal-profiles: + driver: local + drupal-themes: + driver: local + drupal-sites: + driver: local + db-data: + driver: local + diff --git a/templates/drupal/1/rancher-compose.yml b/templates/drupal/1/rancher-compose.yml new file mode 100644 index 0000000..8fb6f3e --- /dev/null +++ b/templates/drupal/1/rancher-compose.yml @@ -0,0 +1,76 @@ +version: '2' +catalog: + name: "Drupal" + version: "8.3.5-rancher1" + description: "Blog tool, publishing platform and CMS" + uuid: Drupal-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "PUBLIC_PORT" + description: "public port to access the drupal site" + label: "Public Port" + required: true + default: "15080" + type: "int" + + - variable: "DB_TYPE" + description: "public port to access the drupal site" + label: "DB type" + required: true + default: "postgres" + type: "enum" + options: + - "mysql" + - "postgres" + + - variable: "DB_NAME" + description: "Database Name to use for the server" + label: "DB Name" + required: true + default: "drupal" + type: "string" + + - variable: "DB_USER" + description: "Database User to use for the server" + label: "DB User" + required: true + default: "drupal" + type: "string" + + - variable: "DB_PASS" + description: "Database Password to use for the server" + label: "DB Password" + required: true + default: "" + type: "password" +services: + drupal: + retain_ip: true + scale: 1 + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 80 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 + drupal-lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - priority: 1 + protocol: http + service: drupal + source_port: ${PUBLIC_PORT} + target_port: 80 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + reinitializing_timeout: 60000 diff --git a/templates/drupal/catalogIcon-drupal.svg b/templates/drupal/catalogIcon-drupal.svg new file mode 100644 index 0000000..c362f21 --- /dev/null +++ b/templates/drupal/catalogIcon-drupal.svg @@ -0,0 +1,967 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/drupal/config.yml b/templates/drupal/config.yml new file mode 100644 index 0000000..0877efe --- /dev/null +++ b/templates/drupal/config.yml @@ -0,0 +1,5 @@ +name: Drupal +description: | + Drupal is an open source CMS powering millions of websites and applications. +version: "8.3.5-rancher1" +category: CMS diff --git a/templates/es-cluster/0/README.md b/templates/es-cluster/0/README.md new file mode 100644 index 0000000..c662188 --- /dev/null +++ b/templates/es-cluster/0/README.md @@ -0,0 +1,5 @@ +# Elasticsearch Cluster + +A scalable Elasticsearch cluster + +WARN: To avoid vm.max_map_count errors you could set "Update host sysctl" to true. Then param vm.max_map_count will be update to 262144 if it's less in your hosts. diff --git a/templates/es-cluster/0/docker-compose.yml.tpl b/templates/es-cluster/0/docker-compose.yml.tpl new file mode 100644 index 0000000..b917a34 --- /dev/null +++ b/templates/es-cluster/0/docker-compose.yml.tpl @@ -0,0 +1,131 @@ +version: '2' +services: + es-master: + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "ES_JAVA_OPTS=-Xms${master_heap_size} -Xmx${master_heap_size}" + - "discovery.zen.ping.unicast.hosts=es-master" + - "discovery.zen.minimum_master_nodes=${minimum_master_nodes}" + - "node.master=true" + - "node.data=false" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${master_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + + es-data: + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "discovery.zen.ping.unicast.hosts=es-master" + - "ES_JAVA_OPTS=-Xms${data_heap_size} -Xmx${data_heap_size}" + - "node.master=false" + - "node.data=true" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${data_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + depends_on: + - es-master + + es-client: + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "discovery.zen.ping.unicast.hosts=es-master" + - "ES_JAVA_OPTS=-Xms${client_heap_size} -Xmx${client_heap_size}" + - "node.master=false" + - "node.data=false" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${client_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + depends_on: + - es-master + + es-storage: + labels: + io.rancher.container.start_once: true + network_mode: none + image: rawmind/alpine-volume:0.0.2-1 + environment: + - SERVICE_UID=1000 + - SERVICE_GID=1000 + - SERVICE_VOLUME=/usr/share/elasticsearch/data + volumes: + - es-storage-volume:/usr/share/elasticsearch/data + + {{- if eq .Values.UPDATE_SYSCTL "true" }} + es-sysctl: + labels: + io.rancher.container.start_once: true + network_mode: none + image: rawmind/alpine-sysctl:0.1 + privileged: true + environment: + - "SYSCTL_KEY=vm.max_map_count" + - "SYSCTL_VALUE=262144" + {{- end}} + +volumes: + es-storage-volume: + driver: local + per_container: true diff --git a/templates/es-cluster/0/rancher-compose.yml b/templates/es-cluster/0/rancher-compose.yml new file mode 100644 index 0000000..e5580a1 --- /dev/null +++ b/templates/es-cluster/0/rancher-compose.yml @@ -0,0 +1,97 @@ +.catalog: + name: Elasticsearch Cluster + version: 5.4.0-rancher1 + description: Scalable Elasticsearch Cluster + + questions: + - variable: "cluster_name" + type: "string" + required: true + label: "Cluster name" + description: "Name of the Elasticsearch Cluster" + default: "es-cluster" + + - variable: "UPDATE_SYSCTL" + label: "Update host sysctl:" + description: | + Set true to avoid vm.max_map_count errors. + WARN: If set true, host param vm.max_map_count will be update to 262144. + default: false + required: true + type: enum + options: + - false + - true + + - variable: "master_heap_size" + type: "string" + required: true + label: "Heap size (master nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "master_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (master nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (master nodes)" + default: 1073741824 + + - variable: "data_heap_size" + type: "string" + required: true + label: "Heap size (data nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "data_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (data nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (data nodes)" + default: 1073741824 + + - variable: "client_heap_size" + type: "string" + required: true + label: "Heap size (client nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "client_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (client nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (client nodes)" + default: 1073741824 + + - variable: "minimum_master_nodes" + type: "int" + required: true + label: "# of minimum Master Nodes" + description: "Set the number of required master nodes to reach quorum. Sets initial scale to this value as well" + default: 3 + + - variable: "initial_data_nodes" + type: "int" + required: true + label: "# of initial data nodes" + description: "Set the initial number of data nodes" + default: 2 + + - variable: "initial_client_nodes" + type: "int" + required: true + label: "# of initial client nodes" + description: "Set the initial number of client nodes" + default: 1 + + +es-master: + scale: ${minimum_master_nodes} + +es-data: + scale: ${initial_data_nodes} + +es-client: + scale: ${initial_client_nodes} diff --git a/templates/es-cluster/1/README.md b/templates/es-cluster/1/README.md new file mode 100644 index 0000000..c662188 --- /dev/null +++ b/templates/es-cluster/1/README.md @@ -0,0 +1,5 @@ +# Elasticsearch Cluster + +A scalable Elasticsearch cluster + +WARN: To avoid vm.max_map_count errors you could set "Update host sysctl" to true. Then param vm.max_map_count will be update to 262144 if it's less in your hosts. diff --git a/templates/es-cluster/1/docker-compose.yml.tpl b/templates/es-cluster/1/docker-compose.yml.tpl new file mode 100644 index 0000000..5aadb0a --- /dev/null +++ b/templates/es-cluster/1/docker-compose.yml.tpl @@ -0,0 +1,131 @@ +version: '2' +services: + es-master: + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.2 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "ES_JAVA_OPTS=-Xms${master_heap_size} -Xmx${master_heap_size}" + - "discovery.zen.ping.unicast.hosts=es-master" + - "discovery.zen.minimum_master_nodes=${minimum_master_nodes}" + - "node.master=true" + - "node.data=false" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${master_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + + es-data: + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.2 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "discovery.zen.ping.unicast.hosts=es-master" + - "ES_JAVA_OPTS=-Xms${data_heap_size} -Xmx${data_heap_size}" + - "node.master=false" + - "node.data=true" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${data_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + depends_on: + - es-master + + es-client: + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.2 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "discovery.zen.ping.unicast.hosts=es-master" + - "ES_JAVA_OPTS=-Xms${client_heap_size} -Xmx${client_heap_size}" + - "node.master=false" + - "node.data=false" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${client_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + depends_on: + - es-master + + es-storage: + labels: + io.rancher.container.start_once: true + network_mode: none + image: rawmind/alpine-volume:0.0.2-1 + environment: + - SERVICE_UID=1000 + - SERVICE_GID=1000 + - SERVICE_VOLUME=/usr/share/elasticsearch/data + volumes: + - es-storage-volume:/usr/share/elasticsearch/data + + {{- if eq .Values.UPDATE_SYSCTL "true" }} + es-sysctl: + labels: + io.rancher.container.start_once: true + network_mode: none + image: rawmind/alpine-sysctl:0.1 + privileged: true + environment: + - "SYSCTL_KEY=vm.max_map_count" + - "SYSCTL_VALUE=262144" + {{- end}} + +volumes: + es-storage-volume: + driver: local + per_container: true diff --git a/templates/es-cluster/1/rancher-compose.yml b/templates/es-cluster/1/rancher-compose.yml new file mode 100644 index 0000000..632407f --- /dev/null +++ b/templates/es-cluster/1/rancher-compose.yml @@ -0,0 +1,97 @@ +.catalog: + name: Elasticsearch Cluster + version: 5.4.2-rancher1 + description: Scalable Elasticsearch Cluster + + questions: + - variable: "cluster_name" + type: "string" + required: true + label: "Cluster name" + description: "Name of the Elasticsearch Cluster" + default: "es-cluster" + + - variable: "UPDATE_SYSCTL" + label: "Update host sysctl:" + description: | + Set true to avoid vm.max_map_count errors. + WARN: If set true, host param vm.max_map_count will be update to 262144. + default: false + required: true + type: enum + options: + - false + - true + + - variable: "master_heap_size" + type: "string" + required: true + label: "Heap size (master nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "master_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (master nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (master nodes)" + default: 1073741824 + + - variable: "data_heap_size" + type: "string" + required: true + label: "Heap size (data nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "data_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (data nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (data nodes)" + default: 1073741824 + + - variable: "client_heap_size" + type: "string" + required: true + label: "Heap size (client nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "client_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (client nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (client nodes)" + default: 1073741824 + + - variable: "minimum_master_nodes" + type: "int" + required: true + label: "# of minimum Master Nodes" + description: "Set the number of required master nodes to reach quorum. Sets initial scale to this value as well" + default: 3 + + - variable: "initial_data_nodes" + type: "int" + required: true + label: "# of initial data nodes" + description: "Set the initial number of data nodes" + default: 2 + + - variable: "initial_client_nodes" + type: "int" + required: true + label: "# of initial client nodes" + description: "Set the initial number of client nodes" + default: 1 + + +es-master: + scale: ${minimum_master_nodes} + +es-data: + scale: ${initial_data_nodes} + +es-client: + scale: ${initial_client_nodes} diff --git a/templates/es-cluster/catalogIcon-elasticsearch.svg b/templates/es-cluster/catalogIcon-elasticsearch.svg new file mode 100644 index 0000000..76ee3cf --- /dev/null +++ b/templates/es-cluster/catalogIcon-elasticsearch.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/es-cluster/config.yml b/templates/es-cluster/config.yml new file mode 100644 index 0000000..8b9077b --- /dev/null +++ b/templates/es-cluster/config.yml @@ -0,0 +1,5 @@ +name: Elasticsearch Cluster 5.4.2 +description: | + Elasticsearch, you know for search! +version: 5.4.2-rancher1 +category: ELK \ No newline at end of file diff --git a/templates/gitlab-multi-runner/0/docker-compose.yml b/templates/gitlab-multi-runner/0/docker-compose.yml new file mode 100644 index 0000000..c331348 --- /dev/null +++ b/templates/gitlab-multi-runner/0/docker-compose.yml @@ -0,0 +1,46 @@ +version: '2' + +services: + + gitlab-runner-config: + image: gitlab/gitlab-runner:alpine-v9.3.0 + stdin_open: true + volumes: + - /etc/gitlab-runner/ + tty: true + command: + - register + - -n + - --url + - ${GITLAB_URL} + - --registration-token + - ${GITLAB_TOKEN} + - --tag-list + - ${GITLAB_TAGS} + - --executor + - docker + - --description + - Rancher Docker Runner + - --docker-image + - docker:latest + - --docker-volumes + - /var/run/docker.sock:/var/run/docker.sock + - --docker-privileged + labels: + io.rancher.container.pull_image: always + io.rancher.container.start_once: 'true' + + gitlab-runner: + image: gitlab/gitlab-runner:alpine-v9.3.0 + stdin_open: true + volumes: + - /var/run/docker.sock:/var/run/docker.sock + tty: true + volumes_from: + - gitlab-runner-config + command: + - run + labels: + io.rancher.sidekicks: gitlab-runner-config + io.rancher.container.pull_image: always + io.rancher.scheduler.global: 'true' diff --git a/templates/gitlab-multi-runner/0/rancher-compose.yml b/templates/gitlab-multi-runner/0/rancher-compose.yml new file mode 100644 index 0000000..ab5c198 --- /dev/null +++ b/templates/gitlab-multi-runner/0/rancher-compose.yml @@ -0,0 +1,37 @@ +version: '2' + +catalog: + name: "gitlab-multi-runner" + version: "9.3.0" + description: "a Gitlab pipelines multi-runner, that will spawn privates runners in your infra." + minimum_rancher_version: v1.5.0 + # maximum_rancher_version: + # upgrade_from: # The previous versions that this template can be upgraded from + questions: + - variable: "GITLAB_URL" + label: "Gitlab Url" + description: "Url to your Gitlab CI endpoint" + type: "string" + default: "https://gitlab.com/ci" + required: true + + - variable: "GITLAB_TOKEN" + label: "Gitlab Token" + description: "Token provided in you project settings" + type: "string" + default: "xxxxxxxxxxxxxxxxxxxx" + required: true + + - variable: "GITLAB_TAGS" + label: "Gitlab Tags" + description: "Tags to apply" + type: "string" + default: "dev" + required: false + +services: + gitlab-runner-config: + scale: 1 + start_on_create: true + gitlab-runner: + start_on_create: true diff --git a/templates/gitlab-multi-runner/catalogIcon-gitlab-multi-runner.png b/templates/gitlab-multi-runner/catalogIcon-gitlab-multi-runner.png new file mode 100644 index 0000000..a629de7 Binary files /dev/null and b/templates/gitlab-multi-runner/catalogIcon-gitlab-multi-runner.png differ diff --git a/templates/gitlab-multi-runner/config.yml b/templates/gitlab-multi-runner/config.yml new file mode 100644 index 0000000..eca0b3c --- /dev/null +++ b/templates/gitlab-multi-runner/config.yml @@ -0,0 +1,5 @@ +name: gitlab-multi-runner +description: | + a Gitlab pipelines multi-runner, that will spawn privates runners in your infra. +version: 9.3.0 +category: Continuous Integration diff --git a/templates/gitlab/0/docker-compose.yml b/templates/gitlab/0/docker-compose.yml index 25e7e81..9422535 100644 --- a/templates/gitlab/0/docker-compose.yml +++ b/templates/gitlab/0/docker-compose.yml @@ -1,27 +1,26 @@ -gitlab-server: - ports: - - ${ssh_port}:22/tcp - - ${http_port}:80/tcp - - ${https_port}:443/tcp - labels: - io.rancher.sidekicks: gitlab-data - hostname: ${gitlab_hostname} - image: gitlab/gitlab-ce:latest - volumes_from: - - gitlab-data - environment: - GITLAB_OMNIBUS_CONFIG: | - external_url '${gitlab_omnipus_prefix}${gitlab_hostname}' - -gitlab-data: - labels: - io.rancher.container.start_once: 'true' - entrypoint: - - /bin/true - hostname: gitdata - image: gitlab/gitlab-ce:latest - volumes: - - /etc/gitlab - - /var/log/gitlab - - /var/opt/gitlab +version: '2' +volumes: + gitlab-app-data: + driver: ${volumedriver} + gitlab-log-data: + driver: ${volumedriver} + gitlab-conf-files: + driver: ${volumedriver} +services: + gitlab-server: + ports: + - ${ssh_port}:22/tcp + - ${http_port}:80/tcp + - ${https_port}:443/tcp + labels: + io.rancher.container.hostname_override: container_name + image: gitlab/gitlab-ce:9.3.3-ce.0 + volumes: + - gitlab-app-data:/var/opt/gitlab + - gitlab-log-data:/var/log/gitlab + - gitlab-conf-files:/etc/gitlab + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url '${gitlab_omnipus_prefix}${gitlab_hostname}' + registry_external_url '${gitlab_omnipus_prefix}${registry_gitlab_hostname}' diff --git a/templates/gitlab/0/rancher-compose.yml b/templates/gitlab/0/rancher-compose.yml index 9147ff9..b382043 100644 --- a/templates/gitlab/0/rancher-compose.yml +++ b/templates/gitlab/0/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: Gitlab Community - version: latest + version: 9.3.3-ce.0 description: | Gitlab CE is a free GitHub alternative minimum_rancher_version: v0.56.0 @@ -13,34 +13,49 @@ required: true default: "git.example.com" type: "string" + - variable: "registry_gitlab_hostname" + description: "Registry Gitlab hostname (without uri scheme http:// or https://)" + label: "Registry hostname:" + required: true + default: "registry.example.com" + type: "string" - variable: "gitlab_omnipus_prefix" label: "Gitlab external_url prefix:" description: | This is needed for the docker-compose file to set the correct external_url - default: 'https://' + default: 'http://' required: true - type: "string" + type: "enum" options: - - 'https://' - 'http://' + - 'https://' - variable: "http_port" description: "HTTP port to expose on host. Will be used to bind TCP" label: "HTTP port:" required: true default: 80 - type: "string" + type: "int" - variable: "https_port" description: "HTTPS port to expose on host. Will be used to bind TCP" label: "HTTPS port:" required: true default: 443 - type: "string" + type: "int" - variable: "ssh_port" description: "SSH port to expose on host. Will be used to bind TCP" label: "SSH port:" required: true default: 22 - type: "string" + type: "int" + - variable: "volumedriver" + description: "Choose the Volume Driver being used.(Option: local or rancher-nfs)" + label: "Volume Driver:" + required: true + default: local + type: "enum" + options: + - local + - rancher-nfs gitlab-server: scale: 1 @@ -52,8 +67,3 @@ gitlab-server: strategy: recreate response_timeout: 2000 healthy_threshold: 2 - -gitlab-data: - scale: 1 - retain_ip: true - diff --git a/templates/gitlab/config.yml b/templates/gitlab/config.yml index 66e2221..a4ad423 100644 --- a/templates/gitlab/config.yml +++ b/templates/gitlab/config.yml @@ -1,5 +1,5 @@ name: Gitlab Community description: | Gitlab CE is a free GitHub alternative -version: latest +version: 9.3.3-ce.0 category: Versioning diff --git a/templates/jenkins-ci/2/docker-compose.yml b/templates/jenkins-ci/2/docker-compose.yml index 33f5de9..edb56fb 100644 --- a/templates/jenkins-ci/2/docker-compose.yml +++ b/templates/jenkins-ci/2/docker-compose.yml @@ -1,5 +1,5 @@ jenkins-primary: - image: "jenkins:2.19.4" + image: "jenkins:2.32.2" ports: - "${PORT}:8080" labels: diff --git a/templates/jenkins-ci/2/rancher-compose.yml b/templates/jenkins-ci/2/rancher-compose.yml index df16cf0..b0feb48 100644 --- a/templates/jenkins-ci/2/rancher-compose.yml +++ b/templates/jenkins-ci/2/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: Jenkins - version: 2.19.4-rancher1 + version: 2.32.2-rancher1 description: | Jenkins CI management server. questions: diff --git a/templates/jenkins-ci/3/docker-compose.yml b/templates/jenkins-ci/3/docker-compose.yml new file mode 100644 index 0000000..0f694e9 --- /dev/null +++ b/templates/jenkins-ci/3/docker-compose.yml @@ -0,0 +1,20 @@ +jenkins-primary: + image: "jenkins:2.60.1" + ports: + - "${PORT}:8080" + labels: + io.rancher.sidekicks: jenkins-plugins,jenkins-datavolume + io.rancher.container.hostname_override: container_name + volumes_from: + - jenkins-plugins + - jenkins-datavolume + entrypoint: /usr/share/jenkins/rancher/jenkins.sh +jenkins-plugins: + image: rancher/jenkins-plugins:v0.1.1 +jenkins-datavolume: + image: "busybox" + volumes: + - ${volume_work}:/var/jenkins_home + labels: + io.rancher.container.start_once: true + entrypoint: ["chown", "-R", "1000:1000", "/var/jenkins_home"] diff --git a/templates/jenkins-ci/3/rancher-compose.yml b/templates/jenkins-ci/3/rancher-compose.yml new file mode 100644 index 0000000..ae6b848 --- /dev/null +++ b/templates/jenkins-ci/3/rancher-compose.yml @@ -0,0 +1,42 @@ +.catalog: + name: Jenkins + version: 2.60.1-rancher1 + description: | + Jenkins CI management server. + questions: + - variable: "PORT" + type: "int" + label: "Port Number" + description: "Which port should Jenkins listen on?" + default: 8080 + required: true + - variable: "volume_work" + description: "Work volume to save jenkins data" + label: "Work volume:" + required: true + default: "/var/lib/docker/jenkins-ci" + type: "string" + - variable: "plugins" + type: "multiline" + label: "List of Plugins" + description: | + List of plugins in the format [:] + one entry per line. + default: | + credentials + git + git-client + github + github-api + github-oauth + greenballs + junit + plain-credentials + scm-api + ssh-credentials + ssh-slaves + swarm +jenkins-primary: + metadata: + plugins: | + ${plugins} diff --git a/templates/jenkins-ci/config.yml b/templates/jenkins-ci/config.yml index d840a03..42c8ad3 100644 --- a/templates/jenkins-ci/config.yml +++ b/templates/jenkins-ci/config.yml @@ -1,5 +1,5 @@ name: Jenkins description: | Jenkins CI server (LTS) -version: 2.19.4-rancher1 +version: 2.60.1-rancher1 category: Continuous Integration diff --git a/templates/logmatic/0/docker-compose.yml b/templates/logmatic/0/docker-compose.yml index a950fc0..ed6c6f1 100755 --- a/templates/logmatic/0/docker-compose.yml +++ b/templates/logmatic/0/docker-compose.yml @@ -1,6 +1,6 @@ logmatic-agent: image: logmatic/logmatic-docker - entrypoint: /usr/src/app/index.js + entrypoint: python /app/main.py command: ${logmatic_key} ${opts_args} restart: always volumes: diff --git a/templates/meanshop/0/docker-compose.yml b/templates/meanshop/0/docker-compose.yml new file mode 100644 index 0000000..eaa28c7 --- /dev/null +++ b/templates/meanshop/0/docker-compose.yml @@ -0,0 +1,39 @@ +version: '2' +services: + meanshop-nginx: + image: ohmydocker/meanshop:nginx + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.pull_image: always + ports: + - ${PORT}:80 + meanshop-node: + image: ohmydocker/meanshop:alpine + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.pull_image: always + environment: + MEANGO_DEBUG: ${debug} + PORT: 9000 + MONGODB_DB_URL: "mongodb://meango/meanshop" + meango: + restart: always + environment: + MONGO_SERVICE_NAME: meango + CATTLE_SCRIPT_DEBUG: ${debug} + tty: true + image: mongo:3.2 + labels: + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: meango-datavolume + io.rancher.container.pull_image: always + volumes_from: + - meango-datavolume + meango-datavolume: + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: true + volumes: + - /data/db + entrypoint: /bin/true + image: busybox diff --git a/templates/meanshop/0/rancher-compose.yml b/templates/meanshop/0/rancher-compose.yml new file mode 100644 index 0000000..c2b7463 --- /dev/null +++ b/templates/meanshop/0/rancher-compose.yml @@ -0,0 +1,41 @@ +.catalog: + name: "meanshop" + version: "0.4.9" + description: "Ecommerce powered by Meanshop" + uuid: meanshop-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "MEANSHOP_HOST" + description: "Hostname to use for the MEANSHOP server" + label: "MEANSHOP Hostname" + required: true + default: "meanshop" + type: "string" + - variable: "MEANSHOP_DOMAIN" + description: "Domain to use for the MEANSHOP server" + label: "MEANSHOP Domain" + required: true + default: "example.com" + type: "string" + - variable: "PORT" + description: "Port to use for the MEANSHOP server" + label: "MEANSHOP Port" + required: true + default: "8080" + type: "int" + +meanshop-nginx: + scale: 1 + retain_ip: true + +meanshop-node: + scale: 1 + retain_ip: true + +meango: + scale: 1 + retain_ip: true + metadata: + mongo: + yml: + replset.name: "${replset_name}" diff --git a/templates/meanshop/README.md b/templates/meanshop/README.md new file mode 100644 index 0000000..7891a46 --- /dev/null +++ b/templates/meanshop/README.md @@ -0,0 +1,13 @@ +#[MeanShop](http://meanshop.com/) + +Is a project by [Adrian Mejia](http://adrianmejia.com/) +which he describes as an: +"E-commerce Application built with the MEAN stack". +Visit it's [github page here.](https://github.com/amejiarosario/meanshop/) +Where Adrian maintains a set of links where you can purchase his book. + +This is a rancher template that should enable you to quickly test it on +your rancher setup. + +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/meanshop/catalogIcon-meanshop.png b/templates/meanshop/catalogIcon-meanshop.png new file mode 100644 index 0000000..df19cd4 Binary files /dev/null and b/templates/meanshop/catalogIcon-meanshop.png differ diff --git a/templates/meanshop/config.yml b/templates/meanshop/config.yml new file mode 100644 index 0000000..8e4d48b --- /dev/null +++ b/templates/meanshop/config.yml @@ -0,0 +1,5 @@ +name: Meanshop +description: | + Ecommerce powered by Meanshop +version: 0.4.9 +category: Repository diff --git a/templates/minio/0/README.md b/templates/minio/0/README.md index 60d6094..e8de9af 100644 --- a/templates/minio/0/README.md +++ b/templates/minio/0/README.md @@ -21,9 +21,9 @@ Minio can now be accessed over the Rancher network on port `9000` (http://IP_CON You can set many disks per nodes (max of 4). If you use local disk (no extra Docker driver), you need to mount them on the same `base path` and indicate this name on `Volume Driver / Path` section. Moreover, you need to use the same disk name with a number as suffix (from 0 to 4) and report this on `Disk base name` section. -For exemple, if you should to use 4 disks per nodes: +For example, if you should to use 4 disks per nodes: - Number of disks per node: 4 -- Volume drver / Path: /data/minio +- Volume driver / Path: /data/minio - Disk base name: disk And you have to mount the following partition: diff --git a/templates/minio/0/docker-compose.yml.tpl b/templates/minio/0/docker-compose.yml.tpl index a567ca6..7bce3f8 100644 --- a/templates/minio/0/docker-compose.yml.tpl +++ b/templates/minio/0/docker-compose.yml.tpl @@ -5,9 +5,9 @@ services: image: webcenter/alpine-minio:2017-03-16_4 volumes: - minio-scheduler-setting:/opt/scheduler - {{- if contains .Values.VOLUME_DRIVER "/" }} + {{- if eq (printf "%.1s" .Values.VOLUME_DRIVER) "/" }} {{- range $idx, $e := atoi .Values.MINIO_DISKS | until }} - - {{.Values.VOLUME_DRIVER}}/{{.Values.DISK_BASE_NAME}}{{$idx}}:/data/disk{{$idx}} + - ${VOLUME_DRIVER}/${DISK_BASE_NAME}{{$idx}}:/data/disk{{$idx}} {{- end}} {{- else}} {{- range $idx, $e := atoi .Values.MINIO_DISKS | until }} @@ -61,10 +61,10 @@ volumes: minio-scheduler-setting: driver: local per_container: true - {{- if not (contains .Values.VOLUME_DRIVER "/")}} + {{- if ne (printf "%.1s" .Values.VOLUME_DRIVER) "/" }} {{- range $idx, $e := atoi .Values.MINIO_DISKS | until }} minio-data-{{$idx}}: per_container: true driver: ${VOLUME_DRIVER} {{- end}} - {{- end}} + {{- end}} \ No newline at end of file diff --git a/templates/minio/0/rancher-compose.yml b/templates/minio/0/rancher-compose.yml index e571ea1..8363018 100644 --- a/templates/minio/0/rancher-compose.yml +++ b/templates/minio/0/rancher-compose.yml @@ -2,7 +2,6 @@ version: '2' catalog: name: Minio version: 2017-03-16-rancher1 - minimum_rancher_version: v1.5.0 questions: - variable: "MINIO_SCALE" description: "Number of minio nodes." @@ -111,4 +110,4 @@ services: healthy_threshold: 2 port: 42 unhealthy_threshold: 3 - interval: 2000 + interval: 2000 \ No newline at end of file diff --git a/templates/neuvector/0/README.md b/templates/neuvector/0/README.md index cbbba90..b001029 100644 --- a/templates/neuvector/0/README.md +++ b/templates/neuvector/0/README.md @@ -2,9 +2,9 @@ ### Info: -NeuVector provides continuous network security for application containers. +NeuVector provides continuous network security for application containers. Deploy the NeuVector containers to get network visibility, application layer segmentation, Docker Bench auditing, and run-time vulnerability scanning. -Deploy the NeuVector containers to protect running containers from violations, threats, and vulnerabilities. NeuVector also detects host and container privilege escalations / break outs. +NeuVector also detects host and container privilege escalations / break outs and application threats such as DDoS and DNS attacks. NeuVector can be deployed on greenfield or brownfield (already running) application environments. diff --git a/templates/neuvector/0/docker-compose.yml b/templates/neuvector/0/docker-compose.yml index d7b8a22..bee18e6 100644 --- a/templates/neuvector/0/docker-compose.yml +++ b/templates/neuvector/0/docker-compose.yml @@ -1,5 +1,5 @@ allinone: - image: neuvector/allinone:1.1.0 + image: neuvector/allinone:rancher1.2 container_name: neuvector.allinone restart: always privileged: true @@ -9,6 +9,7 @@ allinone: ports: - 8443:8443 volumes: + - /var/neuvector:/var/neuvector - /var/run/docker.sock:/var/run/docker.sock - /proc:/host/proc:ro - /sys/fs/cgroup:/host/cgroup:ro @@ -17,7 +18,7 @@ allinone: io.rancher.scheduler.affinity:host_label: ${NV_ALLINONE_LABEL} io.rancher.container.hostname_override: container_name enforcer: - image: neuvector/enforcer:1.1.0 + image: neuvector/enforcer:rancher1.2 container_name: neuvector.enforcer restart: always privileged: true @@ -25,6 +26,7 @@ enforcer: - affinity:com.myself.name!=neuvector - CLUSTER_JOIN_ADDR=allinone volumes: + - /var/neuvector:/var/neuvector - /var/run/docker.sock:/var/run/docker.sock - /proc:/host/proc:ro - /sys/fs/cgroup/:/host/cgroup/:ro diff --git a/templates/neuvector/0/rancher-compose.yml b/templates/neuvector/0/rancher-compose.yml index db518b2..336660d 100644 --- a/templates/neuvector/0/rancher-compose.yml +++ b/templates/neuvector/0/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: "NeuVector" - version: "v1.1.0" + version: "rancher1.2" description: "Container Security Solution" questions: - variable: "NV_ALLINONE_LABEL" diff --git a/templates/neuvector/config.yml b/templates/neuvector/config.yml index 020c8b8..a3bcc64 100644 --- a/templates/neuvector/config.yml +++ b/templates/neuvector/config.yml @@ -1,6 +1,6 @@ name: NeuVector description: | - Container Application Security -version: v1.1.0 + Container Security Solution +version: rancher1.2 category: Security maintainer: neuvector support diff --git a/templates/nextcloud/0/docker-compose.yml b/templates/nextcloud/0/docker-compose.yml new file mode 100644 index 0000000..2dfb5ac --- /dev/null +++ b/templates/nextcloud/0/docker-compose.yml @@ -0,0 +1,48 @@ +version: '2' + +services: + + nextcloud: + image: nextcloud:12-apache + volumes_from: + - nextcloud-data + ports: + - ${NEXTCLOUD_PORT}:80 + depends_on: + - mariadb + labels: + io.rancher.sidekicks: nextcloud-data + io.rancher.container.hostname_override: container_name + + nextcloud-data: + image: nextcloud:12-apache + entrypoint: + - /bin/true + volumes: + - /var/www/html + labels: + io.rancher.container.start_once: 'true' + io.rancher.container.hostname_override: container_name + + mariadb: + image: mariadb:10 + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASS} + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASS} + labels: + io.rancher.sidekicks: mariadb-data + io.rancher.container.hostname_override: container_name + + mariadb-data: + image: mariadb:10 + entrypoint: + - /bin/true + volumes: + - /var/lib/mysql + tty: true + labels: + io.rancher.container.start_once: 'true' + io.rancher.container.hostname_override: container_name + diff --git a/templates/nextcloud/0/rancher-compose.yml b/templates/nextcloud/0/rancher-compose.yml new file mode 100644 index 0000000..804707c --- /dev/null +++ b/templates/nextcloud/0/rancher-compose.yml @@ -0,0 +1,50 @@ +version: '2' + +catalog: + + name: nextcloud + version: 0.0.1 + description: Nextcloud - Enterprise File Sync and Share + questions: + - variable: NEXTCLOUD_PORT + label: Port + default: 80 + required: true + type: int + - variable: MYSQL_ROOT_PASS + label: MySQL root password + required: true + type: password + - variable: MYSQL_DATABASE + default: nextcloud + label: MySQL Database + required: true + type: string + - variable: MYSQL_USER + default: nextcloud + label: MySQL User + required: true + type: string + - variable: MYSQL_PASS + label: MySQL Pass + required: true + type: password + +services: + + nextcloud: + scale: 1 + start_on_create: true + + nextcloud-data: + scale: 1 + start_on_create: true + + mariadb: + scale: 1 + start_on_create: true + + mariadb-data: + scale: 1 + start_on_create: true + diff --git a/templates/nextcloud/README.md b/templates/nextcloud/README.md new file mode 100644 index 0000000..6581bd8 --- /dev/null +++ b/templates/nextcloud/README.md @@ -0,0 +1,22 @@ +# NextCloud + +Enterprise File Sync and Share + +## Configuration + +When you start Nextcloud for the first time you will see the [Installation Wizard](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html). + +1.) Point your Web browser to your Nextcloud Installation and enter your [Username / Password](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html#quick-start). + +2.) We persist the [Data Directory Location](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html#data-directory-location) from `/var/www/html/data` to a Sidekick Container. *(If you don't change the location there is nothing else to do. In case you want to use another directory you have to update the volumes entry for the `nextcloud-data` service in `docker-compose.yml`.)* + +3.) The last step is to update the [Database Settings](https://docs.nextcloud.com/server/12/admin_manual/installation/installation_wizard.html#database-choice) and switch from SQLite to MariaDB for better performance. + +- Database: `YOUR-DATABASE` (default: `nextcloud`) +- MySQL Username: `YOUR-USER` (default: `nextcloud`) +- MySQL Password: `YOUR-PASSWORD` +- MySQL Hostname: `mariadb` (**Important:** Use `mariadb` instead of `localhost`) + +Read more in the official [Nextcloud Documentation](https://docs.nextcloud.com/). + + diff --git a/templates/nextcloud/catalogIcon-nextcloud.svg b/templates/nextcloud/catalogIcon-nextcloud.svg new file mode 100644 index 0000000..628c953 --- /dev/null +++ b/templates/nextcloud/catalogIcon-nextcloud.svg @@ -0,0 +1,103 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/templates/nextcloud/config.yml b/templates/nextcloud/config.yml new file mode 100644 index 0000000..28f63b8 --- /dev/null +++ b/templates/nextcloud/config.yml @@ -0,0 +1,6 @@ +name: nextcloud +description: Enterprise File Sync and Share +version: 0.0.1 +category: File Synchronisation +projectURL: https://github.com/ellerbrock/rancher-collection + diff --git a/templates/openproject/0/docker-compose.yml b/templates/openproject/0/docker-compose.yml new file mode 100644 index 0000000..77b78c2 --- /dev/null +++ b/templates/openproject/0/docker-compose.yml @@ -0,0 +1,26 @@ +version: '2' + +services: + + openproject: + image: openproject/community:7 + volumes_from: + - openproject-data + ports: + - ${OPENPROJECT_PORT}:80 + labels: + io.rancher.sidekicks: openproject-data + io.rancher.container.hostname_override: container_name + + openproject-data: + image: openproject/community:7 + entrypoint: + - /bin/true + volumes: + - /var/lib/postgresql/9.4/main + - /var/log/supervisor + - /var/db/openproject + labels: + io.rancher.container.start_once: 'true' + io.rancher.container.hostname_override: container_name + diff --git a/templates/openproject/0/rancher-compose.yml b/templates/openproject/0/rancher-compose.yml new file mode 100644 index 0000000..aa6fa23 --- /dev/null +++ b/templates/openproject/0/rancher-compose.yml @@ -0,0 +1,24 @@ +version: '2' + +catalog: + + name: openproject + version: 0.0.1 + description: Project planning and scheduling + questions: + - variable: OPENPROJECT_PORT + label: Port + default: 80 + required: true + type: int + +services: + + openproject: + scale: 1 + start_on_create: true + + openproject-data: + scale: 1 + start_on_create: true + diff --git a/templates/openproject/README.md b/templates/openproject/README.md new file mode 100644 index 0000000..9a608e7 --- /dev/null +++ b/templates/openproject/README.md @@ -0,0 +1,6 @@ +# OpenProject + +Login via Username: `admin` and Password `admin`. + +Read more in the official OpenProject [Documentation](https://www.openproject.org/help/). + diff --git a/templates/openproject/catalogIcon-openproject.png b/templates/openproject/catalogIcon-openproject.png new file mode 100644 index 0000000..680ea77 Binary files /dev/null and b/templates/openproject/catalogIcon-openproject.png differ diff --git a/templates/openproject/config.yml b/templates/openproject/config.yml new file mode 100644 index 0000000..baa3695 --- /dev/null +++ b/templates/openproject/config.yml @@ -0,0 +1,6 @@ +name: openproject +description: Project planning and scheduling +version: 0.0.1 +category: Agile +projectURL: https://github.com/ellerbrock/rancher-collection + diff --git a/templates/postgres/0/docker-compose.yml b/templates/postgres/0/docker-compose.yml index 24e8dfa..89ff0da 100644 --- a/templates/postgres/0/docker-compose.yml +++ b/templates/postgres/0/docker-compose.yml @@ -1,11 +1,9 @@ version: '2' services: postgres-lb: - image: rancher/load-balancer-service - links: - - postgres + image: rancher/lb-service-haproxy ports: - - ${lb_port}:5432 + - ${lb_port} postgres-data: image: busybox diff --git a/templates/project-harbor/0/README.md b/templates/project-harbor/0/README.md new file mode 100644 index 0000000..05fd42f --- /dev/null +++ b/templates/project-harbor/0/README.md @@ -0,0 +1,14 @@ +##Harbor 0.5.0 deployment: single-host (revision 0) + +This version deploys `Harbor` 0.5.0 on a single host of a Cattle cluster. + +The host is identified, by default, by the `harbor-host=true` label (can be changed at deployment time to point to another key). + +Note that: +- the `IP/Hostname/FQDN` parameter needs to be set to the exact same name you will use to access the registry (e.g. IP or FQDN of the host) +- the host needs to have port `80` and port `443` free for use (the Harbor proxy container will bind to those ports) +- this catalog entry only supports `http` (`https` access is not supported) +- because only `http` is supported, the Docker Host pulling/pushing from/to Harbor needs to have the `--insecure-registry` flag properly configured +- if you want to re-provision Harbor on the same Docker host and you want to use different inputs (e.g. a different password) you need to remove the `/data` directory on the host. If you fail to do so the new Harbor instance will use the same parameters entered in the previous deployment (saved in the `/data` directory) + +![](singlehost.png) diff --git a/templates/project-harbor/0/docker-compose.yml b/templates/project-harbor/0/docker-compose.yml new file mode 100644 index 0000000..91ba36c --- /dev/null +++ b/templates/project-harbor/0/docker-compose.yml @@ -0,0 +1,168 @@ +version: '2' +services: + harbor-setupwrapper: + image: mreferre/harbor-setupwrapper:0.5.0 + container_name: harbor-setupwrapper + environment: + - HARBORHOSTNAME=${harborhostname} + - HARBOR_ADMIN_PASSWORD=${harbor_admin_password} + volumes: + - /etc/registry + - /etc/ui + - /etc/jobservice + - /etc/nginx + - /configdb + - /configui + - /configjobservice + command: ["/harbor/harbor-setupwrapper.sh"] + network_mode: "none" + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: 'true' + io.rancher.sidekicks: registry, ui, jobservice, mysql, proxy + log: + image: vmware/harbor-log:0.5.0 + container_name: harbor-log + restart: always + volumes: + - /var/log/harbor:/var/log/docker/ + ports: + - 1514:514 + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + registry: + image: library/registry:2.5.0 + container_name: registry + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/registry:/storage + volumes_from: + - harbor-setupwrapper + environment: + - GODEBUG=netdns=cgo + command: + ["serve", "/etc/registry/config.yml"] + depends_on: + - log + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "registry" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + mysql: + image: vmware/harbor-db:0.5.0 + container_name: harbor-db + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/database:/var/lib/mysql + volumes_from: + - harbor-setupwrapper + depends_on: + - log + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "mysql" + entrypoint: + - /bin/sh + - -c + command: + - /configdb/entrypointdb.sh + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + ui: + image: vmware/harbor-ui:0.5.0 + container_name: harbor-ui + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data:/harbor_storage + volumes_from: + - harbor-setupwrapper + depends_on: + - log + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "ui" + entrypoint: + - /bin/sh + - -c + command: + - /configui/entrypointui.sh + external_links: + - registry + - mysql + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + jobservice: + image: vmware/harbor-jobservice:0.5.0 + container_name: harbor-jobservice + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/job_logs:/var/log/jobs + volumes_from: + - harbor-setupwrapper + depends_on: + - log + #external_links: + # - registry + # - ui + # - mysql + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "jobservice" + entrypoint: + - /bin/sh + - -c + command: + - /configjobservice/entrypointjobservice.sh + #external_links: + # - registry + # - ui + # - mysql + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + proxy: + image: nginx:1.11.5 + container_name: nginx + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes_from: + - harbor-setupwrapper + ports: + - 80:80 + - 443:443 + depends_on: + - log + #external_links: + # - registry + # - ui + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "proxy" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} diff --git a/templates/project-harbor/0/rancher-compose.yml b/templates/project-harbor/0/rancher-compose.yml new file mode 100644 index 0000000..5d970d1 --- /dev/null +++ b/templates/project-harbor/0/rancher-compose.yml @@ -0,0 +1,48 @@ +version: '2' +.catalog: + name: Harbor + version: 0.5.0-rev0-singlehost + description: | + Enterprise Class Container Registry by VMware + minimum_rancher_version: v0.59.0 + uuid: harbor-0 + questions: + - variable: "harborhostname" + description: "Harbor IP, HOSTNAME or FQDN as used to acces it from the Docker CLI" + label: "IP/Hostname/FQDN:" + required: true + default: myregistry + type: "string" + - variable: "harbor_admin_password" + label: "Harbor password:" + description: | + Harbor admin password + default: Vmware123! + required: true + type: "string" + - variable: "harborhostlabel" + label: "Harbor will be deployed on the host with this label (default: harbor-host=true)" + description: | + Harbor host label + default: harbor-host=true + required: true + type: "string" +services: + registry: + scale: 1 + start_on_create: false + proxy: + scale: 1 + start_on_create: false + jobservice: + scale: 1 + start_on_create: false + ui: + scale: 1 + start_on_create: false + mysql: + scale: 1 + start_on_create: false + harbor-setupwrapper: + scale: 1 + start_on_create: true diff --git a/templates/project-harbor/0/singlehost.png b/templates/project-harbor/0/singlehost.png new file mode 100644 index 0000000..d743fa8 Binary files /dev/null and b/templates/project-harbor/0/singlehost.png differ diff --git a/templates/project-harbor/1/README.md b/templates/project-harbor/1/README.md new file mode 100644 index 0000000..10f1cee --- /dev/null +++ b/templates/project-harbor/1/README.md @@ -0,0 +1,18 @@ +##Harbor 0.5.0 deployment: distributed (revision 0) + +This version deploys `Harbor` 0.5.0 on a Cattle cluster. + +All hosts have to have the `harbor-log=true` label (the log container needs to be deployed on all of them). + +Also, `Traefik` needs to be enabled on one of the host and a proper DNS configuration needs to be in place. + +Last but not least a storage service for named volumes needs to be available (this catalog entry has been tested with `rancher-nfs` which needs to be activated separately and prior to launch the distributed Harbor deployment). + +Note that: +- the `IP/Hostname/FQDN` can be arbitrary set but the `(Traefik) domain` parameter needs to be a domain name that resolves to the host where `Traefik` is running +- this catalog entry only supports `http` (`https` access is not supported) +- because only `http` is supported, the Docker Host pulling/pushing from/to Harbor needs to have the `--insecure-registry` flag properly configured +- while the Rancher UI may show that stack upgrades are available, upgrades are not supported at this point +- sometimes the proxy front-end fails to configure properly (due to a race condition) and it shows the "welcome to NGINX" page. If it happens, try to re-deploy the restart the `proxy` container + +![](distributed.png) diff --git a/templates/project-harbor/1/distributed.png b/templates/project-harbor/1/distributed.png new file mode 100644 index 0000000..48ff707 Binary files /dev/null and b/templates/project-harbor/1/distributed.png differ diff --git a/templates/project-harbor/1/docker-compose.yml b/templates/project-harbor/1/docker-compose.yml new file mode 100644 index 0000000..51de591 --- /dev/null +++ b/templates/project-harbor/1/docker-compose.yml @@ -0,0 +1,210 @@ +version: '2' +volumes: #most volumes mappings require optimization (now all volumes map all containers) + etcjobservice: + #external: true + driver: ${volumedriver} + etcnginx: + #external: true + driver: ${volumedriver} + etcregistry: + #external: true + driver: ${volumedriver} + etcui: + #external: true + driver: ${volumedriver} + configjobservice: + #external: true + driver: ${volumedriver} + configdb: + #external: true + driver: ${volumedriver} + configui: + #external: true + driver: ${volumedriver} + data: #according to the eng team this is not even needed (but leaving it in for consistency) + #external: true + driver: ${volumedriver} + data-registry: + #external: true + driver: ${volumedriver} + data-database: + #external: true + driver: ${volumedriver} + data-job_logs: + #external: true + driver: ${volumedriver} +services: + harbor-setupwrapper: + image: mreferre/harbor-setupwrapper:0.5.0 + container_name: harbor-setupwrapper + environment: + - HARBORHOSTNAME=${harborhostname}.${traefikdomain} + - HARBOR_ADMIN_PASSWORD=${harbor_admin_password} + volumes: + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + command: ["/harbor/harbor-setupwrapper.sh"] + network_mode: "none" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: 'true' + log: + image: vmware/harbor-log:0.5.0 + container_name: harbor-log + restart: always + volumes: + - /var/log/harbor/:/var/log/docker/ + ports: + - 1514:514 + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label: harbor-log=true + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + registry: + image: library/registry:2.5.0 + container_name: registry + restart: always + volumes: + - data-registry:/storage + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + environment: + - GODEBUG=netdns=cgo + command: + ["serve", "/etc/registry/config.yml"] + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "registry" + labels: + io.rancher.container.hostname_override: container_name + mysql: + image: vmware/harbor-db:0.5.0 + container_name: harbor-db + restart: always + volumes: + - data-database:/var/lib/mysql + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "mysql" + entrypoint: + - /bin/sh + - -c + command: + - /configdb/entrypointdb.sh + labels: + io.rancher.container.hostname_override: container_name + ui: + image: vmware/harbor-ui:0.5.0 + container_name: harbor-ui + restart: always + volumes: + - data:/harbor_storage #according to the eng team this is not even needed (but leaving it in for consistency) + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "ui" + entrypoint: + - /bin/sh + - -c + command: + - /configui/entrypointui.sh + labels: + io.rancher.container.hostname_override: container_name + jobservice: + image: vmware/harbor-jobservice:0.5.0 + container_name: harbor-jobservice + restart: always + volumes: + - data-job_logs:/var/log/jobs + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "jobservice" + entrypoint: + - /bin/sh + - -c + command: + - /configjobservice/entrypointjobservice.sh + labels: + io.rancher.container.hostname_override: container_name + proxy: + image: nginx:1.11.5 + container_name: nginx + restart: always + volumes: + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + depends_on: + - log + - harbor-setupwrapper + external_links: #these entries seem to be required for the proxy service to start correctly + - registry + - ui + - mysql + - jobservice + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "proxy" + labels: + io.rancher.container.hostname_override: container_name + traefik.alias: ${harborhostname} + traefik.port: 80 + traefik.domain: ${traefikdomain} + traefik.enable: stack diff --git a/templates/project-harbor/1/rancher-compose.yml b/templates/project-harbor/1/rancher-compose.yml new file mode 100644 index 0000000..8eeb432 --- /dev/null +++ b/templates/project-harbor/1/rancher-compose.yml @@ -0,0 +1,56 @@ +version: '2' +.catalog: + name: Harbor + version: 0.5.0-rev0-distributed + description: | + Enterprise Class Container Registry by VMware + minimum_rancher_version: v0.59.0 + uuid: harbor-0 + questions: + - variable: "harborhostname" + description: "Harbor IP, HOSTNAME or FQDN as used to acces it from the Docker CLI" + label: "IP/Hostname/FQDN:" + required: true + default: myregistry + type: "string" + - variable: "harbor_admin_password" + label: "Harbor password:" + description: | + Harbor admin password + default: Vmware123! + required: true + type: "string" + - variable: "traefikdomain" + description: "Harbor domain name (if you are using Traefik you should call out the domain here and the harbor host name should just represent the hostname)" + label: "(Traefik) domain:" + required: true + default: mycompany.com + type: "string" + - variable: "volumedriver" + description: "Volume Driver being used (default: rancher-nfs)" + label: "Volume Driver:" + required: true + default: rancher-nfs + type: "string" +services: + registry: + scale: 1 + proxy: + scale: 1 + health_check: + healthy_threshold: 2 + response_timeout: 2000 + port: 80 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + strategy: recreate + request_line: + jobservice: + scale: 1 + ui: + scale: 1 + mysql: + scale: 1 + harbor-setupwrapper: + scale: 1 diff --git a/templates/project-harbor/2/README.md b/templates/project-harbor/2/README.md new file mode 100644 index 0000000..4cf3e71 --- /dev/null +++ b/templates/project-harbor/2/README.md @@ -0,0 +1,15 @@ +##Harbor 1.1.1 deployment: single-host (revision 0) + +This version deploys `Harbor` 1.1.1 on a single host of a Cattle cluster. + +The host is identified, by default, by the `harbor-host=true` label (can be changed at deployment time to point to another key). + +Note that: +- the `IP/Hostname/FQDN` parameter needs to be set to the exact same name you will use to access the registry (e.g. IP or FQDN of the host) +- the host needs to have port `80` and port `443` free for use (the Harbor proxy container will bind to those ports) +- this catalog entry only supports `http` (`https` access is not supported) +- because only `http` is supported, the Docker Host pulling/pushing from/to Harbor needs to have the `--insecure-registry` flag properly configured +- if you want to re-provision Harbor on the same Docker host and you want to use different inputs (e.g. a different password) you need to remove the `/data` directory on the host. If you fail to do so the new Harbor instance will use the same parameters entered in the previous deployment (saved in the `/data` directory) +- While the Rancher UI may show that stack upgrades are available, upgrades are not supported at this point + +![](singlehost.png) diff --git a/templates/project-harbor/2/docker-compose.yml b/templates/project-harbor/2/docker-compose.yml new file mode 100644 index 0000000..119f776 --- /dev/null +++ b/templates/project-harbor/2/docker-compose.yml @@ -0,0 +1,207 @@ +version: '2' +services: + harbor-setupwrapper: + image: mreferre/harbor-setupwrapper:1.1.1-1 + container_name: harbor-setupwrapper + environment: + - HARBORHOSTNAME=${harborhostname} + - HARBOR_ADMIN_PASSWORD=${harbor_admin_password} + volumes: + - /data:/data + - /etc/registry + - /etc/ui + - /etc/jobservice + - /etc/nginx + - /configdb + - /configui + - /configjobservice + - /configadminserver + command: ["/harbor/harbor-setupwrapper.sh"] + network_mode: "none" + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: 'true' + io.rancher.sidekicks: registry, ui, jobservice, mysql, proxy, adminserver + log: + image: vmware/harbor-log:v1.1.1 + container_name: harbor-log + restart: always + volumes: + - /var/log/harbor:/var/log/docker/:z + ports: + - 1514:514 + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + registry: + image: vmware/registry:photon-2.6.0 + container_name: registry + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/registry:/storage:z + volumes_from: + - harbor-setupwrapper + environment: + - GODEBUG=netdns=cgo + command: + ["serve", "/etc/registry/config.yml"] + depends_on: + - log + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "registry" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + mysql: + image: vmware/harbor-db:v1.1.1 + container_name: harbor-db + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/database:/var/lib/mysql:z + volumes_from: + - harbor-setupwrapper + depends_on: + - log + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "mysql" + entrypoint: + - /bin/sh + - -c + command: + - /configdb/entrypointdb.sh + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + adminserver: + image: vmware/harbor-adminserver:v1.1.1 + container_name: harbor-adminserver + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/config/:/etc/adminserver/config/:z +# - /data/secretkey:/etc/adminserver/key:z +# - /data/:/data/:z + volumes_from: + - harbor-setupwrapper + depends_on: + - log + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "adminserver" + entrypoint: + - /bin/sh + - -c + command: + - /configadminserver/entrypointadminserver.sh + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + ui: + image: vmware/harbor-ui:v1.1.1 + container_name: harbor-ui + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes +# - /data/secretkey:/etc/ui/key:z + - /data/ca_download/:/etc/ui/ca/:z + volumes_from: + - harbor-setupwrapper + depends_on: + - log + - adminserver + - registry + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "ui" + entrypoint: + - /bin/sh + - -c + command: + - /configui/entrypointui.sh + external_links: + - registry + - mysql + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + jobservice: + image: vmware/harbor-jobservice:v1.1.1 + container_name: harbor-jobservice + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes: #original directory mapping has been moved to named volumes + - /data/job_logs:/var/log/jobs:z +# - /data/secretkey:/etc/jobservice/key:z + volumes_from: + - harbor-setupwrapper + depends_on: + - log + - ui + - adminserver + #external_links: + # - registry + # - ui + # - mysql + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "jobservice" + entrypoint: + - /bin/sh + - -c + command: + - /configjobservice/entrypointjobservice.sh + #external_links: + # - registry + # - ui + # - mysql + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + proxy: + image: vmware/nginx:1.11.5-patched + container_name: nginx + restart: always + dns_search: #https://forums.rancher.com/t/cant-resolve-simple-container-names-within-sidekick-structure/3876 + - harbor-setupwrapper + volumes_from: + - harbor-setupwrapper + ports: + - 80:80 + - 443:443 + - 4443:4443 + depends_on: + - mysql + - registry + - ui + - log + #external_links: + # - registry + # - ui + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "proxy" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} diff --git a/templates/project-harbor/2/rancher-compose.yml b/templates/project-harbor/2/rancher-compose.yml new file mode 100644 index 0000000..b92e9b1 --- /dev/null +++ b/templates/project-harbor/2/rancher-compose.yml @@ -0,0 +1,51 @@ +version: '2' +.catalog: + name: Harbor + version: 1.1.1-rev0-singlehost + description: | + Enterprise Class Container Registry [by VMware] + minimum_rancher_version: v0.59.0 + uuid: harbor-2 + questions: + - variable: "harborhostname" + description: "Harbor IP, HOSTNAME or FQDN as used to acces it from the Docker CLI" + label: "IP/Hostname/FQDN:" + required: true + default: myregistry + type: "string" + - variable: "harbor_admin_password" + label: "Harbor password:" + description: | + Harbor admin password + default: Vmware123! + required: true + type: "string" + - variable: "harborhostlabel" + label: "Harbor will be deployed on the host with this label (default: harbor-host=true)" + description: | + Harbor host label + default: harbor-host=true + required: true + type: "string" +services: + registry: + scale: 1 + start_on_create: false + adminserver: + scale: 1 + start_on_create: false + proxy: + scale: 1 + start_on_create: false + jobservice: + scale: 1 + start_on_create: false + ui: + scale: 1 + start_on_create: false + mysql: + scale: 1 + start_on_create: false + harbor-setupwrapper: + scale: 1 + start_on_create: true diff --git a/templates/project-harbor/2/singlehost.png b/templates/project-harbor/2/singlehost.png new file mode 100644 index 0000000..d743fa8 Binary files /dev/null and b/templates/project-harbor/2/singlehost.png differ diff --git a/templates/project-harbor/3/README.md b/templates/project-harbor/3/README.md new file mode 100644 index 0000000..6a1a80a --- /dev/null +++ b/templates/project-harbor/3/README.md @@ -0,0 +1,18 @@ +##Harbor 1.1.1 deployment: distributed (revision 0) + +This version deploys `Harbor` 1.1.1 on a Cattle cluster. + +All hosts have to have the `harbor-log=true` label (the log container needs to be deployed on all of them). + +Also, `Traefik` needs to be enabled on one of the host and a proper DNS configuration needs to be in place. + +Last but not least a storage service for named volumes needs to be available (this catalog entry has been tested with `rancher-nfs` which needs to be activated separately and prior to launch the distributed Harbor deployment). + +Note that: +- the `IP/Hostname/FQDN` can be arbitrary set but the `(Traefik) domain` parameter needs to be a domain name that resolves to the host where `Traefik` is running +- this catalog entry only supports `http` (`https` access is not supported) +- because only `http` is supported, the Docker Host pulling/pushing from/to Harbor needs to have the `--insecure-registry` flag properly configured +- while the Rancher UI may show that stack upgrades are available, upgrades are not supported at this point +- sometimes the proxy front-end fails to configure properly (due to a race condition) and it shows the "welcome to NGINX" page. If it happens, try to re-deploy the restart the `proxy` container + +![](distributed.png) diff --git a/templates/project-harbor/3/distributed.png b/templates/project-harbor/3/distributed.png new file mode 100644 index 0000000..48ff707 Binary files /dev/null and b/templates/project-harbor/3/distributed.png differ diff --git a/templates/project-harbor/3/docker-compose.yml b/templates/project-harbor/3/docker-compose.yml new file mode 100644 index 0000000..d8e681b --- /dev/null +++ b/templates/project-harbor/3/docker-compose.yml @@ -0,0 +1,290 @@ +version: '2' +volumes: #most volumes mappings require optimization (now all volumes map all containers) + etcjobservice: + #external: true + driver: ${volumedriver} + etcnginx: + #external: true + driver: ${volumedriver} + etcregistry: + #external: true + driver: ${volumedriver} + etcui: + #external: true + driver: ${volumedriver} + configjobservice: + #external: true + driver: ${volumedriver} + configdb: + #external: true + driver: ${volumedriver} + configui: + #external: true + driver: ${volumedriver} + configadminserver: + #external: true + driver: ${volumedriver} + data: #according to the eng team this is not even needed (but leaving it in for consistency) + #external: true + driver: ${volumedriver} + data-registry: + #external: true + driver: ${volumedriver} + data-database: + #external: true + driver: ${volumedriver} + data-job_logs: + #external: true + driver: ${volumedriver} + data-ca_download: + #external: true + driver: ${volumedriver} + data-config: + #external: true + driver: ${volumedriver} +services: + harbor-setupwrapper: + image: mreferre/harbor-setupwrapper:1.1.1-1 + container_name: harbor-setupwrapper + environment: + - HARBORHOSTNAME=${harborhostname}.${traefikdomain} + - HARBOR_ADMIN_PASSWORD=${harbor_admin_password} + volumes: + - data:/data + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + command: ["/harbor/harbor-setupwrapper.sh"] + network_mode: "none" + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: 'true' + log: + image: vmware/harbor-log:v1.1.1 + container_name: harbor-log + restart: always + volumes: + - /var/log/harbor/:/var/log/docker/:z + ports: + - 1514:514 + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label: harbor-log=true + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + registry: + image: vmware/registry:photon-2.6.0 + container_name: registry + restart: always + volumes: + - data-registry:/storage + - data:/data + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + environment: + - GODEBUG=netdns=cgo + command: + ["serve", "/etc/registry/config.yml"] + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "registry" + labels: + io.rancher.container.hostname_override: container_name + mysql: + image: vmware/harbor-db:v1.1.1 + container_name: harbor-db + restart: always + volumes: + - data-database:/var/lib/mysql + - data:/data:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "mysql" + entrypoint: + - /bin/sh + - -c + command: + - /configdb/entrypointdb.sh + labels: + io.rancher.container.hostname_override: container_name + adminserver: + image: vmware/harbor-adminserver:v1.1.1 + container_name: harbor-adminserver + restart: always + volumes: +# - /data/secretkey:/etc/adminserver/key + - data-database:/var/lib/mysql + - data:/data/:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "adminserver" + entrypoint: + - /bin/sh + - -c + command: + - /configadminserver/entrypointadminserver.sh + labels: + io.rancher.container.hostname_override: container_name + ui: + image: vmware/harbor-ui:v1.1.1 + container_name: harbor-ui + restart: always + volumes: +# - /data/secretkey:/etc/ui/key:z +# - data:/harbor_storage #according to the eng team this is not even needed (but leaving it in for consistency) + - data:/data/:z + - data-database:/var/lib/mysql + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + - adminserver + - registry + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "ui" + entrypoint: + - /bin/sh + - -c + command: + - /configui/entrypointui.sh + labels: + io.rancher.container.hostname_override: container_name + jobservice: + image: vmware/harbor-jobservice:v1.1.1 + container_name: harbor-jobservice + restart: always + volumes: +# - /data/secretkey:/etc/jobservice/key:z + - data:/data/:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + - ui + - adminserver + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "jobservice" + entrypoint: + - /bin/sh + - -c + command: + - /configjobservice/entrypointjobservice.sh + labels: + io.rancher.container.hostname_override: container_name + proxy: + image: vmware/nginx:1.11.5-patched + container_name: nginx + restart: always + volumes: + - data-database:/var/lib/mysql + - data:/data/:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - mysql + - registry + - ui + - log + - harbor-setupwrapper + external_links: #these entries seem to be required for the proxy service to start correctly + - registry + - ui + - mysql + - jobservice + - adminserver + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "proxy" + labels: + io.rancher.container.hostname_override: container_name + traefik.alias: ${harborhostname} + traefik.port: 80 + traefik.domain: ${traefikdomain} + traefik.enable: stack diff --git a/templates/project-harbor/3/rancher-compose.yml b/templates/project-harbor/3/rancher-compose.yml new file mode 100644 index 0000000..1226102 --- /dev/null +++ b/templates/project-harbor/3/rancher-compose.yml @@ -0,0 +1,58 @@ +version: '2' +.catalog: + name: Harbor + version: 1.1.1-rev0-distributed + description: | + Enterprise Class Container Registry [by VMware] + minimum_rancher_version: v0.59.0 + uuid: harbor-3 + questions: + - variable: "harborhostname" + description: "Harbor IP, HOSTNAME or FQDN as used to acces it from the Docker CLI" + label: "IP/Hostname/FQDN:" + required: true + default: myregistry + type: "string" + - variable: "harbor_admin_password" + label: "Harbor password:" + description: | + Harbor admin password + default: Vmware123! + required: true + type: "string" + - variable: "traefikdomain" + description: "Harbor domain name (if you are using Traefik you should call out the domain here and the harbor host name should just represent the hostname)" + label: "(Traefik) domain:" + required: true + default: mycompany.com + type: "string" + - variable: "volumedriver" + description: "Volume Driver being used (default: rancher-nfs)" + label: "Volume Driver:" + required: true + default: rancher-nfs + type: "string" +services: + registry: + scale: 1 + adminserver: + scale: 1 + proxy: + scale: 1 + health_check: + healthy_threshold: 2 + response_timeout: 2000 + port: 80 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + strategy: recreate + request_line: + jobservice: + scale: 1 + ui: + scale: 1 + mysql: + scale: 1 + harbor-setupwrapper: + scale: 1 diff --git a/templates/project-harbor/4/README.md b/templates/project-harbor/4/README.md new file mode 100644 index 0000000..dd4c5c3 --- /dev/null +++ b/templates/project-harbor/4/README.md @@ -0,0 +1,44 @@ +### Harbor 1.1.1 deployment (revision 1) ### + +This catalog item version deploys `Harbor` 1.1.1 on a Cattle cluster and leverages [Harbor setup wrapper](https://hub.docker.com/r/mreferre/harbor-setupwrapper/tags/) version 1.1.1-1. + +This catalog item version supports both a basic (i.e. standalone) as well as advanced (i.e. distributed) deployment model for Harbor. + +The basic model has less pre-requisites but it's less powerful. The advanced model has more pre-requisites but it's more powerful. + +#### Governing the deployment model #### + +You govern the deployment model being used by setting the `harbor-host` label: +- if you set the label on one host, you opt in for the basic model. +- if you set the label on two or more hosts, you opt in for the advanced model. + +#### Storage pre-requisites #### + +If you opt in for the basic model there is no storage prerequisite and you can use the `local` volume driver. All volumes will be created locally and transparently on the host with the `harbor-host` label. + +If you opt in for the advanced model you have to configure a volume driver that supports sharing among containers (this catalog entry has been tested with `rancher-nfs` which needs to be activated separately and prior to launch the advanced deployment model). + +You can use a volume driver that supports sharing among containers when deploying with the basic model but it is not required. + +#### Network pre-requisites #### + +The network pre-requisites as described in this section apply to both the basic and advanced deployment models. + +> **Note:** the Harbor name you choose at deployment time must be the exact same end-point (IP, FQDN, etc) that you are going to use with your Docker client to `login` into Harbor, `pull` and `push` images from and to Harbor. This has ramification on how you configure access to the Harbor service. + +In this implementation, access to Harbor is fullfilled by a Rancher load balancer that forwards the host port 80 to port 80 of the Harbor proxy container. The Rancher load balancer is deployed on all hosts that have the `harbor-lb-host` label. + +The simplest way to configure the deployment is to set the `harbor-lb-host` label on a single host and use the IP address (or FQDN) of that host in the Harbor `IP/Hostname/FQDN` field. This IP (or FQDN) is what you will use to consume Harbor. + +A more sophisticated way to configure the deployment is to set the `harbor-lb-host` label on multiple hosts and have an external component (e.g. DNS with RR, or external LB) that can send requests to multiple hosts. In this case the Harbor `IP/Hostname/FQDN` field will need to be filled with the FQDN as provided by the DNS or by the external LB (virtual IP). This DNS name (or virtual IP) is what you will use to consume Harbor. + +In general, the only real prerequisite is that the `IP/Hostname/FQDN` field at deployment time maps exactly what the user will be using as an endpoint when interacting with the Harbor service. You should have a certain degree of flexibility to configure your deployment as long as you fullfill this requirement. + +#### Additional considerations and known issues #### + +- this catalog entry only supports `http` (`https` access is not supported) +- because only `http` is supported, the Docker Host pulling/pushing from/to Harbor needs to have the `--insecure-registry` flag properly configured +- the host(s) with the `harbor-lb-host` label need to have port `80` free for use (different port forwarding configurations hasn't been tested) +- while the Rancher UI may show that stack upgrades are available, upgrades are not supported at this point +- sometimes the proxy front-end fails to configure properly (due to a race condition) and it shows the "welcome to NGINX" page. If it happens, try to re-deploy the restart the `proxy` container +- every Harbor deployment will create a certain number of volumes. Note that these volumes may not always be properly deleted on the NFS share or on the local Docker host due to bug and/or limitations in the driver(s). It is suggested to keep an eye on volumes sprawl. \ No newline at end of file diff --git a/templates/project-harbor/4/docker-compose.yml b/templates/project-harbor/4/docker-compose.yml new file mode 100644 index 0000000..1e3667b --- /dev/null +++ b/templates/project-harbor/4/docker-compose.yml @@ -0,0 +1,299 @@ +version: '2' +volumes: #most volumes mappings require optimization (now all volumes map all containers) + etcjobservice: + #external: true + driver: ${volumedriver} + etcnginx: + #external: true + driver: ${volumedriver} + etcregistry: + #external: true + driver: ${volumedriver} + etcui: + #external: true + driver: ${volumedriver} + configjobservice: + #external: true + driver: ${volumedriver} + configdb: + #external: true + driver: ${volumedriver} + configui: + #external: true + driver: ${volumedriver} + configadminserver: + #external: true + driver: ${volumedriver} + data: #according to the eng team this is not even needed (but leaving it in for consistency) + #external: true + driver: ${volumedriver} + data-registry: + #external: true + driver: ${volumedriver} + data-database: + #external: true + driver: ${volumedriver} + data-job_logs: + #external: true + driver: ${volumedriver} + data-ca_download: + #external: true + driver: ${volumedriver} + data-config: + #external: true + driver: ${volumedriver} +services: + harbor-setupwrapper: + image: mreferre/harbor-setupwrapper:1.1.1-1 + container_name: harbor-setupwrapper + environment: + - HARBORHOSTNAME=${harborhostname}.${traefikdomain} + - HARBOR_ADMIN_PASSWORD=${harbor_admin_password} + volumes: + - data:/data + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + command: ["/harbor/harbor-setupwrapper.sh"] + network_mode: "none" + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: 'true' + log: + image: vmware/harbor-log:v1.1.1 + container_name: harbor-log + restart: always + volumes: + - /var/log/harbor/:/var/log/docker/:z + ports: + - 1514:514 + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + registry: + image: vmware/registry:photon-2.6.0 + container_name: registry + restart: always + volumes: + - data-registry:/storage + - data:/data + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + environment: + - GODEBUG=netdns=cgo + command: + ["serve", "/etc/registry/config.yml"] + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "registry" + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + mysql: + image: vmware/harbor-db:v1.1.1 + container_name: harbor-db + restart: always + volumes: + - data-database:/var/lib/mysql + - data:/data:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "mysql" + entrypoint: + - /bin/sh + - -c + command: + - /configdb/entrypointdb.sh + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + adminserver: + image: vmware/harbor-adminserver:v1.1.1 + container_name: harbor-adminserver + restart: always + volumes: +# - /data/secretkey:/etc/adminserver/key + - data-database:/var/lib/mysql + - data:/data/:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "adminserver" + entrypoint: + - /bin/sh + - -c + command: + - /configadminserver/entrypointadminserver.sh + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + ui: + image: vmware/harbor-ui:v1.1.1 + container_name: harbor-ui + restart: always + volumes: + - data:/data/:z + - data-database:/var/lib/mysql + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + - adminserver + - registry + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "ui" + entrypoint: + - /bin/sh + - -c + command: + - /configui/entrypointui.sh + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + jobservice: + image: vmware/harbor-jobservice:v1.1.1 + container_name: harbor-jobservice + restart: always + volumes: +# - /data/secretkey:/etc/jobservice/key:z + - data:/data/:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - log + - harbor-setupwrapper + - ui + - adminserver + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "jobservice" + entrypoint: + - /bin/sh + - -c + command: + - /configjobservice/entrypointjobservice.sh + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + proxy: + image: vmware/nginx:1.11.5-patched + container_name: nginx + restart: always + volumes: + - data-database:/var/lib/mysql + - data:/data/:z + - data-job_logs:/var/log/jobs + - data-ca_download:/etc/ui/ca/ + - data-config:/etc/adminserver/config/ + - etcui:/etc/ui + - etcjobservice:/etc/jobservice + - etcregistry:/etc/registry + - etcnginx:/etc/nginx + - configdb:/configdb + - configui:/configui + - configjobservice:/configjobservice + - configadminserver:/configadminserver + depends_on: + - mysql + - registry + - ui + - log + - harbor-setupwrapper + external_links: #these entries seem to be required for the proxy service to start correctly + - registry + - ui + - mysql + - jobservice + - adminserver + logging: + driver: "syslog" + options: + syslog-address: "tcp://127.0.0.1:1514" + tag: "proxy" + labels: + io.rancher.scheduler.affinity:host_label: ${harborhostlabel} + io.rancher.container.hostname_override: container_name + harbor-lb: + image: rancher/lb-service-haproxy + ports: + - 80 + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label: ${harborlbhostlabel} + io.rancher.container.hostname_override: container_name diff --git a/templates/project-harbor/4/rancher-compose.yml b/templates/project-harbor/4/rancher-compose.yml new file mode 100644 index 0000000..afcd473 --- /dev/null +++ b/templates/project-harbor/4/rancher-compose.yml @@ -0,0 +1,75 @@ +version: '2' +.catalog: + name: Harbor + version: 1.1.1-1-rev1 + description: | + Enterprise Class Container Registry [by VMware] + minimum_rancher_version: v0.59.0 + uuid: harbor-4 + questions: + - variable: "harborhostname" + description: "Harbor IP, HOSTNAME or FQDN as used to acces it from the Docker CLI" + label: "IP/Hostname/FQDN:" + required: true + default: myregistry + type: "string" + - variable: "harbor_admin_password" + label: "Harbor password:" + description: | + Harbor admin password + default: Vmware123! + required: true + type: "string" + - variable: "harborhostlabel" + label: "Harbor will be deployed on the host(s) with this label (default: harbor-host=true)" + description: | + The various Harbor containers will be deployed on host(s) with this label + Set the label on one host if you want Harbor to be deployed on a single host (rancher-nfs volume driver is required for multiple hosts) + default: harbor-host=true + required: true + type: "string" + - variable: "harborlbhostlabel" + label: "Rancher load balancer will be deployed on the host(s) with this label (default: harbor-lb-host=true)" + description: | + The Rancher load balancer will be deployed on host(s) with this label + Make sure you understand the pre-requisite as outlined in the README document above + default: harbor-lb-host=true + required: true + type: "string" + - variable: "volumedriver" + description: "Volume Driver being used. Set rancher-nfs if you run in distributed mode" + label: "Volume Driver:" + required: true + default: local + type: "enum" + options: + - local + - rancher-nfs +services: + registry: + scale: 1 + adminserver: + scale: 1 + proxy: + scale: 1 + harbor-lb: + scale: 1 + lb_config: + port_rules: + - source_port: 80 + target_port: 80 + service: proxy + health_check: + port: 42 + interval: 2000 + unhealthy_threshold: 3 + healthy_threshold: 2 + response_timeout: 2000 + jobservice: + scale: 1 + ui: + scale: 1 + mysql: + scale: 1 + harbor-setupwrapper: + scale: 1 diff --git a/templates/project-harbor/catalogIcon-vmwareharbor.svg b/templates/project-harbor/catalogIcon-vmwareharbor.svg new file mode 100644 index 0000000..805eede --- /dev/null +++ b/templates/project-harbor/catalogIcon-vmwareharbor.svg @@ -0,0 +1,270 @@ + +image/svg+xml \ No newline at end of file diff --git a/templates/project-harbor/config.yml b/templates/project-harbor/config.yml new file mode 100644 index 0000000..33859d4 --- /dev/null +++ b/templates/project-harbor/config.yml @@ -0,0 +1,7 @@ +name: Project Harbor +description: | + (Experimental) Enterprise Class Container Registry [by VMware] +version: 1.1.1-1-rev1 +category: Private Container Registry +projectURL: https://github.com/vmware/harbor +license: Apache License 2.0 diff --git a/templates/rancher-backup/0/docker-compose.yml b/templates/rancher-backup/0/docker-compose.yml deleted file mode 100644 index b22a784..0000000 --- a/templates/rancher-backup/0/docker-compose.yml +++ /dev/null @@ -1,45 +0,0 @@ -backup: - environment: - CRON_SCHEDULE: ${CRON_SCHEDULE} - BACKEND: ${BACKEND} - TARGET_PATH: ${TARGET_PATH} - BK_FULL_FREQ: ${BK_FULL_FREQ} - BK_KEEP_FULL: ${BK_KEEP_FULL} - BK_KEEP_FULL_CHAIN: ${BK_KEEP_FULL_CHAIN} - VOLUME_SIZE: ${VOLUME_SIZE} - DEBUG: false - DISABLE_DUMP : ${DISABLE_DUMP} - DISABLE_DUMP_RANCHER: ${DISABLE_DUMP_RANCHER} - FTP_PASSWORD: ${FTP_PASSWORD} - AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} - AZURE_ACCOUNT_NAME: ${AZURE_ACCOUNT_NAME} - AZURE_ACCOUNT_KEY: ${AZURE_ACCOUNT_KEY} - CLOUDFILES_USERNAME: ${CLOUDFILES_USERNAME} - CLOUDFILES_APIKEY: ${CLOUDFILES_APIKEY} - DPBX_ACCESS_TOKEN: ${DPBX_ACCESS_TOKEN} - GS_ACCESS_KEY_ID: ${GS_ACCESS_KEY_ID} - GS_SECRET_ACCESS_KEY: ${GS_SECRET_ACCESS_KEY} - GOOGLE_DRIVE_ACCOUNT_KEY: ${GOOGLE_DRIVE_ACCOUNT_KEY} - SWIFT_USERNAME: ${SWIFT_USERNAME} - SWIFT_PASSWORD: ${SWIFT_PASSWORD} - SWIFT_AUTHURL: ${SWIFT_AUTHURL} - labels: - io.rancher.sidekicks: backup-data - io.rancher.container.create_agent: true - io.rancher.container.agent.role: environment - tty: true - image: webcenter/rancher-backup:1.0.2 - stdin_open: false - privileged: true - volumes_from: - - backup-data - -backup-data: - labels: - io.rancher.container.start_once: 'true' - image: alpine - volumes: - - /backup - net: none - command: /bin/true diff --git a/templates/rancher-backup/0/docker-compose.yml.tpl b/templates/rancher-backup/0/docker-compose.yml.tpl new file mode 100644 index 0000000..155e64c --- /dev/null +++ b/templates/rancher-backup/0/docker-compose.yml.tpl @@ -0,0 +1,71 @@ +version: '2' +services: + backup: + environment: + - BACKUP_CRON_schedule=${CRON_SCHEDULE} + - BACKUP_DUPLICITY_url=${BACKEND} + - BACKUP_DUPLICITY_target-path=${TARGET_PATH} + - BACKUP_DUPLICITY_source-path=/backup + - BACKUP_DUPLICITY_full-if-older-than=${BK_FULL_FREQ} + - BACKUP_DUPLICITY_remove-all-but-n-full=${BK_KEEP_FULL} + - BACKUP_DUPLICITY_remove-all-inc-of-but-n-full=${BK_KEEP_FULL_CHAIN} + - BACKUP_DUPLICITY_volsize=${VOLUME_SIZE} + - BACKUP_DUPLICITY_options=${DUPLICITY_OPTIONS} + - DEBUG=false + - BACKUP_MODULE_database=${ENABLE_DUMP_SERVICE} + - BACKUP_MODULE_stack=${ENABLE_DUMP_STACK} + - BACKUP_MODULE_rancher-db=${ENABLE_DUMP_RANCHER_DATABASE} + - BACKUP_RANCHER_db_host=${RANCHER_DATABASE_HOST} + - BACKUP_RANCHER_db_port=${RANCHER_DATABASE_PORT} + - BACKUP_RANCHER_db_user=${RANCHER_DATABASE_USER} + - BACKUP_RANCHER_db_password=${RANCHER_DATABASE_PASSWORD} + - BACKUP_RANCHER_db_name=${RANCHER_DATABASE_NAME} + - DOCKER_HOST=docker-engine:2375 + - FTP_PASSWORD=${FTP_PASSWORD} + - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} + - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} + - AZURE_ACCOUNT_NAME=${AZURE_ACCOUNT_NAME} + - AZURE_ACCOUNT_KEY=${AZURE_ACCOUNT_KEY} + - CLOUDFILES_USERNAME=${CLOUDFILES_USERNAME} + - CLOUDFILES_APIKEY=${CLOUDFILES_APIKEY} + - DPBX_ACCESS_TOKEN=${DPBX_ACCESS_TOKEN} + - GS_ACCESS_KEY_ID=${GS_ACCESS_KEY_ID} + - GS_SECRET_ACCESS_KEY=${GS_SECRET_ACCESS_KEY} + - GOOGLE_DRIVE_ACCOUNT_KEY=${GOOGLE_DRIVE_ACCOUNT_KEY} + - SWIFT_USERNAME=${SWIFT_USERNAME} + - SWIFT_PASSWORD=${SWIFT_PASSWORD} + - SWIFT_AUTHURL=${SWIFT_AUTHURL} + - CONFD_BACKEND=${CONFD_BACKEND} + - CONFD_NODES=${CONFD_NODES} + - CONFD_PREFIX_KEY=${CONFD_PREFIX} + labels: + io.rancher.sidekicks: docker-engine + io.rancher.container.create_agent: true + io.rancher.container.agent.role: environment + tty: true + image: webcenter/rancher-backup:2.0.0-2 + stdin_open: false + volumes: + {{- if (contains .Values.VOLUME_DRIVER "/")}} + - ${VOLUME_DRIVER}:/data + {{- else}} + - backup-data:/data + {{- end}} + docker-engine: + privileged: true + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + image: index.docker.io/docker:1.13-dind + volumes: + {{- if (contains .Values.VOLUME_DRIVER "/")}} + - ${VOLUME_DRIVER}:/data + {{- else}} + - backup-data:/backup + {{- end}} + +{{- if not (contains .Values.VOLUME_DRIVER "/")}} +volumes: + backup-data: + driver: local +{{- end}} diff --git a/templates/rancher-backup/0/rancher-compose.yml b/templates/rancher-backup/0/rancher-compose.yml index 67998e9..8a1feb4 100644 --- a/templates/rancher-backup/0/rancher-compose.yml +++ b/templates/rancher-backup/0/rancher-compose.yml @@ -1,124 +1,190 @@ -.catalog: +version: '2' +catalog: name: "Rancher Backup" - version: "1.0.2" + version: "2.0.0" description: "It's a general purpose to solve backup matter on Rancher" - uuid: rancher-backup-1.0.2 - minimum_rancher_version: v0.56.0 + minimum_rancher_version: v1.5.0 questions: - - variable: CRON_SCHEDULE + - variable: "CRON_SCHEDULE" description: "The schedule with the Go cron syntaxe (per default, each day)" label: "Schedule" type: "string" required: true default: "0 0 0 * * *" - - variable: BACKEND + - variable: "BACKEND" description: "The duplicity backend for remote backup" label: "Backend" type: "string" required: true - - variable: TARGET_PATH - description: "The path on target backup (default, /backup)" + - variable: "TARGET_PATH" + description: "The path on target backup" label: "Target path on backend" type: "string" required: true - default: "/backup" - - variable: BK_FULL_FREQ + default: "/" + - variable: "BK_FULL_FREQ" description: "The backup full frequency (per defaut, each 7 days)" label: "Backup full frequency" type: "string" required: true default: "7D" - - variable: BK_KEEP_FULL + - variable: "BK_KEEP_FULL" description: "How many keep full backup (per default, keep 3s)" label: "Backup full retention" type: "string" required: true default: "5" - - variable: BK_KEEP_FULL_CHAIN + - variable: "BK_KEEP_FULL_CHAIN" description: "How many keep incremental backup chain (per default, keep 1)" label: "Backup incremental retention" type: "string" required: true default: "1" - - variable: VOLUME_SIZE - description: "The volume size in MB (per default, 25)" + - variable: "VOLUME_SIZE" + description: "The volume size in MB" label: "Volume size" type: "string" required: true - default: "25" - - variable: DISABLE_DUMP + default: "200" + - variable: "DUPLICITY_OPTIONS" + description: "Pass options when invoke Duplicity command backup" + label: "Duplicity options" + type: "string" + required: false + - variable: "ENABLE_DUMP_SERVICE" description: "If disabled, it's doesn't perform dump before save data" - label: "Disable dump" + label: "Enable dump service" type: "string" required: true - default: "false" + default: "true" type: "enum" options: - "false" - "true" - - variable: DISABLE_DUMP_RANCHER + - variable: "ENABLE_DUMP_STACK" description: "If disabled, it's doesn't perform the backup of stack definition" - label: "Disable Rancher dump" + label: "Enable Rancher dump stack" type: "string" required: true - default: "false" + default: "true" type: "enum" options: - "false" - "true" - - variable: FTP_PASSWORD + - variable: "ENABLE_DUMP_RANCHER_DATABASE" + description: "If disabled, it's doesn't perform the dump of Rancher database" + label: "Enable Rancher database dump" + type: "string" + required: true + default: "true" + type: "enum" + options: + - "false" + - "true" + - variable: "VOLUME_DRIVER" + description: "Docker driver to store volume of local dump" + label: "Volume drver / Path" + type: "string" + required: true + default: "local" + - variable: "RANCHER_DATABASE_HOST" + description: "The rancher database host" + label: "Rancher DB host" + type: "string" + required: false + - variable: "RANCHER_DATABASE_PORT" + description: "The rancher database port" + label: "Rancher DB port" + type: "string" + required: false + default: "3306" + - variable: "RANCHER_DATABASE_NAME" + description: "The rancher database name" + label: "Rancher DB name" + type: "string" + required: false + default: "rancher" + - variable: "RANCHER_DATABASE_USER" + description: "The rancher database user" + label: "Rancher DB user" + type: "string" + required: false + default: "rancher" + - variable: "RANCHER_DATABASE_PASSWORD" + description: "The rancher database password" + label: "Rancher DB password" + type: "password" + required: false + - variable: "CONFD_BACKEND" + description: "The confd backend to grab config" + label: "Confd backend" + required: true + default: "env" + type: "string" + - variable: "CONFD_NODES" + description: "The confd nodes" + label: "Confd nodes" + required: false + type: "string" + - variable: "CONFD_PREFIX" + description: "The confd prefix" + label: "Confd prefix" + required: true + default: "/backup" + type: "string" + - variable: "FTP_PASSWORD" label: "FTP password" type: "password" required: false - - variable: AWS_ACCESS_KEY_ID + - variable: "AWS_ACCESS_KEY_ID" label: "AWS access key" type: "string" required: false - - variable: AWS_SECRET_ACCESS_KEY + - variable: "AWS_SECRET_ACCESS_KEY" label: "AWS secret key" type: "password" required: false - - variable: AZURE_ACCOUNT_NAME + - variable: "AZURE_ACCOUNT_NAME" label: "Azure account name" type: "string" required: false - - variable: AZURE_ACCOUNT_KEY + - variable: "AZURE_ACCOUNT_KEY" label: "Azure account key" type: "password" required: false - - variable: CLOUDFILES_USERNAME + - variable: "CLOUDFILES_USERNAME" label: "CloudFiles username" type: "string" required: false - - variable: CLOUDFILES_APIKEY + - variable: "CLOUDFILES_APIKEY" label: "Cloudfiles API key" type: "password" required: false - - variable: DPBX_ACCESS_TOKEN + - variable: "DPBX_ACCESS_TOKEN" label: "Dropbox access token" type: "password" required: false - - variable: GS_ACCESS_KEY_ID + - variable: "GS_ACCESS_KEY_ID" label: "Google Storage key" type: "string" required: false - - variable: GS_SECRET_ACCESS_KEY + - variable: "GS_SECRET_ACCESS_KEY" label: "Google Storage secret" type: "password" required: false - - variable: GOOGLE_DRIVE_ACCOUNT_KEY + - variable: "GOOGLE_DRIVE_ACCOUNT_KEY" label: "Google Drive account key" type: "password" required: false - - variable: SWIFT_USERNAME + - variable: "SWIFT_USERNAME" label: "Swift username" type: "string" required: false - - variable: SWIFT_PASSWORD + - variable: "SWIFT_PASSWORD" label: "Swift password" type: "password" required: false - - variable: SWIFT_AUTHURL + - variable: "SWIFT_AUTHURL" label: "Swift auth URL" type: "string" required: false @@ -127,5 +193,3 @@ backup: scale: 1 -backup-data: - scale: 1 diff --git a/templates/rancher-backup/config.yml b/templates/rancher-backup/config.yml index 8c5aa70..eb47b19 100644 --- a/templates/rancher-backup/config.yml +++ b/templates/rancher-backup/config.yml @@ -1,5 +1,7 @@ name: Rancher Backup description: | It's a general purpose to solve backup matter on Rancher. -version: 1.0.2 +version: 2.0.0 category: Backup +maintainer: "Sebastien Langoureaux " +license: MIT License diff --git a/templates/redmine/0/docker-compose.yml b/templates/redmine/0/docker-compose.yml new file mode 100644 index 0000000..1389433 --- /dev/null +++ b/templates/redmine/0/docker-compose.yml @@ -0,0 +1,45 @@ +version: '2' +services: + redmine: + image: sameersbn/redmine:3.3.2-1 + labels: + io.rancher.container.hostname_override: container_name + io.rancher.container.pull_image: always + traefik.enable: true + traefik.alias: ${REDMINE_HOST} + traefik.domain: ${REDMINE_DOMAIN} + traefik.acme: true + traefik.port: 80 + environment: + - PORT=80 + - TZ=${TZ} + - DB_PASS=${DB_PASS} + - DB_ADAPTER=mysql2 + - DB_HOST=db + - DB_USER=redmine + - DB_NAME=redmine_production + - REDMINE_SECRET_TOKEN=${REDMINE_SECRET_TOKEN} + - SMTP_ENABLED=false + - IMAP_ENABLED=false + volumes: + - redminedata:/home/redmine/data + - redminelog:/var/log/redmine + db: + restart: always + image: mariadb:10.2 + volumes: + - redminedbdata:/var/lib/mysql + labels: + io.rancher.container.pull_image: always + environment: + - MYSQL_USER=redmine + - MYSQL_PASSWORD=${DB_PASS} + - MYSQL_ROOT_PASSWORD=${DB_PASS} + - MYSQL_DATABASE=redmine_production +volumes: + redminedata: + driver: ${VOLUME_DRIVER} + redminelog: + driver: ${VOLUME_DRIVER} + redminedbdata: + driver: ${VOLUME_DRIVER} diff --git a/templates/redmine/0/rancher-compose.yml b/templates/redmine/0/rancher-compose.yml new file mode 100644 index 0000000..d8effe1 --- /dev/null +++ b/templates/redmine/0/rancher-compose.yml @@ -0,0 +1,61 @@ +version: '2' +catalog: + name: Redmine + version: 0.1.2 + description: | + Redmine + questions: + - variable: "REDMINE_HOST" + description: "Hostname to use for the Redmine" + label: "Thalhalla Store Hostname" + required: true + default: "redmine" + type: "string" + - variable: "REDMINE_DOMAIN" + description: "Domain to use for the Redmine server" + label: "REDMINE Domain" + required: true + default: "" + type: "string" + - variable: "TZ" + description: "Timezone to use for the server" + label: "Timezone" + required: true + default: "America/Chicago" + type: "string" + - variable: "DB_PASS" + description: "Database Password to use for the server" + label: "DB Password" + required: true + default: "" + type: "password" + - variable: "REDMINE_SECRET_TOKEN" + description: "REDMINE_SECRET_TOKEN" + label: "REDMINE_SECRET_TOKEN" + required: true + default: "" + type: "password" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "rancher-nfs" + type: enum + options: + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + +services: + redmine: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 80 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 diff --git a/templates/redmine/README.md b/templates/redmine/README.md new file mode 100644 index 0000000..7f7aaae --- /dev/null +++ b/templates/redmine/README.md @@ -0,0 +1,11 @@ +[Redmine](https://www.redmine.org/) + +Redmine is a flexible project management web application. Written using +the Ruby on Rails framework, it is cross-platform and cross-database. + +This rancher template should get you a redmine container up and running +to test. To see other implementations, including postgres, and using convoy for persistent data see +the catalog [here](https://github.com/webhostingcoopteam/whc-catalog) + +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 diff --git a/templates/redmine/catalogIcon-redmine.png b/templates/redmine/catalogIcon-redmine.png new file mode 100644 index 0000000..e962805 Binary files /dev/null and b/templates/redmine/catalogIcon-redmine.png differ diff --git a/templates/redmine/config.yml b/templates/redmine/config.yml new file mode 100644 index 0000000..453bbcd --- /dev/null +++ b/templates/redmine/config.yml @@ -0,0 +1,5 @@ +name: Redmine +description: | + Redmine Project Manager +version: 0.1.2 +category: Project Management diff --git a/templates/rethinkdb/0/README.md b/templates/rethinkdb/0/README.md new file mode 100644 index 0000000..ddc7f05 --- /dev/null +++ b/templates/rethinkdb/0/README.md @@ -0,0 +1,17 @@ +# RethinkDB Cluster +RethinkDB is the first open-source, scalable JSON database built from the ground up for the realtime web. It inverts the traditional database architecture by exposing an exciting new access model – instead of polling for changes, the developer can tell RethinkDB to continuously push updated query results to applications in realtime. RethinkDB’s realtime push architecture dramatically reduces the time and effort necessary to build scalable realtime apps. + + +**This Template creates 2 services:** +- **rethinkdb:** This is the scalable database service. +- **rethinkdb-proxy:** This is the proxy service, the query-router and admin panel. (queries are sent to this service) + + +### Repository +https://github.com/xkodiak/rancher-rethinkdb + +### Variables +- **Proxy Web Port:** admin panel port (default: 8080) +- **Proxy Query Port:** query port (default: 28015) +- **Volume Driver:** local, rancher-nfs, ... (default: local) + diff --git a/templates/rethinkdb/0/docker-compose.yml b/templates/rethinkdb/0/docker-compose.yml new file mode 100644 index 0000000..6b69a23 --- /dev/null +++ b/templates/rethinkdb/0/docker-compose.yml @@ -0,0 +1,23 @@ +version: '2' +volumes: + rethinkdb-data: + driver: '${rethinkdb_volume_driver}' + per_container: true +services: + rethinkdb: + image: xkodiak/rancher-rethinkdb:2.3.5 + volumes: + - rethinkdb-data:/data + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + rethinkdb-proxy: + image: xkodiak/rancher-rethinkdb:2.3.5 + entrypoint: /proxy.sh + links: + - rethinkdb:db + ports: + - ${rethinkdb_proxy_webport}:8080/tcp + - ${rethinkdb_proxy_queryport}:28015/tcp + depends_on: + - rethinkdb diff --git a/templates/rethinkdb/0/rancher-compose.yml b/templates/rethinkdb/0/rancher-compose.yml new file mode 100644 index 0000000..d2524bf --- /dev/null +++ b/templates/rethinkdb/0/rancher-compose.yml @@ -0,0 +1,34 @@ +.catalog: + name: "RethinkDB" + version: "2.3.5" + description: "(Experimental) NoSQL-Database" + uuid: rethinkdb-0 + questions: + - variable: "rethinkdb_proxy_webport" + description: "" + label: "Proxy Web Port (Admin Panel):" + required: true + type: "int" + default: 8080 + - variable: "rethinkdb_proxy_queryport" + description: "" + label: "Proxy Query Port:" + required: true + type: "int" + default: 28015 + - variable: "rethinkdb_volume_driver" + description: "" + label: "Volume Driver:" + required: true + type: "string" + default: "local" + + +version: '2' +services: + rethinkdb: + scale: 1 + start_on_create: true + rethinkdb-proxy: + scale: 1 + start_on_create: true diff --git a/templates/rethinkdb/catalogIcon-rethinkdb.svg b/templates/rethinkdb/catalogIcon-rethinkdb.svg new file mode 100644 index 0000000..30c8eea --- /dev/null +++ b/templates/rethinkdb/catalogIcon-rethinkdb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/rethinkdb/config.yml b/templates/rethinkdb/config.yml new file mode 100644 index 0000000..fe967df --- /dev/null +++ b/templates/rethinkdb/config.yml @@ -0,0 +1,5 @@ +name: RethinkDB Cluster +description: | + RethinkDB is the open-source, scalable database that makes building realtime apps dramatically easier. +version: 2.3.5 +category: Databases diff --git a/templates/sematext/0/docker-compose.yml b/templates/sematext/0/docker-compose.yml index c4c2d80..83be754 100755 --- a/templates/sematext/0/docker-compose.yml +++ b/templates/sematext/0/docker-compose.yml @@ -8,8 +8,8 @@ sematext-agent: - HTTP_PROXY=${http_proxy} - MATCH_BY_IMAGE=${match_by_image} - MATCH_BY_NAME=${match_by_name} - - SKIP_BY_IMAGE=${match_by_image} - - SKIP_BY_NAME=${match_by_name} + - SKIP_BY_IMAGE=${skip_by_image} + - SKIP_BY_NAME=${skip_by_name} - LOGAGENT_PATTERNS=${logagent_patterns} - KUBERNETES=${kubernetes} restart: always