From 9820dabeeecd2ebe4da9dce6c1e934fd77e84e45 Mon Sep 17 00:00:00 2001 From: Mateusz Trojak Date: Tue, 6 Sep 2016 19:19:00 +0200 Subject: [PATCH] Adding TeamCity Stack to the Rancher (#254) * Adding support for database auto creation * Creation v0.8.44 for auto-database-creation * Update config.yml * Fixing syntax * Fixing syntax * Update * Fixing uuid for gogs-1 * Create README.md * Delete README.md * Create README.md * Add files via upload * Create docker-compose.yml * Create rancher-compose.yml * Create config.yml * Update docker-compose.yml * Update README.md * Initial TeamCity commit * Addin variable for postgress_container * Addin variable for postgress_container * Setting Internal Docker port for Agents * Fix for Rancher autoselect * Syntax correction * Adding details to the Readme * Update rancher-compose.yml * Fixing vocabulary * Adding support for autoscale * Adding support for autoscale * Adding support for autoscale * Adding Sidekicks Enabling Sidekicks for teamcity-server and postgress services with shared working wolumes. This will help with easy upgrades of both containers. * Added info about Sidekicks. * fix * Reverting newer version of goog * Adding back missing category --- templates/teamcity/0/docker-compose.yml | 49 ++++++++++++++ templates/teamcity/0/rancher-compose.yml | 71 ++++++++++++++++++++ templates/teamcity/README.md | 14 ++++ templates/teamcity/catalogIcon-teamcity.png | Bin 0 -> 4907 bytes templates/teamcity/config.yml | 5 ++ 5 files changed, 139 insertions(+) create mode 100644 templates/teamcity/0/docker-compose.yml create mode 100644 templates/teamcity/0/rancher-compose.yml create mode 100644 templates/teamcity/README.md create mode 100644 templates/teamcity/catalogIcon-teamcity.png create mode 100644 templates/teamcity/config.yml 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 0000000000000000000000000000000000000000..d0484e771d292b000fe685b45ecc0f5f9cfdabbd GIT binary patch literal 4907 zcmV+`6V&X9P)9s|r z6lk0ZQ7F({C`F)B>_`O(2^!}eDd)Z+A;qrX0Tp5Ur9q-#8w#jJsvTOPK4C`)cqoz` zRe`n<#H}c(q>5ddwzQ(nrAbI*-_0=p*_qv$+3&qQd)D56G}({aJKyc^_y3%kof_Ie znfm5hgKg@tKl0?ZMO4YU3tk710pLN_0PF$Q`bCQqAj1l4FR-?>QRMjIo8PKqOokBd z46toO{03E8@cl$PcKpW2=PLsEpf_1N7;@9{NK267C?mscuW!od&pgn;xO0fLCIg<` zr4GWpku=|P8g2n2Lu<#*MT0h5HKUM%Y!RK2>j1(jQnPnsx-qZwO;ExFK z>l^eNRs<1pyM{fd4g>fL4A?q0wcP|?J5Nea0^9}g0Qj5;@NAGpL4-^J;~g(Q%)w`x z9u2+|M~YM~!CDgFoZv%Xx3Ga)pG1UVMue553qSqOY4G{W48%GTV5-`VLNwny?-yw8f9;vY|Ll6b>8E(CA%e7H z9CaKO6J$yiM{TMPI4QuF(Z1E-yC4go1@LXhB}7}CJG1-E{x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