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

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