MuleSoft IoT: MuleSoft, Git, Docker, and Raspberry Pi

DZone 's Guide to

MuleSoft IoT: MuleSoft, Git, Docker, and Raspberry Pi

Learn how to utilize MuleSoft's capabilities, Git, and Docker containers to start a project using a Raspberry Pi with these basic setup instructions.

· IoT Zone ·
Free Resource

My vision for using MuleSoft for railways and airways started with Europe, mainly Germany, so that all humans could reap the benefits of an app. So, let's go through a little example using Docker, MuleSoft, MMC, and a Raspberry Pi.

MuleSoft Capabilities

  • Design Documents: Architecture for MuleSoft in a three-layer design. For IoT, the basic structure involves MuleSoft cloud services, utility apps, and backend apps in the cloud.

  • MuleSoft Anypoint Engine for IoT applications.

  • Mulesoft Runtime Engine to expose APIs to deliver logical capabilities that we make in IoT.

  • Required tools apart from MuleSoft: Docker, Git, Salesforce (or even MySQL), and a Raspberry Pi with a MuleSoft standalone server (MMC).

Basic Setup

  • Maven setup: MAVEN_HOME and an .m2 repository

  • Git setup: SSH folder in which three files will reside: id_rsa, id_rsa.pub, and known_hosts

  • Anypoint Studio integration with GIT with SSH key

Generate an RSA Key in Anypoint Studio:

Window->Preferences->General->Network Connections->SSH2->Key Management->Generate RSA Key

In Key Management, save the ssh-rsa key without a passphrase.

In GitLab, go to Profile Settings -> SSH Keys -> Add key {Give title and the key generated from Anypoint studio (Ex: C:\Users\kapil\.ssh\id_rsa_pub)}

You can import any GitLab project into Anypoint Studio with SSH Configuration. Click yes for the first time when importing a project. It will ask permission to make a fingerprint. You can check it in Known Hosts, for example: gitlab.ops.tiaa-cref.org ssh-rsa .........key......

Start With Docker (Windows Platform)

Basic steps for Docker:

  • Docker base image for Mule ESB

  • Create and export the ZIP file

  • Deploy in the Docker image

  • Start the Docker container

  • Test


From Java:8

MAINTAINER kapil.arora0069@gmail.com

ENV MULE_HOME /opt/mule



Run set -x \

&& cd /opt \

&& curl -o german_transportation.zip https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/distributions/mule-standalone/{mule_version}/mule....zip

&& unzip german_transportation.zip

&& mv mule-standalone-$mule_version mule

&& rm german_transportation.zip




  • VOLUME $MUOLE_HOME/domains


ENTRYPOINT ["./bin/mule"]

C:\Docker_Folder\docker build --tag kapil -app #(This will be the Docker image with Java 8 & Mule 3.8.5)


From kapil -app folder

Add german_transportation.zip from $MULE_HOME/app/

EXPOSE 9004:9004

doctest build -tag kapil -app

docker images #(This will show all images)

docker run -t -i -p 9004:9004 .....

Installing Docker on a Raspberry Pi

  • Raspberry Pi with Docker

  • Run Docker installer: -curl -SSL https://get.docker.com | sh

  • Auto start Docker (requiring registration): -sudo systemctl enable docker

iot ,mulesoft ,git ,raspberry pi ,docker containers ,tutorial

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}