first explains what paas is and then execute helloworld in cloudfoundry which is a vmware paas solution then explain what containerization is the what docker is and how to execute hell world in a docker container
2. List of Content
• What is PaaS?
• PaaS Technologies
• PaaS Example – Cloudfoundry
• Simple Hello World in Cloudfoundry
• What is Containerization?
• Container VS VMs
• Containerization Example – Docker
• Simple Hello World in Docker
• PaaS & Containerization
• What is PaaS and containerization roll in agile?
Evoteam.ir
2
3. PaaS , What is it?
• Platform as a service (PaaS) is a cloud computing offering that provides
users a cloud environment in which they can develop, manage, and deliver
applications.
Private PaaS
Public PaaS
Evoteam.ir
3
4. Key Features
• Facilitates collaborative work even if teams work remotely.
• PaaS provides a platform with tools to test, develop, and host applications in
the same environment.
• Enables organizations to focus on development without having to worry
about underlying infrastructure
• Providers manage security, operating systems, server software, and backups.
Evoteam.ir
4
8. What is cloud foundry?
• Cloud Foundry is an open source, multi cloud application platform as a
service (PaaS) governed by the Cloud Foundry Foundation.
• The software was originally developed by VMware and then transferred to
Pivotal Software, a joint venture by EMC, VMware and General Electric.
Evoteam.ir
8
9. Simple hello world
• Pivotal web services (PWS) provides “Cloud Foundry as a web service,”
deployed on top of AWS. You’ll just need create an account and you’ll
automatically get a sixty day free trial.
Cloud Foundry supports many languages like Java, PHP, Ruby, Node.js etc.
In this example we will run Java hello world program in Pivotal Web
Service.
Evoteam.ir
9
10. Step 1: Register with Pivotal Web
Service
• Register with Pivotal Web Service.
Create your account and finally you
should be able to see your Pivotal
account as below.
Evoteam.ir
10
11. Step 2: Install the Cloud Foundry Command Line Interface
(cf CLI)
• Cloud Foundry Command Line Interface (cf CLI) is a tool to deploy and
manage applications in Cloud Foundry.
1. Download and install Cloud Foundry Cli
2. Add the Cloud Foundry path to environment variable.
3. Open Command Prompt and run “cf help” to confirm that the tool is installed
correctly. The example shows the beginning lines of output for this command.
Evoteam.ir
11
12. Step 3: Download and deploy Java Hello World Application
in Cloud Foundry
1. Download the Java Hello World program.
2. Enter command “cf api api.run.pivotal.io” to set the API endpoint.
3. Enter “cf login” to login. Enter your email id and password you used
while registering to Pivotal Web Service.
4. Open Command Prompt and enter the command “CD
<CF_FOLDER_PATH>”.
5. Enter the command “cf push” to publish the Hello World application.
6. Finally the application should be started and the app URL should be
provided as below. For example in this case, it is Java-
HelloWorld.cfapps.io
Evoteam.ir
12
13. Enter command “cf api api.run.pivotal.io” to
set the API endpoint.
Evoteam.ir
13
14. Enter “cf login” to login. Enter your email id and password
you used while registering to Pivotal Web Service.
Evoteam.ir
14
15. Open Command Prompt and enter the
command “CD <CF_FOLDER_PATH>”.
Evoteam.ir
15
16. Enter the command “cf push” to publish
the Hello World application.
Evoteam.ir
16
19. Deploying App to Cloud Foundry
Runtime
① Upload app
bits and
metadata
push app
② Create and bind services
③ Stage application
④ Deploy application
⑤ Manage application health
…
Cloud Foundry
Run.me (PaaS)
Blobstore DB
Cloud Controller
Service Broker
Node(s)
DEA
DEA
DEA
DEA
MD+ ap p
+ =
Service
credentials
MDapp
Evoteam.ir
19
20. Creating and Binding a Service
Cloud Foundry
Run.me (PaaS )
DB
Service
credentials
reserve resourcescreate service (HTTP) create service (HTTP)
bind service (HTTP)bind service (HTTP) obtain connection data
CLI Cloud
Controller
Service
Broker
Data
Service
Evoteam.ir
20
24. Cloud Foundry Architecture
• The Cloud Foundry platform is
abstracted as a set of large-scale
distributed services. It uses Cloud
Foundry Bosh to operate the
underlying infrastructure from IaaS
providers (e.g., VMware, Amazon
AWS, OpenStack).
• Components are dynamically
discoverable and loosely coupled,
exposing health through HTTP
endpoints so agents can collect state
information (app state & system
state) and act on it.
Evoteam.ir
24
25. Containerization, What’s it about?
• A container image is a lightweight, stand-alone, executable package of a piece of software
that includes everything needed to run it: code, runtime, system tools, system libraries,
settings. Available for both Linux and Windows based apps, containerized software will
always run the same, regardless of the environment.
Containers isolate software from its surroundings,
for example differences between development and
staging environments and help reduce conflicts
between teams running different software on
the same infrastructure.
Evoteam.ir
25
26. Container Vs VMs
• Containers and virtual machines have similar resource isolation and
allocation benefits, but function differently because containers virtualize the
operating system instead of hardware. Containers are more portable and
efficient.
Evoteam.ir
26
27. Container Vs VMs
• Faster to boot, less overhead than a VM
$ time docker run ubuntu echo hello world hello world real 0m0.258s
• Disk usage: less than 100 kB
• Memory usage: less than 1.5 MB
Evoteam.ir
27
31. Docker
• Docker is an open platform for developing, shipping, and running
applications. Docker is designed to deliver your applications faster. With
Docker you can separate your applications from your infrastructure AND
treat your infrastructure like a managed application. Docker helps you ship
code faster, test faster, deploy faster, and shorten the cycle between writing
code and running code.
Evoteam.ir
31
33. Simple hello world in Docker
(pulling)
• docker pull hello-world
• docker run hello-world
Evoteam.ir
33
34. Simple hello world in
Docker(Dockerfile)
FROM Alpine3.0.1
Echo “hello world”
Evoteam.ir
34
35. Docker Concepts
• Docker is composed of following four components
Docker Client and Daemon
Images
registries
Containers
Evoteam.ir
35
36. Docker Concepts
• Docker Daemon
the Docker daemon runs on a host machine. The user does not directly interact with
the daemon, but instead through the Docker client.
• Docker Client
The Docker client, in the form of the docker binary, is the primary user interface to
Docker. It accepts commands from the user and communicates back and forth with a
Docker daemon.
• Images
A Docker image is a read-only template.
Images that exist on register (docker hub)
Images that can created with build
Evoteam.ir
36
37. Docker Concepts
• Registeries
Docker registries hold images. These are public or private stores from which you
upload or download images. The public Docker registry is provided with the Docker
Hub.
• Containers
Docker containers are similar to a directory. A Docker container holds everything
that is needed for an application to run. Each container is created from a Docker
image.
Evoteam.ir
37
39. What happens when you run a
container?
• Pulls the image
• Creates a new container
• Allocates a filesystem and mounts a read-write layer
• Allocates a network / bridge interface
• Sets up an IP address
• Executes a process that you specify
• Captures and provides application output
Evoteam.ir
39
40. PaaS GOAL:
• Creates an abstracted environment that supports an efficient, costeffective,
and repeatable process for the creation and deployment of high-quality
applications.
• The infrastructure such as network, storage etc. and applications are
managed for customers and support is available.
• Services are constantly updated and existing features get upgraded
Evoteam.ir
40
41. PaaS & Container
• Nowadays, companies are following microservice architecture and creating
containerized apps which could not be run on traditional paas frameworks.
• We design our pass frameworks along with containers such as Docker as
they provide flexibility and easy monitoring of our applications.
• Sometimes it becomes difficult for a application developer to setup and
create the environment on a container there are some companies such as
cloud foundry which setup and manages the containers and the developer
can write and run its code.
• This allows us to run multi-layered application on the cloud.
Evoteam.ir
41
43. What is PaaS and containerization
roll in agile?
• Development Agility:
Faster time-to-market
Better feedback loop
More frequent iterations with less impact in change process
More user requirements met
Less change requests
Alignment with business
Positioning IT as a value center and partner to business
• Derived:
https://apprenda.com/blog/what-does-paas-have-to-do-with-agile-development-very-
little-except-for-the-benefits/
Evoteam.ir
43
44. Acknoledgments
Thanks to:
Jérôme Petazzoni
Mohammadreza Amini
Amir Arsalan
For their wonderful slides and presentation and I used some of their slides in
my presentation
Also many thanks to http://saphanatutorial.com for their tutorial on hello
world in cloud foundry
Evoteam.ir
44
public cloud service from a provider, where the consumer controls software deployment with minimal
configuration options, and the provider provides the networks, servers, storage, OS, 'middleware' (i.e.; java runtime, .net runtime, integration, etc.), database and other services to host the consumer's application; or as a private service (software or appliance) inside the firewall, or as software deployed on a public infrastructure as a service.