17 changed files with 688 additions and 1 deletions
Unified View
Diff Options
-
23party/teamcity-agent/Dockerfile
-
2SETUP.md
-
4site/README.md
-
48site/docker-compose.yml
-
8site/install-rancher.sh
-
57site/prod/TML-KHHW/docker-compose.yml
-
83site/prod/TML-KHHW/rancher-compose.yml
-
57site/prod/TML-TXGW/docker-compose.yml
-
82site/prod/TML-TXGW/rancher-compose.yml
-
6site/prod/create-stacks.sh
-
73site/uat/Management-Backend/docker-compose.yml
-
94site/uat/Management-Backend/rancher-compose.yml
-
43site/uat/TML-TXGW/docker-compose.yml
-
34site/uat/TML-TXGW/rancher-compose.yml
-
47site/uat/WHL-KHHW/docker-compose.yml
-
34site/uat/WHL-KHHW/rancher-compose.yml
-
15site/uat/create-stacks.sh
@ -0,0 +1,2 @@ |
|||||
|
FROM jetbrains/teamcity-agent:latest |
||||
|
RUN curl -LkSs https://github.com/rancher/cli/releases/download/v0.6.11/rancher-linux-amd64-v0.6.11.tar.gz | tar -xz && mv -f ./rancher-v0.6.11/rancher /bin/rancher && rm -rf ./rancher-v0.6.11 |
@ -0,0 +1,4 @@ |
|||||
|
|
||||
|
1. Create Stacks |
||||
|
2. Add Hosts |
||||
|
3. Add Registry |
@ -0,0 +1,48 @@ |
|||||
|
version: '3' |
||||
|
services: |
||||
|
mysql: |
||||
|
container_name: mysql |
||||
|
image: "mysql:5.7" |
||||
|
restart: unless-stopped |
||||
|
environment: |
||||
|
MYSQL_ROOT_PASSWORD: example |
||||
|
MYSQL_USER: cattle |
||||
|
MYSQL_PASSWORD: cattle |
||||
|
MYSQL_DATABASE: cattle |
||||
|
volumes: |
||||
|
- /docker/mysql:/var/lib/mysql |
||||
|
mysql-admin: |
||||
|
container_name: mysql-admin |
||||
|
image: "phpmyadmin/phpmyadmin" |
||||
|
restart: unless-stopped |
||||
|
ports: |
||||
|
- 8222:80 |
||||
|
environment: |
||||
|
PMA_HOST: db |
||||
|
PMA_PORT: 3306 |
||||
|
depends_on: |
||||
|
- "mysql" |
||||
|
links: |
||||
|
- mysql:db |
||||
|
fluent-log: |
||||
|
container_name: fluent-log |
||||
|
image: "fluent/fluentd" |
||||
|
ports: |
||||
|
- 24224:24224 |
||||
|
- 24224:24224/udp |
||||
|
volumes: |
||||
|
- /docker/log:/fluentd/log |
||||
|
rancher-server: |
||||
|
container_name: rancher-server |
||||
|
image: "rancher/server" |
||||
|
restart: unless-stopped |
||||
|
command: --db-host db |
||||
|
depends_on: |
||||
|
- "mysql" |
||||
|
ports: |
||||
|
- 8888:8080 |
||||
|
environment: |
||||
|
DB_HOST: db |
||||
|
links: |
||||
|
- mysql:db |
||||
|
|
@ -0,0 +1,8 @@ |
|||||
|
export RANCHER_URL=http://localhost:8888 |
||||
|
#Create necessary folders for volume mounting |
||||
|
mkdir -p -m 777 /docker/mysql |
||||
|
mkdir -p -m 777 /docker/log |
||||
|
chmod -R 777 /docker/* |
||||
|
# install rancher cli |
||||
|
curl -LkSs https://github.com/rancher/cli/releases/download/v0.6.11/rancher-linux-amd64-v0.6.11.tar.gz | tar -xz && mv -f ./rancher-v0.6.11/rancher /bin/rancher && rm -rf ./rancher-v0.6.11 |
||||
|
docker-compose up -d |
@ -0,0 +1,57 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-WS: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/tml-ws:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=khhw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
LB: |
||||
|
image: rancher/lb-service-haproxy:v0.9.3 |
||||
|
ports: |
||||
|
- 80:80/tcp |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=khhw,com.wanhai.tml.lb_host=true |
||||
|
io.rancher.container.agent.role: environmentAdmin,agent |
||||
|
io.rancher.container.agent_service.drain_provider: 'true' |
||||
|
io.rancher.container.create_agent: 'true' |
||||
|
TML-CY: |
||||
|
mem_limit: 1073741824 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/prod/tml-cy:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: -Xms1024m -Xmx1024m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=khhw -Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=khhw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
TML-MENU: |
||||
|
mem_limit: 805306368 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/prod/tml-menu:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: -Xms512m -Xmx750m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=khhw -Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=khhw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
TML-STATIC: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/tml-static:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=khhw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
OTT: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/ott:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=khhw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
@ -0,0 +1,83 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-WS: |
||||
|
scale: 1 |
||||
|
start_on_create: true |
||||
|
LB: |
||||
|
scale: 2 |
||||
|
start_on_create: true |
||||
|
lb_config: |
||||
|
certs: [] |
||||
|
config: "defaults\noption forwardfor\n\nlisten stats \nbind 0.0.0.0:9123\nmode\ |
||||
|
\ http\nstats enable\nstats hide-version\nstats realm Haproxy\\ Statistics\n\ |
||||
|
stats uri /haproxy_stats" |
||||
|
port_rules: |
||||
|
- hostname: khhwtml.wanhai.com |
||||
|
path: /collab/ott |
||||
|
priority: 1 |
||||
|
protocol: http |
||||
|
service: OTT |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml.wanhai.com |
||||
|
path: /wanhai/tml/static |
||||
|
priority: 2 |
||||
|
protocol: http |
||||
|
service: TML-STATIC |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml.wanhai.com |
||||
|
path: /wanhai/tml/menu |
||||
|
priority: 3 |
||||
|
protocol: http |
||||
|
service: TML-MENU |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml.wanhai.com |
||||
|
path: /wanhai/tml/cy |
||||
|
priority: 4 |
||||
|
protocol: http |
||||
|
service: TML-CY |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml.wanhai.com |
||||
|
path: /wanhai/tml/services |
||||
|
priority: 5 |
||||
|
protocol: http |
||||
|
service: TML-WS |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml.wanhai.com |
||||
|
path: /haproxy_stats |
||||
|
priority: 6 |
||||
|
protocol: http |
||||
|
service: LB |
||||
|
source_port: 80 |
||||
|
target_port: 9123 |
||||
|
stickiness_policy: |
||||
|
cookie: JSESSIONID |
||||
|
indirect: true |
||||
|
mode: prefix |
||||
|
nocache: true |
||||
|
postonly: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 2000 |
||||
|
port: 42 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 2000 |
||||
|
reinitializing_timeout: 60000 |
||||
|
TML-CY: |
||||
|
scale: 2 |
||||
|
start_on_create: true |
||||
|
TML-MENU: |
||||
|
retain_ip: true |
||||
|
scale: 1 |
||||
|
start_on_create: true |
||||
|
TML-STATIC: |
||||
|
scale: 1 |
||||
|
start_on_create: true |
||||
|
OTT: |
||||
|
scale: 1 |
||||
|
start_on_create: true |
@ -0,0 +1,57 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-WS: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/tml-ws:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=txgw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
LB: |
||||
|
image: rancher/lb-service-haproxy:v0.9.3 |
||||
|
ports: |
||||
|
- 80:80/tcp |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=txgw,com.wanhai.tml.lb_host=true |
||||
|
io.rancher.container.agent.role: environmentAdmin,agent |
||||
|
io.rancher.container.agent_service.drain_provider: 'true' |
||||
|
io.rancher.container.create_agent: 'true' |
||||
|
TML-CY: |
||||
|
mem_limit: 1073741824 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/prod/tml-cy:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: -Xms1024m -Xmx1024m -XX:MetaspaceSize=96M -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=txgw -Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=txgw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
TML-MENU: |
||||
|
mem_limit: 805306368 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/prod/tml-menu:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: -Xms512m -Xmx750m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=txgw -Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=txgw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
TML-STATIC: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/tml-static:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=txgw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
OTT: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/ott:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.env=txgw |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
@ -0,0 +1,82 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-WS: |
||||
|
scale: 1 |
||||
|
start_on_create: true |
||||
|
LB: |
||||
|
scale: 2 |
||||
|
start_on_create: true |
||||
|
lb_config: |
||||
|
certs: [] |
||||
|
config: "defaults\noption forwardfor\n\nlisten stats \nbind 0.0.0.0:9123\nmode\ |
||||
|
\ http\nstats enable\nstats hide-version\nstats realm Haproxy\\ Statistics\n\ |
||||
|
stats uri /haproxy_stats" |
||||
|
port_rules: |
||||
|
- hostname: txgwtml.wanhai.com |
||||
|
path: /collab/ott |
||||
|
priority: 1 |
||||
|
protocol: http |
||||
|
service: OTT |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml.wanhai.com |
||||
|
path: /wanhai/tml/static |
||||
|
priority: 2 |
||||
|
protocol: http |
||||
|
service: TML-STATIC |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml.wanhai.com |
||||
|
path: /wanhai/tml/menu |
||||
|
priority: 3 |
||||
|
protocol: http |
||||
|
service: TML-MENU |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml.wanhai.com |
||||
|
path: /wanhai/tml/cy |
||||
|
priority: 4 |
||||
|
protocol: http |
||||
|
service: TML-CY |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml.wanhai.com |
||||
|
path: /wanhai/tml/services |
||||
|
priority: 5 |
||||
|
protocol: http |
||||
|
service: TML-WS |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml.wanhai.com |
||||
|
path: /haproxy_stats |
||||
|
priority: 7 |
||||
|
protocol: http |
||||
|
service: LB |
||||
|
source_port: 80 |
||||
|
target_port: 9123 |
||||
|
stickiness_policy: |
||||
|
cookie: JSESSIONID |
||||
|
indirect: true |
||||
|
mode: prefix |
||||
|
nocache: true |
||||
|
postonly: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 2000 |
||||
|
port: 42 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 2000 |
||||
|
reinitializing_timeout: 60000 |
||||
|
TML-CY: |
||||
|
scale: 2 |
||||
|
start_on_create: true |
||||
|
TML-MENU: |
||||
|
scale: 1 |
||||
|
start_on_create: true |
||||
|
TML-STATIC: |
||||
|
scale: 1 |
||||
|
start_on_create: true |
||||
|
OTT: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
@ -0,0 +1,6 @@ |
|||||
|
export RANCHER_URL=http://localhost:8888 |
||||
|
#Create Rancher Environment |
||||
|
rancher env create PROD |
||||
|
#Create Application Stacks |
||||
|
rancher --wait-state active --env PROD stack create TML-KHHW -f ./WHL-KHHW/docker-compose.yml -r ./WHL-KHHW/rancher-compose.yml |
||||
|
rancher --wait-state active --env PROD stack create TML-TXGW -f ./WHL-TXGW/docker-compose.yml -r ./WHL-TXGW/rancher-compose.yml |
@ -0,0 +1,73 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
Global-LB: |
||||
|
image: rancher/lb-service-haproxy:v0.9.6 |
||||
|
ports: |
||||
|
- 80:80/tcp |
||||
|
labels: |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.lb_host=true |
||||
|
io.rancher.container.agent.role: environmentAdmin,agent |
||||
|
io.rancher.container.agent_service.drain_provider: 'true' |
||||
|
io.rancher.container.create_agent: 'true' |
||||
|
TeamCity-Agent-Alpha: |
||||
|
privileged: true |
||||
|
image: khhwtml02t.wanhai.com:8182/jetbrains/teamcity-agent:latest |
||||
|
environment: |
||||
|
SERVER_URL: http://khhwtml02t.wanhai.com:8111 |
||||
|
AGENT_NAME: Agent-Alpha1 |
||||
|
RANCHER_URL: http://khhwtml01t.wanhai.com:8888 |
||||
|
RANCHER_ACCESS_KEY: 5E7731B2CB115A1B007C |
||||
|
RANCHER_SECRET_KEY: VR3DGmfivwHjMPxnhVL4QLv2VEYKcnUHDuTcoWgD |
||||
|
stdin_open: true |
||||
|
volumes: |
||||
|
- /var/run/docker.sock:/var/run/docker.sock |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
TeamCity-Agent-Beta: |
||||
|
privileged: true |
||||
|
image: khhwtml02t.wanhai.com:8182/jetbrains/teamcity-agent:latest |
||||
|
environment: |
||||
|
SERVER_URL: http://khhwtml02t.wanhai.com:8111 |
||||
|
AGENT_NAME: Agent-Beta1 |
||||
|
RANCHER_URL: http://khhwtml01t.wanhai.com:8888 |
||||
|
RANCHER_ACCESS_KEY: 5E7731B2CB115A1B007C |
||||
|
RANCHER_SECRET_KEY: VR3DGmfivwHjMPxnhVL4QLv2VEYKcnUHDuTcoWgD |
||||
|
stdin_open: true |
||||
|
volumes: |
||||
|
- /var/run/docker.sock:/var/run/docker.sock |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
TML-Docker-Registry: |
||||
|
image: sonatype/nexus3:latest |
||||
|
environment: |
||||
|
TZ: Asia/Taipei |
||||
|
stdin_open: true |
||||
|
network_mode: bridge |
||||
|
volumes: |
||||
|
- /docker/nexus3/nexus-data:/nexus-data |
||||
|
tty: true |
||||
|
ports: |
||||
|
- 8181:8081 |
||||
|
- 8182:8182 |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.main_host=true |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
TeamCity-Server: |
||||
|
image: jetbrains/teamcity-server:latest |
||||
|
environment: |
||||
|
TZ: Asia/Taipei |
||||
|
stdin_open: true |
||||
|
volumes: |
||||
|
- /docker/teamcity/data:/data/teamcity_server/datadir |
||||
|
- /docker/teamcity/logs:/opt/teamcity/logs |
||||
|
tty: true |
||||
|
ports: |
||||
|
- 8111:8111 |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.scheduler.affinity:host_label: com.wanhai.tml.main_host=true |
||||
|
io.rancher.container.hostname_override: container_name |
@ -0,0 +1,94 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
Global-LB: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
lb_config: |
||||
|
certs: [] |
||||
|
config: "defaults\noption forwardfor\n\nlisten stats \nbind 0.0.0.0:9123\nmode\ |
||||
|
\ http\nstats enable\nstats hide-version\nstats realm Haproxy\\ Statistics\n\ |
||||
|
stats uri /haproxy_stats" |
||||
|
port_rules: |
||||
|
- hostname: khhwtml01t.wanhai.com |
||||
|
path: /collab/ott |
||||
|
priority: 1 |
||||
|
protocol: http |
||||
|
service: TML-KHHW/OTT |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml01t.wanhai.com |
||||
|
path: /wanhai/tml/static |
||||
|
priority: 2 |
||||
|
protocol: http |
||||
|
service: TML-KHHW/TML-STATIC |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml01t.wanhai.com |
||||
|
path: /wanhai/tml/menu |
||||
|
priority: 3 |
||||
|
protocol: http |
||||
|
service: TML-KHHW/TML-MENU |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: khhwtml01t.wanhai.com |
||||
|
path: /wanhai/tml/cy |
||||
|
priority: 4 |
||||
|
protocol: http |
||||
|
service: TML-KHHW/TML-CY |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml01t.wanhai.com |
||||
|
path: /wanhai/tml/static |
||||
|
priority: 5 |
||||
|
protocol: http |
||||
|
service: TML-TXGW/TML-STATIC |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml01t.wanhai.com |
||||
|
path: /collab/ott |
||||
|
priority: 6 |
||||
|
protocol: http |
||||
|
service: TML-TXGW/OTT |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml01t.wanhai.com |
||||
|
path: /wanhai/tml/menu |
||||
|
priority: 7 |
||||
|
protocol: http |
||||
|
service: TML-TXGW/TML-MENU |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
- hostname: txgwtml01t.wanhai.com |
||||
|
path: /wanhai/tml/cy |
||||
|
priority: 8 |
||||
|
protocol: http |
||||
|
service: TML-TXGW/TML-CY |
||||
|
source_port: 80 |
||||
|
target_port: 8080 |
||||
|
stickiness_policy: |
||||
|
cookie: JSESSIONID |
||||
|
domain: '' |
||||
|
indirect: true |
||||
|
mode: prefix |
||||
|
nocache: true |
||||
|
postonly: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 2000 |
||||
|
port: 42 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 2000 |
||||
|
reinitializing_timeout: 60000 |
||||
|
TeamCity-Agent-Alpha: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
TML-Docker-Registry: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
TeamCity-Agent-Beta: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
TeamCity-Server: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
@ -0,0 +1,43 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-CY: |
||||
|
mem_limit: 1073741824 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/tml-cy:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: "-Xms1024m -Xmx1024m -XX:MetaspaceSize=96M -XX:+UnlockExperimentalVMOptions\ |
||||
|
\ -XX:+UseCGroupMemoryLimitForHeap -XX:MaxMetaspaceSize=256m -XX:+UseG1GC\ |
||||
|
\ -XX:NativeMemoryTracking=summary -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true\ |
||||
|
\ -Dcom.wanhai.tml.yard.current=txgw -Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2\ |
||||
|
\ -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat\ |
||||
|
\ \n-Dsentry.compression=true" |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.scheduler.affinity:host_label_soft: com.wanhai.tml.env=* |
||||
|
TML-MENU: |
||||
|
mem_limit: 1073741824 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/tml-menu:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: -Xms1024m -Xmx1024m -XX:MetaspaceSize=96M -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:NativeMemoryTracking=summary -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=txgw -Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.scheduler.affinity:host_label_soft: com.wanhai.tml.env=* |
||||
|
TML-STATIC: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/tml-static:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
OTT: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/txgw/uat/ott:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.container.hostname_override: container_name |
@ -0,0 +1,34 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-CY: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 5000 |
||||
|
port: 8080 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 30000 |
||||
|
strategy: recreate |
||||
|
request_line: GET "/" "HTTP/1.0" |
||||
|
reinitializing_timeout: 60000 |
||||
|
TML-MENU: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 5000 |
||||
|
port: 8080 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 30000 |
||||
|
strategy: recreate |
||||
|
request_line: GET "/" "HTTP/1.0" |
||||
|
reinitializing_timeout: 60000 |
||||
|
TML-STATIC: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
OTT: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
@ -0,0 +1,47 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-CY: |
||||
|
mem_limit: 1073741824 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/tml-cy:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: "-Xms1024m -Xmx1024m -XX:MetaspaceSize=96M -XX:+UnlockExperimentalVMOptions\ |
||||
|
\ -XX:+UseCGroupMemoryLimitForHeap -XX:MaxMetaspaceSize=256m -XX:+UseG1GC\ |
||||
|
\ -XX:NativeMemoryTracking=summary -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true\ |
||||
|
\ -Dcom.wanhai.tml.yard.current=khhw \n-Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2\ |
||||
|
\ -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat\ |
||||
|
\ \n-Dsentry.compression=true" |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.scheduler.affinity:host_label_soft: com.wanhai.tml.env=* |
||||
|
TML-MENU: |
||||
|
mem_limit: 1073741824 |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/tml-menu:latest |
||||
|
environment: |
||||
|
JAVA_OPTS: "-Xms1024m -Xmx1024m -XX:MetaspaceSize=96M -XX:+UnlockExperimentalVMOptions\ |
||||
|
\ -XX:+UseCGroupMemoryLimitForHeap -XX:MaxMetaspaceSize=256m -XX:+UseG1GC\ |
||||
|
\ -XX:NativeMemoryTracking=summary -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true\ |
||||
|
\ -Dcom.wanhai.tml.yard.current=khhw \n-Dcom.wanhai.tml.config.env=uat -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2\ |
||||
|
\ -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat" |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.scheduler.affinity:host_label_soft: com.wanhai.tml.env=* |
||||
|
TML-STATIC: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/tml-static:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.container.hostname_override: container_name |
||||
|
OTT: |
||||
|
image: khhwtml02t.wanhai.com:8182/wanhai/tml/khhw/uat/ott:latest |
||||
|
stdin_open: true |
||||
|
tty: true |
||||
|
labels: |
||||
|
io.rancher.container.pull_image: always |
||||
|
io.rancher.container.hostname_override: container_name |
@ -0,0 +1,34 @@ |
|||||
|
version: '2' |
||||
|
services: |
||||
|
TML-CY: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 5000 |
||||
|
port: 8080 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 30000 |
||||
|
strategy: recreate |
||||
|
request_line: GET "/" "HTTP/1.0" |
||||
|
reinitializing_timeout: 60000 |
||||
|
TML-MENU: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
health_check: |
||||
|
healthy_threshold: 2 |
||||
|
response_timeout: 5000 |
||||
|
port: 8080 |
||||
|
unhealthy_threshold: 3 |
||||
|
initializing_timeout: 60000 |
||||
|
interval: 30000 |
||||
|
strategy: recreate |
||||
|
request_line: GET "/" "HTTP/1.0" |
||||
|
reinitializing_timeout: 60000 |
||||
|
TML-STATIC: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
||||
|
OTT: |
||||
|
scale: 1 |
||||
|
start_on_create: false |
@ -0,0 +1,15 @@ |
|||||
|
export RANCHER_URL=http://localhost:8888 |
||||
|
export IPADDRESS=$(hostname -i) |
||||
|
|
||||
|
#Create Rancher Environment |
||||
|
rancher env create UAT |
||||
|
#Create Application Stacks |
||||
|
rancher --wait-state active --env UAT stack create TML-KHHW -f ./WHL-KHHW/docker-compose.yml -r ./WHL-KHHW/rancher-compose.yml |
||||
|
rancher --wait-state active --env UAT stack create TML-TXGW -f ./WHL-TXGW/docker-compose.yml -r ./WHL-TXGW/rancher-compose.yml |
||||
|
#Create Management Stacks |
||||
|
#Create necessary folders for volume mounting |
||||
|
mkdir -p -m 777 /docker/nexus3/nexus-data |
||||
|
mkdir -p -m 777 /docker/teamcity/data |
||||
|
mkdir -p -m 777 /docker/teamcity/logs |
||||
|
chmod -R 777 /docker/* |
||||
|
rancher --wait-state active --env UAT stack create Management-Backend -f ./Management-Backend/docker-compose.yml -r ./Management-Backend/rancher-compose.yml |
xxxxxxxxxx