Create
CREATE resources using input files or interactive mode.
ACTIONβ
Create an action that can be assigned to be performed against a device. The available action types are:
keystrokeβ
Send one or more keystrokes to a device. There are two types of keystrokes:
stringβ
An ascii string. You can use this to input a username or pass a parameter into a text field. Note that it doesnβt send a newline following the string - you need to use a special key for that (see key combo).
key comboβ
One or more special keys, along with an optional single character. You can use this to navigate via cursor keys, press Enter, and send special key combinations such as ctrl-c. The key format follows the Selenium convention:
Keys.<key_type>
and can be combined using the+
(plus) character. For example, to send a ctrl-c, you would inputKeys.Control+c
. The list of possible keys is available here and also by issuing the following command:$ vaxctl create action -I -v
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Action Type: β sleep β
β String Value: β number of seconds to sleep β
β Additional Data: β only digits are allowed β
β Example: β 10 β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Action Type: β power β
β String Value: β power action to send via ipmitool β
β Additional Data: β one of: [on, off, reset, graceful, status] β
β Example: β on β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Action Type: β ipmitool β
β String Value: β free text β
β Additional Data: β will be appended to ipmitool command β
β Example: β lan print β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Action Type: β keystroke β
β String Value: β a ';' seperated list of key combos β
β Additional Data: β A list of key combos (either a string to send or multiple keys to be pressed at once): β
β β - string: the string as it should be entered (each key will be pressed in sequence) β
β β - multiple keys: seperated by '+' (special keys can be used by prepending 'Keys.' to the key name) β
β β List of special keys: β
β β [ADD, ALT, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, BACKSPACE, BACK_SPACE, CANCEL, CLEAR, COMM β
β β AND, CONTROL, DECIMAL, DELETE, DIVIDE, DOWN, END, ENTER, EQUALS, ESCAPE, F1, F10, F11, F12, F2, F3, β
β β F4, F5, F6, F7, F8, F9, HELP, HOME, INSERT, LEFT, LEFT_ALT, LEFT_CONTROL, LEFT_SHIFT, META, MULTIPLY β
β β , NULL, NUMPAD0, NUMPAD1, NUMPAD2, NUMPAD3, NUMPAD4, NUMPAD5, NUMPAD6, NUMPAD7, NUMPAD8, NUMPAD9, PA β
β β GE_DOWN, PAGE_UP, PAUSE, RETURN, RIGHT, SEMICOLON, SEPARATOR, SHIFT, SPACE, SUBTRACT, TAB, UP] β
β Example: β Keys.Control+c;exit;Keys.Enter β
ββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
You can mix and chain multiple keystrokes together inside an action by separating them using the
;
(semicolon) character. For example, you can use the following action yaml to logout of a Linux system by sending these keystrokes:- ctrl-c
- exit
- enter
name: logout
action_type: keystroke
action_data: Keys.Control+c;exit;Keys.Enteripmitoolβ
Use ipmitool to interact with the device. This one is just a wrapper around ipmitool - you can input whatever ipmitool commands you want and Vaxiin will handle credentials for you. For example, you could use the following yaml to get LAN information from the deviceβs BMC:
name: ipmi lan print
action_type: ipmitool
action_data: lan printpowerβ
A wrapper around ipmitool for power commands. You can use this to power on, off, restart and cycle a system. Itβs a handy shortcut.
name: power status
action_type: power
action_data: statussleepβ
Sleep for an N amount of seconds. You use this to wait while stuff happens.
name: sleep for 10 seconds
action_type: sleep
action_data: 10requestβ
Send an HTTP GET request. You can use this to interact with other systems (ex. trigger a jenkins job)
name: trigger jenkins cleanup job
action_type: request
action_data: http://myjenkins:8080/job/My-Clenaup-Job/buildWithParameters?UID={device::uid}&token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z
action_dataβ
The action_data value can include attributes that will populated according to the device the action is running on.
The synatx is {BASE_KEY::NESTED_KEY}
. Available attributes:
BASE KEY | NESTED KEY | DEFINED BY | DESCRIPTION | USAGE |
---|---|---|---|---|
device | uid | System | the device's UID | {device::uid} |
device | ipmi_ip | System | the device's ipmi IP | {device::ipmi_ip} |
device | model | System | the device's model | {device::model} |
cred | username | System | the device's cred username | {cred::username} |
cred | password | System | the device's cred password | {cred::password} |
metadata | * | User | the value of the nested key from the device's metadata | {metadata::ANY_KEY} |
cred_store | CRED_NAME::username | System | a username from an existing cred | {cred_store::CRED_NAME::username} |
cred_store | CRED_NAME::username | System | a password from an existing cred | {cred_store::CRED_NAME::password} |
DEVICEβ
CREATE a device from a yaml file. Empty, self-documenting yaml files can be created using the GENERATE command. Note that the first time a Vaxiin agent contacts the Vaxiin server, it will initiate device creation. So youβd only CREATE DEVICE
for devices which arenβt running the agent. If youβre wondering about out-of-band credentials, these are created via CREATE CRED and then explicitly specified during device creation, either via agent config or in the device's yaml, as per this example:
uid: test_device
ipmi_ip: 10.1.1.2
model: idrac9
zombie: false
metadata:
fqdn: test-device.rebooto.io
creds_name: new_oob_creds
If you'd like to have the device switch back to the 'default' creds, follow the example in APPLY DEVICE.
CREDβ
CREATE a set of credentials for connecting to an out-of-band device from a yaml file. Empty, self-documenting yaml files can be created using the GENERATE command. You can have multiple sets of credentials. One of these credentials must be defined as the βdefaultβ set. If thereβs only one set defined, weβll mark it as βdefaultβ automatically. If youβd like to mark another set of credentials as βdefaultβ, check out SET CRED.
info
You cannot use default
as the name for your credentials, as its a reserved keyword.
STATEβ
CREATE a state from a yaml file. Empty, self-documenting yaml files can be created using the GENERATE command.
RULEβ
CREATE a rule from a yaml file or via interactive mode. Empty, self-documenting yaml files can be created using the GENERATE command. You can set rules as disabled by setting the enabled
parameter to false
. The rule contains an array of actions that will be run in order so you could do something like reset provisioning state, change boot device & reboot
, as per the yaml example below.
name: reset provisioning
state_id: 1
regex: [Pp]rovision.*fail.*
actions:
- reset provisioning state
- change boot device
- reboot
enabled: true
Rules contain within them the state from which they were created. This is so you could go back and see what the original screenshot & OCR text contained.
To create a rule, you must specify the state to store within, either via referencing an existing state or by providing a base64 encoded screenshot.
info
Note that the state within a rule is there only for informational purposes - so you could see which state "inspired" the rule. It's not used for any other purpose, and is therefore immutable following its creation. While you can change the regex of a rule and its actions, you cannot change the state stored within it.