SlideShare a Scribd company logo
Simple Docker hosting on FIWARE Lab
Kenneth Nagin
IBM
Cloud Chapter Lead, FIWARE
nagin@il.ibm.com
Simple docker hosting on fiware lab
Simple docker hosting on fiware lab
Simple docker hosting on fiware lab
FIWARE Lab Cloud Docker Hosting Overview
• Docker Hub: cloud service for managing and sharing Docker container images, including
FIWARE services, i.e. Generic Enablers (GEs) (http://catalogue.fiware.org/enablers);
• Docker Engine: creates and runs Docker containers; pulls/pushes images from/to
Docker Hub;
• Docker Compose: defines and runs multi-container applications;.
• Docker Swarm: manages a pool of Docker hosts using the full suite of Docker tools.
Because Docker Swarm serves the standard Docker API, any tool that already
communicates with a Docker daemon, e.g. Docker-Compose, can use Swarm to
transparently scale to multiple hosts.
• Docker Machine: creates and manages Docker hosts locally or on cloud providers
(including OpenStack). It can be used to create and manage Docker swam clusters.
• FIWARE Lab Docker Hosting: Docker Containers, Docker machines, and Docker Swarm
clusters can be hosted on the FIWARE lab, but remotely created and managed by local
Docker clients;
5
Simple Docker hosting on FIWARE
Remotely Managed by Docker Client
……
Region
….
Region
….
client
client
docker-engine
docker-machine
docker-compose
docker-swarm
docker api, openstack api, ssh
any tool based
on
docker-apidocker cli
Set up steps
1. Sign up fiware account (https://account.lab.fiware.org/sign_up/)
2. (Optionall) Request Community Upgrade
3. The orgranization automatically associated with your account must be able to
allocate at least on floating point IP and access at least one FIWARE region.
You can create other organizations.
4. In Cloud service
– Create Security Group that exposes ports for daemon, ssh, and any other
ports that are required.
– Allocated a floating point IP
5. Install docker and docker machine on your local computer
6. Use docker-machine to create hosts & swarm clusters on the desired FIWARE
regions
7
Simple docker hosting on fiware lab
Simple docker hosting on fiware lab
10
FIWARE Set up: Add security group for docker-machine
SSH: Port 22
Docker Daemon Port 2376
Docker Swarm Master Port: 3376
Auto allocated user ports: 32768-
33768
Other User Ports e.g. 8080
11
FIWARE set up: Allocate at least one public ip
12
docker-machine create docker host on FIWARE
export OS_REGION_NAME=<fiware region> #e.g. 'Spain2’
export OS_TENANT_NAME=<user’s organization> #e.g. ‘username cloud’
export OS_USERNAME=<user’s email address> #e.g. ‘username@gmail.com’
export OS_PASSWORD=<user’s password>
Export OS_DOMAIN_NAME=‘default’
export OS_AUTH_URL='http://cloud.lab.fi-ware.org:4730/v2.0/'
export OS_AUTH_STRATEGY='keystone'
13
docker-machine create docker host on fiware
$ docker-machine create -d openstack --openstack-flavor-id="2“ 
--openstack-image-name=“base_Ubuntu_14.04” 
--openstack-net-name="node-int-net-01" 
--openstack-floatingip-pool="public-ext-net-01" 
--openstack-sec-groups="docker-machine-sg" 
--openstack-ssh-user=“ubuntu” 
FIWARE-SPAIN2
Don’t forget to configure the security group with all necessary ports.
Simple docker hosting on fiware lab
15
docker-machine ls
>eval “$(docker-machine env FIWARE-SPAIN2)”
>docker info
>eval $(docker-machine env FIWARE-SPAIN2)
>docker run hello-world
Simple docker hosting on fiware lab
>eval $(docker-machine env FIWARE-SPAIN2)
>docker-compose up –d
>docker-compose ps
curl <FIWARE-SPAIN2 IP>:<EXPOSED PORT>
>curl <FIWARE-SPAIN2 IP>:<EXPOSED PORT>
Simple docker hosting on fiware lab
21
Docker create swarm container
Save token in $TOKEN
> docker
22
Docker Swarm: create master
>export OS_REGION_NAME=Spain2
>docker-machine create -d openstack 
--openstack-flavor-id="2" 
--openstack-image-id=“base_Ubuntu_14.4” 
--openstack-net-name="node-int-net-01" 
--openstack-floatingip-pool="public-ext-net-01“ 
--openstack-sec-groups="docker-machine-sg" 
--openstack-ssh-user=“ubuntu” 
--swarm --swarm-master 
--swarm-discovery token://$TOKEN 
FIWARE-SPAIN2
23
Docker Swarm: create agent
>export OS_REGION_NAME=Crete
>docker-machine create -d openstack 
–-openstack-flavor-id="2" 
--openstack-image-id=“base_Ubuntu_14.4” 
--openstack-net-name="node-int-net-01" 
--openstack-floatingip-pool="public-ext-net-01" 
--openstack-sec-groups="docker-machine-sg“ 
--openstack-ssh-user=“ubuntu” 
--swarm 
--swarm-discovery token://$TOKEN 
FIWARE-Crete
docker swarm
• docker-machine ls
>eval “$(docker-machine env --swarm FIWARE-SPAIN2)”
>docker info
>eval $(docker-machine env --swarm FIWARE-SPAIN2)
>docker run hello-world
>docker ps -a
>eval $(docker-machine env --swarm FIWARE-SPAIN2)
>docker-compose up -d
>docker ps
>curl http://147.27.60.99:32768/employees/resources/employees/
>eval $(docker-machine env --swarm FIWARE-SPAIN2)
>docker-compose stop
>docker-compose ps
Limitations
•labor-intensive for non-trivial environments
•security
•multi-tenancy
•scalability
•manageability
•limited Docker features (storage, network, etc)
•not production-ready (high availability, etc)
Simple docker hosting on fiware lab

More Related Content

What's hot (19)

PPTX
K8s security best practices
Sharon Vendrov
 
PDF
Dev stacklabguide
openstackcisco
 
PPTX
Docker Container Security
Suraj Khetani
 
PPTX
Openstack architure part 1
Nhan Cao Thanh
 
PPTX
Quick overview of Openstack architecture
Toni Ramirez
 
PPTX
Secure Keystone Deployment
Priti Desai
 
PDF
Build Your Own Open Source Cloud
Adrian Otto
 
PDF
Installing WordPress on AWS
Manish Jain
 
ODP
OpenStack DevStack Configuration localrc local.conf Tutorial
Saju Madhavan
 
PPTX
Hyper-V OpenStack Nova Compute
Alessandro Pilotti
 
PPTX
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
OpenStack Korea Community
 
PDF
OpenStack Architecture: Past and Future
Ken Pepple
 
PPTX
Docker Container Security - A Network View
NeuVector
 
PPTX
Keystone - Openstack Identity Service
Prasad Mukhedkar
 
PDF
OPNFV & OpenStack
openstackindia
 
PPTX
Devnet 1005 Getting Started with OpenStack
Cisco DevNet
 
PDF
How abusing the Docker API led to remote code execution same origin bypass an...
Aqua Security
 
PDF
Code Factory avec GitLab CI et Rancher
SUSE
 
PPTX
Security best practices for kubernetes deployment
Michael Cherny
 
K8s security best practices
Sharon Vendrov
 
Dev stacklabguide
openstackcisco
 
Docker Container Security
Suraj Khetani
 
Openstack architure part 1
Nhan Cao Thanh
 
Quick overview of Openstack architecture
Toni Ramirez
 
Secure Keystone Deployment
Priti Desai
 
Build Your Own Open Source Cloud
Adrian Otto
 
Installing WordPress on AWS
Manish Jain
 
OpenStack DevStack Configuration localrc local.conf Tutorial
Saju Madhavan
 
Hyper-V OpenStack Nova Compute
Alessandro Pilotti
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
OpenStack Korea Community
 
OpenStack Architecture: Past and Future
Ken Pepple
 
Docker Container Security - A Network View
NeuVector
 
Keystone - Openstack Identity Service
Prasad Mukhedkar
 
OPNFV & OpenStack
openstackindia
 
Devnet 1005 Getting Started with OpenStack
Cisco DevNet
 
How abusing the Docker API led to remote code execution same origin bypass an...
Aqua Security
 
Code Factory avec GitLab CI et Rancher
SUSE
 
Security best practices for kubernetes deployment
Michael Cherny
 

Viewers also liked (20)

PPT
HSW - Home Sweet Work
Marco Coghi
 
PDF
Beacon Portuguese October 2011
npac75
 
PDF
Geneva crossing the lake - cool travel - around the world
Maarten Schäfer
 
DOC
Manoel luciene2007doutorado
Luciene Gomes
 
PPTX
Publicidad y Redes Sociales. II Parte.
Bidane Galicia
 
PPTX
Power mireia silvia
jdelga36
 
PPT
Influencia de la estructura de los distritos en su capacidad de innovación
Daniel Gabadón-Estevan
 
PPTX
Trabajo práctico nº3
Camiii07
 
PDF
Merkenbinding door Social Media (Poken uitgelegd)
Ayman van Bregt
 
PDF
Drupal Panopoly | Drupal Camp Vienna 2015
Matthias Walti
 
PDF
7 people
ricciouno
 
PDF
Invitación a Ponencia sobre Desarrollo Comunitario DIF Nuevo León
Natura Equilibrium
 
PPT
Fiji 2012
Mario Verdugo
 
PDF
The Shipyard Email Statistics
Tonnisha J. English
 
PDF
Hitex TexPrint
Hitex International Group
 
PDF
SPORT CV - 2015 resume
Dave van Dyk
 
PDF
Antioxidant and-anticancer-activities-of-moringa-leaves
Silentdisco Berlin
 
PDF
6 AltáNtico
boyacaresponsable
 
PPT
La liebre mara brandon
Carina Daniela Soumoulou
 
HSW - Home Sweet Work
Marco Coghi
 
Beacon Portuguese October 2011
npac75
 
Geneva crossing the lake - cool travel - around the world
Maarten Schäfer
 
Manoel luciene2007doutorado
Luciene Gomes
 
Publicidad y Redes Sociales. II Parte.
Bidane Galicia
 
Power mireia silvia
jdelga36
 
Influencia de la estructura de los distritos en su capacidad de innovación
Daniel Gabadón-Estevan
 
Trabajo práctico nº3
Camiii07
 
Merkenbinding door Social Media (Poken uitgelegd)
Ayman van Bregt
 
Drupal Panopoly | Drupal Camp Vienna 2015
Matthias Walti
 
7 people
ricciouno
 
Invitación a Ponencia sobre Desarrollo Comunitario DIF Nuevo León
Natura Equilibrium
 
Fiji 2012
Mario Verdugo
 
The Shipyard Email Statistics
Tonnisha J. English
 
SPORT CV - 2015 resume
Dave van Dyk
 
Antioxidant and-anticancer-activities-of-moringa-leaves
Silentdisco Berlin
 
6 AltáNtico
boyacaresponsable
 
La liebre mara brandon
Carina Daniela Soumoulou
 
Ad

Similar to Simple docker hosting on fiware lab (20)

PPTX
Intro to the FIWARE Lab
FIWARE
 
PPTX
Setting up your virtual infrastructure using FIWARE Lab Cloud
Fernando Lopez Aguilar
 
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
PDF
Docker for developers
andrzejsydor
 
PDF
FIWARE Lab
Miguel González
 
PPTX
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
Codemotion
 
PPTX
FIWARE Primer - Learn FIWARE in 60 Minutes
Federico Michele Facca
 
PDF
Using Docker with OpenStack - Hands On!
Adrian Otto
 
PPTX
Microservices in academic environment
Milind Bhagwati
 
PDF
Docker for (Java) Developers
Rafael Benevides
 
PDF
Docker
SangtongPeesing
 
PPTX
DockerCon EU 2015 Barcelona
Roman Dembitsky
 
PDF
Real-World Docker: 10 Things We've Learned
RightScale
 
PDF
Docker Introduction
Peng Xiao
 
PPTX
Docker for Multi-Cloud Apps
Adrian Otto
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PDF
Docker From Scratch
Giacomo Vacca
 
PDF
Containerization Is More than the New Virtualization
C4Media
 
Intro to the FIWARE Lab
FIWARE
 
Setting up your virtual infrastructure using FIWARE Lab Cloud
Fernando Lopez Aguilar
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
Docker for developers
andrzejsydor
 
FIWARE Lab
Miguel González
 
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 Minutes
Codemotion
 
FIWARE Primer - Learn FIWARE in 60 Minutes
Federico Michele Facca
 
Using Docker with OpenStack - Hands On!
Adrian Otto
 
Microservices in academic environment
Milind Bhagwati
 
Docker for (Java) Developers
Rafael Benevides
 
DockerCon EU 2015 Barcelona
Roman Dembitsky
 
Real-World Docker: 10 Things We've Learned
RightScale
 
Docker Introduction
Peng Xiao
 
Docker for Multi-Cloud Apps
Adrian Otto
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Docker From Scratch
Giacomo Vacca
 
Containerization Is More than the New Virtualization
C4Media
 
Ad

Simple docker hosting on fiware lab

  • 1. Simple Docker hosting on FIWARE Lab Kenneth Nagin IBM Cloud Chapter Lead, FIWARE [email protected]
  • 5. FIWARE Lab Cloud Docker Hosting Overview • Docker Hub: cloud service for managing and sharing Docker container images, including FIWARE services, i.e. Generic Enablers (GEs) (http://catalogue.fiware.org/enablers); • Docker Engine: creates and runs Docker containers; pulls/pushes images from/to Docker Hub; • Docker Compose: defines and runs multi-container applications;. • Docker Swarm: manages a pool of Docker hosts using the full suite of Docker tools. Because Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon, e.g. Docker-Compose, can use Swarm to transparently scale to multiple hosts. • Docker Machine: creates and manages Docker hosts locally or on cloud providers (including OpenStack). It can be used to create and manage Docker swam clusters. • FIWARE Lab Docker Hosting: Docker Containers, Docker machines, and Docker Swarm clusters can be hosted on the FIWARE lab, but remotely created and managed by local Docker clients; 5
  • 6. Simple Docker hosting on FIWARE Remotely Managed by Docker Client …… Region …. Region …. client client docker-engine docker-machine docker-compose docker-swarm docker api, openstack api, ssh any tool based on docker-apidocker cli
  • 7. Set up steps 1. Sign up fiware account (https://account.lab.fiware.org/sign_up/) 2. (Optionall) Request Community Upgrade 3. The orgranization automatically associated with your account must be able to allocate at least on floating point IP and access at least one FIWARE region. You can create other organizations. 4. In Cloud service – Create Security Group that exposes ports for daemon, ssh, and any other ports that are required. – Allocated a floating point IP 5. Install docker and docker machine on your local computer 6. Use docker-machine to create hosts & swarm clusters on the desired FIWARE regions 7
  • 10. 10 FIWARE Set up: Add security group for docker-machine SSH: Port 22 Docker Daemon Port 2376 Docker Swarm Master Port: 3376 Auto allocated user ports: 32768- 33768 Other User Ports e.g. 8080
  • 11. 11 FIWARE set up: Allocate at least one public ip
  • 12. 12 docker-machine create docker host on FIWARE export OS_REGION_NAME=<fiware region> #e.g. 'Spain2’ export OS_TENANT_NAME=<user’s organization> #e.g. ‘username cloud’ export OS_USERNAME=<user’s email address> #e.g. ‘[email protected]’ export OS_PASSWORD=<user’s password> Export OS_DOMAIN_NAME=‘default’ export OS_AUTH_URL='http://cloud.lab.fi-ware.org:4730/v2.0/' export OS_AUTH_STRATEGY='keystone'
  • 13. 13 docker-machine create docker host on fiware $ docker-machine create -d openstack --openstack-flavor-id="2“ --openstack-image-name=“base_Ubuntu_14.04” --openstack-net-name="node-int-net-01" --openstack-floatingip-pool="public-ext-net-01" --openstack-sec-groups="docker-machine-sg" --openstack-ssh-user=“ubuntu” FIWARE-SPAIN2 Don’t forget to configure the security group with all necessary ports.
  • 16. >eval “$(docker-machine env FIWARE-SPAIN2)” >docker info
  • 17. >eval $(docker-machine env FIWARE-SPAIN2) >docker run hello-world
  • 19. >eval $(docker-machine env FIWARE-SPAIN2) >docker-compose up –d >docker-compose ps curl <FIWARE-SPAIN2 IP>:<EXPOSED PORT> >curl <FIWARE-SPAIN2 IP>:<EXPOSED PORT>
  • 21. 21 Docker create swarm container Save token in $TOKEN > docker
  • 22. 22 Docker Swarm: create master >export OS_REGION_NAME=Spain2 >docker-machine create -d openstack --openstack-flavor-id="2" --openstack-image-id=“base_Ubuntu_14.4” --openstack-net-name="node-int-net-01" --openstack-floatingip-pool="public-ext-net-01“ --openstack-sec-groups="docker-machine-sg" --openstack-ssh-user=“ubuntu” --swarm --swarm-master --swarm-discovery token://$TOKEN FIWARE-SPAIN2
  • 23. 23 Docker Swarm: create agent >export OS_REGION_NAME=Crete >docker-machine create -d openstack –-openstack-flavor-id="2" --openstack-image-id=“base_Ubuntu_14.4” --openstack-net-name="node-int-net-01" --openstack-floatingip-pool="public-ext-net-01" --openstack-sec-groups="docker-machine-sg“ --openstack-ssh-user=“ubuntu” --swarm --swarm-discovery token://$TOKEN FIWARE-Crete
  • 25. >eval “$(docker-machine env --swarm FIWARE-SPAIN2)” >docker info
  • 26. >eval $(docker-machine env --swarm FIWARE-SPAIN2) >docker run hello-world >docker ps -a
  • 27. >eval $(docker-machine env --swarm FIWARE-SPAIN2) >docker-compose up -d >docker ps >curl http://147.27.60.99:32768/employees/resources/employees/
  • 28. >eval $(docker-machine env --swarm FIWARE-SPAIN2) >docker-compose stop >docker-compose ps
  • 29. Limitations •labor-intensive for non-trivial environments •security •multi-tenancy •scalability •manageability •limited Docker features (storage, network, etc) •not production-ready (high availability, etc)