genvid-bastion¶
Manage the local bastion cluster.
The script installs the supervisor services underGENVID_SERVICES_DATADIR
(defaults to ~/.genvid) and sets up a bastion-api service on top of them, using the installation directory.
usage: genvid-bastion [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
{backup,clean,env,install,load-bastion-config,log,monitor,open,reinstall,restart,setup,start,status,stop,uninstall,update-global-tfvars}
...
Positional Arguments¶
command | Possible choices: backup, clean, env, install, load-bastion-config, log, monitor, open, reinstall, restart, setup, start, status, stop, uninstall, update-global-tfvars |
Named Arguments¶
--loglevel | Possible choices: DEBUG, INFO, WARNING, ERROR Set the script log level |
Sub-commands:¶
backup¶
Create a snapshot of the services data directory.
Only Consul (including the Vault database in the default configuration), the Vault’s key, and Terraform workdir will be saved. Nomad’s data will not be. Please, make sure no terraform operations are running during the process, including updating repository.
The data could be restored when performing an install.
New in version 1.14.0.
genvid-bastion backup [-h] zipfile
Positional Arguments¶
zipfile | Archive to save the backup. |
install¶
Install and set up the services.
Changed in version 1.13.0: The –update-global-tfvars no longer updates the toolbox variable. Instead, it updates the toolbox_location variable only if present.
Changed in version 1.14.0: The command now checks if a valid bastion ID is set and allow you to set it with the –bastionid parameter.
Changed in version 1.15.0: Added –reconfigure parameter.
genvid-bastion install [-h] [-b BASTIONID] [-r] [-m] [-l] [-u]
[--backup BACKUP] [--reconfigure]
Named Arguments¶
-b, --bastionid | |
Identifier of the bastion. Must be only lowercase, numbers and hyphens and between 3 and 32 characters. | |
-r, --force-rename | |
Force the bastion to be renamed if the actual bastion exists with a different name. Default: False | |
-m, --checkmodules | |
Install the modules and update them Default: False | |
-l, --loadconfig | |
Load the default bastion configuration Default: False | |
-u, --update-global-tfvars | |
Update the global terraform variable values. Default: False | |
--backup | Backup file to use for restoration. Using this option will always stop all services and rename the consul data directory to backup before applying the changes. |
--reconfigure | Reset the configuration of the services. This only resets the configuration files installed by the service. It won’t modify any other files present. Default: False |
load-bastion-config¶
Load default bastion config. This includes the jobs and logs
genvid-bastion load-bastion-config [-h]
log¶
Return the specific log for a task.
genvid-bastion log [-h] [-t] [-n LINES] [-f]
{bastion-api,cluster-api,consul,hashi-ui,nomad,vault}
Positional Arguments¶
task | Possible choices: bastion-api, cluster-api, consul, hashi-ui, nomad, vault |
Named Arguments¶
-t, --tail | Only show the last line. Default: False |
-n, --lines | The number of lines to tail (10). Default: 10 |
-f, --follow | Wait for additional content at the end of file. Default: False |
open¶
Open a link in a webbrowser or list the link available.
genvid-bastion open [-h] [link]
Positional Arguments¶
link | Name of the link |
reinstall¶
Stop all services and reinstall them.
Changed in version 1.13.0: The –update-global-tfvars no longer updates the toolbox variable. Instead, it updates the toolbox_location variable only if present.
Changed in version 1.14.0: Added –bastionid parameter to set or change the bastion ID, and –backup parameter to restore from a previous version of bastion.
Changed in version 1.15.0: Added –reconfigure parameter.
genvid-bastion reinstall [-h] [-c] [-f] [-d] [-b BASTIONID] [-r] [-m] [-l]
[-u] [--backup BACKUP] [--reconfigure]
Named Arguments¶
-c, --clean | Clean the installation. Default: False |
-f, --force | Force deinstallation. Default: False |
-d, --destroy | Destroy existing clusters. Default: False |
-b, --bastionid | |
Identifier of the bastion. Must be only lowercase, numbers and hyphens and between 3 and 32 characters. | |
-r, --force-rename | |
Force the bastion to be renamed if the actual bastion exists with a different name. Default: False | |
-m, --checkmodules | |
Install the modules and update them Default: False | |
-l, --loadconfig | |
Load the default bastion configuration Default: False | |
-u, --update-global-tfvars | |
Update the global terraform variable values. Default: False | |
--backup | Backup file to use for restoration. Using this option will always stop all services and rename the consul data directory to backup before applying the changes. |
--reconfigure | Reset the configuration of the services. This only resets the configuration files installed by the service. It won’t modify any other files present. Default: False |
restart¶
Restart the services.
Changed in version 1.13.0: The –jobs-only option restarts only the jobs.
genvid-bastion restart [-h] [-j] [jobs [jobs ...]]
Positional Arguments¶
jobs |
Named Arguments¶
-j, --jobs-only | |
Only stops the jobs Default: False |
start¶
Start the services.
Changed in version 1.13.0: The –jobs-only option starts only the jobs.
genvid-bastion start [-h] [-j] [jobs [jobs ...]]
Positional Arguments¶
jobs |
Named Arguments¶
-j, --jobs-only | |
Only stops the jobs Default: False |
stop¶
Stop the services.
Changed in version 1.13.0: The –jobs-only option stops only the jobs.
genvid-bastion stop [-h] [-j] [jobs [jobs ...]]
Positional Arguments¶
jobs |
Named Arguments¶
-j, --jobs-only | |
Only stops the jobs Default: False |
uninstall¶
Stop and uninstall the services.
genvid-bastion uninstall [-h] [-c] [-f] [-d]
Named Arguments¶
-c, --clean | Clean the installation. Default: False |
-f, --force | Force deinstallation. Default: False |
-d, --destroy | Destroy existing clusters. Default: False |
update-global-tfvars¶
Update the global variables with your current settings.
This update the Global TFVars with your current external IP and the current toolbox.
Changed in version 1.13.0: The toolbox variable is no longer updated. It is replaced by a toolbox_location variable that is updated only if present.
genvid-bastion update-global-tfvars [-h]