Created
May 25, 2018 15:42
-
-
Save DazWilkin/c2bc593bdb211a270e2459f4079b279f to your computer and use it in GitHub Desktop.
Ethereum on Google Cloud Platform
This file contains hidden or 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
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: datadir | |
spec: | |
storageClassName: standard | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 500Gi | |
... | |
--- | |
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: ethereum | |
labels: | |
run: ethereum | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
run: ethereum | |
template: | |
metadata: | |
labels: | |
run: ethereum | |
spec: | |
initContainers: | |
- name: init-service | |
image: alpine | |
command: ["ash","-c","cp /keystore/UTC* /cache"] | |
volumeMounts: | |
- name: keystore | |
mountPath: /keystore | |
- name: cache | |
mountPath: /cache | |
containers: | |
- name: ethereum | |
image: ethereum/client-go | |
args: [ | |
"--rinkeby", | |
"--datadir=/datadir", | |
"--keystore=/cache", | |
"--rpc", | |
"--rpcaddr=0.0.0.0", | |
"--rpcapi=\"db,eth,net,web3,personal,web3\"" | |
] | |
imagePullPolicy: Always | |
ports: | |
- name: json-rpc | |
containerPort: 8545 | |
protocol: TCP | |
- name: default | |
containerPort: 30303 | |
protocol: TCP | |
volumeMounts: | |
- name: datadir | |
mountPath: /datadir | |
- name: keystore | |
mountPath: /keystore | |
- name: cache | |
mountPath: /cache | |
volumes: | |
- name: datadir | |
persistentVolumeClaim: | |
claimName: datadir | |
readOnly: false | |
- name: keystore | |
secret: | |
secretName: keystore | |
- name: cache | |
emptyDir: {} | |
... | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: ethereum | |
labels: | |
run: ethereum | |
spec: | |
ports: | |
- name: json-rpc | |
port: 30303 | |
protocol: TCP | |
targetPort: 30303 | |
- name: default | |
port: 8545 | |
protocol: TCP | |
targetPort: 8545 | |
selector: | |
run: ethereum | |
type: NodePort | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment