Bastion UI

Bastion UI is a website for supervising Genvid clusters. It is a GUI for the bastion-api.

Settings page

This page is where you can change the Bastion-UI page configuration. You can also see and edit the Global Vars, Modules, and Backends.

../_images/bastion_ui.png

Global Vars

The Global Vars Settings lets you set a variable that you can use for all Terraform clusters. Add the value here and every Cluster with settings that have the same name will inherit this value by default.

../_images/bastion_ui_globalvars.PNG

Modules Section

In the Modules section, you will find the existing Terraform module repositories that you can edit or remove. Click REFRESH to update the modules in the repositories.

../_images/bastion_ui_settings_modules.png

Click + New Repository to create a new repository.

../_images/bastion_ui_settings_modules_dialogue.png
ID
The repository folder-name in all lower-case characters.
URL
The URL of the folder where the repository exists.

Backends Section

In the Backends section, you can see the list of available backend configurations. A backend configuration is composed of its unique name, a type, and a list of variables. From here you can:

  • Add, edit, or remove a backend configuration.
../_images/bastion_ui_backends.png
Name
A unique ID for the backend.
Type
A valid Terraform backend type.
Variables

The arguments for the backend type, which the user can add or remove. A variable is composed of an 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 to Terraform as an argument.
  • Protected: If the variable is shown as a password when initializing a cluster.

See also

Terraform’s Backends for documentation on Terraform backends.

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.

Terraform

Important

Please refer to Clusters in the previous versions of documentation.

This page displays all the Terraform configurations deployed. From here you can:

  • Start or stop the cluster-api.
  • Access each cluster’s specific Cluster-UI page if the cluster-api is started.
../_images/bastion_ui_clusters.png

Create a Terraform configuration

Click Add Config to open the New Config dialog.

../_images/bastion_ui_create_cluster1.png
ID
A unique ID for the cluster.
Category
This helps the user identify what the Terraform configuration does. The default is cluster.
Backend
The Terraform backend to use. The dropdown lists all available backends.
Type
The type of Terraform backend being used.
Variables
Additional variables for configuring the backend.

Import Terraform Module

Important

This step is required.

../_images/bastion_ui_cluster_module1.png

To initialize the Terraform configuration on the Commands page:

  1. Select the appropriate module.
  2. Click IMPORT MODULE.

The list by default only displays the modules that support cluster-api. Check Display all modules to see all available modules.

The selection of a module will be disabled after a module is imported. You can change or reimport a module by clicking on REIMPORT MODULE.

Terraform Commands

This page is where Terraform commands are executed after the configuration is initialized.

../_images/bastion_ui_cluster_terraform.png
Plan Apply
Perform terraform plan.
Plan Destroy
Perform terraform plan -destroy.
Refresh
Perform terraform refresh.
Output
Perform terraform output and show the result in another window.

You can terminate or kill a command while it’s running.

Terminate
Send the terminate signal to the running command. Terraform will first try to gracefully shut down. On the second try Terraform will immediately stop the process. This may result in data loss.
Kill
Kill the Terraform process immediately. This may result in data loss.

Terraform Local Settings

Terraform Settings is where you configure the variables Terraform needs to build an infrastructure. There are three types of values:

Default
Default values come from the selected Terraform module.
Global
Global values are set in Global Vars Settings. and override the default value for any variable with the same name.
Local
Local values are custom values that override both default and global values.
../_images/bastion_ui_cluster_settings1.png

The label beside each variable tells you if its value is Default, Global, or Local. Click the buttons underneath to change the associated variable to either Default or Global.

../_images/bastion_ui_terraform_setting.png

Jobs

This page is where you manage the jobs in the bastion cluster. From here you can:

  • See the status of each job.
  • Start and stop the stacks and jobs.
  • Go to the corresponding hashi-ui Job page.
../_images/bastion_ui_jobs.png

To edit the jobs:

  1. Click Settings to open the Settings page.
  2. Go to the to the Jobs section.

The Jobs Setting page shows the settings for all configured jobs. From here you can:

  • Click Download to download a job template. The template is in text format with the .nomad.tmpl extension.
  • Edit or delete job configurations.
../_images/bastion_ui_settings_job.png

Click + ADD JOB to open the Add new job dialog.

../_images/bastion_ui_settings_job_form.png
Name
The name of the job should match both the name of the template file and 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. This adds the Cluster ID to the job name.
Cluster categories
Specify which cluster categories the jobs must run for. Only available if the By cluster option is checked.
Template
Drag and drop an ASCII file here 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 available task-logs. The logs refresh automatically when the service is running. You can set the log level to either the default or per allocation level.

../_images/bastion_ui_logs.png

To edit the logs:

  1. Click Settings to open the Settings page.
  2. Go to the Logs section.
../_images/bastion_ui_settings_log.png

Click +ADD LOG to open the Add New Log dialog.

../_images/bastion_ui_settings_log_form.png
ID
A unique ID for the log. Once the ID is created, it can’t be changed.
File Name
The file name for the saved log. Example: stderr, stdout.
Job
The ID of the job being logged. If the job is configured by cluster, the log name includes the cluster ID.
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. Levels change the amount of information logged. The log level can be debug, info, warning, error, fatal, or panic.

Health

This page displays the health of all services.

../_images/tool_ui_consul_health.png

The left column shows the services and their instances. The instances have different colors according to their health.

  • Green: All the health checks are passing.
  • Orange: At least one health check is in a working state.
  • Red: At least one health check is in a critical state.

On this page you can:

  • Hide the system services to focus on the important services.
  • Refresh the status.
  • Click on a service instance to see its details.

Clicking a service will display its information in the detail section.

Information
Details about the service.
Node
The node the service is running on.
Checks
The health checks for this service.