1.11.0 • Published 9 months ago

@janus-idp/backstage-plugin-web-terminal v1.11.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

Web Terminal plugin for Backstage

This plugin provides a frontend for webterminal proxy and shows a terminal for catalog entities with an Kubernetes API-Server annotation (kubernetes.io/api-server).

Users first enter their user token from the cluster, and then the plugin setups environment. Once it is set up, it connects to webterminal-proxy, which finishes setups and passes data between the frontend plugin and pod.

This plugin uses xterm.js to simulate a regular terminal.

Prerequisites

Before we can install this plugin, we need to fulfill the following requirements:

  1. Installed Web Terminal operator
  2. Deployed webterminal-proxy

Installation

  1. Install the Web Terminal plugin using the following command:

    yarn workspace app add @janus-idp/backstage-plugin-web-terminal
  2. Enable an additional tab on the entity view page using the packages/app/src/components/catalog/EntityPage.tsx file as follows:

    /* highlight-add-start */
    import {
      isWebTerminalAvailable,
      WebTerminal,
    } from '@janus-idp/backstage-plugin-web-terminal';
    
    /* highlight-add-end */
    
    const serviceEntityPage = (
      <EntityLayout>
        // ...
        {/* highlight-add-start */}
        <EntityLayout.Route
          if={isWebTerminalAvailable}
          path="/webterminal"
          title="Web Terminal"
        >
          <WebTerminal />
        </EntityLayout.Route>
        {/* highlight-add-end */}
      </EntityLayout>
    );
  3. Alternative you can add the WebTerminal to an existing page:

    /* highlight-add-start */
    import {
      isWebTerminalAvailable,
      WebTerminal,
    } from '@janus-idp/backstage-plugin-web-terminal';
    
    /* highlight-add-end */
    
    <Grid container spacing={3}>
      {/* highlight-add-start */}
      <EntitySwitch>
        <EntitySwitch.Case if={isWebTerminalAvailable}>
          <Grid item md={6}>
            <WebTerminal />
          </Grid>
        </EntitySwitch.Case>
      </EntitySwitch>
      {/* highlight-add-end */}
    </Grid>;
  4. Annotate your entity using the following annotations:

    metadata:
      annotations:
        'kubernetes.io/api-server': `<CLUSTER-URL>',

Configuration

You have to define the location of the webterminal-proxy in app-config.yaml:

webTerminal:
  webSocketUrl: 'wss://example.com:3000/webterminal'
  restServerUrl: 'https://example.com:3000/webterminal/rest'

Optionally, you can also define the default namespace for the terminal; otherwise, openshift-terminal will be used:

webTerminal:
  webSocketUrl: 'wss://example.com:3000/webterminal'
  restServerUrl: 'https://example.com:3000/webterminal/rest'
  defaultNamespace: 'default'
1.11.0

9 months ago

1.10.1

9 months ago

1.10.0

10 months ago

1.9.5

10 months ago

1.9.4

10 months ago

1.9.3

10 months ago

1.9.2

10 months ago

1.9.1

10 months ago

1.9.0

11 months ago

1.8.3

11 months ago

1.8.2

12 months ago

1.8.1

12 months ago

1.8.0

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.9

1 year ago

1.5.8

1 year ago

1.5.7

1 year ago

1.5.6

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.7.0

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.11

1 year ago

1.3.12

1 year ago

1.3.10

1 year ago

1.3.9

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.0.3

2 years ago

1.2.9

2 years ago

1.2.10

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago