An IoT App's Journey to the Cloud From Localhost to PCF Dev and Pivotal Cloud Foundry

Similar documents
1. How do you deploy an application to Cloud Foundry with multiple instances, on a non-default domain?

Index. Bessel function, 51 Big data, 1. Cloud-based version-control system, 226 Containerization, 30 application, 32 virtualize processes, 30 31

São Paulo. August,

Copyright 2016 Pivotal. All rights reserved. Cloud Native Design. Includes 12 Factor Apps

Redis for Pivotal Cloud Foundry Docs

Peco Karayanev Bryan Wynns

Using the Bluemix CLI IBM Corporation

Single Sign-On for PCF. User's Guide

IBM Bluemix platform as a service (PaaS)

Is Docker Infrastructure or Platform? & Cloud Foundry intro

Developer Cockpit. Introduction 1. Prerequisites 2. Application Lifecycle in MindSphere 3. User interfaces "Developer Cockpit" 4

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Cloud Computing Introduction to Cloud Foundry

Using DC/OS for Continuous Delivery

Redis for Pivotal Cloud Foundry Docs

Connect and Transform Your Digital Business with IBM

Exam C IBM Cloud Platform Application Development v2 Sample Test

Recent Enhancements to Cloud Foundry Routing. Route Services and TCP Routing

Extending the BOSH Backup and Restore Framework. Therese Stowell, Product Manager Chunyi Lyu, Engineer Platform Recovery Team, Pivotal

Continuous Delivery for Cloud Native Applications

IoT on Fedora Using Fedora as a base for the IoT Revolution

AGENDA Introduction Pivotal Cloud Foundry NSX-V integration with Cloud Foundry New Features in Cloud Foundry Networking NSX-T with Cloud Fou

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Pivotal Cloud Foundry on VMware vsphere using Dell EMC XC Series Hyper-Converged Appliances Deployment Guide

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

mongodb-tornado-angular Documentation

Using PCF Ops Manager to Deploy Hyperledger Fabric

NATIVE HYBRID CLOUD, OPENSTACK EDITION WITH VXRACK SYSTEM WITH NEUTRINO

OPENSTACK BEIJING CONFERENCE. by: Steven Hallett Head of Cloud Infrastructure Engineering and Operations

swiftenv Documentation

Big Data Applications with Spring XD

TIBCO BusinessWorks Container Edition Application Monitoring and Troubleshooting

Architecting Microsoft Azure Solutions (proposed exam 535)

Cloud-Native Applications. Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0

Cloud Computing II. Exercises

Think Small: API Architecture For The Enterprise

Deploying webmethods Integration Server as Bosh Release

Beyond 1001 Dedicated Data Service Instances

Table of Contents. Copyright Pivotal Software Inc, of

Design and Architecture. Derek Collison

Exercise 1. Bluemix and the Cloud Foundry command-line interface (CLI)

Chris Calloway for Triangle Python Users Group at Caktus Group December 14, 2017

Data and AI LATAM 2018

Fixing the "It works on my machine!" Problem with Docker

Oracle Eloqua Sales Tools for Microsoft Outlook. User Guide

BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications

70-532: Developing Microsoft Azure Solutions

IBM Watson Solutions Business and Academic Partners

How to Route Internet Traffic between A Mobile Application and IoT Device?

Developing Microsoft Azure Solutions (70-532) Syllabus

About This Document 3. Overview 3. System Requirements 3. Installation & Setup 4

Deploying and Operating Cloud Native.NET apps

Knative: Building serverless platforms on top of Kubernetes

70-532: Developing Microsoft Azure Solutions

DCLI User's Guide. Modified on 20 SEP 2018 Data Center Command-Line Interface

Deploying and Using ArcGIS Enterprise in the Cloud. Bill Major

DCLI User's Guide. Data Center Command-Line Interface

PIVOTAL CLOUD FOUNDRY

Deploying and Operating Cloud Native.NET apps

Heroku. Rimantas Kybartas

SQL Diagnostic Manager Management Pack for Microsoft System Center

Accelerate critical decisions and optimize network use with distributed computing

Dell EMC Native Hybrid Cloud

Anaconda Project Documentation

coxtactoe Documentation

Python web frameworks

USER MANUAL. MageMob App Builder TABLE OF CONTENTS. Version: 2.0.0

CMPE PolyProtoPi. A multiprotocol home automation system that is configurable and accessible from the cloud. Weekly Progress Report 2

Which compute option is designed for the above scenario? A. OpenWhisk B. Containers C. Virtual Servers D. Cloud Foundry

Open Service Broker API: Creating a Cross-Platform Standard Doug Davis IBM Shannon Coen Pivotal

Monitoring MySQL with Prometheus & Grafana

3rd Party Application Deployment Instructions

Fluentd + MongoDB + Spark = Awesome Sauce

Rekall. Rekall Agent - OSDFCon Forensics. We will remember it for you wholesale! Michael Cohen

DCLI User's Guide. Data Center Command-Line Interface 2.9.1

Accelerating intelligence at the edge for embedded and IoT applications

FACIAL RECOGNITION PLATFORM

Introduction of the IoT Platform Node-RED and Hitachi s Activities Open Source Summit Japan 2018 Ide, Takaya Nakanishi, Kazuki

Conda Documentation. Release latest

Go Further Ford Motor Company. Ford Invests in Making Customer Experience as Strong as Its Vehicles with FordPass

App Service Overview. Rand Pagels Azure Technical Specialist - Application Development US Great Lakes Region

Erlang in the Heroku Cloud

State of Enterprise Mobile App Development

Harnessing the Power of Python in ArcGIS Using the Conda Distribution. Shaun Walbridge Mark Janikas Ting Lee

Qualys Cloud Platform

Getting Started with Python

The 12-Factor app and IBM Bluemix IBM Corporation

Deploying a distributed application with OpenStack

Extreme automation of today s technological marvel - connected cars

ALPR to Milestone Integration. User Ma

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

Werden Sie ein Teil von Internet der Dinge auf AWS. AWS Enterprise Summit 2015 Dr. Markus Schmidberger -

MFX-1 IoT EdgeX Computing Gateway

Using GPUaaS in Cloud Foundry

CISCO NETWORKS BORDERLESS Cisco Systems, Inc. All rights reserved. 1

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

Copyright 2012 EMC Corporation. All rights reserved. Obrigado

Windows 10 IoT Overview. Microsoft Corporation

RDO container registry Documentation

IoT Edge within the IoT Framework

Transcription:

An IoT App's Journey to the Cloud From Localhost to PCF Dev and Pivotal Cloud Foundry Beibei Yang, Ph.D. Sr. Advisor @beibei_yang

The Hype around IoT The technology underpinning the Internet of Things (IoT) acquiring, analyzing, and activating data is an essential element of generating innovative experiences and transforming operating models. $800 Million in Spending 8+ Billion Connected Things" 2021 2017 $1.4 Trillion in Spending 20+ Billion Connected "Things" Source: IDC: Worldwide Semiannual Internet of Things Spending Guide, 2017 IDC: IoT and Digital Transformation: A Tale of Four Industries, March 2016 Gartner: Internet of Things Endpoints and Associated Services, Worldwide, 2016

Use Case Factory Reporting environment Public Cloud Native Hybrid Cloud Cognitive Services Windows OS & Ubuntu HDFS MQTT Broker Master Node Data Center Edge VMs Event Video MQTT MQTT MQTT Demo Room Lab 1 Room Lab 2 Room MQTT IP cameras IP cameras IP cameras Sensors

R Shiny Dashboard

Customized R Buildpack https://github.com/beibeiyang/cf-buildpack-r

Containers Friendly to R users Apps run on both CF and Heroku

Version compatibility issues Extended staging time $ export CF_STAGING_TIMEOUT=60 $ export CF_STARTUP_TIMEOUT=60 Bulky apps RJDBC xlsx OpenNLP rjava arulesnbminer OpenStreetMap mallet RMongo RWeka No-go for libraries using JDK, OpenMP, OpenMPController RcppArmadillo markovchain crossover

Another Direction Use an official CF buildpack (such as python_buildpack) Run on localhost Test in PCF Dev Push to NHC PCF / Pivotal Web Services

Python App in Three Scenarios Localhost Language Python 2.x / Anaconda Python 2.x Libraries Endpoint login Dependencies pip install -r requirements.txt tornado==4.4.2 bokeh>=0.12.5 numpy==1.11.1 pymongo==3.3.0 redis==2.10.5 NA Local Redis Virtualenv Start command bokeh serve \ --port=8080 \ --address=localhost \ --show app App URL http://localhost:8080

Python App in Three Scenarios Localhost Language Python 2.x / Anaconda Python 2.x Libraries Endpoint login Dependencies Start command pip install -r requirements.txt tornado==4.4.2 bokeh>=0.12.5 numpy==1.11.1 pymongo==3.3.0 redis==2.10.5 NA Local Redis Virtualenv bokeh serve \ --port=8080 \ --address=localhost \ --show app PCF Dev Python Built-in Buildpack Python built-in buildpack takes care of library installations cf login -a api.local.pcfdev.io cf create-service p-redis \ shared-vm iot_redis Procfile web: bokeh serve --port=8080 \ --allow-websocketorigin=iotapp1.local.pcfdev.io \ --address=0.0.0.0 \ --use-xheaders \ --log-level=debug app App URL http://localhost:8080 http://iotapp1.local.pcfdev.io

Python App in Three Scenarios Localhost Language Python 2.x / Anaconda Python 2.x Libraries Endpoint login Dependencies Start command pip install -r requirements.txt tornado==4.4.2 bokeh>=0.12.5 numpy==1.11.1 pymongo==3.3.0 redis==2.10.5 NA Local Redis Virtualenv bokeh serve \ --port=8080 \ --address=localhost \ --show app PCF Dev Python Built-in Buildpack Python built-in buildpack takes care of library installations cf login -a api.local.pcfdev.io cf create-service p-redis \ shared-vm iot_redis Procfile web: bokeh serve --port=8080 \ --allow-websocketorigin=iotapp1.local.pcfdev.io \ --address=0.0.0.0 \ --use-xheaders \ --log-level=debug app Pivotal Web Services Python Built-in Buildpack Python built-in buildpack takes care of library installations cf login -a api.run.pivotal.io cf create-service rediscloud \ 30mb iot_redis Procfile web: bokeh serve --port=$port \ --allow-websocketorigin=iotapp1.cfapps.io:4443 \ --address=0.0.0.0 \ --use-xheaders --log-level=debug app App URL http://localhost:8080 http://iotapp1.local.pcfdev.io http://iotapp1.cfapps.io:4443

Demo

Customer 360 Acquire and retain customers Enhanced Customer Engagement Staffing/Human Capital Management Artificial intelligence (AI) Customer satisfaction, Productivity, workforce optimization Image of the customer NOTE: Assume customers opt in to provide personal and locational data. Scenario Video Management System detects the license plate of a Highly Valued Customer in the bank s parking lot then sends an alert to the Banking Staff. The alert will include the mood of the customer from a facial recognition application plus a customer dashboard providing the Banking Staff with important information about the customer. Resulting in high quality customer service. Bank Parking Lot IP Cameras Video Capture Software AI Application MJV Detects License Plate Within the Milestone Video Bank IP Cameras Creates an EVENT Creates an Alert Bank Staff Dashboard App Includes: Searching for Customer s Car in the Chase Parking Lot Customer Screen containing the Customer s mood, value, transaction history, etc

Next Steps Extended IoT use cases Deep Learning GPU as-a-service Native Hybrid Cloud Edge Compute Next-gen IoT solution

Appendix

Localhost Read sensor data from MongoDB Python 2.7 (Anaconda Python 2.7) Use virtualenv or conda environments Cache data in local Redis Dependency libraries Bokeh Tornado Redis pymongo Numpy Directory Structure app main.py set_environ_variables.sh

Localhost: Define MongoDB Credentials Set up a shell script $ cat set_environ_variables.sh #!/bin/sh export MONGO_ENV_HOST= mongo.domain.com export MONGO_ENV_USERNAME= user export MONGO_ENV_PASSWORD= pass export MONGO_ENV_AUTHSOURCE= iotlab export MONGO_ENV_PORT=27017 Execute source set_environ_variables.sh In Python script: mongoip = os.getenv('mongo_env_host', mongoip) mongouser = os.getenv('mongo_env_username', mongouser) mongopwd = os.getenv('mongo_env_password', mongopwd) mongoauthsrc = os.getenv('mongo_env_authsource', mongoauthsrc) mongoport = int(os.getenv('mongo_env_port', mongoport)) uri = "mongodb://{}:{}@{}:{}/?authsource={}".format(mongouser, \ mongopwd, mongoip, mongoport, mongoauthsrc)

Run on Localhost $ bokeh serve --port=8080 --address=localhost --show app Browse http://localhost:8080

Router Pushing an App cf push push app Blobstore DB Service credentials + app MD 1 Upload app bits and metadata CC + CC Bridge + Brain Service Broker Node(s) 2 Create and bind services Cell 3 Stage application DEA DEADEA + = 4 Deploy application

PCF Dev Python buildpack takes care of `pip install` Procfile $ cat requirements.txt tornado==4.4.2 bokeh>=0.12.5 numpy==1.11.1 pymongo==3.3.0 redis==2.10.5 $ cat Procfile web: bokeh serve --port=8080 --address=0.0.0.0 --allow-websocket-origin=iotapp1.local.pcfdev.io --use-xheaders --log-level=debug app Directory Structure.cfignore Procfile app main.py manifest.yml requirements.txt

PCF Dev (Contd.) Login via endpoint Microservices Two ways to define MongoDB Credentials In manifest.yml cf cups cf cups iotapp-mongo-config -p '{"MONGO_ENV_HOST": "mongo.domain.com", "MONGO_ENV_USERNAME": "user", "MONGO_ENV_PASSWORD": "pass",...}' cf login -a https://api.local.pcfdev.io --skip-ssl-validation cf create-service p-redis shared-vm iot_redis --- applications: - name: iotapp1 buildpack: python_buildpack memory: 128M disk_quota: 256M services: - iot_redis env: MONGO_ENV_SERVER_IP: mongo.domain.com MONGO_ENV_USERNAME: user MONGO_ENV_PASSWORD: pass MONGO_ENV_AUTHSOURCE: iotlab MONGO_ENV_PORT: 27017

Run on PCF Dev cf push Mircroservice bound to app https://iotapp1.local.pcfdev.io/

Pivotal Cloud Foundry / PWS Python buildpack takes care of `pip install` Procfile $ cat requirements.txt tornado==4.4.2 bokeh>=0.12.5 numpy==1.11.1 pymongo==3.3.0 redis==2.10.5 Directory Structure.cfignore Procfile app main.py manifest.yml requirements.txt Procfile for PCF web: bokeh serve --port=$port --allow-websocket-origin=iotapp1.cfapps.io --address=0.0.0.0 --use-xheaders --log-level=debug app https://iotapp1.cfapps.io Procfile for PWS web: bokeh serve --port=$port --allow-websocket-origin=iotapp1.cfapps.io:4443 --address=0.0.0.0 --use-xheaders --log-level=debug app https://iotapp1.cfapps.io:4443

Pivotal Cloud Foundry / PWS (Contd.) Login via endpoint Microservices Two ways to define MongoDB Credentials In manifest.yml cf cups cf cups iotapp-mongo-config -p '{"MONGO_ENV_HOST": "mongo.domain.com", "MONGO_ENV_USERNAME": "user", "MONGO_ENV_PASSWORD": "pass",...}' cf login -a api.run.pivotal.io cf marketplace cf create-service rediscloud 30mb iot_redis --- applications: - name: iotapp1 buildpack: python_buildpack memory: 128M disk_quota: 256M services: - iot_redis env: MONGO_ENV_SERVER_IP: mongo.domain.com MONGO_ENV_USERNAME: user MONGO_ENV_PASSWORD: pass MONGO_ENV_AUTHSOURCE: iotlab MONGO_ENV_PORT: 27017