-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: make clients parse config TOMLs (#810)
Remove config TOML processing from propolis-server. The only thing the config TOML is used for in Omicron is specifying a bootrom path (and possibly a version string); turn this into a propolis-server command-line argument instead. The instance spec-based ensure API already ignored the server's config TOML, and the non-spec ensure API is about to be removed anyway, so this is a good time to make this shift. To avoid breaking existing config TOML users, move the TOML-to-spec processing logic into the propolis-config-toml crate, and have it output propolis-client's generated instance spec types. (This would have been a layering violation previously, but is OK now that propolis-server no longer uses this crate.) Teach propolis-cli to use this crate to process TOMLs and to use the instance spec-based ensure endpoint to create and migrate VMs. Remove the config TOML from the Propolis zone image and change its command line invocation. Also change PHD's propolis-server invocations as needed. Finally, tweak the propolis-server and propolis-cli READMEs to describe the new state of affairs.
- Loading branch information
Showing
33 changed files
with
815 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Propolis CLI | ||
|
||
The `propolis-cli` utility provides a user-friendly frontend to the | ||
[`propolis-server`](../propolis-server) REST API. | ||
|
||
## Getting started | ||
|
||
The easiest way to launch a VM via the CLI is to write a TOML file describing | ||
the VM's configuration. An example of such a file might be the following: | ||
|
||
```toml | ||
[block_dev.alpine_iso] | ||
type = "file" | ||
path = "/path/to/alpine-extended-3.12.0-x86_64.iso" | ||
|
||
[dev.block0] | ||
driver = "pci-virtio-block" | ||
block_dev = "alpine_iso" | ||
pci-path = "0.4.0" | ||
|
||
[dev.net0] | ||
driver = "pci-virtio-viona" | ||
vnic = "vnic_name" | ||
pci-path = "0.5.0" | ||
``` | ||
|
||
To create and run a Propolis VM using this configuration: | ||
|
||
``` | ||
# propolis-cli -s <server ip> -p <port> new --config-toml <path> <VM name> | ||
# propolis-cli -s <server ip> -p <port> state run | ||
``` | ||
|
||
To connect to the VM's serial console: | ||
|
||
``` | ||
# propolis-cli -s <server ip> -p <port> serial | ||
``` | ||
|
||
Run `propolis-cli --help` to see the full list of supported commands and their | ||
arguments. |
Oops, something went wrong.