Guides
Migrating to 2.0
Isoloom 2.0 keeps the spec format (version: 1): most specs validate and generate unchanged. It
is a major release because it refuses a few specs 1.x took, changes the run manifest's contract,
and removes library API. This page lists what you may have to change, by who you are. The full
list is the CHANGELOG.
Everyone
- Install 2.0 (install): from 2.0 the releases carry signed binaries.
- Run
isoloom validateon each spec, and fix what it refuses (below). - Regenerate from scratch once,
rm -rf .isoloom && isoloom generate, and commit the regenerated.isoloom/if you commit it. Most generated files change, andisoloom checkfails until you do. From scratch, because 1.x listed none of the files it wrote in.isoloom/.generated, so 2.0 never removes those it no longer writes; the tools' state under.isoloom/(a.terraform/folder,.vagrant/) goes with it, so destroy a running environment first. - Upgrade your runner to a release that reads run manifest version 1 (Isothrum 2.0).
Specs 2.0 refuses
| 1.x spec | 2.0 | Change it to |
|---|---|---|
service: dvwa or service: juice-shop | unknown-reference: the entries are removed from the catalogue | app: { image: <the image you used> } gives the same container |
A machine name or alias starting with isoloom- | refused: those names are Isoloom's own (its controller, router and tool VM, the containers' VM, the check stand-in and runners, the route sidecars, the init jobs) | another name |
A Vagrant box name with anything but letters, digits, ., _ and - after an optional <org>/ (in overrides.vagrant or an image table) | invalid-value (an error reading the image table) | the box's name as vagrant box list shows it |
A message naming .published or .url of a port without publish: | unknown-reference (isoloom message refused it already) | the port's .port, or publish the port |
A machine using the openssh entry and signing in as ctf without saying so | the login account defaults to user | with: { username: ctf } to keep the old account |
A tag key starting with a digit, two keys equal but for case or lowercasing to one label (Cost.Center, cost_center), or Managed-By/Isoloom… in any case | refused at tags.<key> | one key per tag, starting with a letter |
A tag whose key:value is over 50 characters, or under 3 (an empty value of a one-letter key) | refused at tags.<key> (Linode's limit, the strictest cloud's) | a shorter value |
An access: true machine with no os and nothing to run, generated with no image table (--images, the defaults' images:) giving its access: | refused by every target but external and cloud-services at machines.<m>.os (validate warns): Docker wrote a service with no image, which the runner couldn't start, and the VM targets left the machine out while every other machine's hosts file listed it | os: debian@12 (or the image table's access: { docker: <image>, vm: <os> }) |
A Windows machine whose name is over 15 characters, for cloud-vm | refused by every VM target (cloud-vm cut it to 15 characters, so two machines could get one computer name) | a name of 15 characters at most |
A check that is a project script or an Ansible playbook, or a check with no from: in a spec with no access machine, for external | refused by external (it left them out of the check runners, so they never ran) | a tcp, http or exec check, each with from: one of the hosts (or an access: true machine) |
The same tag rules broken by a tag of the defaults (a defaults file, ISOLOOM_TAGS__*, -s defaults.tags.*), or a tag of the defaults clashing with the spec's | every command stops, naming the layer (defaults (environment ISOLOOM_TAGS__TEAM): tag …) | fix the defaults' tag |
Behavior that changed
- Published Kubernetes ports are ClusterIP Services by default (a LoadBalancer before), and
pods run under the Pod Security Standards'
baselinelevel, which their namespace enforces. Expose a port outside the cluster in your own overlay (Kubernetes). - Images built from the project are named under
localhost/isoloom/by default. - A machine's published Kubernetes Service is
isoloom-<machine>(was<machine>-published):kubectl port-forward svc/isoloom-web …. - Proxmox verifies the API's TLS certificate:
proxmox_insecuredefaults tofalse. A server with a self-signed certificate needsproxmox_insecure=true(or a certificate its clients trust). .isoloom/.gitignoreis written byisoloom generate, ignoring the tools' state (commit the generated files).isoloom generateremoves the files it wrote before and no longer writes (listed in.isoloom/.generated), andisoloom checkfails on such a stale file.isoloom checkchecks a profile's pinned target, or the one--targetnames, else every target; it has--quietand--json.- A cloud refuses a machine bigger than its largest size instead of giving it the largest
silently, and
cloud-vmrefuses a machine whose user data is over its cloud's cap. - An AWS
cloud-vminstance that shuts itself down at the run's expiry is terminated, not left stopped; its root disk is encrypted and its metadata service needs session tokens (IMDSv2). A machine's own AMI must support IMDSv2. - An input read as a file is the slot
<INPUT>oncloud-vm(wasinput-<name>), kept on the VM at/var/lib/isoloom/secrets/<INPUT>. - The Vagrantfile no longer carries a hook for a runner's own ad-hoc VM. A spec that wants an
access machine declares it (
access: true). resolved.jsonisresolved_version: 5: a machine's size in each form (resources.docker,resources.vm), and an environment machine'sroleismember(wastarget).- The example
pivot-dmzis nowdmz-jump. - Isoloom's own router and controller are renamed on Proxmox, ESXi and the clouds (
isoloom-router,isoloom-controller: their snippets, VM names and cloud resource names). An environment applied with 1.x has them under the old names:terraform applyreplaces them (destroy and re-create), or runisothrum downandupagain.
Runner authors
-
The names a runner shares with the generated files outside
run.jsonareisoloom_manifest::contract's:OUTPUT_DIR,RESERVED_PREFIX,CONTROLLER,HALTING,EXPIRES_TAG,INSTANCE_TAG,EXPIRES_WORD,ESXI_HOSTNAME,ESXI_HOSTPORT,ESXI_DEFAULT_SSH_PORT,SSH_PROXY_COMMAND,HOSTPORTS,PUBLISH_FIXED,SECRETS_DIRandDELIVERED. Read them from there instead of copying their values. -
The
externaltarget writes nomachines.json: read the hosts frominventory.ini. -
No Terraform set-up writes
.isoloom-reach/<machine>: deliver a guest secret once itsduring_stephas succeeded, else onceup's steps all have, as the run manifest reference says. -
An environment machine's role is
member(wastarget, a word the manifest's top-leveltargetuses for something else):machines[].roleismember,job,infra,access,toolorcheck(isoloom_manifest::Role::Member, wasRole::Target). A runner matching ontargetmatchesmemberinstead. -
manifest_versionis 1, frozen with a compatibility policy (the run manifest). A runner built for version 0 refuses 2.0's manifests. -
Values Isoloom never wrote are gone from the schema, and a manifest holding one is refused: the
vagrant_sshandwinrmguest-delivery transports, thedotenvstate-file format, thegeneratedslot kind, thesshandcredentialoutput roles, thestaticoutput source and theminutes_from_nowexpiry unit. -
New, optional: each Vagrant VM's
machines[].native.boot_digest(reload a running VM whose digest changed), each environment machine'smachines[].resources. -
A published port's output is named
<machine>__<port>(web__portal, wasweb_portal), and a manifest naming an output twice is refused. -
A manifest giving one name twice in any list (machines, networks, tools, params, secret slots, outputs) is refused with one error,
Error::Duplicate { list, name }(codeduplicate), which replacesError::DuplicateMachine(duplicate_machine). -
Isoloom's own Compose services start with
isoloom-: a route sidecar isisoloom-routes-<machine>(was<machine>-routes), aninitjobisoloom-init-<machine>-<n>(was<machine>-init-<n>) and its stepjob-isoloom-init-<machine>-<n>. -
The controller is
isoloom-controllerin Proxmox's run manifests and in thechecksoutput of Proxmox, ESXi and the clouds (wascontroller). -
docker-vm's VM isisoloom-docker-hostin its run manifests (Vagrant's and Proxmox's; wasdocker), ascloud-docker's is: read it fromguest.machineandmachines[]. On QEMU, the VM's SSH port isISOLOOM_HOSTPORTS'isoloom-docker-host/sshkey (wasdocker/ssh). The Vagrant define staysdefault. -
project.archiveleaves Isoloom's outputs out butwith.outputs(optional: paths from the project, separated by spaces, each a file or a folder with all it holds). Build the archive's rules withisoloom_manifest::ignore::Rules::for_copy(<the project's .isoloomignore>, <outputs>)and drop any list of your own: it also leaves out version control and the tools' state (.terraform/,*.tfstate*,.vagrant/) at any depth, and an earlier archive at the top.docker-vm/proxmox/run.jsonandcloud-docker's manifests name.isoloom/docker .isoloom/configure;cloud-vm's name none. -
The networks' check runner is
isoloom-networks(stepcheck-isoloom-networks, scriptchecks/isoloom-networks.sh; wasnetworks), a machine'sexecchecks' runnerisoloom-exec-<machine>(stepcheck-isoloom-exec-<machine>; wasexec-<machine>), andresolved.json'schecks.positions[].positionsaysisoloom-networks. A runner that names them reads them fromchecks.runners[]. -
The demo secret names in the fixtures are
DEMO_SECRETandDEMO_SECRET_<X>. -
On Vagrant (and
hybrid), the controller's check runner step ischeck-isoloom-controller(wascheck-controller) and its runner scriptchecks/isoloom-controller.sh(waschecks/controller.sh). Isoloom's own VMs show as<environment> - isoloom-controller,<environment> - isoloom-routerand<environment> - isoloom-tool-shell(<environment>-isoloom-…on Hyper-V and ESXi; werecontroller,router,tool shell), the docker-vm and hybrid hosts asisoloom-docker-host(weredocker,containers): read them frommachines[].native.vm_names. -
A Vagrant VM's display name (VirtualBox, VMware, Parallels, UTM) is
<environment> - <machine>, ASCII (was<environment> · <machine>): Vagrant renames an existing VM when it next boots it.
Library users
The supported crates are isoloom-spec, isoloom-targets and isoloom-manifest
(policies). Removed or made crate-internal in 2.0,
among others (the CHANGELOG's Removed section lists every item):
isoloom_spec::validate::{Cidr, Cidr6, PRIVATE, IPV6_PREFIX, docker_cidrs}areisoloom_spec::net's, andCidr'sbaseandlenare private:Cidr::new(base, len),base(),prefix(). A network's reserved addresses (host,gateway,tool,controller,router) areisoloom_spec::net::NetworkBlock's, a /24 to /29:NetworkBlock::parse(text)?.host(octet).isoloom_spec::validate::RESERVED_PREFIX,isoloom_targets::OUTPUT_DIRareisoloom_manifest::contract's.isoloom_spec::model::secret_variableisisoloom_manifest::contract::secret_variable(besidecontract::SECRET_PREFIX), andisoloom_manifest::access::{IMAGE_ENV, BOX_ENV}areisoloom_manifest::contract::{ACCESS_IMAGE, ACCESS_BOX}, with the same values.isoloom_spec::defaults::{apply_to_files, set_region, BUILTIN_REGIONS, builtin}: the environment takes the regions (Lab::with_regions, fromDefaults::regions);isoloom_targets::default_regionsgives each cloud's built-in one.isoloom_spec::files(GeneratedFileis re-exported byisoloom-targetsas before),isoloom_spec::load_with(useload_profiled(dir, None, sets)),Spec::with_cloud_outputs,Spec::cloud_message;isoloom_specno longer re-exportsDeclared,Dns,KNOWN_OS,Network,Port,Reach,Resources,ShapeorVlanat its root (useisoloom_spec::model).isoloom_targets::resolved::{render_message_at, HostPort, with_published},isoloom_targets::decision, the matrix'scolumns,rows,RowandCell.isoloom_spec::images::{VagrantBox, HyperVBox, vagrant, HYPERV_DEBIAN_12, QEMU_DEBIAN_12}andisoloom_spec::windows::esxi_guest_os(the backends' own now).Lab::plan,Lab::catalogueandisoloom_targets::backendare hidden, outside the supported API, andisoloom_targets::{CloudDockerBackend, DockerVmBackend, HybridBackend}are crate-internal: generate withisoloom_targets::generate.isoloom_spec::defaults::Defaults::tags_underisResolved::tags_under, which returns aResult(Error::DefaultTagfor a tag of the defaults clashing with the spec's);resolveandloadrefuse a tag of the defaults no cloud takes withError::DefaultTag.isoloom_targets::Error::Placeholderhaswhy: String(washint: &'static str), andisoloom_targets::resolved::fillreads the message's placeholder paths only (thoseisoloom_spec::syntax::placeholderhas), not any path of the snapshot.isoloom_manifest::access::{DEFAULT_BOX, DEFAULT_ARM64_BOX, DEFAULT_IMAGE}andisoloom_manifest::SUPPORTED_VERSION(now crate-internal).isoloom_spec::model::Spec::inputsis a list ofInput(name,sensitive), andSpec::plain_inputsis removed: readinput.sensitive.isoloom_spec::validate::kebabisisoloom_manifest::is_kebab.isoloom_spec::targets(derive,effective,missing,mixed) is removed: ask the environment,isoloom_targets::Lab::possiblefor the targets that can run a spec andLab::not_possible(target)for why one can't, which count the access machine and the image table as the generator does.Spec::declares_input(look the name up inSpec::inputs),isoloom_spec::model::PUBLIC_RESOLVER(model::resolvers(None)gives it),isoloom_spec::tags::{key_refusal, value_refusal},isoloom_spec::defaults::{parse_set, override_spec}(load_profiled(dir, None, sets)applies the sets,override_spec_with(yaml, None, sets)to text) and the root'sDEFAULT_MEMORY_MB,DEFAULT_DISK_GBandCONTAINER_DISK_GBare crate-internal.isoloom_spec::profile::listreturnsResult<Listed>: the profiles'names, and theskippedfiles a listing warns about.isoloom_targets::GenerateError::NoGeneratoris removed (every target has a backend), and an instance that can't be made isGenerateError::Instance, which isn't a refusal.isoloom_targets::refusal_onalso takes a cloud forcloud-vm(Some("aws")), ascloud_refusalsreports it.isoloom_vagrant::disk_refusalis part ofprovider_refusal.- The spec model's growing structs are
#[non_exhaustive](Spec,Machine,Network,DockerImpl,VmImpl,VmImage,Constraints,Proxy,Mirrors): build them withSpec::new,VmImpl::neworDefault, then set fields, or parse a spec, and match them with... - In the building-block crates (
isoloom-plan,isoloom-render, the backends,isoloom-catalogue), many items became crate-internal; those crates' API is not a promise.