Commit 3dafe424 authored by Sergei Zubov's avatar Sergei Zubov

Merge remote-tracking branch 'origin/release' into dev

parents 7a3d08c8 b6802d31
Pipeline #201 canceled with stages
in 18 seconds
...@@ -4,7 +4,8 @@ stages: ...@@ -4,7 +4,8 @@ stages:
- build_prod - build_prod
- deploy_to_test - deploy_to_test
- run_tests - run_tests
- deploy_to_prod - deploy_node_to_prod
- deploy_seed_to_prod
build_dev: build_dev:
stage: build_dev stage: build_dev
...@@ -107,30 +108,15 @@ run_test: ...@@ -107,30 +108,15 @@ run_test:
tags: tags:
- buidl1-dind - buidl1-dind
deploy_to_prod: deploy_node_to_prod:
stage: deploy_to_prod stage: deploy_node_to_prod
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script: script:
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node1.tpl.yml > node1.yml; cat node1.yml - cd ~/infra && git reset --hard HEAD && git pull
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node2.tpl.yml > node2.yml; cat node2.yml - ansible-playbook -i inventory/hosts playbooks/cloud.yml -e "CI_PIPELINE_ID=${CI_PIPELINE_ID}" -t "destream-blockchain" -u build1-shell
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node3.tpl.yml > node3.yml; cat node3.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' seed1.tpl.yml > seed1.yml; cat seed1.yml
- wget https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl && chmod +x ./kubectl
- wget https://github.com/garethr/kubeval/releases/download/0.7.3/kubeval-linux-amd64.tar.gz && tar xvf kubeval-linux-amd64.tar.gz
- ./kubeval node1.yml && ./kubeval node2.yml && ./kubeval node3.yml && ./kubeval seed1.yml
- ./kubectl apply -f node1.yml
- ./kubectl apply -f node2.yml
- ./kubectl apply -f node3.yml
- ./kubectl apply -f seed1.yml
environment: environment:
name: ${CI_COMMIT_REF_NAME} name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com url: https://xvideos.com
only: only:
- release - release
tags: tags:
- buidl1-dind - buidl1-shell
\ No newline at end of file \ No newline at end of file
...@@ -5,9 +5,9 @@ metadata: ...@@ -5,9 +5,9 @@ metadata:
name: node1 name: node1
labels: labels:
app: node1 app: node1
namespace: prod namespace: prod1
spec: spec:
replicas: 3 replicas: 1
revisionHistoryLimit: 2 revisionHistoryLimit: 2
strategy: strategy:
type: Recreate type: Recreate
......
...@@ -5,9 +5,9 @@ metadata: ...@@ -5,9 +5,9 @@ metadata:
name: node2 name: node2
labels: labels:
app: node2 app: node2
namespace: prod namespace: prod2
spec: spec:
replicas: 3 replicas: 1
revisionHistoryLimit: 2 revisionHistoryLimit: 2
strategy: strategy:
type: Recreate type: Recreate
......
...@@ -5,9 +5,9 @@ metadata: ...@@ -5,9 +5,9 @@ metadata:
name: node3 name: node3
labels: labels:
app: node3 app: node3
namespace: prod namespace: prod3
spec: spec:
replicas: 3 replicas: 1
revisionHistoryLimit: 2 revisionHistoryLimit: 2
strategy: strategy:
type: Recreate type: Recreate
......
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node4
labels:
app: node4
namespace: prod4
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app: node
template:
metadata:
labels:
app: node
spec:
containers:
- name: node4
image: _IMAGE_NAME_:_VERSION_
command: ["dotnet"]
args: ["DeStream.DeStreamD.dll","-addnode=148.251.53.215","-addnode=144.76.219.71"]
ports:
- name: node-api
containerPort: 56833
- name: node-svc
containerPort: 56864
volumeMounts:
- name: pv-node4
mountPath: "/root/.destreamnode"
imagePullSecrets:
- name: registrypullsecret
volumes:
- name: pv-node4
persistentVolumeClaim:
claimName: pv-node4-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node5
labels:
app: node5
namespace: prod5
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app: node
template:
metadata:
labels:
app: node
spec:
containers:
- name: node5
image: _IMAGE_NAME_:_VERSION_
command: ["dotnet"]
args: ["DeStream.DeStreamD.dll","-addnode=148.251.53.215","-addnode=144.76.219.71"]
ports:
- name: node-api
containerPort: 56833
- name: node-svc
containerPort: 56864
volumeMounts:
- name: pv-node5
mountPath: "/root/.destreamnode"
imagePullSecrets:
- name: registrypullsecret
volumes:
- name: pv-node5
persistentVolumeClaim:
claimName: pv-node5-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node6
labels:
app: node6
namespace: prod6
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app: node
template:
metadata:
labels:
app: node
spec:
containers:
- name: node6
image: _IMAGE_NAME_:_VERSION_
command: ["dotnet"]
args: ["DeStream.DeStreamD.dll","-addnode=148.251.53.215","-addnode=144.76.219.71"]
ports:
- name: node-api
containerPort: 56833
- name: node-svc
containerPort: 56864
volumeMounts:
- name: pv-node6
mountPath: "/root/.destreamnode"
imagePullSecrets:
- name: registrypullsecret
volumes:
- name: pv-node6
persistentVolumeClaim:
claimName: pv-node6-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node7
labels:
app: node7
namespace: prod7
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app: node
template:
metadata:
labels:
app: node
spec:
containers:
- name: node7
image: _IMAGE_NAME_:_VERSION_
command: ["dotnet"]
args: ["DeStream.DeStreamD.dll","-addnode=148.251.53.215","-addnode=144.76.219.71"]
ports:
- name: node-api
containerPort: 56833
- name: node-svc
containerPort: 56864
volumeMounts:
- name: pv-node7
mountPath: "/root/.destreamnode"
imagePullSecrets:
- name: registrypullsecret
volumes:
- name: pv-node7
persistentVolumeClaim:
claimName: pv-node7-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node8
labels:
app: node8
namespace: prod8
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app: node
template:
metadata:
labels:
app: node
spec:
containers:
- name: node8
image: _IMAGE_NAME_:_VERSION_
command: ["dotnet"]
args: ["DeStream.DeStreamD.dll","-addnode=148.251.53.215","-addnode=144.76.219.71"]
ports:
- name: node-api
containerPort: 56833
- name: node-svc
containerPort: 56864
volumeMounts:
- name: pv-node8
mountPath: "/root/.destreamnode"
imagePullSecrets:
- name: registrypullsecret
volumes:
- name: pv-node8
persistentVolumeClaim:
claimName: pv-node8-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node9
labels:
app: node9
namespace: prod9
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app: node
template:
metadata:
labels:
app: node
spec:
containers:
- name: node9
image: _IMAGE_NAME_:_VERSION_
command: ["dotnet"]
args: ["DeStream.DeStreamD.dll","-addnode=148.251.53.215","-addnode=144.76.219.71"]
ports:
- name: node-api
containerPort: 56833
- name: node-svc
containerPort: 56864
volumeMounts:
- name: pv-node9
mountPath: "/root/.destreamnode"
imagePullSecrets:
- name: registrypullsecret
volumes:
- name: pv-node9
persistentVolumeClaim:
claimName: pv-node9-claim
...@@ -7,7 +7,7 @@ metadata: ...@@ -7,7 +7,7 @@ metadata:
app: seed1 app: seed1
namespace: prod namespace: prod
spec: spec:
replicas: 2 replicas: 3
revisionHistoryLimit: 2 revisionHistoryLimit: 2
strategy: strategy:
type: Recreate type: Recreate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment