-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Nomadic's and BCD tezos indexers #166
Changes from 20 commits
42a174d
0e5dbc8
9ff649e
7ea5e98
c1b17c5
3910c59
8181980
c8d25de
c60057d
2e8697e
eee2ac1
d243424
9ce5ebc
14e0491
15d255b
4053ca5
29a2013
56989c5
02a4bb3
f2723a6
bd1c8cf
5643fe3
a0b8984
1dda418
d85ebf9
3a7a7b2
fe9b4f8
6994b50
cca2e0b
6ef7354
c8420ac
c38bc06
02c674e
2fc5ff8
9d58717
79019bb
03f587e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{{- if eq (include "tezos.indexer" .) "bcd" }} | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ .Values.bcd_indexer_statefulset.name }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
podManagementPolicy: Parallel | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.bcd_indexer_statefulset.name }} | ||
serviceName: {{ .Values.bcd_indexer_statefulset.name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.bcd_indexer_statefulset.name }} | ||
appType: tezos | ||
spec: | ||
securityContext: | ||
fsGroup: 1000 | ||
containers: | ||
- image: bakingbad/bcdhub-api:3.5 | ||
name: api | ||
envFrom: | ||
- configMapRef: | ||
name: bcd-env | ||
- configMapRef: | ||
name: db-creds | ||
- image: bakingbad/bcdhub-indexer:3.5 | ||
name: indexer | ||
envFrom: | ||
- configMapRef: | ||
name: bcd-env | ||
- image: postgres:alpine | ||
name: db | ||
volumeMounts: | ||
- mountPath: /var/lib/postgresql/ | ||
name: indexer-db | ||
envFrom: | ||
- configMapRef: | ||
name: db-creds | ||
- image: rabbitmq:latest | ||
name: mq | ||
volumeMounts: | ||
- mountPath: /var/lib/rabbitmq/mnesia | ||
name: mq-data | ||
env: | ||
- name: RABBITMQ_DEFAULT_USER | ||
value: guest | ||
- name: RABBITMQ_DEFAULT_PASS | ||
value: guest | ||
- image: bakingbad/bcdhub-elastic:3.5 | ||
name: elastic | ||
volumeMounts: | ||
- mountPath: /usr/share/elasticsearch/data | ||
name: esdata | ||
env: | ||
- name: "bootstrap.memory_lock" | ||
value: "true" | ||
- name: "discovery.type" | ||
value: single-node | ||
- name: ES_JAVA_OPTS | ||
value: "-Xms256m -Xmx256m" | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: esdata | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: "300Gi" | ||
- metadata: | ||
name: mq-data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: "5Gi" | ||
- metadata: | ||
name: indexer-db | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: "300Gi" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: bcd-config | ||
data: | ||
bcd_config.yml: |- | ||
storage: | ||
uri: | ||
- http://localhost:9200 | ||
timeout: 10 | ||
rabbitmq: | ||
uri: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@localhost:5672/" | ||
timeout: 10 | ||
db: | ||
conn_string: "host=127.0.0.1 port=5432 user=${POSTGRES_USER} dbname=${POSTGRES_DB} password=${POSTGRES_PASSWORD} sslmode=disable" | ||
timeout: 10 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: bcd-env | ||
data: | ||
BCD_ENV: sandbox | ||
GIN_MODE: debug | ||
ELASTIC_HOSTNAME: localhost | ||
RABBITMQ_HOSTNAME: localhost | ||
DB_HOSTNAME: 127.0.0.1 | ||
RABBITMQ_DEFAULT_USER: guest | ||
RABBITMQ_DEFAULT_PASS: guest | ||
SANDBOX_NODE_URI: "http://{{ .Values.index.target }}:8732" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: db-creds | ||
data: | ||
POSTGRES_USER: root | ||
POSTGRES_PASSWORD: root | ||
POSTGRES_DB: bcd | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{{- if eq (include "tezos.indexer" .) "nomadic" }} | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ .Values.nomadic_indexer_statefulset.name }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
podManagementPolicy: Parallel | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.nomadic_indexer_statefulset.name }} | ||
serviceName: {{ .Values.nomadic_indexer_statefulset.name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.nomadic_indexer_statefulset.name }} | ||
appType: tezos | ||
spec: | ||
initContainers: | ||
- image: registry.gitlab.com/nomadic-labs/tezos-indexer/tezos-indexer:v9.1.0 | ||
command: ["/bin/bash","-c"] | ||
args: [ "/home/tezos/tezos-indexer --db-schema | tee /docker-entrypoint-initdb.d/tezos-indexer-schema.sql" ] | ||
name: schema-extractor | ||
volumeMounts: | ||
- mountPath: /docker-entrypoint-initdb.d/ | ||
name: schema-volume | ||
containers: | ||
- image: registry.gitlab.com/nomadic-labs/tezos-indexer/tezos-indexer:v9.1.0 | ||
name: tezos-indexer | ||
args: | ||
- --debug | ||
- --verbosity=1 | ||
- --no-contract-balances | ||
- --db=postgresql://localhost/tezos | ||
- --tezos-url=http://{{ .Values.index.target }}:8732 | ||
- image: postgres:alpine | ||
name: postgres | ||
volumeMounts: | ||
- mountPath: /docker-entrypoint-initdb.d/ | ||
name: schema-volume | ||
- mountPath: /var/lib/postgresql/data | ||
name: indexer-db | ||
envFrom: | ||
- configMapRef: | ||
name: db-creds | ||
volumes: | ||
- emptyDir: {} | ||
name: schema-volume | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: indexer-db | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: "5Gi" | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: db-creds | ||
data: | ||
POSTGRES_USER: tezos | ||
POSTGRES_PASSWORD: tezosrocks | ||
POSTGRES_DB: tezos | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,9 @@ metadata: | |
spec: | ||
ports: | ||
- port: 8732 | ||
name: rpc | ||
selector: | ||
app: tezos-baking-node | ||
app: tezos-node | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens if there is only a baker in the cluster and no reg nodes? chain-init needs to look for a baker, not a reg node. Hmmmm, well chain-init is a job and as of now every pod has all of the keys imported on it (for sk's this should change). So it would likely still activate the chain even if there is only a single reg node. Shouldn't a baker be a more reliable source for RPC? We should be able to select multiple apps if desired. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just tried on latest commit 02a4bb3 on branch indexer_new, and in minikube. It breaks bec job can't find the activation key.
|
||
type: NodePort | ||
--- | ||
apiVersion: v1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused configmap