![NG Logo](/Open-Cyber-Range/Deputy/raw/main/assets/logos/ng.png)
Deputy is a Digital Library for cybersecurity exercise artifacts. Deputy functionality is divided into 3 categories:
-
deputy-package-server
Executable that acts as a repository for the artifacts -
deputy
CLI program that acts as a client for the repository. -
deputy-library
Rust library containing shared code and structures between server and the client program
Use attached .devcontainer
in vscode
for better development experience.
Executable at target/debug/deputy
is automatically added to the path and working configuration
is specified at /home/vscode/.deputy/configuration.toml
.
To test the CLI against a locally running deputy-package-server, set the .devcontainer/deputy-development/deputy-configuration.toml
files main-registry
to http://127.0.0.1:9000/
.
For now testing out changes in deputy
involves two steps
-
cargo build -p deputy
-
Test the
deputy
command in CLI
Running on Next.js, located in the web-client
directory.
To use the hot reloading feature:
-
yarn
Build initial packages -
yarn dev
Run the local server
To run the production build (no hot reloading):
-
yarn
Build initial packages -
yarn build
Build production artifacts -
yarn start
Run the local server. If there are conflicts with the default port3000
then assign your ownPORT
environment variable before thenext start
command inpackage.json
Additional configuration:
- Modify the
.env
file to your liking, for example, set theDOCUMENTATION_URL
to your own documentation page
Login credentials in the development environment are
Username: developers@cr14.ee
Password: Testimine.123
Deputy package server uses a MySQL database for saving metadata of packages. Default credentials are mysql_user:mysql_pass
.
For local testing, change the URL of the database in deputy-package-server/example-config.yml
from mariadb
to 127.0.0.1
, remove previous containers, if necessary.
Get deputy-package-server running with
cargo run -p deputy-package-server -- deputy-package-server/example-config.yml
For front end, run
yarn dev
If there are no test packages showing, you need to first upload them with deputy publish
inside the test package folder or use deputy publish -p <package_path>
to specify the package path.