Vaquero Tools
Home | Docs Repo | |
Migrate | Preview | Validator |
Vaquero Migrate
The Vaquero migrate tool is built for moving and renaming stored information about SoTs and Sites. By default, the tool will check for collisions in the destination storage. If it finds any, it will ask for the user to confirm to continue and overwrite any information.
Potential use cases include:
- Moving storage between any combination of
FileStorage
andEtcdStorage
- Checking if a storage migration would overwrite pre-existing information
- Renaming sites and SoTs
- Migrating specific sites or SoTs
- Disaster recovery via creating backups
- Debugging from a specific saved state
- Splitting up a vaquero server into multiple servers
- Migrating to a new storage system
Using vaquero migrate
Migrating files from one local storage to the destination etcd:
vaquero migrate --src <config_with_local>.yaml --dst <config_with_etcd>.yaml
Migrating and renaming an SoT:
vaquero migrate --src <config>.yaml --dst <config>.yaml --src-sot <src_sot_id> --dst-sot <new_id> --del
Options:
--src
required- The source config file containing either the etcd or savepath configurations.
--dst
required- The destination config file containing either the etcd or savepath configurations.
--src-sot
optional- The SoT id if moving a specific SoT from the source.
--src-site
optional- The site id if moving a specific site from the source. This requires having specified
the containing SoT with
--src-sot
.
- The site id if moving a specific site from the source. This requires having specified
the containing SoT with
--dst-sot
optional- The name for the destination SoT id. This requires having a source SoT specified.
--dst-site
optional- The name for the destination site id. This requires having the source and destiation SoTs specified.
--ovwrt
optional- This will disable checking for migration conflicts causing it to overwrite any saved information in the destination.
--del
optional- This will delete the source files targeted for migration.
Example configs
Below are some configs showing valid configurations to provide to the migrate tool.
sample-file-store.yaml:
SavePath: "/var/vaquero"
minimal-etcd-store.yaml:
Etcd:
Endpoints:
- "http://127.0.0.1:2379"
sample-etcd-store.yaml:
Etcd:
Root: "vaquero1"
Endpoints:
- "http://127.0.0.1:2379"
Vaquero Preview
The Vaquero preview tool is built to prview iPXE and unattended boot scripts for specific host machines.
Using vaquero preview
Preview the cloud config for the host with given MAC:
vaquero preview --mac 00:00:00:00:00:01 --sot examples/etcd-cluster
Preview the iPXE for a given MAC:
vaquero preview --mac 00:00:00:00:00:01 --sot examples/etcd-cluster --ipxe
Preview a specific boot stage for the machine with the given MAC:
vaquero preview --mac 00:00:00:00:00:01 --sot examples/etcd-cluster --boot coreos-partition
Vaquero Validator
The Vaquero validator is a built in utility for checking the consistency of your configurations. Its purpose is to preemptively report any inconsistencies (mistyped IDs, missing metadata, etc) in your configuration before you attempt to deploy it.
Using vaquero validate
Validating a local SoT:
vaquero validate --sot <base_directory>
The base directory structure should be consistent with the data model.
Validation Process
The validator first loads the directory tree passed in through a local directory, or through git. It then:
- Checks if all links between objects exist. For example, an error would be generated if a
host_group
is looking foroperating_system: coreos-1053.2.0-stable
and the data model only hascoreos-1053.2.0-alpha
. - Checks if all metadata needed to render templates is available.
- Checks unattended files are in a valid format
- Checks unattended files mentioned are supported by Vaquero
- Checks for name duplication amongst a class of data model objects
- Checks if inventory has hosts
- Checks if the ignition files provided are valid. Uses coreos/fuze
- Checks if the cloud-config files provided are valid. Uses coreos/coreos-cloudinit
- Checks if the kickstart files provided are valid using a simple internally developed parser. Further validation can be done using the official validator.