Skip to content

Commit

Permalink
[REM] Remove Traefik Certs volume
Browse files Browse the repository at this point in the history
* Remove the Traefik certs volume, which is unnecessary because of ipsec between containers
  • Loading branch information
lasley committed Jan 4, 2018
1 parent 3c64c75 commit e476114
Show file tree
Hide file tree
Showing 3 changed files with 313 additions and 1 deletion.
155 changes: 155 additions & 0 deletions templates/runbot/1/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
version: '2'

volumes:
runbot-web-data:
driver: ${VOLUME_DRIVER}
runbot-db-data:
driver: ${VOLUME_DRIVER}
runbot-build-data:
driver: ${VOLUME_DRIVER}
runbot-ssh-data:
driver: ${VOLUME_DRIVER}
runbot-private-addons:
driver: ${VOLUME_DRIVER}

services:

runbot-install:
image: laslabs/runbot:9.0
environment:
PGPASSWORD: "${PSQL_PASSWORD}"
PGUSER: "${PSQL_USER}"
WITHOUT_DEMO: "all"
command: 'install-addons'
links:
- postgresql:db
volumes:
- runbot-web-data:/var/lib/odoo
- runbot-build-data:/opt/odoo/custom/src/odoo-extra/runbot/static
- runbot-private-addons:/opt/odoo/custom/src/private
tty: true
labels:
io.rancher.container.pull_image: 'always'
io.rancher.container.start_once: 'true'

runbot-web:
image: laslabs/runbot:9.0
environment:
ADMIN_PASSWORD: "${ODOO_ADMIN_PASSWORD}"
PGPASSWORD: "${PSQL_PASSWORD}"
PGUSER: "${PSQL_USER}"
PROXY_MODE: "true"
WAIT_NOHOST: runbot-install
volumes:
- runbot-web-data:/var/lib/odoo
- runbot-build-data:/opt/odoo/custom/src/odoo-extra/runbot/static
- runbot-private-addons:/opt/odoo/custom/src/private
tty: true
links:
- postgresql:db
command:
- "/usr/local/bin/odoo"
- "--max-cron-threads=0"
- "--workers=${ODOO_WORKERS}"
labels:
{{- if ne .Values.TRAEFIK_DOMAIN "" }}
traefik.domain: "${TRAEFIK_DOMAIN}"
{{- end }}
{{- if ne .Values.TRAEFIK_HOST "" }}
traefik.frontend.rule: 'Host: ${TRAEFIK_HOST}'
{{- end }}
traefik.enable: 'true'
traefik.port: '8069'
io.rancher.container.hostname_override: container_name
io.rancher.container.pull_image: always
traefik.frontend.passHostHeader: 'true'
traefik.frontend.priority: 10

runbot-cron:
privileged: true
image: laslabs/runbot:9.0
environment:
ADMIN_PASSWORD: "${ODOO_ADMIN_PASSWORD}"
PGPASSWORD: "${PSQL_PASSWORD}"
PGUSER: "${PSQL_USER}"
DOCKER_REGISTRY_DOCKERHUB_USERNAME: "${DOCKERHUB_USERNAME}"
DOCKER_REGISTRY_DOCKERHUB_PASSWORD: "${DOCKERHUB_PASSWORD}"
WAIT_NOHOST: runbot-install
volumes:
- runbot-web-data:/var/lib/odoo
- runbot-build-data:/opt/odoo/custom/src/odoo-extra/runbot/static
- runbot-ssh-data:/home/odoo/.ssh
- runbot-private-addons:/opt/odoo/custom/src/private
- /var/run/docker.sock:/var/run/docker.sock
tty: true
links:
- postgresql:db
command:
- "/usr/local/bin/odoo"
- "--max-cron-threads=${ODOO_MAX_CRON_THREADS}"
- "--workers=0"
- "--limit-time-real=${ODOO_CRON_LIMIT_TIME_REAL}"
- "--limit-time-cpu=${ODOO_CRON_LIMIT_TIME_CPU}"
labels:
io.rancher.scheduler.affinity:host_label: "${HOST_LABEL_WORKER}"
io.rancher.container.hostname_override: container_name
io.rancher.container.pull_image: always

runbot-longpolling:
image: laslabs/runbot:9.0
environment:
ADMIN_PASSWORD: "${ODOO_ADMIN_PASSWORD}"
PGPASSWORD: "${PSQL_PASSWORD}"
PGUSER: "${PSQL_USER}"
PROXY_MODE: "true"
WAIT_NOHOST: runbot-install
volumes:
- runbot-web-data:/var/lib/odoo
- runbot-build-data:/opt/odoo/custom/src/odoo-extra/runbot/static
- runbot-private-addons:/opt/odoo/custom/src/private
tty: true
links:
- postgresql:db
command:
- "/usr/local/bin/odoo"
- "--max-cron-threads=0"
- "--workers=0"
labels:
{{- if ne .Values.TRAEFIK_HOST "" }}
traefik.frontend.rule: 'Host: ${TRAEFIK_HOST}; PathPrefix: /longpolling/;'
{{- else }}
traefik.frontend.rule: 'PathPrefix: /longpolling/;'
{{- end }}
traefik.domain: "${TRAEFIK_DOMAIN}"
traefik.enable: 'true'
traefik.port: '8069'
io.rancher.container.hostname_override: container_name
io.rancher.container.pull_image: always
traefik.frontend.passHostHeader: 'true'
traefik.frontend.priority: 10

postgresql:
image: postgres:9.6-alpine
hostname: db
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: "${PSQL_PASSWORD}"
POSTGRES_USER: "${PSQL_USER}"
volumes:
- runbot-db-data:/var/lib/postgresql/data/

traefik:
image: laslabs/runbot-traefik:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- --web
labels:
traefik.enable: 'true'
traefik.domain: "${TRAEFIK_DOMAIN}"
traefik.frontend.rule: 'HostRegexp: {subdomain:[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+}.${TRAEFIK_DOMAIN};'
traefik.port: '80'
io.rancher.container.pull_image: always
traefik.frontend.passHostHeader: 'true'
traefik.frontend.priority: 1
157 changes: 157 additions & 0 deletions templates/runbot/1/rancher-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
version: "2"

catalog:
name: Odoo Runbot
version: "v9.0.0.1.1"
description: \
Runbot is a Continuous Integration server for Odoo.
Meant to be proxied by Traefik.
uuid: laslabs-runbot-1
minimum_rancher_version: v1.0.0
questions:

- variable: "VOLUME_DRIVER"
description: "The volume driver to use for persistent storage."
label: "Volume Driver"
required: true
type: "enum"
default: "local"
options:
- local
- rancher-ebs
- rancher-efs
- rancher-nfs

- variable: "PSQL_USER"
description: "Username to use for the PostgreSQL server."
label: "PostgreSQL User"
default: "odoo"
type: "string"
required: true

- variable: "PSQL_PASSWORD"
description: "Password to use for the PostgreSQL server."
label: "PostgreSQL Password"
type: "password"
required: true

- variable: "ODOO_ADMIN_PASSWORD"
description: "Password to Odoo database management interface."
label: "Odoo Admin Password"
type: "password"
required: true

- variable: "DOCKERHUB_USERNAME"
description: "Username to use when logging into DockerHub."
label: "DockerHub Username"
type: "string"

- variable: "DOCKERHUB_PASSWORD"
description: "Password to use when logging into DockerHub."
label: "DockerHub Password"
type: "password"

- variable: "ODOO_CRON_LIMIT_TIME_REAL"
description: "Real time limit for the Runbot workers."
label: "Odoo Worker Time Limit (Real)"
type: "int"
required: true
default: 6000

- variable: "ODOO_CRON_LIMIT_TIME_CPU"
description: "CPU time limit for the Runbot workers."
label: "Odoo Worker Time Limit (CPU)"
type: "int"
required: true
default: 600

- variable: "ODOO_WORKERS"
description: "Amount of workers allowed per web instance."
label: "Odoo Workers"
type: "int"
required: true
default: 4

- variable: "ODOO_MAX_CRON_THREADS"
description: "Maximum amount of threads allowed for crons (per cron instance)."
label: "Odoo Cron Threads"
type: "int"
required: true
default: 1

- variable: "HOST_LABEL_WORKER"
description: \
Host label and value that must be applied to any host that is allowed to have
a Runbot build worker.
label: "Worker Label"
type: "string"
required: true
default: "runbot_worker=true"

- variable: "TRAEFIK_DOMAIN"
description: "Base domain to define in Traefik."
label: "Traefik Domain"
type: "string"
required: true
default: rancher.internal

- variable: "TRAEFIK_HOST"
description: \
Additional domain name that should be advertised through Traefik.
Comma separate to include more than one.
label: "Traefik Host"
type: "string"

services:

runbot-web:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 8069
unhealthy_threshold: 10
initializing_timeout: 60000
interval: 5000
strategy: recreate
request_line: GET "/" "HTTP/1.0"

runbot-cron:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 8069
unhealthy_threshold: 250
initializing_timeout: 60000
interval: 10000
strategy: recreate
request_line: GET "/" "HTTP/1.0"

runbot-longpolling:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 8069
unhealthy_threshold: 10
initializing_timeout: 60000
interval: 5000
strategy: recreate
request_line: GET "/" "HTTP/1.0"

postgresql:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 5432
unhealthy_threshold: 20
initializing_timeout: 60000
interval: 5000
strategy: recreate
reinitializing_timeout: 60000
2 changes: 1 addition & 1 deletion templates/runbot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Odoo Runbot
description: |
Runbot is a Continuous Integration server for Odoo.
This build is meant to be behind a Traefik proxy.
version: v9.0.0.1.0
version: v9.0.0.1.1
category: Continuous Integration
maintainer: LasLabs Inc. <support@laslabs.com>
license: Apache 2.0
Expand Down

0 comments on commit e476114

Please sign in to comment.