SlideShare uma empresa Scribd logo
1 de 43
Launching a Cloud Service
for your IoT project
Vincent Claes
Get started
• We will use Python and Flask for our Cloud service
• Part 1: Heroku
• https://www.heroku.com
• Install heroku cli tools
• https://devcenter.heroku.com/articles/heroku-cli
• Part 2: Pythonanywhere
• https://www.pythonanywhere.com
• Read about git
• https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
• Be sure to have git installed on your system
• https://git-scm.com/download/win
Vincent Claes
Sign up or Log in @ www.heroku.com
Vincent Claes
Our Application
Vincent Claes
• Python Application
• https://www.python.org/
• Flask Python Library
• http://flask.pocoo.org/
• Code is on our local machine and not on www.github.com
Create a new pipeline
Vincent Claes
A pipeline is a dyno (aka
cloud worker - vm) that will
run your app
Create a new pipeline
Vincent Claes
Create a new pipeline
Vincent Claes
Add App
Vincent Claes
The App is the actual Python Application, on Heroku you can host
applications from different programming languages (Python, R, PHP,…)
We will build our application in a way that Heroku recognizes that we
used Python to program it.
Create new App
Vincent Claes
Create new App
Vincent Claes
Create new App
Vincent Claes
Create requirements.txt file
Create a new file “requirements.txt” with the following contents:
Flask
gunicorn
Vincent Claes
Create Procfile file
Create a new file “Procfile” with the following contents:
web: gunicorn PXLApp:app
Vincent Claes
Create PXLApp.py file
Vincent Claes
Open CMD
• Open a commandprompt (cmd) and open (or create) a directory with
the following files:
• requirements.txt
• Procfile
• PXLApp.py
Vincent Claes
Heroku login
Vincent Claes
Heroku update
Vincent Claes
Heroku help
Vincent Claes
Git init
Vincent Claes
Heroku git:remote –a sspxlpy
Vincent Claes
Git add .
Vincent Claes
Git commit –am “First Launch”
Vincent Claes
Git push heroku master
Vincent Claes
heroku open /hi
Vincent Claes
curl –i https://sspxlpy.herokuapp.com/hi
Vincent Claes
Part 2: Pythonanywhere
• https://www.pythonanywhere.com
Vincent Claes
Log in or Sign up @ pythonanywhere
Vincent Claes
Open Web Apps
Vincent Claes
Add a new web app
Vincent Claes
Create a new web app
Vincent Claes
Flask Python Web Framework
Vincent Claes
Python 3.7 (Flask 1.0.2)
Vincent Claes
Select path for python file – Flask app
Vincent Claes
Overview Web Tab
Vincent Claes
Files Tab
Vincent Claes
Open mysite directory
Vincent Claes
Open flask_app.py
Vincent Claes
https://cteq.pythonanywhere.com
Vincent Claes
Example Flask App
Vincent Claes
Web Tab => reload
Vincent Claes
curl –i https://cteq.pythonanywhere.com/hi
Vincent Claes
CURL REFERENCE
option purpose
-X specify HTTP request method e.g. POST
curl -X GET http://cteq.pythonanywhere.com
-H specify request headers e.g. "Content-type: application/json“
curl -H "Content-type: application/json" -X POST http://cteq.pythonanywhere.com -d '{"message: "Hi Python World!!!"}'
-d specify request data e.g. '{"message":“Hi Python World!!!"}’
curl -H "Content-type: application/json" -X POST http://cteq.pythonanywhere.com -d '{"message: "Hi Python World!!!"}'
--data-binary specify binary request data e.g. @file.bin
curl -H "Content-type: application/octet-stream" -X POST http://cteq.pythonanywhere.com -data-binary @file.bin
-i shows the response headers
curl -i http://cteq.pythonanywhere.com/hi
-u specify username and password e.g. "admin:secret“
curl -v -u "admin:pass" http://cteq.pythonanywhere.com/passneededcontents
-v enables verbose mode which outputs info such as request and response headers and errors
curl -v -u "admin:pass" http://cteq.pythonanywhere.com/passneededcontents
Vincent Claes
• More info: vincent[at]cteq.eu
• https://www.linkedin.com/in/vincentclaes/
• You can contact me for IoT, Embedded Systems (HW, SW, FPGA,
ARM,…) and ML/AI projects (R and Python).
Vincent Claes

Mais conteúdo relacionado

Mais procurados

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
Weaveworks
 
The hardest part of microservices: your data
The hardest part of microservices: your dataThe hardest part of microservices: your data
The hardest part of microservices: your data
Christian Posta
 

Mais procurados (20)

DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps
 
Github in Action
Github in ActionGithub in Action
Github in Action
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
mykola marzhan - jenkins on aws spot instance
mykola marzhan - jenkins on aws spot instancemykola marzhan - jenkins on aws spot instance
mykola marzhan - jenkins on aws spot instance
 
Microservices and docker
Microservices and dockerMicroservices and docker
Microservices and docker
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
Gitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CIGitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CI
 
AWS DevOps - Terraform, Docker, HashiCorp Vault
AWS DevOps - Terraform, Docker, HashiCorp VaultAWS DevOps - Terraform, Docker, HashiCorp Vault
AWS DevOps - Terraform, Docker, HashiCorp Vault
 
The hardest part of microservices: your data
The hardest part of microservices: your dataThe hardest part of microservices: your data
The hardest part of microservices: your data
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on Kubernetes
 
Flutter
FlutterFlutter
Flutter
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
Introduction to python requests
Introduction to python requestsIntroduction to python requests
Introduction to python requests
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEANGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 

Semelhante a Launching Python Cloud Services for AI/IoT Projects

Setting up your virtual infrastructure using fi lab cloud webminar
Setting up your virtual infrastructure using fi lab cloud webminarSetting up your virtual infrastructure using fi lab cloud webminar
Setting up your virtual infrastructure using fi lab cloud webminar
Henar Muñoz Frutos
 

Semelhante a Launching Python Cloud Services for AI/IoT Projects (20)

DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with Python
 
Ian huston getting started with cloud foundry
Ian huston   getting started with cloud foundryIan huston   getting started with cloud foundry
Ian huston getting started with cloud foundry
 
Ian Huston - "Deploying your data driven web app on Cloud Foundry"
Ian Huston - "Deploying your data driven web app on Cloud Foundry" Ian Huston - "Deploying your data driven web app on Cloud Foundry"
Ian Huston - "Deploying your data driven web app on Cloud Foundry"
 
Deploying to AppEngine
Deploying to AppEngineDeploying to AppEngine
Deploying to AppEngine
 
DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
 
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code DeployAWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
 
OpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATXOpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATX
 
Jump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & GithubJump into Squeak - Integrate Squeak projects with Docker & Github
Jump into Squeak - Integrate Squeak projects with Docker & Github
 
WordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and VagrantWordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and Vagrant
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
PVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIPVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CI
 
Setting up your virtual infrastructure using fi-lab cloud
Setting up your virtual infrastructure using fi-lab cloudSetting up your virtual infrastructure using fi-lab cloud
Setting up your virtual infrastructure using fi-lab cloud
 
Contributing to OpenStack
Contributing to OpenStackContributing to OpenStack
Contributing to OpenStack
 
Setting up your virtual infrastructure using fi lab cloud webminar
Setting up your virtual infrastructure using fi lab cloud webminarSetting up your virtual infrastructure using fi lab cloud webminar
Setting up your virtual infrastructure using fi lab cloud webminar
 
Python Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsPython Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + Jenkins
 
Python/Flask Presentation
Python/Flask PresentationPython/Flask Presentation
Python/Flask Presentation
 
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutesHow to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
 
Building Serverless applications with Python
Building Serverless applications with PythonBuilding Serverless applications with Python
Building Serverless applications with Python
 

Mais de Vincent Claes

Mais de Vincent Claes (20)

Percepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZEDPercepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZED
 
Xilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello WorldXilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello World
 
Programming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDKProgramming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDK
 
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP BlockDebugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
 
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
 
Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot Python
 
Installation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python WorkshopInstallation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python Workshop
 
ZYNQ BRAM Implementation
ZYNQ BRAM ImplementationZYNQ BRAM Implementation
ZYNQ BRAM Implementation
 
Real Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARMReal Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARM
 
R Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by ExampleR Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by Example
 
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL LaunchpadUsing Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
 
Hogeschool PXL Smart Mirror
Hogeschool PXL Smart MirrorHogeschool PXL Smart Mirror
Hogeschool PXL Smart Mirror
 
Softcore vs Hardcore processor
Softcore vs Hardcore processorSoftcore vs Hardcore processor
Softcore vs Hardcore processor
 
MySQL / PHP Server
MySQL / PHP ServerMySQL / PHP Server
MySQL / PHP Server
 
Implementing an interface in r to communicate with programmable fabric in a x...
Implementing an interface in r to communicate with programmable fabric in a x...Implementing an interface in r to communicate with programmable fabric in a x...
Implementing an interface in r to communicate with programmable fabric in a x...
 
fTales workshop
fTales workshopfTales workshop
fTales workshop
 
Maker Revolution
Maker RevolutionMaker Revolution
Maker Revolution
 
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
 
FreeRTOS API
FreeRTOS APIFreeRTOS API
FreeRTOS API
 

Último

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 

Último (20)

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

Launching Python Cloud Services for AI/IoT Projects