Installation validation
To validate that your new ranger and deputy-package-server services are functioning properly and in unison, follow the instructions below to create, publish and deploy an exercise containing a VM package.
Creating a Deputy package
- Create a directory named after the VM you are making into a package
- The directory must include a
package.toml
, areadme.md
and the VM-s.ova
- The deputy service only supports OVA type VM-s, so you may need to use
ovftool
for example to change the VM-s file format from OVF to OVA
readme.md
This text is being displayed in the package description in the front-end
package.toml
[package]
name = "name_of_package" #change me
description = "package_description"
version = "1.0.0" #change me
authors = ["authors_name authors_email_address "]
license = "your_SPDX_standard_compatible_license" #for example "Apache-2.0" or "MIT"
readme = "readme.md"
[content]
type = "vm"
[virtual-machine]
accounts = [{name = "vm_account_name", password = "vm_account_password"}]
default_account = "vm_account_name"
operating_system = "your_vm_os"
architecture = "your_vm_architecture"
type = "OVA"
Publishing a package to the Deputy repository
- To publish a package to the deputy repository, you need to have the latest Deputy-CLI program installed on your workstation
- You also need to create a
configuration.toml
on your workstation in~/.deputy
, specifying where the packages are pushed to and fetched from
configuration.toml
[registries]
main-registry = { api = "https://deputy.ocr.cr14.net" }
[package]
download_path = "~/.deputy/downloads/"
- Go to your package directory and use the command
deputy publish
- You should see the package in your deputy front-end after its done publishing
Creating a Ranger exercise with the package
- Log into your ranger subdomain
- Go to
Exercises
- Click
Add exercise
and give the exercise a name - Click on the created exercise and compose an SDL scenario for your vm package (Refer to the SDL Reference Guide)
SDL scenario example for example-vm-package
name: Exercise_1
description: Testing if ranger can get vm package
start: 2023-06-01T08:00:00Z
end: 2023-06-02T08:00:00Z
nodes:
example-vm-package:
type: VM
resources:
ram: 8gib
cpu: 4
source: example-vm-package
infrastructure:
example-vm-package: 1
- Then click
Submit
andAdd Deployments
- Choose the deployment group and give the deployment a name and deployment count
- Then click
Add
- If the added deployment shows up and the deployment bar turns green, your deployment was successful and your ranger can deploy exercises containig deputy packages
- If the deployment bar stays empty or turns red, find the cause by checking the logs of your docker handler containers