SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
How Leverages and
Deploys on
Lead Software/System architect at
dorma+kaba
Author and maintainer in multiple open
source projects such as a cqrs framework
for node.js (cqrs.js.org), push2.cloud and
i18next.com with its "as a service"
offering locize.com.
Father of 2 children.
Always in search for innovative and
disruptive stuff.
CEO and System Engineer at wölkli
gmbh
Supports the dorma+kaba group in
their journey with Cloud Foundry.
One of the maintainers of the open
source deployment framework
push2.cloud.
Owner of 2 cats.
Adriano
Hello!
My name is:
@adrirai
adrai
@themerne
michaelerne
Michael
Hello!
My name is:
Who is dorma+kaba
154 + 108 years of experience
Top three position Over 2 billion Swiss francs 16,000 employees
Subsidiaries +50 countries products, solutions, services
for secure physical access
partners in 130 countries
Urbanization
Increasing
prosperity in
emerging
markets
Demographic
change
Increasing need
for security
Technology
Growth drivers shaping our industry
Our goal: innovation leadership
dorma+kaba is striving for
innovation leadership in its
industry.
What is exivo?
Our frontend
apps are on
For customers, partners, market
organisations, administrators,
factories, support, etc...
Our backend
services are on
Business Domains, Identity
Management, Web servers, API
servers, etc...
Our IoT
stack is on
Communication, messaging,
signing service, authentication,
firmware update, virtual device
representation, management apis,
diagnostics, etc...
Our Business
Model is on
From acquisition to life cycle
management...
Everything
is on
⇒ But Why?
Platform
Know-How
Application
Know-How
Infrastructure
Know-How
SysOpsDevOps
How many apps do you
deploy (in parallel)?
50 Applications
48 Services
150 Instances
Frontend Applications
Customer, Partner, RMO, Admin,
Support, etc...
Business Domain
30 Applications
18 Services
90 Instances
Backend connection
to periphery
Wired Doors, Wireless Doors
IoT stack
CQRS
(D)DDD
Event Sourcing
flexible
loosely-coupled
scalable
tolerant of failure
highly responsive
secure
no vendor lock-in
12-factor app methodology
share nothing
public
virtual
private
deploy
Our deployment journey
---
applications:
- name: taibika-app-customer-host
buildpack: https://github.com/KABA-CCEAC/nodejs-buildpack.git
# buildpack: https://github.com/cloudfoundry/nodejs-buildpack.git
memory: 256M
instances: 1
path: .
command: node server.js
env:
DEPLOY_TYPE: cf
RABBITMQ_MODE: compatibility
➜ ~ cf push
➜ ~ cf set-env my-app myvar myval
➜ ~ cf create-service mongodb default my-db
➜ ~ cf bind-service my-app my-db
➜ ~ cf restart my-app
Start the classic way
shell script serial push
#!/bin/bash
SCRIPTDIR=$(dirname $(readlink -f $0))
PROJECTROOT=$(readlink -f "${SCRIPTDIR}/../../..")
cd ${SCRIPTDIR}
# CF_USER injected from username and password binding
CF_USER_USERNAME=`echo $CF_USER | cut -f1 -d:`
CF_USER_PASSWORD=`echo $CF_USER | cut -f2 -d:`
org=kaba ; space=dev
api=http://api.appcloud.swisscom.com
# login
cf api ${api}
cf auth ${CF_USER_USERNAME} ${CF_USER_PASSWORD}
cf target -o ${org} -s ${space}
# deploy auth
(cd ${PROJECTROOT}/auth && 
npm install && ./deploy.sh ${org} ${space})
# deploy domain
(cd ${PROJECTROOT}/domain/server && 
npm install && ./deploy.sh ${org} ${space})
# deploy app-customer-host
(cd ${PROJECTROOT}/app_customer/host && 
npm install && ./deploy.sh ${org} ${space})
...
#!/bin/bash
org="$1"
space="$2"
appname=taibika-app-customer
hostname=${appname}-${org}-${space}
echo "create services"
cf cs redis default taibika-app-customer-sessions
echo "pushing app but do not start it..."
cf push -n ${hostname} --no-start
echo "set env var AUTH_HOST"
cf set-env ${appname} AUTH_HOST https://taibika-
auth.scapp.io
echo "set env var MY_HOST"
cf set-env ${appname} MY_HOST
https://${hostname}.beta.scapp.io
echo "set env var DAAL_HOST"
cf set-env ${appname} DAAL_HOST https://cust.scapp.io
echo "set env var DAAL_USERNAME"
cf set-env ${appname} DAAL_USERNAME user
echo "set env var DAAL_PASSWORD"
cf set-env ${appname} DAAL_PASSWORD password
echo "restage/restart app"
cf push
echo "OK"
Script of scripts
shell script parallel push
#!/bin/bash
SCRIPTDIR=$(dirname $(readlink -f $0))
PROJECTROOT=$(readlink -f "${SCRIPTDIR}/../../..")
cd ${SCRIPTDIR}
# CF_USER injected from username and password binding
CF_USER_USERNAME=`echo $CF_USER | cut -f1 -d:`
CF_USER_PASSWORD=`echo $CF_USER | cut -f2 -d:`
org=kaba
space=dev
api=http://api.appcloud-beta.swisscom.com
# login
cf api ${api}
cf auth ${CF_USER_USERNAME} ${CF_USER_PASSWORD}
cf target -o ${org} -s ${space}
# deploy auth
(cd ${PROJECTROOT}/auth && npm install && ./deploy.sh ${org} ${space} &)
# deploy domain
(cd ${PROJECTROOT}/domain/server && npm install && ./deploy.sh ${org} ${space} &)
# deploy app-customer-host
(cd ${PROJECTROOT}/app_customer/host && npm install && ./deploy.sh ${org} ${space} &)
...
in parallel
echo('deploy ' + appsToDeploy.length + ' apps');
echo(JSON.stringify(appsToDeploy, null, 2));
echo('with ' + servicesToDeploy.length + ' services');
echo(JSON.stringify(servicesToDeploy, null, 2));
echo('starting to deploy...');
async.series([
function (callback) {
utils.prepushApps(appsToDeploy, callback);
},
function (callback) {
utils.createServices(servicesToDeploy, callback);
},
function (callback) {
utils.deployAppsStep1(appsToDeploy, function (err,
deployedApps) {
alreadyDeployedApps = deployedApps;
callback(err);
});
},
function (callback) {
utils.bindServices(appsToDeploy, callback);
},
function (callback) {
utils.deployAppsStep2(appsToDeploy, alreadyDeployedApps,
callback);
}
], function (err) {
if (err) return exit(err);
echo('!!!! finished :-) !!!');
});
Wrap the cli
require('shelljs/global');
//...
if (!which('cf')) {
echo('sorry, this script requires cf (cloudfoundry-cli)');
exit(1);
}
if (!which('git')) {
echo('sorry, this script requires git');
exit(1);
}
//...
var branch = env['BRANCH'] || env['GIT_BRANCH'] ||
currentBranch() || 'develop';
var org = env['ORG'] || currentOrg() || 'kaba';
var space = env['SPACE'] || currentSpace() || branch;
var deployType = env['DEPLOY_TYPE'] || branch || space;
var api = env['API'] || currentApi() || 'https://api.appcloud-
nova.swisscom.com';
execCmd('cf api ' + api);
execCmd('cf target -o ' + org + ' -s ' + space);
//...
we need
sophisticated,
reliable and
flexible tooling
required for
application
management
?
?
? ?
?
?
State definition Workflows
Apps
EnvVars
Services
Routes
Actual State
Desired State
App Connections
Secret Stores
App A
EnvVars
Services
Routes
App B
App A
EnvVars
Services
Routes
App B
B_HOST = "https://..."
B_USERNAME = "deadbeef"
B_PASSWORD = "..."
App A
App B
App C
App D
Release
1.0.0
1.0.1
1.5.0
1.2.1
Release
Application Defaults
Service Mappings
Secret Stores
Deployment
Target
Release
Deployment
App A
App B
App C
Compiler
Deployment
Configuration
Actual State
Desired State
Actual State
Desired State
Deployment
Configuration
Actual State
Desired State
Deployment
Configuration
Actual State
Desired State
Deployment
Configuration
Workflows
Actual State
Desired State
const blueGreen = (deploymentConfig, api, log) =>
waterfall(
[ init(deploymentConfig, api, log)
, map(api.packageApp, missing.apps)
, mapSeries(api.createServiceInstance, missing.services)
, map(api.createRoute, missing.routes)
, mapLimit(api.pushApp, missing.apps)
, map(api.setEnv, missing.envVars)
, map(api.stageApp, missing.apps)
, map(api.waitForServiceInstance, missing.services)
, map(api.bindService, missing.serviceBindings)
, map(api.startAppAndWaitForInstances, missing.apps)
, map(api.associateRoute, missing.unAssociatedRoutes)
, map(api.switchRoutes, old.routes)
, map(api.stopApp, old.apps)
, map(api.unbindService, old.serviceBindings)
, map(api.deleteApp, old.apps)
]
);
Sophisticated application configuration
Release- & Deployment management
Target platform agnostic
Flexible, customizable workflow framework
Extensible
Open Source
☑ Docker Support
☑ Custom Retry Handling
☑ Retry/Error statistics
☑ Release Manifest by filesystem
What’s
new?
☑ TCP Routing
Backed by ...
ZHAW InIT Cloud Computing Lab (ICCLab)
Research Lab at School of Engineering
at Zurich University of Applied Sciences (ZHAW)
Working on the forefront of cloud technologies
dorma+kaba
One of the top three companies in the global market for
physical security and access solutions with pro forma sales
of more than CHF 2 billion (USD 2.1 billion) and around
16'000 employees in more than 50 countries.
Swisscom
Switzerland's leading telecom provider and one of its leading
IT companies. Cloud Foundry certified provider.
blog.zhaw.ch/icclab
www.dormakaba.com
developer.swisscom.com
THANKS!
Any questions?
You can find push2cloud at:
www.push2.cloud
github.com/push2cloud
@Push2_cloud

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Perl and AWS
Perl and AWSPerl and AWS
Perl and AWS
 
2020.02.15 DelEx - CI/CD in AWS Cloud
2020.02.15 DelEx - CI/CD in AWS Cloud2020.02.15 DelEx - CI/CD in AWS Cloud
2020.02.15 DelEx - CI/CD in AWS Cloud
 
Managed Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECSManaged Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECS
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
 
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADSKNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
 
Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020
 
Building a Serverless company with Node.js, React and the Serverless Framewor...
Building a Serverless company with Node.js, React and the Serverless Framewor...Building a Serverless company with Node.js, React and the Serverless Framewor...
Building a Serverless company with Node.js, React and the Serverless Framewor...
 
Presentation kyushu-2018
Presentation kyushu-2018Presentation kyushu-2018
Presentation kyushu-2018
 
Whats all the FaaS About
Whats all the FaaS AboutWhats all the FaaS About
Whats all the FaaS About
 
Serverless Architecture - A Gentle Overview
Serverless Architecture - A Gentle OverviewServerless Architecture - A Gentle Overview
Serverless Architecture - A Gentle Overview
 
JavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless ArchtiecturesJavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless Archtiectures
 
What you see is what you get for AWS infrastructure
What you see is what you get for AWS infrastructureWhat you see is what you get for AWS infrastructure
What you see is what you get for AWS infrastructure
 
AWS meets Continuous Delivery
AWS meets Continuous DeliveryAWS meets Continuous Delivery
AWS meets Continuous Delivery
 
Everything-as-code. Polyglotte Software-Entwicklung in der Praxis.
Everything-as-code. Polyglotte Software-Entwicklung in der Praxis.Everything-as-code. Polyglotte Software-Entwicklung in der Praxis.
Everything-as-code. Polyglotte Software-Entwicklung in der Praxis.
 
PHP as a Service TDC2019
PHP as a Service TDC2019PHP as a Service TDC2019
PHP as a Service TDC2019
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Cloud foundry demo
Cloud foundry demoCloud foundry demo
Cloud foundry demo
 
Chatbots with Serverless
Chatbots with ServerlessChatbots with Serverless
Chatbots with Serverless
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 

Andere mochten auch

Internet of Things
Internet of ThingsInternet of Things
Internet of Things
Vala Afshar
 

Andere mochten auch (7)

Q3 Report Presentation 2016
Q3 Report Presentation 2016Q3 Report Presentation 2016
Q3 Report Presentation 2016
 
Abloy Smart Disc
Abloy Smart DiscAbloy Smart Disc
Abloy Smart Disc
 
ASSA ABLOY customer cases 2013 corporate presentation part 3
ASSA ABLOY customer cases 2013 corporate presentation part 3ASSA ABLOY customer cases 2013 corporate presentation part 3
ASSA ABLOY customer cases 2013 corporate presentation part 3
 
Abloy Oy environmental review 2016
Abloy Oy environmental review 2016Abloy Oy environmental review 2016
Abloy Oy environmental review 2016
 
The Strongest Link - Abloy Padlocks
The Strongest Link - Abloy PadlocksThe Strongest Link - Abloy Padlocks
The Strongest Link - Abloy Padlocks
 
ASSA ABLOY Corporate presentation 2015
ASSA ABLOY Corporate presentation 2015ASSA ABLOY Corporate presentation 2015
ASSA ABLOY Corporate presentation 2015
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 

Ähnlich wie How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Europe 2016

Ähnlich wie How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Europe 2016 (20)

Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Better Operations into the Cloud
Better Operations  into the CloudBetter Operations  into the Cloud
Better Operations into the Cloud
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
 
Cloud Foundry Meetup Stuttgart 2017 - Spring Cloud Development
Cloud Foundry Meetup Stuttgart 2017 - Spring Cloud DevelopmentCloud Foundry Meetup Stuttgart 2017 - Spring Cloud Development
Cloud Foundry Meetup Stuttgart 2017 - Spring Cloud Development
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Droidcon London 2021 - Full Stack Dart
Droidcon London 2021   - Full Stack DartDroidcon London 2021   - Full Stack Dart
Droidcon London 2021 - Full Stack Dart
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 
Stups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWSStups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWS
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
 
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. JavaCloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
CloudLand 2023: Rock, Paper, Scissors Cloud Competition - Go vs. Java
 
How we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CIHow we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CI
 
X-celerate 2019: Iterating fast with the MERN Stack
X-celerate 2019: Iterating fast with the MERN StackX-celerate 2019: Iterating fast with the MERN Stack
X-celerate 2019: Iterating fast with the MERN Stack
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
 
FRIDA 101 Android
FRIDA 101 AndroidFRIDA 101 Android
FRIDA 101 Android
 
2018 RubyHACK: put git to work - increase the quality of your rails project...
2018 RubyHACK:  put git to work -  increase the quality of your rails project...2018 RubyHACK:  put git to work -  increase the quality of your rails project...
2018 RubyHACK: put git to work - increase the quality of your rails project...
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Docker In Bank Unrated
Docker In Bank UnratedDocker In Bank Unrated
Docker In Bank Unrated
 
2018 the conf put git to work - increase the quality of your rails project...
2018 the conf   put git to work -  increase the quality of your rails project...2018 the conf   put git to work -  increase the quality of your rails project...
2018 the conf put git to work - increase the quality of your rails project...
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

How dorma+kaba leverages and deploys on CloudFoundry - CloudFoundry Summit Europe 2016

  • 2. Lead Software/System architect at dorma+kaba Author and maintainer in multiple open source projects such as a cqrs framework for node.js (cqrs.js.org), push2.cloud and i18next.com with its "as a service" offering locize.com. Father of 2 children. Always in search for innovative and disruptive stuff. CEO and System Engineer at wölkli gmbh Supports the dorma+kaba group in their journey with Cloud Foundry. One of the maintainers of the open source deployment framework push2.cloud. Owner of 2 cats. Adriano Hello! My name is: @adrirai adrai @themerne michaelerne Michael Hello! My name is:
  • 4. 154 + 108 years of experience
  • 5. Top three position Over 2 billion Swiss francs 16,000 employees Subsidiaries +50 countries products, solutions, services for secure physical access partners in 130 countries
  • 7. Our goal: innovation leadership dorma+kaba is striving for innovation leadership in its industry.
  • 9.
  • 10.
  • 11. Our frontend apps are on For customers, partners, market organisations, administrators, factories, support, etc...
  • 12. Our backend services are on Business Domains, Identity Management, Web servers, API servers, etc...
  • 13. Our IoT stack is on Communication, messaging, signing service, authentication, firmware update, virtual device representation, management apis, diagnostics, etc...
  • 14. Our Business Model is on From acquisition to life cycle management...
  • 16.
  • 18. How many apps do you deploy (in parallel)?
  • 19. 50 Applications 48 Services 150 Instances Frontend Applications Customer, Partner, RMO, Admin, Support, etc... Business Domain 30 Applications 18 Services 90 Instances Backend connection to periphery Wired Doors, Wireless Doors IoT stack
  • 20. CQRS (D)DDD Event Sourcing flexible loosely-coupled scalable tolerant of failure highly responsive secure no vendor lock-in 12-factor app methodology share nothing
  • 23. --- applications: - name: taibika-app-customer-host buildpack: https://github.com/KABA-CCEAC/nodejs-buildpack.git # buildpack: https://github.com/cloudfoundry/nodejs-buildpack.git memory: 256M instances: 1 path: . command: node server.js env: DEPLOY_TYPE: cf RABBITMQ_MODE: compatibility ➜ ~ cf push ➜ ~ cf set-env my-app myvar myval ➜ ~ cf create-service mongodb default my-db ➜ ~ cf bind-service my-app my-db ➜ ~ cf restart my-app Start the classic way
  • 24. shell script serial push #!/bin/bash SCRIPTDIR=$(dirname $(readlink -f $0)) PROJECTROOT=$(readlink -f "${SCRIPTDIR}/../../..") cd ${SCRIPTDIR} # CF_USER injected from username and password binding CF_USER_USERNAME=`echo $CF_USER | cut -f1 -d:` CF_USER_PASSWORD=`echo $CF_USER | cut -f2 -d:` org=kaba ; space=dev api=http://api.appcloud.swisscom.com # login cf api ${api} cf auth ${CF_USER_USERNAME} ${CF_USER_PASSWORD} cf target -o ${org} -s ${space} # deploy auth (cd ${PROJECTROOT}/auth && npm install && ./deploy.sh ${org} ${space}) # deploy domain (cd ${PROJECTROOT}/domain/server && npm install && ./deploy.sh ${org} ${space}) # deploy app-customer-host (cd ${PROJECTROOT}/app_customer/host && npm install && ./deploy.sh ${org} ${space}) ... #!/bin/bash org="$1" space="$2" appname=taibika-app-customer hostname=${appname}-${org}-${space} echo "create services" cf cs redis default taibika-app-customer-sessions echo "pushing app but do not start it..." cf push -n ${hostname} --no-start echo "set env var AUTH_HOST" cf set-env ${appname} AUTH_HOST https://taibika- auth.scapp.io echo "set env var MY_HOST" cf set-env ${appname} MY_HOST https://${hostname}.beta.scapp.io echo "set env var DAAL_HOST" cf set-env ${appname} DAAL_HOST https://cust.scapp.io echo "set env var DAAL_USERNAME" cf set-env ${appname} DAAL_USERNAME user echo "set env var DAAL_PASSWORD" cf set-env ${appname} DAAL_PASSWORD password echo "restage/restart app" cf push echo "OK" Script of scripts
  • 25. shell script parallel push #!/bin/bash SCRIPTDIR=$(dirname $(readlink -f $0)) PROJECTROOT=$(readlink -f "${SCRIPTDIR}/../../..") cd ${SCRIPTDIR} # CF_USER injected from username and password binding CF_USER_USERNAME=`echo $CF_USER | cut -f1 -d:` CF_USER_PASSWORD=`echo $CF_USER | cut -f2 -d:` org=kaba space=dev api=http://api.appcloud-beta.swisscom.com # login cf api ${api} cf auth ${CF_USER_USERNAME} ${CF_USER_PASSWORD} cf target -o ${org} -s ${space} # deploy auth (cd ${PROJECTROOT}/auth && npm install && ./deploy.sh ${org} ${space} &) # deploy domain (cd ${PROJECTROOT}/domain/server && npm install && ./deploy.sh ${org} ${space} &) # deploy app-customer-host (cd ${PROJECTROOT}/app_customer/host && npm install && ./deploy.sh ${org} ${space} &) ... in parallel
  • 26. echo('deploy ' + appsToDeploy.length + ' apps'); echo(JSON.stringify(appsToDeploy, null, 2)); echo('with ' + servicesToDeploy.length + ' services'); echo(JSON.stringify(servicesToDeploy, null, 2)); echo('starting to deploy...'); async.series([ function (callback) { utils.prepushApps(appsToDeploy, callback); }, function (callback) { utils.createServices(servicesToDeploy, callback); }, function (callback) { utils.deployAppsStep1(appsToDeploy, function (err, deployedApps) { alreadyDeployedApps = deployedApps; callback(err); }); }, function (callback) { utils.bindServices(appsToDeploy, callback); }, function (callback) { utils.deployAppsStep2(appsToDeploy, alreadyDeployedApps, callback); } ], function (err) { if (err) return exit(err); echo('!!!! finished :-) !!!'); }); Wrap the cli require('shelljs/global'); //... if (!which('cf')) { echo('sorry, this script requires cf (cloudfoundry-cli)'); exit(1); } if (!which('git')) { echo('sorry, this script requires git'); exit(1); } //... var branch = env['BRANCH'] || env['GIT_BRANCH'] || currentBranch() || 'develop'; var org = env['ORG'] || currentOrg() || 'kaba'; var space = env['SPACE'] || currentSpace() || branch; var deployType = env['DEPLOY_TYPE'] || branch || space; var api = env['API'] || currentApi() || 'https://api.appcloud- nova.swisscom.com'; execCmd('cf api ' + api); execCmd('cf target -o ' + org + ' -s ' + space); //...
  • 27. we need sophisticated, reliable and flexible tooling required for application management
  • 29.
  • 30. State definition Workflows Apps EnvVars Services Routes Actual State Desired State App Connections Secret Stores
  • 32. App A EnvVars Services Routes App B B_HOST = "https://..." B_USERNAME = "deadbeef" B_PASSWORD = "..."
  • 33. App A App B App C App D Release 1.0.0 1.0.1 1.5.0 1.2.1
  • 35. Release Deployment App A App B App C Compiler Deployment Configuration
  • 40. Actual State Desired State const blueGreen = (deploymentConfig, api, log) => waterfall( [ init(deploymentConfig, api, log) , map(api.packageApp, missing.apps) , mapSeries(api.createServiceInstance, missing.services) , map(api.createRoute, missing.routes) , mapLimit(api.pushApp, missing.apps) , map(api.setEnv, missing.envVars) , map(api.stageApp, missing.apps) , map(api.waitForServiceInstance, missing.services) , map(api.bindService, missing.serviceBindings) , map(api.startAppAndWaitForInstances, missing.apps) , map(api.associateRoute, missing.unAssociatedRoutes) , map(api.switchRoutes, old.routes) , map(api.stopApp, old.apps) , map(api.unbindService, old.serviceBindings) , map(api.deleteApp, old.apps) ] );
  • 41.
  • 42. Sophisticated application configuration Release- & Deployment management Target platform agnostic Flexible, customizable workflow framework Extensible Open Source
  • 43. ☑ Docker Support ☑ Custom Retry Handling ☑ Retry/Error statistics ☑ Release Manifest by filesystem What’s new? ☑ TCP Routing
  • 44. Backed by ... ZHAW InIT Cloud Computing Lab (ICCLab) Research Lab at School of Engineering at Zurich University of Applied Sciences (ZHAW) Working on the forefront of cloud technologies dorma+kaba One of the top three companies in the global market for physical security and access solutions with pro forma sales of more than CHF 2 billion (USD 2.1 billion) and around 16'000 employees in more than 50 countries. Swisscom Switzerland's leading telecom provider and one of its leading IT companies. Cloud Foundry certified provider. blog.zhaw.ch/icclab www.dormakaba.com developer.swisscom.com
  • 45. THANKS! Any questions? You can find push2cloud at: www.push2.cloud github.com/push2cloud @Push2_cloud