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.

../_images/bastion_ui.png

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 the modules in the repositories.

../_images/bastion_ui_settings_modules.png

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.

../_images/bastion_ui_settings_modules_dialogue.png

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.

../_images/bastion_ui_backends.png
  • 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 it’s 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.

../_images/bastion_ui_clusters.png

Create a cluster

Pressing the Create button opens the a dialog for cluster creation.

../_images/bastion_ui_create_cluster1.png
  • 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: A backend may need extra variable to configure.

Cluster Module

This page is used to import a module in the Terraform configuration. This step is mandatory.

../_images/bastion_ui_cluster_module1.png

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.

../_images/bastion_ui_cluster_settings1.png

Cluster Terraform

This page allows you to trigger Terraform commands.

../_images/bastion_ui_cluster_terraform.png
  • 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.

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.
../_images/bastion_ui_jobs.png

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.

../_images/bastion_ui_settings_job.png

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.
  • 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.
../_images/bastion_ui_settings_job_form.png

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.

../_images/bastion_ui_logs.png

If you wish to edit the logs, go to the guilabel:Settings page and navigate to the guilabel:Logs section.

../_images/bastion_ui_settings_log.png

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.
  • 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.
../_images/bastion_ui_settings_log_form.png