dstack
dstack copied to clipboard
Ability to add your own instances to pools/dstack
After we finish pool support, we will be ready to add our own servers to the pool. This is necessary for a particular set of users that have their own bare metal servers.
To add a server, we need to use the dstack pool add
command in the same way as we add cloud instances with additional arguments:
dstack pool add \
--remote \
--remote-host 192.168.88.131 \
--remote-port 22 \
--ssh-user=root \
--ssh-identity ~/ssh_key.pub
I will explain the new arguments:
--remote
- Adding a running server
--remote-host 192.168.88.131
and --remote-port 22
- Connection detils
--ssh-user=root
and --ssh-identity ~/ssh_key.pub
- Credentials for ssh
To add the server, we need to go through the following steps.
- connect via ssh to the server
- install
dstack-shim
- add dstack-shim.service to the systemd
After install, dstack-shim
should retrieve server resources and save them to the InstanceModel on the dstack server.
This information about server resources will be provided to the user via "dstack pool ps" command.