-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Artem Yushkovskiy
authored
Jul 2, 2019
1 parent
f9680e3
commit 84928f2
Showing
8 changed files
with
179 additions
and
23 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
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
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,25 @@ | ||
|
||
|
||
### _cd_ to _deploy_ folder | ||
``` cd deploy ``` | ||
|
||
### Connect to cluster | ||
```gcloud container clusters get-credentials prod-cluster-01 --zone us-west1-b --project production-228907``` | ||
|
||
|
||
|
||
# Deploy in Production cluster | ||
|
||
### Deploy platform-registry-api | ||
```helm --set "global.env=prod" upgrade --install platformmonitoringapi platformmonitoringapi``` | ||
|
||
|
||
|
||
#Deploy in staging and dev clusters | ||
|
||
Dev : | ||
- helm --set "global.env=dev" upgrade --install platformmonitoringapi platformmonitoringapi | ||
|
||
Staging : | ||
- helm --set "global.env=stage" upgrade --install platformmonitoringapi --name=platformmonitoringapi | ||
|
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,4 @@ | ||
name: platformmonitoringapi | ||
description: Deploy platformmonitoringapi | ||
version: 0.0.1 | ||
appVersion: 0.0.1 |
69 changes: 69 additions & 0 deletions
69
deploy/platformmonitoringapi/templates/platformmonitoring.gke.yml
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,69 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: platformmonitoringapi | ||
spec: | ||
replicas: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_REPLICAS | first | default .Values.NP_MONITORING_REPLICAS._default) }} | ||
selector: | ||
matchLabels: | ||
service: platformmonitoringapi | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
service: platformmonitoringapi | ||
spec: | ||
containers: | ||
- name: platformmonitoringapi | ||
image: {{ printf "%s" (pluck .Values.global.env .Values.IMAGE | first | default .Values.IMAGE._default) }} | ||
imagePullPolicy: Always | ||
resources: | ||
requests: | ||
cpu: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_REQUESTS_CPU | first | default .Values.NP_MONITORING_REQUESTS_CPU._default) }} | ||
memory: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_REQUESTS_MEMORY | first | default .Values.NP_MONITORING_REQUESTS_MEMORY._default) }} | ||
limits: | ||
cpu: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_LIMITS_CPU | first | default .Values.NP_MONITORING_LIMITS_CPU._default) }} | ||
memory: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_LIMITS_MEMORY | first | default .Values.NP_MONITORING_LIMITS_MEMORY._default) }} | ||
env: | ||
- name: NP_MONITORING_PLATFORM_API_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: platformservices-secret | ||
key: compute_token | ||
- name: NP_MONITORING_PLATFORM_AUTH_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: platformservices-secret | ||
key: compute_token | ||
- name: NP_MONITORING_K8S_API_URL | ||
value: https://kubernetes:443 | ||
- name: NP_MONITORING_K8S_AUTH_TYPE | ||
value: token | ||
- name: NP_MONITORING_K8S_CA_PATH | ||
value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
- name: NP_MONITORING_K8S_TOKEN_PATH | ||
value: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
- name: NP_MONITORING_PLATFORM_API_URL | ||
value: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_PLATFORM_API_URL | first | default .Values.NP_MONITORING_PLATFORM_API_URL._default) }} | ||
- name: NP_MONITORING_PLATFORM_AUTH_URL | ||
value: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_PLATFORM_AUTH_URL | first | default .Values.NP_MONITORING_PLATFORM_AUTH_URL._default) }} | ||
- name: NP_MONITORING_ES_HOSTS | ||
value: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_ES_HOSTS | first | default .Values.NP_MONITORING_ES_HOSTS._default) }} | ||
- name: NP_MONITORING_K8S_NS | ||
value: {{ printf "%s" (pluck .Values.global.env .Values.NP_MONITORING_K8S_NS | first | default .Values.NP_MONITORING_K8S_NS._default) }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: platformmonitoringapi | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
service: platformmonitoringapi |
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,50 @@ | ||
IMAGE: | ||
_default: gcr.io/light-reality-205619/platformmonitoringapi:latest | ||
dev: gcr.io/light-reality-205619/platformmonitoringapi:latest | ||
staging: gcr.io/light-reality-205619/platformmonitoringapi:latest | ||
prod: gcr.io/production-228907/platformmonitoringapi:latest | ||
NP_MONITORING_REQUESTS_CPU: | ||
_default: "0.3" | ||
dev: "0.1" | ||
staging: "0.1" | ||
prod: "0.1" | ||
NP_MONITORING_LIMITS_CPU: | ||
_default: "0.5" | ||
dev: "0.2" | ||
staging: "0.3" | ||
prod: "0.2" | ||
NP_MONITORING_REQUESTS_MEMORY: | ||
_default: "100Mi" | ||
dev: "50Mi" | ||
staging: "50Mi" | ||
prod: "50Mi" | ||
NP_MONITORING_LIMITS_MEMORY: | ||
_default: "150Mi" | ||
dev: "100Mi" | ||
staging: "100Mi" | ||
prod: "100Mi" | ||
NP_MONITORING_REPLICAS: | ||
_default: "2" | ||
dev: "2" | ||
staging: "2" | ||
prod: "2" | ||
NP_MONITORING_PLATFORM_API_URL: | ||
_default: http://platformapi:8080/api/v1 | ||
dev: http://platformapi:8080/api/v1 | ||
staging: http://platformapi:8080/api/v1 | ||
prod: http://platformapi:8080/api/v1 | ||
NP_MONITORING_PLATFORM_AUTH_URL: | ||
_default: http://platformauthapi:8080 | ||
dev: http://platformauthapi:8080 | ||
staging: http://platformauthapi:8080 | ||
prod: http://platformauthapi:8080 | ||
NP_MONITORING_ES_HOSTS: | ||
_default: http://logging-elasticsearch:9200 | ||
dev: http://logging-elasticsearch:9200 | ||
staging: http://logging-elasticsearch:9200 | ||
prod: http://logging-elasticsearch:9200 | ||
NP_MONITORING_K8S_NS: | ||
_default: default | ||
dev: default | ||
staging: default | ||
prod: default |
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
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