An open API service indexing awesome lists of open source software.

https://github.com/simp/rubygem-simp-cli

The Command Line Interface for SIMP
https://github.com/simp/rubygem-simp-cli

Last synced: 10 months ago
JSON representation

The Command Line Interface for SIMP

Awesome Lists containing this project

README

          

[![License][license-badge]][license-url]
[![SIMP compatibility][simp-badge]][simp-badge]

# simp-cli

A cli interface to configure SIMP and simplify administrative tasks.

* [Description](#description)
* [This is a SIMP project](#this-is-a-simp-project)
* [Usage](#usage)
* [Commands](#commands)
* [Configuration](#configuration)
* [`bootstrap`](#bootstrap)
* [`config`](#config)
* [Administration](#administration)
* [`doc`](#doc)
* [`passgen`](#passgen)
* [`puppetfile`](#puppetfile)
* [`puppetfile generate`](#puppetfile-generate)
* [Recently removed](#recently-removed)
* [`cleancerts` — _use `puppet cert clean CERTNAME` instead_](#cleancerts--_use-puppet-cert-clean-certname-instead)
* [`runpuppet` — _use mcollective instead_](#runpuppet--_use-mcollective-instead)
* [`puppeteval` — _use `puppet agent --evaltrace` instead_](#puppeteval--_use-puppet-agent---evaltrace-instead)
* [Development](#development)
* [Contributing](#contributing)
* [Testing](#testing)
* [License](#license)

## Description

A cli interface to configure SIMP and simplify administrative tasks.

### This is a SIMP project

This project contains tests for the [System Integrity Management
Platform][simp].

If you find any issues, submit them to our [bug tracker][simp-jira].

## Usage

```bash
simp COMMAND [OPTIONS]
```

**NOTE:** The `simp` cli command is intended to be run from a SIMP-managed OS.

### Commands

#### Configuration

##### `bootstrap`
Bootstraps a SIMP system (requires configuration data generated by `simp
config`).

**NOTE:** If you have an existing 'production' environment, it will be backed
up and mapped to a 'simp' environment when bootstrap is run.

##### `config`
Creates SIMP configuration files with an interactive questionnaire.

#### Administration

##### `doc`

Displays SIMP documentation in elinks.

##### `passgen`

Controls user passwords.

##### `puppetfile`

Helper utility to maintain local SIMP Puppetfiles

###### `puppetfile generate`

Print a Puppetfile that deploys from local SIMP git repos

simp puppetfile generate > Puppetfile.simp

simp puppetfile generate --skeleton > Puppetfile

#### Recently removed

##### `cleancerts` — _use `puppet cert clean CERTNAME` instead_

Revokes and removes Puppet certificates from a list of hosts.

##### `runpuppet` — _use [mcollective][mcollective] instead_

Runs puppet on a list of hosts.

##### `puppeteval` — _use `puppet agent --evaltrace` instead_

Gathers metrics information on Puppet runs.

## Development

### Contributing

Please read our [Contribution Guide][simp-contrib].

### Testing

It is recommended to run our run spec tests by using Ruby 2.4.4 and
[bundler][bundler]. To download dependencies, run:

```sh
bundle # when starting from scratch
bundle update # if there are conflicts or out-of-date dependencies
```

To run the spec tests, run:

```sh
bundle exec rake spec
```

By default, the Gemfile prefers `PUPPET_VERSION="~> 5.5"`. To specify another
version of Puppet, run bundler with the preferred ``PUPPET_VERSION``:

```sh
PUPPET_VERSION="~> 4.10" bundle
```

If spec tests are failing with mysterious tmpdir-related errors, like:

```
Directory not empty @ dir_s_rmdir - /home/user/tmp/logging_spec.rb20190314-23352-epe3
```

Re-run the tests with the `TMPDIR` variable set to another location:

```sh
TMPDIR=/tmp bundle exec rake spec
```

See the [`.travis.yml`](.travis.yml) file for examples of these environment
variables at work.

## License
See [LICENSE](LICENSE)

[simp]: https://simp-project.com/
[simp-contrib]: https://simp.readthedocs.io/en/master/contributors_guide/
[simp-jira]: https://simp-project.atlassian.net
[bundler]: https://bundler.io/
[mcollective]: http://puppetlabs.com/mcollective

[license-badge]: http://img.shields.io/:license-apache-blue.svg
[license-url]: http://www.apache.org/licenses/LICENSE-2.0.html
[simp-badge]: https://img.shields.io/badge/SIMP%20compatibility-6.*-orange.svg