Develop

This page is for contributors who want to run VIS locally, make changes, verify behavior, and keep new features consistent with the appliance.

Table of Contents

Contributing to VIS

VIS is meant to be practical infrastructure for VCF lab and proof-of-concept users, so contributions should favor reliability, clear workflows, and predictable appliance behavior over broad abstractions.

Good contributions usually follow these guidelines:

For larger changes, open the design in a draft pull request or discussion first. This is especially useful for new appliance services, storage layout changes, networking behavior, authentication flows, or anything that changes how VIS integrates with VCF.

What You Need

For local web application development:

For appliance or Packer development, also review the Build page because those workflows require Packer, OVF Tool, an Ubuntu ISO, and access to a standalone ESX build host.

Repository Layout

PathPurpose
vis/Flask application, service adapters, templates, and static UI assets
tests/Unit tests for service models, adapters, routes, and packaging expectations
docs/Markdown and generated HTML documentation
scripts/Packer provisioning and deployment helper scripts
files/Appliance setup payloads copied into the VM
vis.jsonPacker template
vis-version.jsonAppliance version, default VM sizing, disk layout, and OVF defaults
vis-builder.jsonLocal ESX build-host settings

Run the Web App Locally

Create a local virtual environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r vis/requirements.txt

Start VIS with a local SQLite database:

VIS_DB_PATH=/tmp/vis-dev.db VIS_PORT=8080 python -m vis.app

Then open:

http://localhost:8080

Use a different VIS_PORT if port 8080 is already in use. Local development does not require real system services unless you are specifically testing appliance adapters.

Run Tests

Run the full test suite:

python3 -m unittest discover

Run a focused test file:

python3 -m unittest tests.test_services

Run a single test when iterating on a specific behavior:

python3 -m unittest tests.test_services.WebAppTest.test_dns_config_route_sets_required_domain

Preview Documentation

After changing Markdown docs, regenerate the static HTML:

python3 docs/render_docs.py

Preview the docs locally:

cd docs
python3 -m http.server 8094

Then open:

http://localhost:8094/

State and Configuration

On an appliance, VIS stores application state in:

/opt/vis/state/vis.db

For local development, always set VIS_DB_PATH to a temporary path so local experiments do not touch appliance state:

VIS_DB_PATH=/tmp/vis-dev.db

Generated service configuration normally lives under /opt/vis/config, and service data normally lives under /opt/vis/data. Local development can render and test most behavior without mutating those paths.

Common Development Workflow

  1. Inspect the existing service pattern before adding a new feature.
  2. Make the smallest code and UI change that supports the requested behavior.
  3. Add or update focused tests for the service adapter, route, or rendered page.
  4. Run the focused tests first.
  5. Run the broader test suite before handing off the change.
  6. Regenerate docs when Markdown changes.
  7. If the change affects appliance behavior, make sure the Packer scripts or first-boot setup include the same behavior.

UI Conventions

These conventions keep new VIS services visually consistent with the original service pages.

Detail Page Structure

Configuration Forms

TLS

Expose using shared VIS certificate.

Binary Choices

Client Values

Service Backends

AI-Assisted Development

VIS has repository-level guidance for AI coding agents in AGENTS.md.

Before using an AI assistant to add or modify VIS features: