Add further CLI functionality for deploying VMs
MHHukiewitz opened this issue · comments
It is possible to set RAM and CPUs but not the volumes required through the CLI, when deploying a new VM.
@nesitor needs this for the CLI flow on deploying Aleph Indexers through the indexer CLI.
A good issue for @mrhouzlane or @AmozPay
Would it not better to create a Python script similar to this one when many options need to be passed ?
Proposal approach from @AmozPay :
aleph program \
--volume /model:25a393222692c2f73489dc6710ae87605a96742ceef7b91de4d7ec34bb688d94:latest \
./my-program main:app
Updated specs @AmozPay what do you think?
aleph program --immutable-volume ref=25a393222692c2f73489dc6710ae87605a96742ceef7b91de4d7ec34bb688d94;use-latest=true ./my-program main:app
aleph program --ephemeral-volume size-mib=100 ./my-program main:app
aleph program --persistent-volume persistence=host;name=my-volume;size-mib=100 ./my-program main:app
I like the possibility to add more parameters to volume settings with this key=value approach, with good retro compatibility further on. As long as we provide a good reference for the existing parameters, I think this would be a great solution. 👌🙌
EDIT:
A crucial detail is missing: the user should specify where the mount point where the volume should be attached @MHHukiewitz @mrhouzlane .
aleph program --immutable-volume ref=25a393222692c2f73489dc6710ae87605a96742ceef7b91de4d7ec34bb688d94;use-latest=true;mount=/mnt/volume ./my-program main:app
branch name :AneequeWorks/bugfixed/further_cli_functionality
I have fixed the Issue for adding the volumes
Please use this as the input parameters in your cli for following volumes:
Use comma , to seperate the input parameters
eg :
1.persistent_volume
====>persistence=host,name=my-volume,size_mib=100
2.ephemeral_volume
===>size_mib=400
3.immutable_volume
====>ref=25a393222692c2f73489dc6710ae87605a96742ceef7b91de4d7ec34bb688d94,use_latest=true,mount=/mnt/volume
Implemented with #127