Created
May 21, 2018 20:24
-
-
Save oatmealraisin/83e6ae0917d45727078ecdb76a53d54c to your computer and use it in GitHub Desktop.
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
kind: List | |
apiVersion: v1 | |
items: | |
- apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: genesis | |
app: ${NODE_NAME} | |
spec: | |
restartPolicy: Never | |
hostname: genesis | |
subdomain: ${NODE_NAME} | |
containers: | |
- name: genesis | |
env: | |
- name: PYTHONPATH | |
value: /project/sawtooth-core/consensus/poet/common:/project/sawtooth-core/consensus/poet/simulator:/project/sawtooth-core.consensus/poet/core | |
- name: POD_IP | |
valueFrom: | |
fieldRef: | |
fieldPath: status.podIP | |
- name: POD_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: POD_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
- name: SAWTOOTH_NODE_ADDRESS | |
value: ${POD_NAME}.$(NODE_NAME).${POD_NAMESPACE}.${SVC_NAME} | |
securityContext: | |
privileged: true | |
command: [ "bash" ] | |
args: | |
- -c | |
- 'cd /var/lib/sawtooth && sawadm keygen --force && sawset genesis -k /etc/sawtooth/keys/validator.priv | |
-o config-genesis.batch && sawset proposal create -k /etc/sawtooth/keys/validator.priv | |
sawtooth.consensus.algorithm=poet sawtooth.poet.report_public_key_pem="$(cat | |
/project/extra/sawtooth-core/consensus/poet/simulator/packaging/simulator_rk_pub.pem)" sawtooth.poet.valid_enclave_measurements=$(poet | |
enclave measurement) sawtooth.poet.valid_enclave_basenames=$(poet enclave | |
basename) -o config.batch && chmod +x /etc/sawtooth/config/poet-settings.sh/poet-settings.sh && poet registration create -k /etc/sawtooth/keys/validator.priv | |
-o poet.batch && sawset proposal create -k /etc/sawtooth/keys/validator.priv sawtooth.poet.target_wait_time=5 sawtooth.poet.initial_wait_time=25 sawtooth.publisher.max_batches_per_block=100 -o poet-settings.batch && sawadm | |
genesis config-genesis.batch config.batch poet.batch poet-settings.batch | |
&& sawtooth-validator -v --bind network:tcp://eth0:8800 --bind component:tcp://127.0.0.1:4004 | |
--peering dynamic --endpoint tcp://validator-0:8800 --scheduler serial --network | |
trust -vvv' | |
image: hyperledger/sawtooth-validator:1.0 | |
imagePullPolicy: IfNotPresent | |
volumeMounts: | |
- name: validator-config | |
mountPath: /etc/sawtooth/validator.toml | |
subPath: validator.toml | |
- name: poet-config-keys | |
mountPath: /etc/sawtooth/config/simulator_rk_pub.pem | |
subPath: simulator_rk_pub.pem | |
- name: poet-config-sh | |
mountPath: /etc/sawtooth/config/poet-settings.sh | |
subpath: poet-settings.sh | |
- name: validator-storage | |
mountPath: /var/lib/sawtooth | |
- name: validator-keys | |
mountPath: /etc/sawtooth/keys | |
- name: sawtooth-core | |
mountPath: /project/extra/ | |
ports: | |
- name: 4004-component | |
containerPort: 4004 | |
protocol: TCP | |
- name: 8800-network | |
containerPort: 8800 | |
protocol: TCP | |
livenessProbe: | |
failureThreshold: 3 | |
initialDelaySeconds: 10 | |
periodSeconds: 10 | |
successThreshold: 1 | |
tcpSocket: | |
port: 4004 | |
timeoutSeconds: 1 | |
- name: sawtooth-settings-tp | |
securityContext: | |
privilaged: true | |
command: [ "settings-tp" ] | |
args: [ "-vvv", "-C", "tcp://localhost:4004" ] | |
image: hyperledger/sawtooth-settings-tp:latest | |
ports: | |
- name: 4004-component | |
containerPort: 4004 | |
protocol: TCP | |
- name: sawtooth-rest-api | |
securityContext: | |
privilaged: true | |
command: [ "sawtooth-rest-api" ] | |
args: [ "-vvv", "-C", "tcp://localhost:4004" ] | |
image: hyperledger/sawtooth-rest-api:1.0 | |
ports: | |
- name: 4004-component | |
containerPort: 4004 | |
protocol: TCP | |
- name: sawtooth-validator-registry | |
securityContext: | |
privilaged: true | |
command: [ "poet-validator-registry-tp" ] | |
args: [ "-vvv", "-C", "tcp://localhost:4004" ] | |
image: hyperledger/sawtooth-poet-validator-registry-tp:1.0 | |
volumeMounts: | |
- name: sawtooth-core | |
mountPath: /project/extra | |
ports: | |
- name: 4004-component | |
containerPort: 4004 | |
protocol: TCP | |
env: | |
- name: PYTHONPATH | |
value: /project/sawtooth-core/consensus/poet/common | |
- name: sawtooth-intkey-tp | |
securityContext: | |
privilaged: true | |
command: [ "intkey-tp-python" ] | |
args: [ "-vvv", "-C", "tcp://localhost:4004" ] | |
image: hyperledger/sawtooth-intkey-tp-python:1.0 | |
ports: | |
- name: 4004-component | |
containerPort: 4004 | |
protocol: TCP | |
serviceAccountName: sawtooth | |
volumes: | |
- name: sawtooth-core | |
gitRepo: | |
repository: "https://github.com/hyperledger/sawtooth-core.git" | |
revision: "30ace3d0fcf2de6c64287e8b7d16194190709e6f" | |
- name: validator-config | |
configMap: | |
name: sawtooth-config | |
items: | |
- key: validator.toml | |
path: validator.toml | |
- name: poet-config-sh | |
configMap: | |
name: sawtooth-poet-settings | |
items: | |
- key: poet-settings.sh | |
path: poet-settings.sh | |
- name: poet-config-keys | |
configMap: | |
name: sawtooth-simiulator-rk-pub | |
items: | |
- key: simulator_rk_pub.pem | |
path: simulator_rk_pub.pem | |
- name: validator-storage | |
emptyDir: {} | |
- name: validator-keys | |
emptyDir: {} | |
#key: sawtooth-poet-settings | |
- apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: sawtooth | |
- apiVersion: v1 | |
kind: RoleBinding | |
metadata: | |
name: sawtooth-view | |
roleRef: | |
kind: Role | |
name: view | |
subjects: | |
- kind: ServiceAccount | |
name: sawtooth | |
- apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: sawtooth-config | |
data: | |
validator.toml: | |
bind = [ | |
"network:tcp://127.0.0.1:8800", | |
"component:tcp://127.0.0.1:4004" | |
] | |
- apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: sawtooth-poet-settings | |
data: | |
poet-settings.sh: | |
#!/bin/bash | |
settings="" | |
settings="$settings sawtooth.poet.target_wait_time=5" | |
settings="$settings sawtooth.poet.initial_wait_time=25" | |
settings="$settings sawtooth.publisher.max_batches_per_block=100" | |
- apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: sawtooth-simiulator-rk-pub | |
data: | |
simulator_rk_pub.pem: | |
'-----BEGIN PUBLIC KEY----- \ | |
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArMvzZi8GT+lI9KeZiInn\ | |
4CvFTiuyid+IN4dP1+mhTnfxX+I/ntt8LUKZMbI1R1izOUoxJRoX6VQ4S9VgDLEC\ | |
PW6QlkeLI1eqe4DiYb9+J5ANhq4+XkhwgCUUFwpfqSfXWCHimjaGsZHbavl5nv/6\ | |
IbZJL/2YzE37IzJdES16JCfmIUrk6TUqL0WgrWXyweTIoVSbld0M29kToSkMXLsj\ | |
8vbQbTiKwViWhYlzi0cQIo7PiAss66lAW0X6AM7ZJYyAcfSjSLR4guMz76Og8aRk\ | |
jtsjEEkq7Ndz5H8hllWUoHpxGDqLhM9O1/h+QdvTz7luZgpeJ5KB92vYL6yOlSxM\ | |
fQIDAQAB\ | |
-----END PUBLIC KEY-----\' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment