trial
This commit is contained in:
parent
d3c3047142
commit
a511909fe6
@ -15,7 +15,7 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
@ -39,7 +39,7 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
@ -58,7 +58,7 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
@ -77,7 +77,7 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
@ -94,7 +94,7 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
@ -112,7 +112,7 @@ services:
|
|||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
@ -132,7 +132,7 @@ services:
|
|||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == development]
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
agent:
|
|
||||||
image: portainer/agent:2.11.1
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- /var/lib/docker/volumes:/var/lib/docker/volumes
|
|
||||||
networks:
|
|
||||||
- agent_network
|
|
||||||
deploy:
|
|
||||||
mode: global
|
|
||||||
placement:
|
|
||||||
constraints: [node.platform.os == linux]
|
|
||||||
|
|
||||||
portainer:
|
|
||||||
image: portainer/portainer-ce:2.11.1
|
|
||||||
command: -H tcp://tasks.agent:9001 --tlsskipverify
|
|
||||||
ports:
|
|
||||||
- "9443:9443"
|
|
||||||
- "8888:9000"
|
|
||||||
- "8000:8000"
|
|
||||||
volumes:
|
|
||||||
- portainer_data:/data
|
|
||||||
networks:
|
|
||||||
- agent_network
|
|
||||||
deploy:
|
|
||||||
mode: replicated
|
|
||||||
replicas: 1
|
|
||||||
placement:
|
|
||||||
constraints: [node.role == manager]
|
|
||||||
|
|
||||||
networks:
|
|
||||||
agent_network:
|
|
||||||
driver: overlay
|
|
||||||
attachable: true
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
portainer_data:
|
|
@ -28,7 +28,7 @@ services:
|
|||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 1
|
replicas: 1
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.labels.stage == production]
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
agent_network:
|
agent_network:
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
version: '3.3'
|
|
||||||
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
image: swarmpit/swarmpit:latest
|
|
||||||
environment:
|
|
||||||
- SWARMPIT_DB=http://db:5984
|
|
||||||
- SWARMPIT_INFLUXDB=http://influxdb:8086
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
|
||||||
interval: 60s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
networks:
|
|
||||||
- net
|
|
||||||
ports:
|
|
||||||
- "888:8080"
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 1024M
|
|
||||||
reservations:
|
|
||||||
memory: 512M
|
|
||||||
placement:
|
|
||||||
constraints:
|
|
||||||
- node.role == manager
|
|
||||||
db:
|
|
||||||
image: treehouses/couchdb:2.3.1
|
|
||||||
networks:
|
|
||||||
- net
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 256M
|
|
||||||
reservations:
|
|
||||||
memory: 128M
|
|
||||||
|
|
||||||
influxdb:
|
|
||||||
image: influxdb:1.7
|
|
||||||
networks:
|
|
||||||
- net
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 256M
|
|
||||||
reservations:
|
|
||||||
memory: 128M
|
|
||||||
|
|
||||||
agent:
|
|
||||||
image: swarmpit/agent:latest
|
|
||||||
environment:
|
|
||||||
- DOCKER_API_VERSION=1.35
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
networks:
|
|
||||||
- net
|
|
||||||
deploy:
|
|
||||||
mode: global
|
|
||||||
labels:
|
|
||||||
swarmpit.agent: 'true'
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 64M
|
|
||||||
reservations:
|
|
||||||
memory: 32M
|
|
||||||
|
|
||||||
networks:
|
|
||||||
net:
|
|
||||||
driver: overlay
|
|
@ -24,8 +24,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
memory: 512M
|
memory: 512M
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints: [node.labels.stage == production]
|
||||||
- node.role == manager
|
|
||||||
db:
|
db:
|
||||||
image: treehouses/couchdb:2.3.1
|
image: treehouses/couchdb:2.3.1
|
||||||
networks:
|
networks:
|
||||||
|
@ -42,11 +42,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: dev
|
ref: dev
|
||||||
- name: prepare
|
- name: prepare
|
||||||
run: chmod 777 ./run.sh && ./run.sh
|
run: chmod 777 ./prepare/run-development.sh && ./prepare/run-development.sh
|
||||||
- name: deploy swarmpit
|
|
||||||
run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-dev.yaml swarmpit
|
|
||||||
- name: deploy portainer
|
|
||||||
run: docker stack deploy --with-registry-auth -c ./.deploy-portainer/deploy-dev.yaml portainer
|
|
||||||
- name: deploy infra
|
- name: deploy infra
|
||||||
env:
|
env:
|
||||||
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
|
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
|
||||||
@ -55,4 +51,4 @@ jobs:
|
|||||||
REDIS_PASSWORD_DEV: ${{ secrets.REDIS_PASSWORD_DEV }}
|
REDIS_PASSWORD_DEV: ${{ secrets.REDIS_PASSWORD_DEV }}
|
||||||
RABBITMQ_PASSWORD_DEV: ${{ secrets.RABBITMQ_PASSWORD_DEV }}
|
RABBITMQ_PASSWORD_DEV: ${{ secrets.RABBITMQ_PASSWORD_DEV }}
|
||||||
REGISTRATION_TOKEN: ${{ secrets.REGISTRATION_TOKEN }}
|
REGISTRATION_TOKEN: ${{ secrets.REGISTRATION_TOKEN }}
|
||||||
run: docker stack deploy --with-registry-auth -c ./.deploy-infra/deploy-dev.yaml infra
|
run: docker stack deploy --with-registry-auth -c ./.deploy-infra/deploy-dev.yaml infra-development
|
||||||
|
@ -42,7 +42,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: prod
|
ref: prod
|
||||||
- name: prepare
|
- name: prepare
|
||||||
run: chmod 777 ./run.sh && ./run.sh
|
run: chmod 777 ./prepare/run-production.sh && ./prepare/run-production.sh
|
||||||
- name: deploy swarmpit
|
- name: deploy swarmpit
|
||||||
run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-prod.yaml swarmpit
|
run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-prod.yaml swarmpit
|
||||||
- name: deploy portainer
|
- name: deploy portainer
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
FROM gitlab/gitlab-runner
|
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install --yes ca-certificates curl gnupg lsb-release
|
|
||||||
RUN mkdir -p /etc/apt/keyrings
|
|
||||||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
||||||
RUN echo \
|
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
|
||||||
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
||||||
RUN apt-get update --yes
|
|
||||||
RUN apt-get install --yes docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
|
||||||
RUN mkdir /etc/builds/
|
|
||||||
RUN chmod 777 /etc/builds
|
|
11
prepare/run-development.sh
Normal file
11
prepare/run-development.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
docker login -u mathwave -p $DOCKERHUB_PASSWORD
|
||||||
|
docker network create -d overlay --attachable common-infra-nginx-development || true
|
||||||
|
docker network create -d overlay --attachable queues-development || true
|
||||||
|
mkdir /sprint-data/mongo || true
|
||||||
|
mkdir /sprint-data/redis || true
|
||||||
|
mkdir /sprint-data/rabbitmq || true
|
||||||
|
mkdir /sprint-data/certs || true
|
||||||
|
mkdir /sprint-data/gitea || true
|
||||||
|
chmod 777 /sprint-data/redis
|
||||||
|
chmod 777 /sprint-data/rabbitmq
|
||||||
|
chmod 777 /sprint-data/gitea
|
Loading…
Reference in New Issue
Block a user