Skip to content

MachineList

shanhui edited this page Apr 4, 2017 · 1 revision

Machine List

Omnitty can load machines from a file, and add machines by group.

How to use this feature?

Write a machine list file

First, you need to write a machine list file. Such as:

[local]
192.168.100.101
192.168.100.102
192.168.100.103
192.168.100.104
192.168.100.105
[hk]
119.9.10.1
119.9.10.2
119.9.10.3
119.9.10.4
119.9.10.5

local and hk are groups that you can load machines by group in omnitty.

Add machine list file to config.json

Second, add the machine list file machine_list.txt to config.json under the ~/.omnitty/ folder.

{
    "ListWindowWidth": 15,
    "SummaryWindowWidth": 15,
    "TerminalWindowWidth": 80,
    
    "LogConfigFilePath": "",
    "LogFilePath": "/tmp/omnitty.log",
    "LogFormat": "%d{%y-%m-%d %H:%M:%S} %p %l %m%n",
    
    "MachineFilePath": "~/.omnitty/machine_list.txt",
    
    "SSHParam": "-p 22 -o StrictHostKeyChecking=no -i ~/.ssh/root.pem",
    "SSHUserName": "root",
    "SSHUserPassword": ""
}

Omnitty will load the machine_list.txt file when it start running.

Load machines to omnitty

Run omnitty, and press F5 to load machines.

Then you can load group by command --g local or --g hk. Omnitty will load the machines under that group.

Clone this wiki locally