Orchestrating the Blockchain
with Containers
Cloudsoft Clocker 2.0 and Hyperledger
Andrew Kennedy
ContainerCon Europe, October 2016
Agenda
Clocker 2.0 and
Cloudsoft AMP
• Application Management
• Docker Swarm and Kubernetes
• Container Management
Hyperledger and
Blockchain
• Blockchain Introduction
• Hyperledger
• Demo
@grkvlt
Cloudsoft AMP
@grkvlt
Problem Solving
Large and Complex Ecosystem
Fast-moving Updates
Complex Deployments
Inconsistent Documentation
Lack of Runtime Management
@grkvlt
What Does AMP Do?
MODEL DEPLOY MANAGE
INSTANTIATE SENSE EFFECT
Capture Best Practices Dynamic Live Model Maintain SLAs
My Model
Apache Tomcat
MySQL
Load Balancer
@grkvlt
AMP – Infrastructure Agnostic
Physical Virtual Local – Private -
Dedicated
Public
@grkvlt
Application Management
Runtime management of deployed applications.
Policies use application-specific metrics such as latency or
transactions per second, averaged across groups of services to give
meaningful results.
Operations like scaling, failover and service monitoring can be
added to any application blueprint using these policies.
@grkvlt
Enterprise Problem Solving
Need reliable cloud-native application patterns to be competitive
Management is tied to infra layer with manual or missing
processes for applications and services, causing risk and hindering
adoption
Increasingly diverse platforms & infrastructure mean applications
are hard to track, increasing the cost & risk of digital transformation
@grkvlt
Container Services
Deploy and manage Docker Swarm clusters and Kubernetes
clusters. Production-ready infrastructure with TLS, high-availability
and extensions like Flannel, Calico and Canal for networking.
Can also connect to existing infrastructure provisioned and managed
externally, by specifying appropriate API endpoints.
Containerize applications by simply deploying blueprints to
container-aware locations or build hybrid applications from virtual
machines, containers and pods.
@grkvlt
Clocker 2.0
@grkvlt
Clocker 2.0
Series of open-source blueprints for Swarm and Kubernetes.
Simplifies creation of managed deployments, ready for immediate
deployment of containerized applications.
Reusable component library to enable creation of applications
incorporating Docker and Kubernetes.
With Cloudsoft AMP allows seamless deployment to these
infrastructures.
@grkvlt
Docker Swarm Blueprint
services:
- type: docker-swarm
id: swarm
name: "swarm"
brooklyn.config:
start.timeout: 30m
swarm.initial.size: 8
swarm.max.size: 16
swarm.manager.size: 3
etcd.initial.size: 3
swarm.defaultnetwork: "swarm"
swarm.scaling.cpu.limit: 0.80
swarm.strategy: "binpack"
swarm.overcommit: 0.50
@grkvlt
Swarm Architecture
@grkvlt
Kubernetes Blueprint
services:
- type: kubernetes-cluster-application
id: kubernetes
name: "kubernetes"
brooklyn.config:
kubernetes.debug: true
kubernetes.version: 1.4.0
start.timeout: 30m
kubernetes.master.size: 2
kubernetes.initial.size: 4
kubernetes.max.size: 16
etcd.initial.size: 3
kubernetes.scaling.cpu.limit: 0.95
flannel.network: 10.254.0.0/16
@grkvlt
Kubernetes Architecture
@grkvlt
Kubernetes Pod Blueprint
location:
kubernetes:
endpoint: "https://192.168.99.100:8443/"
services:
- type: io.cloudsoft.amp.container.kubernetes.entity.KubernetesPod
brooklyn.children:
- type: io.cloudsoft.amp.containerservice.dockercontainer.DockerContainer
id: wordpress-mysql
name: MySQL
brooklyn.config:
docker.container.imageName: mysql:5.6
docker.container.inboundPorts: [ "3306" ]
env: { MYSQL_ROOT_PASSWORD: "password" }
provisioning.properties:
kubernetes.deployment: wordpress-mysql
- type: io.cloudsoft.amp.containerservice.dockercontainer.DockerContainer
id: wordpress
name: Wordpress
brooklyn.config:
docker.container.imageName: wordpress:4.4-apache
docker.container.inboundPorts: [ "80" ]
env: { WORDPRESS_DB_HOST: "wordpress-mysql", WORDPRESS_DB_PASSWORD: "password" }
@grkvlt
Kubernetes Demo
@grkvlt
Hyperledger and Blockchain
@grkvlt
Blockchain
"Blockchain is a technology for a new generation of transactional
applications that establishes trust, accountability and
transparency while streamlining business processes."
Or...
"Blockchain is a distributed, cryptographically secure ledger of
transactions."
@grkvlt
Blockchain Overview
@grkvlt
Blockchain Overview
@grkvlt
Blockchain Overview
@grkvlt
Hyperledger Fabric
The Hyperledger Project is a
collaborative effort created to
advance blockchain
technology by identifying and
addressing important features
for a cross-industry open
standard for distributed
ledgers that can transform the
way business transactions are
conducted globally.
@grkvlt
Hyperledger Fabric
• Open Source
• Originally IBM Blockchain
• Graduated to become first
Hyperledger Foundation
incubator project
• Linux Foundation
Collaboration
@grkvlt
• Identity
• Privacy
• Confidentiality
• Auditability
Hyperledger Fabric
@grkvlt
Hyperledger Application
The Hyperledger Application Fabric is a group of Clusters of
Docker Engines spread across different regions, giving a global
deployment that can be easily scaled and extended.
Hyperledger components are Docker containers providing
Blockchain services.
@grkvlt
Hyperledger Blueprint
@grkvlt
locations:
- sjc-cloud
- lon-cloud
- sng-cloud
services:
- type: hyperledger-fabric
name: Hyperledger Fabric Cluster
brooklyn.config:
hyperledger.peers.per.location: 4
hyperledger.app.timeout: 200
...
Hyperledger Application
We will demonstrate an asset management chaincode
application that spins up a non-validating peer in a Docker
container, deploys the chaincode onto the validating peer
cluster and then performs the following transactions:
1. Assigns an asset to Alice
2. Transfers to Bob and verifies ownership
3. Transfers to Charlie and verifies ownership
4. Transfers to Dave and verifies ownership
@grkvlt
Hyperledger Demo
@grkvlt
AMP 4
Velocity
@grkvlt
ConsistencyControl
Grow effortlessly and Scale and dynamically with workloads
Common management tooling across all applications from pets to cattle
Agnostic so you can combine bare metal, virtual machines and containers
Simple and consistent management view of applications
Resources
http://www.cloudsoft.io/ondemand-distributed-hyperledger-fabric-cluster-with-cloudsoft-amp
http://www.cloudsoft.io/blog/open-source-container-blueprints
https://www.hyperledger.org/
https://github.com/cloudsoft/brooklyn-hyperledger/
https://github.com/brooklyncentral/clocker/
http://clocker.io/
@grkvlt
Questions?
http://clocker.io/

Orchestraing the Blockchain Using Containers

  • 1.
    Orchestrating the Blockchain withContainers Cloudsoft Clocker 2.0 and Hyperledger Andrew Kennedy ContainerCon Europe, October 2016
  • 2.
    Agenda Clocker 2.0 and CloudsoftAMP • Application Management • Docker Swarm and Kubernetes • Container Management Hyperledger and Blockchain • Blockchain Introduction • Hyperledger • Demo @grkvlt
  • 3.
  • 4.
    Problem Solving Large andComplex Ecosystem Fast-moving Updates Complex Deployments Inconsistent Documentation Lack of Runtime Management @grkvlt
  • 5.
    What Does AMPDo? MODEL DEPLOY MANAGE INSTANTIATE SENSE EFFECT Capture Best Practices Dynamic Live Model Maintain SLAs My Model Apache Tomcat MySQL Load Balancer @grkvlt
  • 6.
    AMP – InfrastructureAgnostic Physical Virtual Local – Private - Dedicated Public @grkvlt
  • 7.
    Application Management Runtime managementof deployed applications. Policies use application-specific metrics such as latency or transactions per second, averaged across groups of services to give meaningful results. Operations like scaling, failover and service monitoring can be added to any application blueprint using these policies. @grkvlt
  • 8.
    Enterprise Problem Solving Needreliable cloud-native application patterns to be competitive Management is tied to infra layer with manual or missing processes for applications and services, causing risk and hindering adoption Increasingly diverse platforms & infrastructure mean applications are hard to track, increasing the cost & risk of digital transformation @grkvlt
  • 9.
    Container Services Deploy andmanage Docker Swarm clusters and Kubernetes clusters. Production-ready infrastructure with TLS, high-availability and extensions like Flannel, Calico and Canal for networking. Can also connect to existing infrastructure provisioned and managed externally, by specifying appropriate API endpoints. Containerize applications by simply deploying blueprints to container-aware locations or build hybrid applications from virtual machines, containers and pods. @grkvlt
  • 10.
  • 11.
    Clocker 2.0 Series ofopen-source blueprints for Swarm and Kubernetes. Simplifies creation of managed deployments, ready for immediate deployment of containerized applications. Reusable component library to enable creation of applications incorporating Docker and Kubernetes. With Cloudsoft AMP allows seamless deployment to these infrastructures. @grkvlt
  • 12.
    Docker Swarm Blueprint services: -type: docker-swarm id: swarm name: "swarm" brooklyn.config: start.timeout: 30m swarm.initial.size: 8 swarm.max.size: 16 swarm.manager.size: 3 etcd.initial.size: 3 swarm.defaultnetwork: "swarm" swarm.scaling.cpu.limit: 0.80 swarm.strategy: "binpack" swarm.overcommit: 0.50 @grkvlt
  • 13.
  • 15.
    Kubernetes Blueprint services: - type:kubernetes-cluster-application id: kubernetes name: "kubernetes" brooklyn.config: kubernetes.debug: true kubernetes.version: 1.4.0 start.timeout: 30m kubernetes.master.size: 2 kubernetes.initial.size: 4 kubernetes.max.size: 16 etcd.initial.size: 3 kubernetes.scaling.cpu.limit: 0.95 flannel.network: 10.254.0.0/16 @grkvlt
  • 16.
  • 17.
    Kubernetes Pod Blueprint location: kubernetes: endpoint:"https://192.168.99.100:8443/" services: - type: io.cloudsoft.amp.container.kubernetes.entity.KubernetesPod brooklyn.children: - type: io.cloudsoft.amp.containerservice.dockercontainer.DockerContainer id: wordpress-mysql name: MySQL brooklyn.config: docker.container.imageName: mysql:5.6 docker.container.inboundPorts: [ "3306" ] env: { MYSQL_ROOT_PASSWORD: "password" } provisioning.properties: kubernetes.deployment: wordpress-mysql - type: io.cloudsoft.amp.containerservice.dockercontainer.DockerContainer id: wordpress name: Wordpress brooklyn.config: docker.container.imageName: wordpress:4.4-apache docker.container.inboundPorts: [ "80" ] env: { WORDPRESS_DB_HOST: "wordpress-mysql", WORDPRESS_DB_PASSWORD: "password" } @grkvlt
  • 18.
  • 20.
  • 21.
    Blockchain "Blockchain is atechnology for a new generation of transactional applications that establishes trust, accountability and transparency while streamlining business processes." Or... "Blockchain is a distributed, cryptographically secure ledger of transactions." @grkvlt
  • 22.
  • 23.
  • 24.
  • 25.
    Hyperledger Fabric The HyperledgerProject is a collaborative effort created to advance blockchain technology by identifying and addressing important features for a cross-industry open standard for distributed ledgers that can transform the way business transactions are conducted globally. @grkvlt
  • 26.
    Hyperledger Fabric • OpenSource • Originally IBM Blockchain • Graduated to become first Hyperledger Foundation incubator project • Linux Foundation Collaboration @grkvlt
  • 28.
    • Identity • Privacy •Confidentiality • Auditability Hyperledger Fabric @grkvlt
  • 29.
    Hyperledger Application The HyperledgerApplication Fabric is a group of Clusters of Docker Engines spread across different regions, giving a global deployment that can be easily scaled and extended. Hyperledger components are Docker containers providing Blockchain services. @grkvlt
  • 30.
    Hyperledger Blueprint @grkvlt locations: - sjc-cloud -lon-cloud - sng-cloud services: - type: hyperledger-fabric name: Hyperledger Fabric Cluster brooklyn.config: hyperledger.peers.per.location: 4 hyperledger.app.timeout: 200 ...
  • 31.
    Hyperledger Application We willdemonstrate an asset management chaincode application that spins up a non-validating peer in a Docker container, deploys the chaincode onto the validating peer cluster and then performs the following transactions: 1. Assigns an asset to Alice 2. Transfers to Bob and verifies ownership 3. Transfers to Charlie and verifies ownership 4. Transfers to Dave and verifies ownership @grkvlt
  • 32.
  • 33.
    AMP 4 Velocity @grkvlt ConsistencyControl Grow effortlesslyand Scale and dynamically with workloads Common management tooling across all applications from pets to cattle Agnostic so you can combine bare metal, virtual machines and containers Simple and consistent management view of applications
  • 34.
  • 35.