Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
How To Deploy And Run
Mule in Docker
Ravi Singh
What I am Going to Discuss?
● What is Docker
● How to install Docker
● Advantages of Docker
● Create, deploy and run a dem...
What is docker?
● A Docker is a container where an image runs
● A Docker environment contains multiple environment with di...
Advantage Of Docker
● Consistency from Dev to Prod environment
● Wide cloud support Amazon web service and Google cloud to...
Installing Docker
● I will show demo installing Docker using Mac O/S
● https://www.docker.com/docker-mac
● Instal Docker o...
Run a sample container with Mule
sudo docker run codingtony/mule
codingtony/mule is docker image
Find process associated with Docker
How To Map Local Drive to Docker
● It is must before your run your Mule application in
Docker
● First, download latest Mul...
Create Sample Mule Application
● Create a sample hello World application in Mule anypoint studio
For testing purpose, I ju...
Create Sample Mule Application
● Alongwith Helloworld.xml, create two other file and copy it in apps folder
● Mule-config....
Deploy Mule application on Docker
● Within app folder create a zip of your application
zip mule-hello.zip mule-deploy.prop...
Run Your Mule Application
● You can run application either in same container or from different container
● In MAC O/S , yo...
Run Your Mule Application
Run Mule Application From Other Container
● You can also run your Mule application from another container using IP
address...
Thank you
Upcoming SlideShare
Loading in …5
×

How to deploy and run mule in docker

1,201 views

Published on

Learn using this tutorial How to Deploy and Run Mule application in a Docker

Published in: Technology
  • Be the first to comment

How to deploy and run mule in docker

  1. 1. How To Deploy And Run Mule in Docker Ravi Singh
  2. 2. What I am Going to Discuss? ● What is Docker ● How to install Docker ● Advantages of Docker ● Create, deploy and run a demo Mule application in Docker
  3. 3. What is docker? ● A Docker is a container where an image runs ● A Docker environment contains multiple environment with different application runs on every environment ● By creating multiple container, you can create multi-production server like environment ● Using docker you can create separate container for Mule runtime, Java VM, MQ and so much
  4. 4. Advantage Of Docker ● Consistency from Dev to Prod environment ● Wide cloud support Amazon web service and Google cloud to name a few ● Standard environment and version control ● Replication and redundancy makes it fast ● Each application run in its own container makes it isolated ● Each application uses its own CPU, memory etc keeps your application faster and improved performance ● Dockers are secure; containers never read other’s data, digitally signed and
  5. 5. Installing Docker ● I will show demo installing Docker using Mac O/S ● https://www.docker.com/docker-mac ● Instal Docker on Mac
  6. 6. Run a sample container with Mule sudo docker run codingtony/mule codingtony/mule is docker image
  7. 7. Find process associated with Docker
  8. 8. How To Map Local Drive to Docker ● It is must before your run your Mule application in Docker ● First, download latest Mule Runtime 3.8.1 from here ● Create Mule-root folder in your local home directory ● Create three folders apps,conf and logs and copy the folder content from Mule runtime folder ● Your folder structure should look like this:
  9. 9. Create Sample Mule Application ● Create a sample hello World application in Mule anypoint studio For testing purpose, I just set this in payload: <set-payload value="#[string:Hello World! It is now: #[server.dateTime]]"/> ● Now copy your Helloworld.xml in app folder
  10. 10. Create Sample Mule Application ● Alongwith Helloworld.xml, create two other file and copy it in apps folder ● Mule-config.xml as a placeholder ● Mule-deploy.properties redeployment.enabled=true encoding=UTF-8 domain=default config.resources=HelloWorld.xml ● Update log4j.properties in conf directory with below lines log4j.logger.org.mule=INFO
  11. 11. Deploy Mule application on Docker ● Within app folder create a zip of your application zip mule-hello.zip mule-deploy.properties mule-config.xml HelloWorld.xml ● Start a Mule docker container using your local folder as mapping sudo docker run -d -p 8181:8181 -v ~/mule-root/apps:/opt/mule/apps -v ~/mule-root/conf:/opt/mule/conf -v ~/mule-root/logs:/opt/mule/logs codingtony/mule ● Please note ‘p’ option in command to mention port# ● Use command docker ps -a to confirm your container running
  12. 12. Run Your Mule Application ● You can run application either in same container or from different container ● In MAC O/S , you cannot connect your local host PC to container and run the app as there is limitation with the O/S ● Run application in same container ● Find container id using below command Docker ps -a ● Login to the container docker exec -it <containerid> bash
  13. 13. Run Your Mule Application
  14. 14. Run Mule Application From Other Container ● You can also run your Mule application from another container using IP address of the container where application is running
  15. 15. Thank you

×