@proppos/faspay-cli v1.0.6
FASTPAY CLI DOCUMENTATION
TABLE OF CONTENT
PRE REQUISITES
There are some requisites that need to be fulfilled before being able to use the CLI.
- The supported CPU architectures supported are
arm64v8andamd62, the CLI doesn't allow using other architectures like for examplearm32v7. - The CLI is a node package, and it requires nodejs 12 or higher, an older version may work, but it's not officially supported.
- The CLI uses
dockeranddocker-compose, so, for being able to interact with the servicesdockeranddocker-composemust be installed manually. - The
dockerregistry authorization need to be granted manually, otherwise, any image that belongs to the propposdockerregistry will fail to download.
There are official scripts available that configure both docker, docker-compose and nodeJS with all their dependencies, to run the script use the command bellow.
curl -o- "https://proppos-static.s3.eu-central-1.amazonaws.com/installers/$(uname -p).sh" | bashA reminder of compatibility, since only aarch64 and x86_64 architectures are supported, any other won't find any script to download and execute.
USAGE
The CLI follows the following execution syntax
fastpay [command] [arguments]There are two types of tasks handled by the CLI:
- Task that run locally, like interacting with the already installed services.
- Tasks that require connecting with the cloud, like configuring the device.
Those commands that run locally doesn't require authorization, but some of them like start the service require a configuration, but in order to get that configuration you need an active authorization.
CLI available commands
auth
The auth command allows the user to login with his Proppos account, a token is saved in the configuration file, this token limits the scope to the CLI specific resources for that user
# Syntax example
fastpay authconfigure
:information_source: INFO
This command requires an active account and to log in into the cli, follow the auth for more details.
The configure command it's used for configuring a device no matter if it's the first configuration or if is an update of the configuration, it does a series of configurations:
- Configures the timezone that will be used in some docker containers.
- Downloads the configuration for the docker services for one of the user available devices.
:information_source: INFO
This command uses the local configured environment by the command env to download the configuration adding the local configuration. Changes in the local environment may require configuring or updating the service again.
- Once downloaded the configuration asks the user to start the service, if the user answers yes this will trigger the start of the services, the same way that executing the start
## Syntax example
fastpay configureupdate
The update command is the one that needs to be executed when upgrading versions or updating the existing configuration.
:information_source: INFO
This command requires an active account and to log in into the cli, follow the auth for more details.
:information_source: INFO
This command requires an existing configuration in order to work. If there is no configuration, because it's the first run, or the configuration has been deleted. Follow the instructions of the configure command.
The update process follows this steps:
- Downloads from the cloud the newest manifest for the configured device and local environment.
- Write the newest manifest to local file system.
- Downloads any new image or update from the docker registry.
- Stops the current running services and orphans.
- Starts the new services.
- Cleans all the orphan docker images and volumes.
If any of the steps fails the process will be aborted and exited with status code 1.
## Syntax example
fastpay updatestart
The start command will start the process without stopping any service. This command can be used when the changes on the manifest are minimal, for example, a new environment variable has been added or modified. This will recreate the affected containers without affecting to others without changes.
For more security is better to restart the service instead of starting over running services, but is faster than restarting when all the services are being stopped previously.
This command is also helpful when the stop command fails, because, for example, the network used in the manifest cant be removed because an external docker container is using it, this can happen when you have multiple services in multiple manifests connected to the same network.
:information_source: INFO
This command requires an existing configuration in order to work. If there is no configuration, because it's the first run, or the configuration has been deleted. Follow the instructions of the configure command.
## Syntax example
fastpay startstop
The stop command will stop the services and resources on the manifest and any orphan container.
:information_source: INFO
This command DOESN'T remove any volume, persistent storages are not affected by this remove process .
:information_source: INFO
This command requires an existing configuration in order to work. If there is no configuration, because it's the first run, or the configuration has been deleted. Follow the instructions of the configure command.
## Syntax example
fastpay stoprestart
The restart command it's a shortcut to execute stop and start commands in a row.
:information_source: INFO
This command requires an existing configuration in order to work. If there is no configuration, because it's the first run, or the configuration has been deleted. Follow the instructions of the configure command.
## Syntax example
fastpay restarthelp
The help command prints the list of commands available, a description of it, some syntax help and arguments explanations as well.
:information_source: INFO
Executing the CLI without any extra commands will also show the help output.
## Syntax example
fastpay help
fastpayprune
:warning: WARNING
This command is destructive, it will ask to confirm deletion but once it's done, data is gone forever.
Use with head and caution.
The prune command is the command used to delete all persistent data, like databases, this command will ask first to stop the running services. Once stopped will ask for confirmation, if it's granted all the persistent volumes from any stopped container will be deleted forever.
Persistent volumes from running container are safe, this process won't delete them.
## Syntax example
fastpay prunenetwork
This command is a tool to simplify the process of configuring a network adapter, converts the process in a guided experience instead of manually edit configurations by hand fot both network and dns configurations.
Works for both static and DHCP configurations.
:information_source: INFO
This command has been designed for its usage under linux systems running ifup and resolvconf, if the system uses other network managers, like netplan, this command can lead to network malfunction.
## Syntax example
fastpay networkenv
The env command helps to manage the additional environment variables passed to the cloud in order to generate the final manifest updated.
the commands lead to a guided process that allows the user to add, edit and delete variables.
:information_source: INFO
Not all variables are mapped to the final manifest, only a set of supported variables.
## Syntax example
fastpay env