Bastion UI¶
Bastion UI is a web site used for the supervision of Genvid clusters. It is a GUI for the bastion-api.
Settings page¶
This page enables you to change the configuration of the Bastion-UI page. You can also see and edit the Global vars, Modules and Backends.
Modules Section¶
In the Modules section, you will find the existing Terraform modules repositories that you can edit or remove. The refresh buttons allow you to update the modules in the repositories.
You can also add a repository by providing the URL of the folder where it is located. Set the ID to the name of the folder in lower case.
Backends Section¶
In the Backends section, you can see the list of available backend configurations. You can add, edit, or remove a backend configuration. A backend configuration is composed of it’s unique name, type, and a list of variables.
- The name is a unique ID given by the user.
- The type has to be one supported by Terraform.
- The variables are the backend arguments and depend on the
backend’s type. The user can add or remove variables. A variable is
composed of its ID, value, and a few properties.
- Variable ID: The argument name.
- Value: The argument value.
- Editable: If the argument can be edited when initializing a cluster.
- Argument: If the variable is configured by a file or passed as argument to Terraform.
- Protected: If the variable is shown as a password when initializing a cluster.
See also
- Terraform’s Backends
- Documentation of Backends on Terraform
The bastion-api applies interpolation to the variable’s value before
initializing a cluster. For example, the text {{.clusterID}}
would
become the clusterID. For now, only clusterID
, bastionID
, and
instanceID
are supported.
Clusters¶
This page displays all the clusters deployed. You can access the Cluster-UI page of any clusters from there. You can also start, stop, and restart the cluster-api.
Create a cluster¶
Pressing the Create button opens a dialog for cluster creation.
- Cluster name: The name of the cluster
- Category: Help the user know the purpose of the
cluster. The category
cluster
is the default one. - Backend: The Terraform backend to use. A dropdown is
filled with available backends.
- Type: The type of backend.
- Variables: Extra variables to configure the backend.
Cluster Module¶
This page is used to import a module in the Terraform configuration. This step is mandatory.
You can select the appropriate module and press Import module. This will start an initialization of the cluster.
Cluster Settings¶
Terraform needs variables in order to build an infrastructure. This page allows you to configure them. The variables you need to configure depend on the module.
Cluster Terraform¶
This page allows you to trigger Terraform commands.
- Plan Apply: Perform terraform plan.
- Apply: Perform terraform apply.
- Plan Destroy: Perform terraform plan -destroy.
- Destroy: Perform terraform destroy.
- Refresh: Perform terraform refresh.
- Output: Perform terraform output and show the result in another window.
When a command is running. It’s possible to terminate or kill the command.
- Terminate: Send the terminate signal to the running command. Terraform will try to gracefully shut down. On the second try, terraform will immediately stop the process. It may result in loss of data
- Kill: Kill the terraform process immediately. It may result in loss of data.
Jobs¶
- This page manages the jobs in the bastion cluster. From this page, you can:
- See the status of each job.
- Start and stop the stacks and jobs.
- Go to the corresponding hashi-ui Job page.
If you wish to edit the jobs, go to the Settings page and navigate
to the Jobs section. There are job templates that are available for download
in text format with the extension of .nomad.tmpl
.
When configuring a job:
- Name
- The name of the job should match the name of the template file as well as the name of the job in the template file.
- Dependencies
- A list of services to wait on before starting the job. The default is None.
- Autostart
- Check this option if the job must automatically start on a start command without arguments.
- By cluster
- Check this option if the job must be started for each cluster, individually. The job will include the cluster’s ID in their name.
- Cluster categories
- Specify for which cluster categories the jobs must run. Only available if the By cluster option is checked.
- Template
- You can drag and drop an ASCII file to update the template. The job name must be the same as the template name for the scripts to work correctly. See Nomad Templates for more information.
Logs¶
This page shows the task logs. When the service is running, the log will refresh automatically. You can set the log level to either the default or per allocation logger log level.
If you wish to edit the logs, go to the guilabel:Settings page and navigate to the guilabel:Logs section.
When configuring a log:
- ID
- The log ID. Once the ID is created, it can’t be changed.
- File Name
- The file name. Example: stderr, stdout.
- Job
- The ID of the job. If the job is configured by cluster, the log will include the cluster’s ID in its name.
- Group
- The ID of the task group.
- Task
- The ID of the task.
- Log Level
- Check this option if the log should support dynamic log levels that change the amount of information on a log. The log level can be debug, info, warning, error, fatal, or panic.
Health¶
Display the services’ health.
The column on the left shows the services and their instances. The instances have a different color according to their health.
- Green: All the health checks are passing.
- Orange: At least one health checks is in a working state.
- Red: At least one health checks is in a critical state.
In this page you can:
- Hide the system services to focus on the important services.
- Refresh the status.
- Click on a service instance to see it’s details.
In the detail section you can see:
- The service information.
- The node on which the service is running.
- The health checks for this service.