Set up Docker and docker-compose
Download Docker Desktop for Mac
Install docker-compose with Homebrew
Run steps:
sh ./create-dirs.sh
cp .env.example .env
docker-compose up -d [SERVICE_NAME]
Shutdown steps:
docker-compose down [SERVICE_NAME]
- Go to Anypoint Plarform -> Runtime Manager -> Servers -> Add Server
Copy the following token and server name:
./amc_setup -H (TOKEN) (SERVER_NAME)
And add it to .env
MULE_SERVER_TOKEN=(TOKEN)
MULE_SERVER_ID=(SERVER_NAME)
Run:
docker-compose -f docker-compose-cluster.yml up -d
- Go to Runtime Manager and check dashboard, you should see the servers up and running
- Create Cluster (Add name you want: example: b2b-devops-training-cluster) Unicast IP: Use the one that shows up (should appear automatically) Port: Autodiscovery (default 5701)
- Deploy an application (screenshot): export Mule App .jar deployable
- Test locally:
curl -X GET 1 http://0.0.0.0:5050/834test -v
curl -X POST SERVER:PORT/ENDPOINT -d '{"tag0":value, "tag1": "value", "tag3": "value"}' -v
[Drive DevOps Toolbox - Restricted][https://drive.google.com/drive/u/0/folders/1vjK5aASXmOSOoKPTs8bdDj6LUwc_Yc1o]
- Error: token no valid: Please take into account that the above token can expirate after some time, generate again on Runtime Manager.
- Runtime server already exists:
docker-compose -f docker-compose-cluster.yml down
docker-compose up --build (every time we do some changes on the image)
docker-compose up -d
docker-compose down
docker-compose ps ---> To see the apps running
docker-compose up --remove-orphans
docker inspect [CONTAINER] / docker inspect <container id> | grep "IPAddress" ---> Check raw container info
docker exec -it [CONTAINER HASH / TAG] bash ---> To get inside the container
docker cp file/folder [CONTAINER_ID]:[FOLDER_INSIDE_CONTAINER / example: ]docker cp ~/MY_LOCAL_FILE.zip 350a486dcd7e:/opt/centos
- Use replicas to determine number of nodes on docker-compose-cluster.yml. (WIP)
- Explore create cluster manually by copying mule-cluster.properties from existent nodes into new containers.
To sign in, get inside containers, and use user: admin and password: value inside container/nexus-data/admin.password
docker exec -it nexus bash ✔ │ base Py
nexus-data/
cat admin.password
ed66ab4d-2c0e-4784-8269-d315178efba2bash
User: admin
Pass: admin