Getting Started Guides

Using Mmadu

Mmadu aims to be highly flexible and customizable. Mmadu is made up of different components that enables developers to pick and choose which one they need for their application.

Currently, Mmadu is made up of the following:

  1. Mmadu User Service

  2. Mmadu Registration

  3. Mmadu Identity

Getting Started with the Jars

This guide assumes that you have MongoDB running at local host (default mongodb port).

Running the Identity Service

  1. Download the identity jar from the releases page.

  2. Run the following:

java -Dspring.profiles.active=prod -Dmmadu.identity.url=http://localhost:15553 -Dserver.port=15553 -Dmmadu.identity.db.uri=mongodb://localhost/mmadu_local_db -jar mmadu-identity-2.0.2.jar

Running the User Service

  1. Download the user service jar from the releases page.

  2. Run the following:

java -Dspring.profiles.active=prod -Dmmadu.identity.url=http://localhost:15553 -Dserver.port=15551 -Dmmadu.registration.db.uri=mongodb://localhost/mmadu_local_db -jar mmadu-user-service-2.0.2.jar

Running the Registration Service

  1. Download the registration service jar from the releases page.

  2. Run the following:

java -Dspring.profiles.active=prod -Dmmadu.identity.url=http://localhost:15553 -Dserver.port=15552 -Dmmadu.user.db.uri=mongodb://localhost/mmadu_local_db -jar mmadu-registration-2.0.2.jar

Getting Started with Docker

This guide assumes that you have MongoDB running at local host (default mongodb port).

Running the Identity Service

  1. Pull the Docker Image

docker pull geraldoyudo/mmadu-identity:2.0.2
  1. Start the Identity Container

docker run -it -p 15553:8080 -e MMADU_IDENTITY_DB_URI='http://localhost/mongodb' -e SPRING_PROFILES_ACTIVE=prod -e MMADU_IDENTITY_URL=http://localhost:15553 geraldoyudo/mmadu-identity:2.0.2

Running the User Service

  1. Pull the Docker Image

docker pull geraldoyudo/mmadu-user-service:2.0.2
  1. Start the User Service Container

docker run -it -p 15551:8080 -e MMADU_USER_DB_URI='http://localhost/mongodb' -e SPRING_PROFILES_ACTIVE=prod -e MMADU_IDENTITY_URL=http://localhost:15553 geraldoyudo/mmadu-user-service:2.0.2

This also needs a reference to the identity provider.

Running the Registration Service

  1. Pull the Docker Image

docker pull geraldoyudo/mmadu-registration-service:2.0.2
  1. Start the Registration Service Container

docker run -it -p 15552:8080 -e MMADU_USER_DB_URI='http://localhost/mongodb' -e SPRING_PROFILES_ACTIVE=prod -e MMADU_IDENTITY_URL=http://localhost:15553 -e MMADU_USER_URL=http://localhost:15551 geraldoyudo/mmadu-registration:2.0.2

This also needs a reference to the identity provider.

Getting Started with Docker Compose

To run Mmadu with all the services, use the docker-compose file:

Download and run the docker compose file as shown below:

curl https://raw.githubusercontent.com/geraldoyudo/mmadu/master/docker/prod/docker-compose.yml --output docker-compose.yml

docker-compose up

This starts up four services:

  1. Mmadu User Management Service running at port 15551

  2. Mmadu Registration Service running at 15552

  3. Mmmadu Identity Service running at pot 15553

  4. A mongo db database running at port 27017

You can make modifications to the file to suite your needs. For example, If you want only the user management service, and you have your own mongo db, keep the mmadu user service and the mmadu identity.

The Mmadu User Service depends on the Mmadu Identity, and uses it as its Oauth 2.0 authorization provider.

System Initialization

Identity Service

This starts up an identity provider with an admin client with absolute privileges. The default client id is mmadu_admin and the default secret is 1234567890. this can be changed by adding the MMADU_ADMIN_CLIENT and MMADU_ADMIN_SECRET environment variables to the docker run command.

The environment variable MMADU_IDENTITY_URL is needed because it uses itself as an authorization provider.

User Service

Once the docker container starts up, it configures a default admin user with user name admin and the password, password. To change this, set the MMADU_ADMIN_USERNAME and MMADU_ADMIN_PASSWORD environment variables respectively.

At start up, all services configure data needed for the functioning of Mmadu. Domain with id 0 is reserved for Mmmadu operations.

Starting Your Journey

Click the Guides for quick tutorials on Mmadu.