Operating CSLE
This section describes commands and procedures that are useful when operating CSLE. The framework can be operated in two ways, either through the web interface or through the CLI (see Fig. 29). This section focuses on the CLI, but more or less the same commands can be invoked through the web interface, which should be self-explanatory.
Listing the Available Commands in the CLI
To list the available commands in the CSLE CLI, run the command:
csle help
Listing the State of CSLE
Information about the CSLE installation and its current state can be listed by executing the following command:
csle ls --all
Starting, Stopping, and Resetting the Metastore
The metastore can be started by executing the following command:
sudo service postgresql start
The metastore can be stopped by executing the command:
sudo service postgresql stop
To reset the metastore, execute the commands:
cd metastore; make clean
cd metastore; make build
Starting and Stopping the Management System
The management system can be started by executing the command:
csle start managementsystem
The management system can be stopped by executing the command:
csle stop managementsystem
Starting and Stopping Monitoring Systems
The monitoring systems Grafana, cAdvisor, Node exporter, and Prometheus can be started by executing the commands:
csle start grafana
csle start cadvisor
csle start nodeexporter
csle start prometheus
Similarly, Grafana, cAdvisor, Node exporter, and Prometheus can be stopped by executing the commands:
csle stop grafana
csle stop cadvisor
csle stop nodeexporter
csle stop prometheus
Starting and Stopping Emulation Executions
To start an execution of an emulation configuration
with the name csle-level9-010
, execute the following command:
csle start csle-level9-010
Similarly, to stop an execution of an emulation configuration
with the name csle-level9-010
, execute the following command:
csle stop csle-level9-010
The above command will stop all containers but will not remove them, which means that the emulation can be started again with the same configuration by running the command in Listing 111.
To stop an emulation execution and remove all of its containers and virtual networks, run the command:
csle clean csle-level9-010
Access a Terminal in an Emulated Container
To see which containers are running, execute the command:
csle ls --all
To open a terminal in a running container,
e.g., a container with the name mycontainer
, run the command:
csle shell mycontainer
- Previous
- Next