diff --git a/templates/teamcity/0/docker-compose.yml b/templates/teamcity/0/docker-compose.yml new file mode 100644 index 0000000..e017fad --- /dev/null +++ b/templates/teamcity/0/docker-compose.yml @@ -0,0 +1,49 @@ +teamcity-data: + image: busybox + tty: true + volumes: + - /var/lib/teamcity + +teamcity-server: + image: sjoerdmulder/teamcity:latest + ports: + - ${http_port}:8111 + links: + - postgres:${postgress_container} + environment: + http_proxy: ${http_proxy} + https_proxy: ${https_proxy} + labels: + io.rancher.sidekicks: teamcity-data + volumes_from: + - teamcity-data + +postgres-data: + image: busybox + tty: true + volumes: + - ${postgres_data} + +postgres: + image: postgres:latest + ports: + - ${postgress_port}:5432 + environment: + PGDATA: ${postgres_data} + POSTGRES_DB: ${postgres_db} + POSTGRES_USER: ${postgres_user} + POSTGRES_PASSWORD: ${postgres_password} + tty: true + stdin_open: true + labels: + io.rancher.sidekicks: postgres-data + volumes_from: + - postgres-data + +teamcity-agent: + image: sjoerdmulder/teamcity-agent:latest + links: + - teamcity-server:teamcity-server + environment: + TEAMCITY_SERVER: http://teamcity-server:8111 + diff --git a/templates/teamcity/0/rancher-compose.yml b/templates/teamcity/0/rancher-compose.yml new file mode 100644 index 0000000..89b3266 --- /dev/null +++ b/templates/teamcity/0/rancher-compose.yml @@ -0,0 +1,71 @@ +.catalog: + name: "TeamCity" + version: "v0.0.1" + description: "TeamCity Server" + uuid: teamcity-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: http_port + description: "HTTP port to access TeamCity Server UI" + label: "TeamCity HTTP Port" + required: true + default: "8111" + type: "int" + - variable: scale + description: "Number of TeamCity Agents" + label: "Number of TeamCity Agents" + required: true + default: "1" + type: "int" + - variable: postgress_container + description: "Define a linked postgress container name" + label: "Postgres Container" + required: true + default: "db" + type: "string" + - variable: postgress_port + description: "Port for Postgres" + label: "Postgres Port" + required: true + default: "5432" + type: "int" + - variable: postgres_data + description: "Postgres Data Folder" + label: "Postgres Data" + required: true + default: "/var/lib/postgresql/data/pgdata" + type: "string" + - variable: postgres_db + description: "Postgres Database" + label: "Postgres Database" + required: true + default: "teamcity" + type: "string" + - variable: postgres_user + description: "Postgres User" + label: "Postgres User" + required: true + default: "teamcity" + type: "string" + - variable: postgres_password + description: "Postgres Password" + label: "Postgres Password" + required: true + default: "teamcity" + type: "string" + - variable: http_proxy + description: "In case you are at corporate network, setup http_proxy variable if needed" + label: "http_proxy" + required: false + default: "" + type: "string" + - variable: https_proxy + description: "In case you are at corporate network, setup https_proxy variable if needed" + label: "https_proxy" + required: false + default: "" + type: "string" + +teamcity-agent: + scale: ${scale} + retain_ip: true diff --git a/templates/teamcity/README.md b/templates/teamcity/README.md new file mode 100644 index 0000000..f04a2f8 --- /dev/null +++ b/templates/teamcity/README.md @@ -0,0 +1,14 @@ +## What is inside TeamCity Stack? +* TeamCity Server +* Postgres Database +* Scalable TeamCity Agents + +## Info +* In default TeamCity stack will create "teamcity" postgres database with teamcity user. +* Additional variables `http_proxy` and `https_proxy` are included, which can be helpfull in some cases. +* Once TeamCity will start, make sure you setup correct information in setup page. +* For easy upgrades there are sidekicks for both postgress and teamcity-server with dedicated storage. + +## TeamCity Agents +TeamCity Agents will start automatically and connect to the TeamCity Server. +Agents should be available in TeamCity Server in about 5 minutes after stack's start. diff --git a/templates/teamcity/catalogIcon-teamcity.png b/templates/teamcity/catalogIcon-teamcity.png new file mode 100644 index 0000000..d0484e7 Binary files /dev/null and b/templates/teamcity/catalogIcon-teamcity.png differ diff --git a/templates/teamcity/config.yml b/templates/teamcity/config.yml new file mode 100644 index 0000000..c50cb3a --- /dev/null +++ b/templates/teamcity/config.yml @@ -0,0 +1,5 @@ +name: TeamCity +description: | + TeamCity — Your 24/7 Build Engineer +version: v0.0.1 +category: CI