Skip to content

Commit

Permalink
Basic geth containerization. Need to figure out the config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmesser committed Feb 20, 2018
1 parent c550f16 commit d004d8e
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
32 changes: 32 additions & 0 deletions geth-master/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get -y install autoconf \
automake \
bsdmainutils \
build-essential \
curl \
g++-multilib \
git \
libc6-dev \
libtool \
m4 \
ncurses-dev \
pkg-config \
python \
python-software-properties \
software-properties-common \
unzip \
wget \
zlib1g-dev \
golang-go

# Build btcg
COPY scripts/ scripts
RUN ./scripts/build.sh

# Copy over config
COPY etc/bitcoingold.conf /root/.bitcoingold/bitcoingold.conf

# Run btcg daemon
CMD ./BTCGPU/depends/x86_64-pc-linux-gnu/bin/bgoldd -bootstrap -printtoconsole
26 changes: 26 additions & 0 deletions geth-master/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export KUBECONFIG=../config/gke.yaml

all: deploy

build:
docker build . -t eth-master:latest
docker tag eth-master:latest gcr.io/secret-pool/eth-master:latest
gcloud docker -- push gcr.io/secret-pool/eth-master:latest

create: build
kubectl create -f pod.yaml

deploy: build
kubectl apply -f pod.yaml

delete:
kubectl delete eth-master

status:
kubectl get pod eth-master -o yaml

logs:
kubectl logs eth-master -f

ssh:
kubectl exec -it eth-master -- /bin/bash
Empty file added geth-master/etc/geth.conf
Empty file.
8 changes: 8 additions & 0 deletions geth-master/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Pod
metadata:
name: geth
spec:
containers:
- name: geth
image: gcr.io/secret-pool/geth:latest
7 changes: 7 additions & 0 deletions geth-master/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Clone geth repo
git clone https://github.com/ethereum/go-ethereum
cd go-ethereum

make geth

0 comments on commit d004d8e

Please sign in to comment.