Install MMBatch Management Server
This page will describe how to install the MMBatch Management Server (MMS).
The MMS can be installed locally via a package manager or you can also run it in a container. The release can be found on the GitHub release page.
Security Group
The REST API needs to be accessible from the worker nodes and your client if you want to login.
Create a security group and open the default port of the API.
Attach the security group to the instance.
Installation
Native
Create an instance with a RHEL (Rocky Linux, Amazon Linux) or Debian (Ubuntu,Debian) based OS.
$ sudo yum install -y ./mmab-1.2.0-release.x86_64.rpm
Amazon Linux 2023 Kernel Livepatch repository 98 kB/s | 11 kB 00:00
Dependencies resolved.
===========================================================================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================================================================================================================================================================================================
Installing:
mmab x86_64 1.2.0-release @commandline 64 M
Transaction Summary
===========================================================================================================================================================================================================================================================================================================
Install 1 Package
Total size: 64 M
Installed size: 118 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : mmab-1.2.0-release.x86_64 1/1
Running scriptlet: mmab-1.2.0-release.x86_64 1/1
Created symlink /etc/systemd/system/multi-user.target.wants/mmab.service → /usr/lib/systemd/system/mmab.service.
Verifying : mmab-1.2.0-release.x86_64 1/1
Installed:
mmab-1.2.0-release.x86_64
Complete!
$
$ apt install -y ./mmab-1.2.0.x86_64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'mmab' instead of './mmab-1.2.0.x86_64.deb'
The following NEW packages will be installed:
mmab
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/80.5 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /Users/kniepbert/data/temp/memverge/mmab/./mmab-1.2.0.x86_64.deb mmab amd64 1.2.0 [80.5 MB]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package mmab.
(Reading database ... 12124 files and directories currently installed.)
Preparing to unpack ..././mmab-1.2.0.x86_64.deb ...
Unpacking mmab (1.2.0) ...
Setting up mmab (1.2.0) ...
Reload systemd to recognize the mmab service
Enable mmab service to start on boot
Created symlink /etc/systemd/system/multi-user.target.wants/mmab.service → /etc/systemd/system/mmab.service.
Install: Starting mmab service
Docker
The release page has a compressed docker container (*.tar.gz
). You can use docker load
to get the container.
$ docker load -i mmab_1.2.0-amd64.tar.gz
39b256e5f596: Loading layer [==================================================>] 80.48MB/80.48MB
e2f10ef491b1: Loading layer [==================================================>] 142.6MB/142.6MB
Loaded image: mmab:1.2.0-amd64
You might want to rename the image so that you can push it to a private registry.
IMG_NAME=$(docker image ls -f "reference=mmab" --format '{{.Repository}}:{{.Tag}}' |head -n1)
docker tag ${IMG_NAME} <your-registry>/${IMG_NAME}
docker push <your-registry>/${IMG_NAME}
Afterwards you can run the container as you see fit. As a local container docker run
or docker-compose up -d
, as service in Docker SWARM, ECS, EKS, Kubernetes. Up to you.
Considerations
- the container port is
8080
, if you plan to change the port from the default, make sure to map both ports. - map
/etc/memverge/mmab
to your host directory for the configurations and embedded database. - map
/var/log/memverge
to your host directory for the logs or create a sidecar that forwards the logs to central logging.
Configure IP Address
You can check the configuration locally via API.
port is 443 not 8080
The documentation github.com/MemVerge/batch-engine/blob/master/document/deployment.md states 8080.
Ticket: MDP-3493
It will output the current configuration of the MMS.
# curl -sk -X GET https://127.0.0.1/api/v1/config |jq .
{
"addr": "https://0.0.0.0:443",
"staticFolder": "mmabWeb",
"log": {
"file": "/var/log/memverge/mmab.log",
"level": "info",
"maxSizeMB": 10,
"maxBackups": 10
},
"security": {
"certFile": "/etc/memverge/mmab/server.crt",
"keyFile": "/etc/memverge/mmab/server.pem",
"cognito": {
"enabled": false,
"userPoolID": "",
"identityPoolID": "",
"clientID": ""
}
},
"ckpt": {
"ckptMode": "unknown",
"ckptImagePath": "",
"ckptInterval": 900000000000,
"ckptFiles": null,
"IRMapScanPaths": null,
"ckptOnSigTerm": false,
"rootFSDiff": true
},
"node": {
"heartbeat": 30000000000,
"ttl": 300000000000
}
}
By default the service is available via all network addresses (0.0.0.0
) and the HTTPS port 443
. You can change that via the API.
# curl -skX PUT https://0.0.0.0/api/v1/configKV \
-H "Content-Type: application/json" \
-d "{\"kvMap\": {\"addr\":\"http://0.0.0.0:8080\"}}" |jq .
{
"addr": "http://0.0.0.0:8080",
"staticFolder": "mmabWeb",
"log": {
"file": "/var/log/memverge/mmab.log",
"level": "info",
"maxSizeMB": 10,
"maxBackups": 10
},
"security": {
"certFile": "/etc/memverge/mmab/server.crt",
"keyFile": "/etc/memverge/mmab/server.pem",
"cognito": {
"enabled": false,
"userPoolID": "",
"identityPoolID": "",
"clientID": ""
}
},
"ckpt": {
"ckptMode": "unknown",
"ckptImagePath": "",
"ckptInterval": 900000000000,
"ckptFiles": null,
"IRMapScanPaths": null,
"ckptOnSigTerm": false,
"rootFSDiff": true
},
"node": {
"heartbeat": 30000000000,
"ttl": 300000000000
}
}
From now on, you need to use the IPv4 address to access the host. localhost
won't work anymore.
# curl -Ik -X GET https://127.0.0.1/api/v1/config
curl: (7) Failed to connect to 127.0.0.1 port 443: Connection refused
Configure Snapshot
To enable the snapshot mechanism we'll bootstrap the config with some sane defaults: