Phoebus ecosystem VM¶
EPNix provides a “Phoebus ecosystem” virtual machine that has most of the Phoebus-related services, such as:
Archiver Appliance,
ChannelFinder,
Phoebus Olog,
Phoebus alarm logger,
Phoebus save-and-restore,
all services needed by the Phoebus ecosystem, such as Kafka, Elasticsearch,
and a demo EPICS IOC.
You can run this configuration either in a QEMU VM, or in a VirtualBox VM.
QEMU¶
To run the VM under QEMU, run:
nix run -L "github:epics-extensions/EPNix#phoebus-ecosystem/qemu-vm"
This command will build all the Phoebus services and run QEMU with the proper options for starting the VM with the services port-forwarded.
This command also creates a phoebus-ecosystem.qcow2 disk image file
in the directory you run it.
This file is the hard-drive of the VM
and can be safely deleted to restart from scratch.
VirtualBox¶
To run the VM under VirtualBox, build the Open Virtual Appliance (OVA) file:
nix build -L "github:epics-extensions/EPNix#phoebus-ecosystem/virtualbox-image"
Caution
Besides building all Phoebus services, building the OVA file itself can be resource intensive, being CPU, RAM, or disk I/O. Make sure to run this build on a machine that has enough of those resources available.
After running the command,
you can find the OVA file under result/phoebus-ecosystem-epnix-version.ova
To import it, open VirtualBox and select , or press Ctrl-I. Select the built OVA file, choose its name and where to import it, and click Finish.
Note
Before running the VM, make sure no program on your local machine listens to the ports documented in Port-forwarded ports of the Phoebus ecosystem VM.
The VirtualBox VM has been known to sometimes have boot issues. If this happens, keep reboot the VM.
If you have NAT or port-forwarding issues, restart VirtualBox in its entirety.
Exposed services¶
The VM port-forwards the following services:
Service |
Port |
Link |
|---|---|---|
8080 |
||
8081 |
||
8082 |
||
8083 |
||
8084 |
||
Apache Kafka |
9092 |
none |
Example EPICS IOC |
5064 (TCP and UDP) |
|
SSH |
2222 |
none |
To use those services with a local Phoebus client instance,
use the provided phoebus-ecosystem-settings.ini.
To connect to the VM,
you can log in as root from the VM window.
You can also log in through SSH by running the following command:
ssh root@localhost -p 2222
Tip
Recreating the VM will change its SSH host key. To remove the old one, run:
ssh-keygen -R '[localhost]:2222'