Skip to content

Commit

Permalink
[HELM][Blockscout] Updated package
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortejoso committed Oct 10, 2019
1 parent b189f50 commit d728b67
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ CLUSTER_DOMAIN_NAME="celo-networks-dev"
TESTNET_PROJECT_NAME="celo-testnet"

BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/blockscout"
BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG="web-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG="indexer-f6c3e0888d1d0ef72dc8bf870808702b7fd13730"
BLOCKSCOUT_DOCKER_IMAGE_TAG="ad86714d629c01272e0651dec1fb6a968c3cec71"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX=

Expand Down
3 changes: 1 addition & 2 deletions packages/celotool/src/lib/blockscout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ async function helmParameters(
const params = [
`--set domain.name=${fetchEnv('CLUSTER_DOMAIN_NAME')}`,
`--set blockscout.image.repository=${fetchEnv('BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY')}`,
`--set blockscout.image.webTag=${fetchEnv('BLOCKSCOUT_WEB_DOCKER_IMAGE_TAG')}`,
`--set blockscout.image.indexerTag=${fetchEnv('BLOCKSCOUT_INDEXER_DOCKER_IMAGE_TAG')}`,
`--set blockscout.image.tag=${fetchEnv('BLOCKSCOUT_DOCKER_IMAGE_TAG')}`,
`--set blockscout.db.username=${blockscoutDBUsername}`,
`--set blockscout.db.password=${blockscoutDBPassword}`,
`--set blockscout.db.connection_name=${blockscoutDBConnectionName.trim()}`,
Expand Down
4 changes: 2 additions & 2 deletions packages/helm-charts/blockscout/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: blockscout
version: 0.0.1
version: 0.0.2
description: Chart which is used to deploy a blockscout setup for a celo testnet
keywords:
- ethereum
- blockchain
- blockscout
appVersion: v1.7.3
appVersion: v2.0.4-beta
20 changes: 15 additions & 5 deletions packages/helm-charts/blockscout/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ volumes:
{{- end -}}

{{- define "celo.blockscout-env-vars" -}}
- name: DB_USERNAME
- name: DATABASE_USER
valueFrom:
secretKeyRef:
name: {{ .Release.Namespace }}-blockscout
key: DB_USERNAME
- name: DB_PASSWORD
key: DATABASE_USER
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Namespace }}-blockscout
key: DB_PASSWORD
key: DATABASE_PASSWORD
- name: NETWORK
value: Celo
- name: SUBNETWORK
Expand All @@ -43,7 +43,17 @@ volumes:
- name: ETHEREUM_JSONRPC_WS_URL
value: {{ .Values.blockscout.jsonrpc_ws_url }}
- name: DATABASE_URL
value: postgres://$(DB_USERNAME):$(DB_PASSWORD)@127.0.0.1:5432/{{ .Values.blockscout.db.name }}
value: postgres://$(DATABASE_USER):$(DATABASE_PASSWORD)@127.0.0.1:5432/{{ .Values.blockscout.db.name }}
- name: DATABASE_DB
value: {{ .Values.blockscout.db.name }}
- name: DATABASE_HOSTNAME
value: "127.0.0.1"
- name: DATABASE_PORT
value: "5432"
- name: MIX_ENV
value: prod
- name: LOGO
value: /images/celo_logo.svg
{{- end -}}

{{- define "celo.prom-to-sd-container" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ spec:
spec:
containers:
- name: blockscout-indexer
image: {{ .Values.blockscout.image.repository }}:{{ .Values.blockscout.image.indexerTag }}
image: {{ .Values.blockscout.image.repository }}:{{ .Values.blockscout.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- /bin/sh
- -c
args:
- |
mix cmd --app indexer iex -S mix
ports:
- name: http
containerPort: 4000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: blockscout-web
image: {{ .Values.blockscout.image.repository }}:{{ .Values.blockscout.image.webTag }}
image: {{ .Values.blockscout.image.repository }}:{{ .Values.blockscout.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command: ["/bin/sh"]
args: ["-c", "echo Sleeping for 15; sleep 15; mix ecto.migrate"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ spec:
spec:
containers:
- name: blockscout-web
image: {{ .Values.blockscout.image.repository }}:{{ .Values.blockscout.image.webTag }}
image: {{ .Values.blockscout.image.repository }}:{{ .Values.blockscout.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- /bin/sh
- -c
args:
- |
mix cmd --app block_scout_web mix phx.server
ports:
- name: http
containerPort: 4000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
heritage: {{ .Release.Service }}
type: Opaque
data:
DB_USERNAME: {{ .Values.blockscout.db.username | b64enc | quote }}
DB_PASSWORD: {{ .Values.blockscout.db.password | b64enc | quote }}
DATABASE_USER: {{ .Values.blockscout.db.username | b64enc | quote }}
DATABASE_PASSWORD: {{ .Values.blockscout.db.password | b64enc | quote }}
3 changes: 1 addition & 2 deletions packages/helm-charts/blockscout/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ promtosd:
blockscout:
image:
repository: gcr.io/celo-testnet/blockscout
webTag: web
indexerTag: indexer
tag: v2.0.4-beta-celo
db:
# ip: must be provided at runtime # IP address of the postgres DB
# connection_name: must be provided at runtime # name of the cloud sql connection
Expand Down

0 comments on commit d728b67

Please sign in to comment.