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
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:
Mmadu User Service
Mmadu Registration
Mmadu Identity
This guide assumes that you have MongoDB running at local host (default mongodb port).
Download the identity jar from the releases page.
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
Download the user service jar from the releases page.
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
Download the registration service jar from the releases page.
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
This guide assumes that you have MongoDB running at local host (default mongodb port).
Pull the Docker Image
docker pull geraldoyudo/mmadu-identity:2.0.2
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
Pull the Docker Image
docker pull geraldoyudo/mmadu-user-service:2.0.2
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.
Pull the Docker Image
docker pull geraldoyudo/mmadu-registration-service:2.0.2
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.
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:
Mmadu User Management Service running at port 15551
Mmadu Registration Service running at 15552
Mmmadu Identity Service running at pot 15553
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. |
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.
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.
|
Click the Guides for quick tutorials on Mmadu.