Machine Learning Application Deployment Tool by Kubernetes
You need docker to use MLAD.
$ bash get-env
Install MLAD environments as master node.
$ bash get-env install
You can install MLAD environments as worker node with generated token.
# on master node
$ bash get-env join-token
Generated Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6I...
To add a worker to this cluster, run the following command in 30-mins :
$ bash get-env install --join-token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6I...
# on worker node
$ bash get-env install --join-token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6I...
âš Deploy Released API-Server by Helm Charts [View Page]
$ sudo apt install -y python3-virtualenv
$ python3 -m virtualenv -p python3 <EnvDir>
$ source <EnvDir>/bin/activate # Enable
(EnvDir) $ deactivate # Disable (Optional)
(EnvDir) $ cd python
(EnvDir) $ python setup.py install
(EnvDir) $ mlad config add
MLAppDeploy Service Address [http://localhost:8440]:
MLAppDeploy User Token:
Docker Registry Host [docker.io]:
Ask administrator for your user token and login with the token.
(EnvDir) $ mlad login
User Token: <user token>
If you want to initialize the token, you can logout.
(EnvDir) $ mlad logout
If you want to connect to your S3 storage and registry, you can attach to external those by modify configurations.
(EnvDir) $ mlad config set s3.endpoint=s3.amazonaws.com # Change S3 endpoint
(EnvDir) $ mlad config get # Show current configuration
(EnvDir) $ cd <YOUR PROJECT DIR>
(EnvDir) $ mlad project init
Project Name : <Enter Your Project Name>
Customize project file(mlad-project.yml).
(EnvDir) $ mlad build
(EnvDir) $ mlad up # Deploy whole services in project.
(EnvDir) $ mlad up <services...> # Deploy services in project partialy.
(EnvDir) $ mlad down # Down whole services in project.
(EnvDir) $ mlad down --no-dump # Do not save service logs before down.
(EnvDir) $ mlad down <services...> # Down services in project partialy.
(EnvDir) $ mlad logs # Show logs til now.
(EnvDir) $ mlad logs -f # Show logs with follow.
(EnvDir) $ mlad logs -t # Show logs with timestamp.
(EnvDir) $ mlad logs <service name> # show logs filtered by service name.
(EnvDir) $ cd <YOUR PROJECT DIR>
(EnvDir) $ mlad ps # Show running services in project.
(EnvDir) $ mlad ps -a # Show all services in project
(EnvDir) $ mlad ls
You can show more information by below command.
(EnvDir) $ mlad --help
Same as project.
(EnvDir) $ cd <YOUR Plugin PROJECT DIR>
(EnvDir) $ mlad plugin init
Project Name : <Enter Your Project Name>
Customize project file(mlad-plugin.yml).
(EnvDir) $ TODO
Add label to node.
(EnvDir) $ mlad node label [ID or HOSTNAME] add [KEY]=[VALUE]
Modify constraints at your project file.
...
services:
...
service-name:
...
deploy:
...
constraints:
...
labels.[KEY]: [VALUE]
Labeling.
(EnvDir) $ mlad node ls
ID HOSTNAME ADDRESS ROLE STATE AVAILABILITY ENGINE LABELS
abcdef0001 operator-node 192.168.65.1 Manager Ready Active 19.03.13
abcdef0002 learner-node 192.168.65.2 Worker Ready Active 19.03.13
abcdef0003 actor-node-01 192.168.65.3 Worker Ready Active 19.03.13
abcdef0004 actor-node-02 192.168.65.4 Worker Ready Active 19.03.13
abcdef0005 actor-node-03 192.168.65.5 Worker Ready Active 19.03.13
(EnvDir) $ mlad node label actor-node-01 add type=actor
Added.
(EnvDir) $ mlad node label actor-node-02 add type=actor
Added.
(EnvDir) $ mlad node label actor-node-03 add type=actor
Added.
(EnvDir) $ mlad node ls
ID HOSTNAME ADDRESS ROLE STATE AVAILABILITY ENGINE LABELS
abcdef0001 operator-node 192.168.65.1 Manager Ready Active 19.03.13
abcdef0002 learner-node 192.168.65.2 Worker Ready Active 19.03.13
abcdef0003 actor-node-01 192.168.65.3 Worker Ready Active 19.03.13 type=actor
abcdef0004 actor-node-02 192.168.65.4 Worker Ready Active 19.03.13 type=actor
abcdef0005 actor-node-03 192.168.65.5 Worker Ready Active 19.03.13 type=actor
Modifying project file.
...
services:
operator:
...
ports: [6666]
deploy:
constraints:
hostname: operator-node
learner:
...
ports: [6666]
deploy:
constraints:
hostname: learner-node
actor:
...
ports: [6666]
deploy:
constraints:
labels.type: actor
replicas: 10