Skip to main content

Admin

Introduction​

Admin has it's own dedicated button at the top of the tools list. It is responsible for administering the COSMOS system including installing new plugins, viewing configuration, storing secrets and changing settings.

Plugins​

The Plugins tab is where you install new plugins into the COSMOS system. Plugins can dynamically add targets, microservices, interfaces, protocols, Telemetry Viewer widgets, and entire tools into the COSMOS runtime. The following screenshot shows the Plugins tab when only the COSMOS Demo is installed:

Plugins

The plugin gem name is listed along with all the targets it contains. You can Download, Edit, Upgrade, or Delete (uninstall) the plugin using the buttons to the right. If a plugin's target has been modified, the target name turns into a link which when clicked will download the changed files. New plugins are installed by clicking the top field.

The Migrate to UV button appears in the plugin menu for any plugin that needs dependencies but has no successful per-plugin UV install. For example:

  • The plugin was installed before the UV per-plugin virtual environment feature was added (pre-7.3).
  • The plugin's uv install failed, so COSMOS fell back to the shared Python environment.
  • The plugin was installed with the OPENC3_USE_UV environment variable set to false.

Clicking this button creates an isolated UV virtual environment for the plugin and reinstalls its Python dependencies, giving it the same dependency isolation as newly installed plugins. For a failed install, this retries it, for example after you fix the pypi_url setting. If the plugin is already migrated, this is a safe no-op. This performs the same operation as the cli migratetouv command.

Targets​

The Targets tab shows all the targets installed and what plugin they came from. Clicking the eyeball shows the raw JSON that makes up the target configuration.

Targets

Interfaces​

The Interfaces tab shows all the interfaces installed. Clicking the eyeball shows the raw JSON that makes up the interface configuration.

Interfaces

Routers​

The Routers tab shows all the routers installed. Clicking the eyeball shows the raw JSON that makes up the router configuration.

Routers

Microservices​

The Microservices tab shows all the microservices installed, their update time, state, and count. Clicking the eyeball shows the raw JSON that makes up the microservice configuration.

Microservices that run as threads in another microservice's process, such as a target's decom and logging microservices in its MULTI microservice, are listed under that microservice. The shared processes of a MICROSERVICE_GROUP are listed under a header for the group. Click the arrow next to a microservice or group to collapse or expand what's under it.

Microservices

Packages​

The Packages tab shows all the Ruby gems and Python packages installed in the system. You can also install packages from this tab if you're in an offline (air gapped) environment where COSMOS can't pull dependencies from Rubygems or Pypi.

The Python packages section is organized into the following subsections:

  • Cached — Python wheels available in the UV download cache. This includes system packages (copied from the COSMOS Docker image every time the init container starts, which adds only wheels the cache does not already have) plus any packages downloaded during plugin installs. This section shows what's available for installation without network access, which is useful for planning plugin installs in airgapped environments. Uploaded .whl files are listed here too, but plugin installs do not use them: an upload installs right away into the plugin venv you select in the upload dialog, or into the shared folder when the dialog does not appear. To install a plugin's dependencies without network access, build the plugin with offline_install or set pypi_url to a reachable PyPI mirror.

  • Plugin venvs — Lists each installed plugin's isolated virtual environment and the packages installed in it. Each plugin gets its own venv at /gems/plugin_venvs/<SCOPE>__<plugin name>/.venv (see how the folder is named), so different plugins can use different versions of the same package without conflicts.

  • Shared — Packages in the shared /gems/python_packages folder, which is on the PYTHONPATH of scripts and plugin microservices. This section appears only when that folder has packages. They come from:

    • plugins installed before the UV per-plugin virtual environment feature was added;
    • plugins whose uv install failed and fell back to the shared folder (see plugin Python dependencies);
    • wheels installed with cli pkginstall or the package_install script method, which always install here.

    Use the Migrate to UV button on the Plugins tab to move a plugin's dependencies into its own virtual environment.

Packages

Expanding the Cached section shows all the Python wheels available in the UV download cache. The number in parentheses indicates the total count of cached packages:

Cached Packages Expanded

Each plugin has its own isolated virtual environment. Expanding a plugin section shows the packages installed in that plugin's venv. In this example, the demo plugin has only its direct dependency (numpy) installed:

Plugin with numpy

You can install additional packages into a plugin's venv from the Packages tab. After installing a package like requests, the plugin's venv shows the new package along with its transitive dependencies. Each package has a delete button to remove it from the venv:

Plugin with requests added

Expanding the plugin venv further shows the full list of installed packages with their versions:

Plugin venv expanded

When multiple plugins install different versions of the same package, the Cached section lists all versions. This is expected — each plugin's venv is isolated, so different plugins can use different versions without conflicts:

Multiple versions in cache

Python Venv Lifecycle​

  • A plugin's venv folder, /gems/plugin_venvs/<SCOPE>__<plugin name>, holds the .venv. For a plugin that ships a uv.lock, it also holds a copy of the plugin's pyproject.toml and uv.lock.
  • COSMOS writes a .uv_managed marker file into that folder when the uv install succeeds. Script Runner's Python Venv selector lists only venvs that have the marker, and the Migrate to UV button appears for plugins that lack it.
  • Uninstalling a plugin deletes its whole venv folder, including any packages you added to it on this tab.
  • Nothing removes wheels from the UV cache (/gems/uv). The Cached section keeps listing a wheel after the plugin that downloaded it is uninstalled.

Tools​

The Tools tab lists all the tools installed. You can reorder the tools in the Navigation bar by dragging and dropping the left side grab handle.

Tools

You can also add links to existing tools in the navigation bar by using the Add button. Any material design icons can be used as the Tool icon.

Add Tool

Redis​

The Redis tab allows you to interact directly with the underlying Redis database, making it easy to modify or delete data. THIS IS DANGEROUS, and should only be performed by COSMOS developers.

Commands run as the openc3 Redis user which does not have full admin permissions and thus some commands are not allowed. For example, use SCAN instead of KEYS.

In COSMOS Enterprise, the Redis tab and the TSDB query tab need the superadmin permission (the ALLSCOPES__admin role), since they can read and change data for every scope. The admin role of a single scope can't use them.

Redis

Secrets​

The Secrets tab allows you to create secrets that can be used by Interfaces or Microservices using the SECRET keyword. Secrets require setting the Secret Name and then can be set to an individual value using the Secret Value, or to the contents of a file (like a certificate file) using the file selector. In the following example the USERNAME and PASSWORD were set to values while CA_FILE was set using an uploaded certificate file.

Secrets

See the Secrets guide for the full picture: the REST API equivalents, rotation, Kubernetes deployments (where this tab is not used and secrets come from Kubernetes Secrets instead), and integrating external managers like HashiCorp Vault.

Settings​

The Settings tab contains various settings used throughout COSMOS. These including clearing saved tool configuration, hiding the Astro Clock, changing the system time zone, adding a top and bottom banner, creating a subtitle in the navigation bar, changing the theme, and changing the URLs of the various package libraries.

Settings1 Settings2

Most settings on this tab can also be configured at deploy time with an OPENC3_SETTING_<NAME> environment variable, so a fresh install comes up already configured instead of requiring a pass through this tab. A setting changed here is then left alone on restart. See cli initsettings for the list of settings that can be seeded, and Docker Compose for where the variables go.

The exceptions are the controls stored in your browser's local storage rather than server-side, which are per-browser and cannot be set from the environment: Suppressed Warnings, Default Configs, and the Vim mode and default scripting language on the Code Editor Settings card. The Script File Locking and Script Lifecycle switches on that same card are server-side and can be seeded.

Theme​

COSMOS includes several built-in color themes that change the look and feel of the entire application. To change the theme, select one from the Theme dropdown and click Save. Refresh the page to see the changes.

Themes

The available themes are:

ThemeDescription
Astro (Default)Standard Astro dark theme with blue accents
Dark CobaltNeutral grey with cobalt blue accent
Dark IndigoCool grey with indigo/purple accent
Dark SlateBlue-grey with teal/cyan accent
Dark EmeraldNeutral grey with emerald green accent

The selected theme is a system-wide setting that applies to all users. After saving, each user must refresh their browser to see the updated theme.

PyPI URL​

The Pypi URL setting (pypi_url) is the package index COSMOS uses to install plugin Python dependencies. Enter the base URL of the index, without /simple, such as https://pypi.org or https://mirror.example.com/pypi. COSMOS adds /simple itself, so https://pypi.org/simple would become https://pypi.org/simple/simple. When the setting does not exist yet, COSMOS seeds it from the PYPI_URL environment variable, or https://pypi.org when that is not set. A value that is not an http or https URL is ignored, and COSMOS logs an error and uses https://pypi.org/simple instead.

Roles (Enterprise)​

The Roles tab allows users to create custom roles for role-based access control (RBAC). Roles define permissions and access levels throughout the COSMOS system. For more details, visit Roles and Permissions.

Roles

Scopes (Enterprise)​

The Scopes tab allows users to create scopes which define data boundaries between separate environments. This enables a single COSMOS deployment to manage multiple environments with isolated data (e.g., separate constellations). Scopes can be added using the top dialog, and scope configurations can be managed here. Users can toggle between their scopes from the top-right scopes dropdown. Command Authority and Critical Commanding can also be configured per scope from this tab.

Scopes

Disabling a Scope​

Scopes that are only needed occasionally can be disabled to free the resources their microservices use. Turn off the Enabled switch and click Update Scope. COSMOS stops every microservice in the scope, including interfaces, routers, decom, logging, and plugin microservices. The scope's plugins, configuration, and logged data are kept, and the scope stays disabled across restarts until it is enabled again. Enabling the scope starts its microservices again, except ones that were individually stopped from the Microservices tab. Microservices in a disabled scope can't be started from the Microservices tab. The DEFAULT scope can't be disabled because it runs microservices used by every scope.