Coder Social home page Coder Social logo

bitcoin-etl-streaming's Introduction

Bitcoin ETL Streaming

Streams blocks and transactions to a Pub/Sub topic.

  1. Create a cluster:
gcloud container clusters create bitcoin-etl-streaming \
--zone us-central1-a \
--num-nodes 1 \
--disk-size 10GB \
--machine-type custom-2-4096 \
--scopes pubsub,storage-rw,logging-write,monitoring-write,service-management,service-control,trace
  1. Get kubectl credentials:
gcloud container clusters get-credentials bitcoin-etl-streaming \
--zone us-central1-a
  1. Create Pub/Sub topics "crypto_bitcoin.blocks" and "crypto_bitcoin.transactions". Put it to overlays/bitcoin/configMap.yaml, PUB_SUB_TOPIC_PREFIX property.

  2. Create GCS bucket. Upload a text file with block number you want to start streaming from to gs:/<your-bucket>/bitcoin-etl/streaming/last_synced_block.txt. Put your bucket name to base/configMap.yaml, GCS_BUCKET property.

  3. Update overlays/bitcoin/configMap.yaml, PROVIDER_URI property to point to your Bitcoin node.

  4. Create "bitcoin-etl-app" service account with roles:

    • Pub/Sub Editor
    • Storage Object Creator

Download the key. Create a Kubernetes secret:

kubectl create secret generic bitcoin-etl-app-key --from-file=key.json=$HOME/Downloads/key.json
  1. Install kustomize https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md.
brew install kustomize

Create the application:

kustomize build overlays/bitcoin | kubectl apply -f -
  1. To troubleshoot:
kubectl describe pods
kubectl describe node [NODE_NAME]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.