Added the template for Project Harbor (Cattle only)
This commit is contained in:
@@ -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
|
||||
|
||||

|
||||
Binary file not shown.
|
After Width: | Height: | Size: 253 KiB |
@@ -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
|
||||
@@ -0,0 +1,56 @@
|
||||
version: '2'
|
||||
.catalog:
|
||||
name: Harbor
|
||||
version: 0.5.0-distributed-rev0
|
||||
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
|
||||
Reference in New Issue
Block a user