Skip to main content

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 input Keys.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.Enter
  • ipmitool​

    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 print
  • power​

    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: status
  • sleep​

    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: 10
  • request​

    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 KEYNESTED KEYDEFINED BYDESCRIPTIONUSAGE
deviceuidSystemthe device's UID{device::uid}
deviceipmi_ipSystemthe device's ipmi IP{device::ipmi_ip}
devicemodelSystemthe device's model{device::model}
credusernameSystemthe device's cred username{cred::username}
credpasswordSystemthe device's cred password{cred::password}
metadata*Userthe value of the nested key from the device's metadata{metadata::ANY_KEY}
cred_storeCRED_NAME::usernameSystema username from an existing cred{cred_store::CRED_NAME::username}
cred_storeCRED_NAME::usernameSystema 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.