Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting & Running EdgeX Docker Containers

Similar presentations


Presentation on theme: "Getting & Running EdgeX Docker Containers"— Presentation transcript:

1 Getting & Running EdgeX Docker Containers
Tech Talks – Session 2

2 Agenda Introduction Tools you need to install (Docker & Docker Compose) Where to get the EdgeX Foundry micro service Docker Containers Get the EdgeX Containers Running the EdgeX containers Order Matters!! How to know when the containers are running How to use EdgeX containers in development Hybrid native code and Docker development Eventual container build process Future Topic Request Q&A

3 Jim White Dell Distinguished Engineer & Senior Software Architect
From Dell End User Computing (EUC) CTO Chief Architect and lead developer of Fuse I wrote code line #1  Fuse => EdgeX Foundry

4 Next Thursday’s (July 13th) call is at 6pm EDT
EdgeX Tech Talks Provide this new community with background on the current system In the future, they may address future architecture or special calls to action Currently scheduled for every week (Thursdays) Alternating weekly times: 9am and 6pm EDT Trying to be sensitive to global attendance Topics TBD – me suggestions Next Thursday’s (July 13th) call is at 6pm EDT

5 Docker & Docker Compose
Docker allows the application to be package up and deployed with all of the parts it needs (libraries, other dependencies, etc.) It provides a certain amount of OS independence Docker Compose is a tool for defining, running, and managing complex multi- container systems

6 EdgeX via Docker Tools To use EdgeX via Docker containers, you do not need any development tools You do need Docker (Community Edition is fine) for your particular OS See You will find it very helpful to also have Docker Compose Already comes with Docker for Windows or Docker for Mac Other environments need to install separately See If you are doing EdgeX development, you can use EdgeX containers Allows you to minimize the amount of EdgeX code you need to download Allows you to focus on code for your service while using the latest containers to provide the other micro services We call this hybrid development (more later) Going to assume you can get and setup Docker, Docker Compose, etc. If you desperately need help, please contact me

7 EdgeX Foundry on Docker Hub
Docker Hub offers a public host for Docker containers hub.docker.com EdgeX Foundry micro services are found in Docker Hub Search for “edgexfoundry” (all one word) from the main page Currently 15 container images available The EdgeX Foundry containers are manually created with new code submittal (meaning you get the latest running code) This process is going to be automated soon Let’s see it

8 Docker Compose Simplifies Getting/Running EdgeX
You could use Docker to manually pull and start each EdgeX container Complicated and would require many commands to start and stop each container Example for one container docker pull edgexfoundry/docker-core-data:latest docker run –p 48080:48080 –name docker-core-data –net=edgex-network –volumes-from edgex-files –d edgexfoundry/docker-core-data:latest Would also require setting up a Docker network, volume, etc. Simplified by Docker Compose 1 command to pull all the EdgeX containers 1 simplified command to start a container In the future, 1 command to pull and start all of EdgeX Requires getting the EdgeX docker-compose.yml file Found in the developer-scripts repository in GitHub github.com/edgexfoundry/developer-scripts Where in GitHub

9 Start EdgeX using Docker Compose
From the command line, goto the folder holding the docker-compose.yml file Pull all the EdgeX Foundry containers with one command: docker-compose pull Start each EdgeX Docker Container with a command: docker-compose up –d [compose name] See the next slide for the compose names and start order -d option is to start the container as a background daemon See wiki.edgexfoundry.org/display/FA/Get+EdgeX+Foundry+-+Users for details

10 EdgeX Container Bring Up Order (and wait times)
Compose Name Wait time Container Name volume couple of seconds edgex-files consul 60 seconds edgex-core-consul config-seed edgex-core-config-seed mongo 10 seconds edgex-mongo mongo-seed edgex-mongo-seed logging 1 minute edgex-support-logging notifications 30 seconds edgex-support-notifications metadata edgex-core-metadata data edgex-core-data command edgex-core-command scheduler edgex-support-scheduler export-client edgex-export-client export-distro edgex-export-distro rulesengine edgex-support-rulesengine device-virtual edgex-device-virtual Wait times are approximate Use the logs to see when a service is up Not all services may be required for your needs See it In Action

11 Stop EdgeX using Docker Compose
To stop all the EdgeX containers docker-compose stop To stop and remove all the EdgeX containers docker-compose down More command options available – see Docker Compose documentation

12 Check that EdgeX Containers are working
Any container log can be viewed with: docker-compose logs -f --tail 50 [compose name] Check the logs “This is … the X Micro Service” Ping the service name>:<service port>/api/v1/ping ex: for core data on dell-demo See the event count collected See the devices “connected” See the event/reading data from a particular device limit> See it In Action

13 Hybrid Development Hybrid development allows coding in Eclipse calling services in Docker Example: use Dockerized EdgeX with your new device service in Eclipse Requires you point Eclipse based services to Docker Containers Using application-properties &/or rest-endpoint.properties Requires you first get the Docker IP address Docker OS Typical IP Address Command to find Docker for Windows or Mac docker inspect Docker on Linux Ifconfig or docker inspect Docker using Toolbox (Mac or Windows) docker-machine ip

14 Hybrid Demo Consul, Mongo, Core Data, Metadata, Command, Logging, Notifications running via Docker MQTT Device Service running in Eclipse Altered rest-endpoint.properties to point to core, metadata See it In Action

15 Container Build Process
Dell used the continuous integration process to build the project, build the container in Docker Hub LF is working on a similar process Issues with artifacts in GitHub ETA – few weeks out Currently building and pushing the containers manually Jim if you push code and need a container update

16 EdgeX Resources Wiki (wiki.edgexfoundry.org)
Rocket Chat (chat.edgexfoundry.org) Web Site (edgexfoundry.org) Github (github.com/edgexfoundry) Jim’s address

17 Next Thursday’s (July 13th) call is at 6pm EDT
Upcoming Tech Talks Next Thursday’s (July 13th) call is at 6pm EDT Core Data in-depth Core Metadata in-depth Core Command in-depth Consul and Config/Registry micro service Using the SDK to generate a device service me other suggestions

18 Questions and Answer Time


Download ppt "Getting & Running EdgeX Docker Containers"

Similar presentations


Ads by Google