Skip to content

Instantly share code, notes, and snippets.

@oatmealraisin
Created February 1, 2018 21:03
Show Gist options
  • Save oatmealraisin/2cf6772e023b2abd2d6616a29d915679 to your computer and use it in GitHub Desktop.
Save oatmealraisin/2cf6772e023b2abd2d6616a29d915679 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Template
metadata:
name: sawtooth
annotations:
app: sawtooth
description: Everything you need for sawtooth
message: "A sawtooth server has been deployed."
parameters:
- name: IMAGE_NAMESPACE
displayName: "Sawtooth Namespace"
description: "The namespace of the Sawtooth ImageStreams"
value: "images"
objects:
# https://hub.docker.com/r/hyperledger/sawtooth-rest-api/
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: sawtooth
name: sawtooth-rest-api
namespace: ${IMAGE_NAMESPACE}
spec:
lookupPolicy:
local: false
tags:
tags:
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-rest-api:0.8
generation: 1
importPolicy: {}
name: "0.8"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-rest-api:0.8.12
generation: 1
importPolicy: {}
name: 0.8.12
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-rest-api:0.8.13
generation: 1
importPolicy: {}
name: 0.8.13
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-rest-api:1.0
generation: 1
importPolicy: {}
name: "1.0"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-rest-api:latest
generation: 1
importPolicy: {}
name: latest
referencePolicy:
type: Source
status:
tags:
- items:
- created: 2018-01-29T18:36:10Z
dockerImageReference: hyperledger/sawtooth-rest-api@sha256:040a1c0afbaf776dc1caae1cb54a7f6f364e961c846a9ca3cfe55741eb65b9a4
generation: 1
image: sha256:040a1c0afbaf776dc1caae1cb54a7f6f364e961c846a9ca3cfe55741eb65b9a4
tag: latest
- items:
- created: 2018-01-29T18:36:10Z
dockerImageReference: hyperledger/sawtooth-rest-api@sha256:040a1c0afbaf776dc1caae1cb54a7f6f364e961c846a9ca3cfe55741eb65b9a4
generation: 1
image: sha256:040a1c0afbaf776dc1caae1cb54a7f6f364e961c846a9ca3cfe55741eb65b9a4
tag: "1.0"
- items:
- created: 2018-01-29T18:36:10Z
dockerImageReference: hyperledger/sawtooth-rest-api@sha256:8b6b4bf4c493e526d69d5ab8938ce22d6f655c06fab4e589b494e4744d0985d6
generation: 1
image: sha256:8b6b4bf4c493e526d69d5ab8938ce22d6f655c06fab4e589b494e4744d0985d6
tag: "0.8"
- items:
- created: 2018-01-29T18:36:10Z
dockerImageReference: hyperledger/sawtooth-rest-api@sha256:8b6b4bf4c493e526d69d5ab8938ce22d6f655c06fab4e589b494e4744d0985d6
generation: 1
image: sha256:8b6b4bf4c493e526d69d5ab8938ce22d6f655c06fab4e589b494e4744d0985d6
tag: 0.8.13
- items:
- created: 2018-01-29T18:36:10Z
dockerImageReference: hyperledger/sawtooth-rest-api@sha256:841da8ef6d177e8cdea4e5bd136e735911896425a27acecd56d8f70f0b443994
generation: 1
image: sha256:841da8ef6d177e8cdea4e5bd136e735911896425a27acecd56d8f70f0b443994
tag: 0.8.12
# https://hub.docker.com/r/hyperledger/sawtooth-validator/
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: sawtooth
name: sawtooth-validator
namespace: ${IMAGE_NAMESPACE}
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-validator:0.8
generation: 1
importPolicy: {}
name: "0.8"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-validator:0.8.12
generation: 1
importPolicy: {}
name: 0.8.12
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-validator:0.8.13
generation: 1
importPolicy: {}
name: 0.8.13
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-validator:1.0
generation: 1
importPolicy: {}
name: "1.0"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-validator:latest
generation: 1
importPolicy: {}
name: latest
referencePolicy:
type: Source
status:
tags:
- items:
- created: 2018-01-29T18:42:58Z
dockerImageReference: hyperledger/sawtooth-validator@sha256:381c06c8e1ff15e613ce2cf5507f979c58b1254d558cad6568f1fb3d8ffaace1
generation: 1
image: sha256:381c06c8e1ff15e613ce2cf5507f979c58b1254d558cad6568f1fb3d8ffaace1
tag: latest
- items:
- created: 2018-01-29T18:42:58Z
dockerImageReference: hyperledger/sawtooth-validator@sha256:381c06c8e1ff15e613ce2cf5507f979c58b1254d558cad6568f1fb3d8ffaace1
generation: 1
image: sha256:381c06c8e1ff15e613ce2cf5507f979c58b1254d558cad6568f1fb3d8ffaace1
tag: "1.0"
- items:
- created: 2018-01-29T18:42:58Z
dockerImageReference: hyperledger/sawtooth-validator@sha256:ab762dfaa3872e30f00f90356ed11ec862f8f4eca72454b6f17c979c86e7bb6e
generation: 1
image: sha256:ab762dfaa3872e30f00f90356ed11ec862f8f4eca72454b6f17c979c86e7bb6e
tag: "0.8"
- items:
- created: 2018-01-29T18:42:58Z
dockerImageReference: hyperledger/sawtooth-validator@sha256:ab762dfaa3872e30f00f90356ed11ec862f8f4eca72454b6f17c979c86e7bb6e
generation: 1
image: sha256:ab762dfaa3872e30f00f90356ed11ec862f8f4eca72454b6f17c979c86e7bb6e
tag: 0.8.13
- items:
- created: 2018-01-29T18:42:58Z
dockerImageReference: hyperledger/sawtooth-validator@sha256:f1f22f60b4c3d97ddee51b79e988529629034967437c35569013491de401ce5e
generation: 1
image: sha256:f1f22f60b4c3d97ddee51b79e988529629034967437c35569013491de401ce5e
tag: 0.8.12
# https://hub.docker.com/r/hyperledger/sawtooth-intkey-tp-python/
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: sawtooth
name: sawtooth-tp-intkey-python
namespace: ${IMAGE_NAMESPACE}
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-intkey-tp-python:0.8
generation: 1
importPolicy: {}
name: "0.8"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-intkey-tp-python:0.8.12
generation: 1
importPolicy: {}
name: 0.8.12
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-intkey-tp-python:0.8.13
generation: 1
importPolicy: {}
name: 0.8.13
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-intkey-tp-python:1.0
generation: 1
importPolicy: {}
name: "1.0"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-intkey-tp-python:latest
generation: 1
importPolicy: {}
name: latest
referencePolicy:
type: Source
status:
tags:
- items:
- created: 2018-01-29T18:34:59Z
dockerImageReference: hyperledger/sawtooth-intkey-tp-python@sha256:b80d4f1ca3a5c890bc178739b95336aa7f60dc648d835a32781c4bb9e886b19b
generation: 1
image: sha256:b80d4f1ca3a5c890bc178739b95336aa7f60dc648d835a32781c4bb9e886b19b
tag: latest
- items:
- created: 2018-01-29T18:34:59Z
dockerImageReference: hyperledger/sawtooth-intkey-tp-python@sha256:b80d4f1ca3a5c890bc178739b95336aa7f60dc648d835a32781c4bb9e886b19b
generation: 1
image: sha256:b80d4f1ca3a5c890bc178739b95336aa7f60dc648d835a32781c4bb9e886b19b
tag: "1.0"
- items:
- created: 2018-01-29T18:34:59Z
dockerImageReference: hyperledger/sawtooth-intkey-tp-python@sha256:fb60b944dc320927e12058dda33bcf42bd994a903c96b496d98f0bc0fd3ccd6a
generation: 1
image: sha256:fb60b944dc320927e12058dda33bcf42bd994a903c96b496d98f0bc0fd3ccd6a
tag: "0.8"
- items:
- created: 2018-01-29T18:34:59Z
dockerImageReference: hyperledger/sawtooth-intkey-tp-python@sha256:fb60b944dc320927e12058dda33bcf42bd994a903c96b496d98f0bc0fd3ccd6a
generation: 1
image: sha256:fb60b944dc320927e12058dda33bcf42bd994a903c96b496d98f0bc0fd3ccd6a
tag: 0.8.13
- items:
- created: 2018-01-29T18:34:59Z
dockerImageReference: hyperledger/sawtooth-intkey-tp-python@sha256:78f28682dd201d4b8668a9db1fc2f54c7827585cb21c10e42780c65177e39be1
generation: 1
image: sha256:78f28682dd201d4b8668a9db1fc2f54c7827585cb21c10e42780c65177e39be1
tag: 0.8.12
# https://hub.docker.com/r/hyperledger/sawtooth-settings-tp/
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: sawtooth
name: sawtooth-tp-settings
namespace: ${IMAGE_NAMESPACE}
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-settings-tp:0.8
generation: 1
importPolicy: {}
name: "0.8"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-settings-tp:0.8.12
generation: 1
importPolicy: {}
name: 0.8.12
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-settings-tp:0.8.13
generation: 1
importPolicy: {}
name: 0.8.13
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-settings-tp:1.0
generation: 1
importPolicy: {}
name: "1.0"
referencePolicy:
type: Source
- annotations: null
from:
kind: DockerImage
name: hyperledger/sawtooth-settings-tp:latest
generation: 1
importPolicy: {}
name: latest
referencePolicy:
type: Source
status:
tags:
- items:
- created: 2018-01-29T18:33:22Z
dockerImageReference: hyperledger/sawtooth-settings-tp@sha256:6287db0709b48ff8ca5ba6f96c242fe9fd926229cf5f7d2c923efd7065bed3f4
generation: 1
image: sha256:6287db0709b48ff8ca5ba6f96c242fe9fd926229cf5f7d2c923efd7065bed3f4
tag: latest
- items:
- created: 2018-01-29T18:33:22Z
dockerImageReference: hyperledger/sawtooth-settings-tp@sha256:6287db0709b48ff8ca5ba6f96c242fe9fd926229cf5f7d2c923efd7065bed3f4
generation: 1
image: sha256:6287db0709b48ff8ca5ba6f96c242fe9fd926229cf5f7d2c923efd7065bed3f4
tag: "1.0"
- items:
- created: 2018-01-29T18:33:22Z
dockerImageReference: hyperledger/sawtooth-settings-tp@sha256:f4128e0f3c15b50a1bb5c786b6675cde979924515e40e776160a40989a06e4c2
generation: 1
image: sha256:f4128e0f3c15b50a1bb5c786b6675cde979924515e40e776160a40989a06e4c2
tag: "0.8"
- items:
- created: 2018-01-29T18:33:22Z
dockerImageReference: hyperledger/sawtooth-settings-tp@sha256:f4128e0f3c15b50a1bb5c786b6675cde979924515e40e776160a40989a06e4c2
generation: 1
image: sha256:f4128e0f3c15b50a1bb5c786b6675cde979924515e40e776160a40989a06e4c2
tag: 0.8.13
- items:
- created: 2018-01-29T18:33:22Z
dockerImageReference: hyperledger/sawtooth-settings-tp@sha256:2aaa70ea6bebe602482a20fb84711eebf0604fa80d3cb5f1709a43292450c9a1
generation: 1
image: sha256:2aaa70ea6bebe602482a20fb84711eebf0604fa80d3cb5f1709a43292450c9a1
tag: 0.8.12
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: sawtooth
name: validator
spec:
replicas: 1
selector:
app: sawtooth
deploymentconfig: validator
strategy:
resources: {}
template:
metadata:
labels:
app: sawtooth
deploymentconfig: validator
spec:
serviceAccountName: sawtooth
containers:
- image: ${NAMESPACE}/sawtooth-validator:latest
securityContext:
privileged: true
name: sawtooth-validator
command: [ "bash" ]
args: [ "-c" , "sawtooth keygen my_key && sawset genesis -k /root/.sawtooth/keys/my_key.priv && sawadm genesis config-genesis.batch && sawadm keygen && sawtooth-validator -vv --endpoint tcp://validator:8800 --bind component:tcp://eth0:4004 --bind network:tcp://eth0:8800" ]
ports:
- containerPort: 4004
protocol: TCP
- containerPort: 8800
protocol: TCP
resources: {}
test: false
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- sawtooth-validator
from:
kind: ImageStreamTag
name: sawtooth-validator:latest
namespace: ${IMAGE_NAMESPACE}
- apiVersion: v1
kind: Service
metadata:
labels:
app: sawtooth
name: validator
spec:
ports:
- name: 4004-tcp
port: 4004
protocol: TCP
targetPort: 4004
selector:
app: sawtooth
deploymentconfig: validator
status:
loadBalancer: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: sawtooth
name: intkey
spec:
replicas: 1
selector:
app: sawtooth
deploymentconfig: intkey
strategy:
resources: {}
template:
metadata:
labels:
app: sawtooth
deploymentconfig: intkey
spec:
serviceAccountName: sawtooth
containers:
- image: sawtooth-intkey-tp-python:latest
securityContext:
privileged: true
name: intkey-tp-python
command: [ "bash" ]
args: [ "-c" , "intkey-tp-python", "-vv", "--connect", "tcp://validator.svc.cluster.local:4004" ]
ports:
- containerPort: 4004
protocol: TCP
resources: {}
test: false
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- intkey-tp-python
from:
kind: ImageStreamTag
name: sawtooth-intkey-tp-python:latest
namespace: ${IMAGE_NAMESPACE}
- apiVersion: v1
kind: Service
metadata:
labels:
app: sawtooth
name: intkey
spec:
ports:
- name: 4004-tcp
port: 4004
protocol: TCP
targetPort: 4004
selector:
app: sawtooth
deploymentconfig: intkey
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: sawtooth
name: settings-tp
spec:
replicas: 1
selector:
app: sawtooth
deploymentconfig: settings-tp
strategy:
resources: {}
template:
metadata:
labels:
app: sawtooth
deploymentconfig: settings-tp
spec:
serviceAccountName: sawtooth
containers:
- image: sawtooth-settings-tp:latest
securityContext:
privileged: true
name: settings-tp
command: [ "bash" ]
args: [ "-c" , "settings-tp", "-vv", "--connect", "tcp://validator.svc.cluster.local:4004" ]
ports:
- containerPort: 4004
protocol: TCP
resources: {}
test: false
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- settings-tp
from:
kind: ImageStreamTag
name: sawtooth-settings-tp:latest
namespace: ${IMAGE_NAMESPACE}
- apiVersion: v1
kind: Service
metadata:
labels:
app: sawtooth
name: settings-tp
spec:
ports:
- name: 4004-tcp
port: 4004
protocol: TCP
targetPort: 4004
selector:
app: sawtooth
deploymentconfig: settings-tp
status:
loadBalancer: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: sawtooth
name: sawtooth-api
spec:
replicas: 1
selector:
app: sawtooth
deploymentconfig: sawtooth-api
strategy:
resources: {}
template:
metadata:
labels:
app: sawtooth
deploymentconfig: sawtooth-api
spec:
serviceAccountName: sawtooth
containers:
- image: sawtooth-rest-api:latest
securityContext:
privileged: true
name: sawtooth-api
command: [ "bash" ]
args: [ "-c" , "sawtooth-rest-api", "--connect", "tcp://validator.svc.cluster.local:4004", "--bind", "$HOSTNAME:8080", "-vvv"]
ports:
- containerPort: 4004
protocol: TCP
- containerPort: 8080
protocol: TCP
resources: {}
test: false
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- sawtooth-api
from:
kind: ImageStreamTag
name: sawtooth-rest-api:latest
namespace: ${IMAGE_NAMESPACE}
- apiVersion: v1
kind: Service
metadata:
labels:
app: sawtooth
name: sawtooth-api
spec:
ports:
- name: 4004-tcp
port: 4004
protocol: TCP
targetPort: 4004
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: sawtooth
deploymentconfig: sawtooth-api
status:
loadBalancer: {}
- apiVersion: v1
kind: ServiceAccount
metadata:
name: sawtooth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment