-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dmarket/feature/devops-1896
Feature/devops 1896
- Loading branch information
Showing
21 changed files
with
440 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
resources: | ||
- deployment.yaml | ||
- configmap.yaml | ||
- service.yaml | ||
# - service.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
resources: | ||
- ingress.yaml | ||
- service.yaml | ||
# - ingress.yaml | ||
# - service.yaml | ||
- serviceaccount.yaml | ||
- role.yaml | ||
- rolebinding.yaml | ||
- secret.yaml | ||
#- secret.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: v1 | ||
data: | ||
config.toml: | | ||
[api] | ||
current_node = "node05" | ||
address = "0.0.0.0:8000" | ||
private_address = "0.0.0.0:8001" | ||
peer_address = "0.0.0.0:2000" | ||
peers = [] | ||
keys_path = "./var/keys" | ||
is_validator = false | ||
[db] | ||
path = "./var/db" | ||
[nats] | ||
enabled = false | ||
[service_discovery] | ||
address = "dmbc-discovery:3000/nodes" | ||
kind: ConfigMap | ||
metadata: | ||
name: dmbc05-config | ||
labels: | ||
app: dmbc05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc05 | ||
labels: | ||
app: dmbc05 | ||
dmbc: "true" | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app: dmbc05 | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
name: dmbc05 | ||
labels: | ||
app: dmbc05 | ||
dmbc: "true" | ||
spec: | ||
containers: | ||
- name: dmarket-blockchain | ||
image: globalgames/dmarket-blockchain:latest | ||
imagePullPolicy: Always | ||
env: | ||
- name: RUST_LOG | ||
value: info | ||
- name: RUST_BACKTRACE | ||
value: "1" | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
ports: | ||
- containerPort: 8000 | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: /src/app/var/keys | ||
name: dmbc05-keys | ||
- mountPath: /src/app/var/db | ||
name: dmbc05 | ||
- mountPath: /src/app/etc | ||
name: dmbc05-config | ||
dnsPolicy: ClusterFirst | ||
imagePullSecrets: | ||
- name: dockerhub | ||
restartPolicy: Always | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- name: dmbc05 | ||
persistentVolumeClaim: | ||
claimName: dmbc05 | ||
- name: dmbc05-keys | ||
secret: | ||
defaultMode: 420 | ||
secretName: dmbc05-keys | ||
- configMap: | ||
defaultMode: 420 | ||
name: dmbc05-config | ||
name: dmbc05-config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resources: | ||
- deployment.yaml | ||
- configmap.yaml | ||
- secret.yaml | ||
- persistentvolumeclaim.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: dmbc05 | ||
labels: | ||
app: dmbc05 | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1100Gi | ||
storageClassName: standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
data: | ||
consensus: | ||
consensus.pub: | ||
service: | ||
service.pub: | ||
kind: Secret | ||
metadata: | ||
name: dmbc05-keys | ||
labels: | ||
app: dmbc05 | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ resources: | |
- dmbc02 | ||
- dmbc03 | ||
- dmbc04 | ||
#- dmbc05 | ||
- dmbc-discovery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
# - ../base | ||
- ../base/dmbc00-common | ||
# - ../base/dmbc01 | ||
# - ../base/dmbc02 | ||
# - ../base/dmbc03 | ||
# - ../base/dmbc04 | ||
- ../base/dmbc05 | ||
# - ../base/dmbc-discovery | ||
namespace: dmbc-prod | ||
images: | ||
- name: globalgames/dmarket-blockchain | ||
newName: globalgames/dmarket-blockchain | ||
newTag: fat-wallets-125 | ||
patchesStrategicMerge: | ||
# - patches/dmbc00-common/ingress.yaml | ||
- patches/dmbc05/deployment.yaml | ||
- patches/dmbc05/node-affinity.yaml | ||
# - patches/dmbc04/deployment.yaml | ||
# - patches/dmbc04/node-affinity.yaml | ||
# - patches/dmbc03/deployment.yaml | ||
# - patches/dmbc03/node-affinity.yaml | ||
# - patches/dmbc02/deployment.yaml | ||
# - patches/dmbc02/node-affinity.yaml | ||
#- patches/dmbc01/deployment.yaml | ||
#- patches/dmbc01/node-affinity.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: dmbc | ||
labels: | ||
app: dmbc | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
nginx.ingress.kubernetes.io/configuration-snippet: | | ||
proxy_set_header X-GeoIP-Country $geoip_country_code; | ||
proxy_set_header X-GeoIP-Country-Name $geoip_country_name; | ||
proxy_set_header X-GeoIP-Region-Name $geoip_region_name; | ||
proxy_set_header X-GeoIP-City $geoip_city; | ||
proxy_set_header X-GeoIP-Postal-Code $geoip_postal_code; | ||
proxy_set_header CF-IPCountry $http_cf_ipcountry; | ||
more_set_headers "X-XSS-Protection: 1; mode=block"; | ||
more_set_headers "X-Frame-Options: SAMEORIGIN"; | ||
nginx.ingress.kubernetes.io/cors-allow-credentials: "true" | ||
nginx.ingress.kubernetes.io/cors-allow-headers: | ||
Content-Type, Accept, Authorization, | ||
Language, X-Forwarded-For, Set-Cookie, Payment-Session-Id, Access-Control-Allow-Origin | ||
nginx.ingress.kubernetes.io/cors-allow-methods: GET, POST, OPTIONS, PUT, DELETE | ||
nginx.ingress.kubernetes.io/cors-allow-origin: "*" | ||
nginx.ingress.kubernetes.io/enable-cors: "true" | ||
nginx.ingress.kubernetes.io/whitelist-source-range: 92.60.189.125,212.90.166.94,94.176.196.244,34.90.237.96,35.189.83.42,35.233.1.160,104.199.34.31,35.233.1.160,34.76.42.79,93.74.83.220,185.143.147.206 | ||
spec: | ||
rules: | ||
- host: dm-blockchain-prod01.devss.xyz | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: dmbc | ||
port: | ||
number: 8000 | ||
path: / | ||
pathType: ImplementationSpecific | ||
tls: | ||
- hosts: | ||
- dm-blockchain-prod01.devss.xyz | ||
secretName: devss-tls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc01 | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: dmbc-configmap-updater | ||
initContainers: | ||
- command: | ||
- sh | ||
- -c | ||
- | | ||
#!/usr/bin/env bash -e | ||
echo "Updating of dmbc04-config configmap" | ||
echo "POD_IP: $POD_IP" | ||
kubectl get cm dmbc01-config -o yaml | sed -e "0,/address = .*/ s/address = .*/address = \"$POD_IP:8000\"/g" | kubectl apply -f - | ||
kubectl get cm dmbc01-config -o yaml | sed -e "s|private_address = .*|private_address = \"$POD_IP:8001\"|g" | kubectl apply -f - | ||
kubectl get cm dmbc01-config -o yaml | sed -e "s|peer_address = .*|peer_address = \"$POD_IP:2000\"|g" | kubectl apply -f - | ||
echo "End" | ||
image: bitnami/kubectl:1.21.2 | ||
imagePullPolicy: IfNotPresent | ||
name: configmap-updater | ||
env: | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc01 | ||
labels: | ||
app: dmbc01 | ||
spec: | ||
template: | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: cloud.google.com/gke-nodepool | ||
operator: In | ||
values: | ||
- dmbc-pool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc02 | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: dmbc-configmap-updater | ||
initContainers: | ||
- command: | ||
- sh | ||
- -c | ||
- | | ||
#!/usr/bin/env bash -e | ||
echo "Updating of dmbc02-config configmap" | ||
echo "POD_IP: $POD_IP" | ||
kubectl get cm dmbc02-config -o yaml | sed -e "0,/address = .*/ s/address = .*/address = \"$POD_IP:8000\"/g" | kubectl apply -f - | ||
kubectl get cm dmbc02-config -o yaml | sed -e "s|private_address = .*|private_address = \"$POD_IP:8001\"|g" | kubectl apply -f - | ||
kubectl get cm dmbc02-config -o yaml | sed -e "s|peer_address = .*|peer_address = \"$POD_IP:2000\"|g" | kubectl apply -f - | ||
echo "End" | ||
image: bitnami/kubectl:1.21.2 | ||
imagePullPolicy: IfNotPresent | ||
name: configmap-updater | ||
env: | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc02 | ||
labels: | ||
app: dmbc02 | ||
spec: | ||
template: | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: cloud.google.com/gke-nodepool | ||
operator: In | ||
values: | ||
- dmbc-pool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc03 | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: dmbc-configmap-updater | ||
initContainers: | ||
- command: | ||
- sh | ||
- -c | ||
- | | ||
#!/usr/bin/env bash -e | ||
echo "Updating of dmbc04-config configmap" | ||
echo "POD_IP: $POD_IP" | ||
kubectl get cm dmbc03-config -o yaml | sed -e "0,/address = .*/ s/address = .*/address = \"$POD_IP:8000\"/g" | kubectl apply -f - | ||
kubectl get cm dmbc03-config -o yaml | sed -e "s|private_address = .*|private_address = \"$POD_IP:8001\"|g" | kubectl apply -f - | ||
kubectl get cm dmbc03-config -o yaml | sed -e "s|peer_address = .*|peer_address = \"$POD_IP:2000\"|g" | kubectl apply -f - | ||
echo "End" | ||
image: bitnami/kubectl:1.21.2 | ||
imagePullPolicy: IfNotPresent | ||
name: configmap-updater | ||
env: | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: dmbc03 | ||
labels: | ||
app: dmbc03 | ||
spec: | ||
template: | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: cloud.google.com/gke-nodepool | ||
operator: In | ||
values: | ||
- dmbc-pool |
Oops, something went wrong.