npm package: @remote.it/virtual-devices
Description: The purpose of this project is to be able to test Remote.it products and features with virtual devices. These virtual device are created from Docker containers with Alpine Linux base images and Connectd installed.
Author: Kyle O'Brien
Latest version: 0.2.0

# @remote.it/virtual-devices

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

> The purpose of this project is to be able to test remote.it products and features with virtual devices. These virtual device are created from Docker containers with Alpine Linux base images and connectd installed. Enabled services include SSH and HTTP.

## Guides

- [Guide to Generating Interactive Devices](https://github.com/remoteit/docker_virtual_devices_script/tree/readme/guides/Tool-Guide.pdf)
- [EC2 Instance Recommendations](https://github.com/remoteit/docker_virtual_devices_script/tree/readme/guides/AWS-Guide.pdf)

## Installation

```sh
npm install -g @remote.it/virtual-devices
```

## Usage

### Create

**Bulk ID:** Corresponds to the product bulk identification code.

**CSV Path:** The path to the bulk registeration CSV file.

```shell
$: virtual-devices create BULK_ID BULK_REG_CSV_PATH
```

```shell
$: virtual-devices create 4F389758-2FEC-51AE-EB8A-82B5EAD9XYXY ./test_csv_files/500_devices.csv
```

### Stop

Stops all running virtual device containers.

`$: virtual-devices stop`

### Delete

Deletes all running virtual device containers.

`$: virtual-devices delete`

### Start

Starts all stopped virtual device containers.

`$: virtual-devices start`

### Exec

Executes an argued shell command inside every running container.

`$: virtual-devices exec "touch test.txt"`

## Help

```text
$: virtual-devices --help

  Usage: virtual-devices [options] [command]

  The purpose of this project is to be able to test remote.it products and features with virtual devices. These virtual device are created from Docker containers with Alpine Linux base images and Connectd installed.

  Options:

    -V, --version  output the version number
    -h, --help     output usage information

  Commands:

    create         Parses a bulk reg file and creates virtual devices containers. EX: virtual-devices create BULKD_ID CSV_PATH
    stop           Stops all running virtual device containers. EX: virtual-devices stop
    delete         Deletes all running virtual device containers. EX: virtual-devices delete
    start          Starts all stopped virtual device containers. EX: virtual-devices start
    exec           Executes an argued shell command inside every running container. EX: virtual-devices exec "COMMAND"
```

## Compatibility

This package uses Unix commands to determine which Docker containers are virtual-devices. This causes the tool to have limited availability on non-Unix based operating systems such as Windows. The only command that works on Windows is `virtual-devices create`.

## License

MIT

[npm-image]: https://img.shields.io/npm/v/@remote.it/virtual-devices.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@remote.it/virtual-devices
[downloads-image]: https://img.shields.io/npm/dm/@remote.it/virtual-devices.svg?style=flat
[downloads-url]: https://www.npmjs.com/package/@remote.it/virtual-devices
[travis-image]: https://img.shields.io/travis/{{{username}}}/{{{repoName}}}.svg?style=flat
[travis-url]: https://travis-ci.org/{{{username}}}/{{{repoName}}}
[coveralls-image]: https://img.shields.io/coveralls/{{{username}}}/{{{repoName}}}.svg?style=flat
[coveralls-url]: https://coveralls.io/r/{{{username}}}/{{{repoName}}}?branch=master