Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ guide you through getting up and running.

### Install `ipctl`

To install `ipctl` navigate to the [releases page](https://github.com/itential/ipctl/releases) and download the tarball that matches your machine OS and architecture. Then untar the compressed file put the `ipctl` executable in your path.
To install `ipctl` navigate to the [releases page](https://github.com/itential/ipctl/releases) and download the tarball that matches your machine OS and architecture. Then untar the compressed file put the `ipctl` executable in your path.

### Configuring `ipctl`

The default configuration file for `ipctl` is `~/.platform.d/config`. This file
is read by `ipctl` and used to configure various options. The configuration
file is divided into multiple sections, each section providing one or more
key=vlaue configuration entries.
key=value configuration entries.

The configuration file can be configured using any standard text editor and
should be secured such that it is only readable by the currently logged in
Expand All @@ -26,19 +26,18 @@ The `ipctl` application can also be configured using environment variables. If
configured, environment variables take precedence over values set in the
configuration file.

The configuration file uses profiles to define one or more target instances of Itential Platform. For example, the following will create a new profile called `devel` in the configuration file.
The configuration file uses profiles to define one or more target instances of Itential Platform. For example, the following will create a new profile called `devel` in the configuration file.

```
```ini
[profile devel]
host = devel.itential.com
```

Once created, use the profile name when running commands.

```
```bash
ipctl export project test --profile devel
```

For a complete list of all configuration parameters, please see the
configuration reference [here](docs/configuration-reference.md)

28 changes: 14 additions & 14 deletions docs/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Values configured using environment variables take precedence over the same
values configured in a configuration file.

By default, `ipctl` will load the configuration file `~/.platform.d/config`.
To use a different configuraiton file name and/or location, use the `--config`
To use a different configuration file name and/or location, use the `--config`
command line option and pass it the path to the configuration file you wish to
use.

The configuration file can also be specified using the `IPCTL_CONFIG_FILE`
environment variable.

The configuration file is organzied into sections with each section providing
The configuration file is organized into sections with each section providing
one or more key=value settings that can be used to configure the application.

## Avoiding security risks

The `ipctl` configuration file may contain senstive configuration values used
The `ipctl` configuration file may contain sensitive configuration values used
to authenticate to services. The configuration file should be secured such
that only the current user has access to the configuration directory and file.

Expand All @@ -38,12 +38,12 @@ Please consult your OS documentation for specific commands.

The application configuration file supports configuring multiple profiles. A
profile defines the connection settings for a given server. When `ipctl`
attempts to conect to a server, it will look up the profile settings in the
conifguraiton file based on the profile name.
attempts to connect to a server, it will look up the profile settings in the
configuration file based on the profile name.

The profile name can be passed to any command using the `--profile <name>`
command line argument. A default profile can also be set in the configuration
file. See `default_profile` in the [Applicaiton Settings}(#Application
file. See `default_profile` in the [Application Settings}(#Application
Settings) section for a description.

## Configuration options
Expand Down Expand Up @@ -103,7 +103,7 @@ The default value for `level` is `info`.

The terminal settings section provides configuration values for managing the
terminal environment. All configuration settings are maintained under the
`[terminal]` section and can be overridded using environment variables
`[terminal]` section and can be overridden using environment variables
prefaced with `IPCTL_TERMINAL_<NAME>`.

#### no_color
Expand Down Expand Up @@ -137,7 +137,7 @@ The default value for `pager` is `true`.
#### timestamp_timezone

Configures the timezone to use when converting log timestamp messages from the
application. This setting can be used to automatiocally translate the log
application. This setting can be used to automatically translate the log
messages to any desired timezone.

The default value for `timestamp_timezone` is `utc`.
Expand Down Expand Up @@ -190,7 +190,7 @@ instance, assume we want to pass the password in using an environment variable
instead of storing the password in the configuration file. This could be
accomplished by setting `IPCTL_PROFILE_<NAME>_PASSWORD` to the desired value.

For instance, to set the password for a profile callend `prod`, the environment
For instance, to set the password for a profile called `prod`, the environment
variable would be `IPCTL_PROFILE_PROD_PASSWORD`. The value would override any
value in the configuration file.

Expand All @@ -213,8 +213,8 @@ The default value for `port` is `0`.

#### `use_tls`

Enables or disables the use of TLS for the connecton. When this value is set
to `true`, the application will attempt to establish a TLS connecton to the
Enables or disables the use of TLS for the connection. When this value is set
to `true`, the application will attempt to establish a TLS connection to the
server. When this value is set to `false` the application will not attempt to
use TLS when connecting to the server.

Expand All @@ -224,7 +224,7 @@ The default value for `use_tls` is `true`.

Enables or disables certificate validation for TLS based connections. When
this value is set to `true`, certificates received from the server are
validated. When this value is set to `false`, certifcates are assumed valid.
validated. When this value is set to `false`, certificates are assumed valid.
This feature is useful when using self-signed certificates for TLS connections.

The default value for `verify` is `true`.
Expand All @@ -233,7 +233,7 @@ The default value for `verify` is `true`.

Configures the name of the user to use when authenticating to the Itential
Platform server. This should be the username used to login to the server and
determines the level of authorzation.
determines the level of authorization.

The default value for `username` is `admin@pronghorn`.

Expand All @@ -254,7 +254,7 @@ The default value for `client_id` is `null`.

#### client_secret

Configures the client secret for working with Iential Platform running in
Configures the client secret for working with Itential Platform running in
Itential Cloud. The client secret can be obtained when creating a service
account in Itential Cloud.

Expand Down
2 changes: 1 addition & 1 deletion docs/running-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ need to have `goreleaser` installed and available in your local environment.
See [here](https://goreleaser.com/) for details on how to install `goreleaser`.

Once `goreleaser` is installed, you can build your own snapshot using `make
snapshot` The comand will build the application for all supported platforms
snapshot` The command will build the application for all supported platforms
and place them into the `dist/` folder.
2 changes: 1 addition & 1 deletion internal/flags/jsonforms.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type JsonFormCreateOptions struct {

func (o *JsonFormCreateOptions) Flags(cmd *cobra.Command) {
cmd.Flags().StringVar(&o.Description, "description", o.Description, "Description of JSON form")
cmd.Flags().BoolVar(&o.Replace, "replace", o.Replace, "Replace the exist form if it exists")
cmd.Flags().BoolVar(&o.Replace, "replace", o.Replace, "Replace the existing form if it exists")
}

type JsonFormGetOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/flags/localaaa.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ type LocalAAAOptions struct {
}

func (o *LocalAAAOptions) Flags(cmd *cobra.Command) {
cmd.Flags().StringArrayVar(&o.Groups, "group", o.Groups, "Group to insert user into")
cmd.Flags().StringArrayVar(&o.Groups, "group", o.Groups, "Group to insert the user into")
}
2 changes: 1 addition & 1 deletion internal/flags/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type RoleGetOptions struct {
}

func (o *RoleGetOptions) Flags(cmd *cobra.Command) {
cmd.Flags().BoolVar(&o.All, "all", o.All, "Display all roles including buitin roles")
cmd.Flags().BoolVar(&o.All, "all", o.All, "Display all roles including builtin roles")
cmd.Flags().StringVar(&o.Type, "type", o.Type, "Display only roles of a certain type")
}

Expand Down
4 changes: 2 additions & 2 deletions internal/flags/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type TemplateCreateOptions struct {
}

func (o *TemplateCreateOptions) Flags(cmd *cobra.Command) {
cmd.Flags().StringVar(&o.Description, "description", o.Description, "Description of JSON form")
cmd.Flags().BoolVar(&o.Replace, "replace", o.Replace, "Replace the exist form if it exists")
cmd.Flags().StringVar(&o.Description, "description", o.Description, "Description of template")
cmd.Flags().BoolVar(&o.Replace, "replace", o.Replace, "Replace the existing template if it exists")
cmd.Flags().StringVar(&o.Group, "group", o.Group, "Group name (REQUIRED)")
cmd.MarkFlagRequired("group")
cmd.Flags().StringVar(&o.Type, "type", o.Type, "Type of template to create (REQUIRED)")
Expand Down
4 changes: 2 additions & 2 deletions internal/handlers/descriptors/adapter_models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ get:
group: admin-essentials

description: |
Display one or more available adapter models
Display one or more available adapter models.

The `get adapter-models` command will return the list of adapter models that
are available on the server.

example: |
# Display list of adapter models
4 ipctl get adapter-models
$ ipctl get adapter-models
6 changes: 3 additions & 3 deletions internal/handlers/descriptors/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ load:
dump:
use: dump <path>
description: |
Dump a dataset
Dump a dataset.

The dataset dump command will connect to the running instance of Platform
and dump all of the configred assests into the specified path.
The dataset dump command will connect to the running instance of the Itential
Platform and dump all of the configured assets into the specified path.

example: |
# Dump all assets to `assets`
Expand Down
2 changes: 1 addition & 1 deletion internal/handlers/descriptors/integration_models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get:
description: |
Display one or more integration-models

The `get integraion-models` will display the list of integration models
The `get integration-models` will display the list of integration models
that have been added to the server.

describe:
Expand Down
4 changes: 2 additions & 2 deletions internal/handlers/descriptors/integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get:
description: |
Display one or more integrations

The `get integraions` will display the list of integration models
The `get integrations` will display the list of integration models
that have been added to the server. The default output will display
the list of the configured integrations and models.

Expand All @@ -36,7 +36,7 @@ create:
on the server (regardless of the model type), this command will
return an error

When creating a new integraiton, the `--model` argument is required and
When creating a new integration, the `--model` argument is required and
must reference an Integration Model already on the server. To see a list
of available Integration Models, use the `get integration-models` command.

Expand Down
6 changes: 3 additions & 3 deletions internal/handlers/descriptors/jsonforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get:
description: |
Display one or more jsonforms

The `get jsonforms` command will retreive all of the configured JSON
The `get jsonforms` command will retrieve all of the configured JSON
forms from the instance of Platform and display them. When the output
is set to `human` (default) this command will display the results in
table format.
Expand Down Expand Up @@ -70,7 +70,7 @@ delete:
description: |
Delete a jsonform

The delete command will delete the specifie jsonform from the instance
The delete command will delete the specified jsonform from the instance
of Itential Platform. This is a destructive operation and cannot be
recovered. If the specified jsonform does not exist on the server,
this command will return an error.
Expand Down Expand Up @@ -138,7 +138,7 @@ export:
Export a jsonform

Use the `export jsonform <name>` command to export a jsonform from the
server in JSON format. The exported asset can be immported into the same
server in JSON format. The exported asset can be imported into the same
or another server. If specified jsonform does not exist, an error is
returned.

Expand Down
14 changes: 7 additions & 7 deletions internal/handlers/descriptors/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ get:
group: lifecycle-manager

description: |
Dispaly one or more models
Display one or more models

The `get models` command will retrieve all configured resource models from
the server and display them in table format by default.
Expand Down Expand Up @@ -36,8 +36,8 @@ delete:
description: |
Delete a model

The delete command will atempt to delete the resource model from the
specified server. In order to delete a model successfully, the model
The delete command will attempt to delete the resource model from the
specified server. In order to delete a model successfully, the model
cannot have any current instances.

If the model has any current instances, the command will return an
Expand Down Expand Up @@ -84,8 +84,8 @@ import:
required argument `path` which specifies the path to the file where the
exported model resides.

Models can be imported direclty from Git repositories using the ``--repository`
otional argument.
Models can be imported directly from Git repositories using the ``--repository`
optional argument.

example: |
# Import a resource model from a file
Expand All @@ -100,11 +100,11 @@ export:
Export resource model

The `export model` command will export a resource model from the Itential
Platform server. If exported model will be written to a file. If the
Platform server. If exported model will be written to a file. If the
model name specified by the `name` argument does not exist, this command
will return an error.

exmaple: |
example: |
# Export a resource model called `CLI Test`
$ ipctl export model "CLI Test"

4 changes: 2 additions & 2 deletions internal/handlers/descriptors/profiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ copy:
profile from one server to another. This command has three required
arguments. The first argument is the name of the profile to copy and
it must exist on the source server. The `--from` argument accepts the
name of a named profile from the configuration file and designates the
source server. The `--to` argument accepts the anem of a named profile
name of a ipctl profile from the configuration file and designates the
source server. The `--to` argument accepts the name of a ipctl profile
from the configuration file and designates the destination server.

This command will first check if a profile by the same name exists on the
Expand Down
Loading