Gluon CLI
BrowserMobility is powered by Gluon, an API first distributed hypervisor for managing iOS simulators. The main interface to the Gluon APIs is the gluon-cli command line tool.
Installation
To install the gluon-cli, run this command in a terminal on MacOS:
npm i -g @jhenrycode/gluon-cli
After installation, run gluon-cli
to ensure the command line tools were installed
correctly.
Credentials
Setting credentials for the gluon CLI can be done by calling the set-credentials
command on the CLI.
The effect of executing this command is to write the provided gluon API key to a file which can be
found at ~/.gluon/config.
Alternately, you can set an environment variable called GLUON_API_KEY
with the value of your account
api key. When both the GLUON_API_KEY
environment variable and the
~/.gluon/config
are both set, the environment variable will be used.
Commands
- account-info
- hosts
- host-simulators
- available-simulators
- create-simulator
- delete-simulator
- host-logs
- host-runtimes
- account-sessions
- session-video-url
- provision-host
- set-credentials
- run-sample-test
account-info
{ id, name, adminAccountEmail, publicKey }The
publicKey
is the public part of the RSA keypair used to sign all commands
executed against the Gluon APIs. Gluon is a Zero Trust environment, and as such all API requests must be signed and
validated.
hosts
{ id, accountId, machineIp, hostType, ipAddress, commandPort, agentPort, simulatorCount, maxSimulatorCount, lastHeartBeat, created, updated }
The machine IP is the IP of the base-level host. This is usually the IP address of the physical machine, but could be the IP address of a Virtual Machine that is acting as the hypervisor layer in a nested virtualization environment.
The host type will be an enumerated value with the following values:
- 1 - AWS
- 2 - MacStadium
- 3 - OnPrem (self hosted)
host-simulators
Input argument
: hostId{ id, accountId, hostId, name, runtime, dataPath, dataPathSize, logPath, logPathSize, isAvailable, lockId, deviceTypeIdentifier, state, currentSessionId, webDriverPort, created, updated }
available-simulators
{ id, accountId, hostId, name, runtime, dataPath, dataPathSize, logPath, logPathSize, isAvailable, lockId, deviceTypeIdentifier, state, currentSessionId, webDriverPort, created, updated }
create-simulator
Input argument
: hostId
Input argument
: name
Input argument
: deviceType
Input argument
: runtime
Input argument
: webDriverPort
The runtime and deviceType options can be retrieved using the host-runtimes command.
delete-simulator
Input argument
: hostId
Input argument
: simulatorId
host-runtimes
Input argument
: hostId
[runtime] ================= name identifier version supported devices: [device type] ================= name identifier product
account-sessions
{ sessionId, accountId, sessionRecordingUri, sessionStartTime, sessionEndTime }The session recording URI cannot be accessed directly. Make a call to the
session-video-url
command to get a one-time uri that will allow you to view the
video
of the session.
session-video-url
Input argument
: sessionId
provision-host
Input argument
: ipAddress
Input argument
: agentPort
Input argument
: commandPort
Input argument
: maxSimulatorCount
Input argument
: sshUserName
Input argument
: sshPassword
For AWS host provisioning, see the AWS integration guide.