vtctld2

package
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

Vitess Control Panel

This project was generated with angular-cli version 1.0.0-beta.11-webpack.2.

Local development

⚠️ Warning! This project relies on very out-of-date node dependencies, many with significant security vulnerabilities. Install at your own risk.

Prerequisites

You will need (very old!) installations of npm and node to run the front-end dev server. To check your versions:

node -v # v8.17.0 required
npm -v # 6.13.4 required

Using a node version manager like nvm is strongly recommended, as the versions required by this project are several years out of date.

  1. Install nvm using the installation guide.
  2. Install node (and npm): nvm install 8.17.0
  3. In the shell you're using for vtctld UI development: nvm use 8.17.0
Starting the dev server

From the root vitess/ directory:

  1. Run Vitess locally using Docker and start a vtctld API on http://localhost:15000/. For more on this, see the guide on Local Installation via Docker.

    source dev.env
    make docker_local && ./docker/local/run.sh
    
  2. Start a local Angular server on http://localhost:4200. The UI will automatically refresh every time you save a change. Note that you will probably see build errors and security warnings during the npm install step; this is, unfortunately, to be expected due to out-of-date dependencies. :)

    make web_start
    

Note: the local docker install will also start a vtctld admin UI on http://localhost:15000/app. This instance will use the statically embedded files, and will not reflect any changes you make unless you run make web_build.

Building for production

In production, the vtctld UI is hosted with go embed. All front-end assets must be built, minified, and embedded in the executable.

If you're ready to open a pull request for your changes, or if you want to do a production build just for fun... :)

make web_build

This will regenerate a bunch of files in the web/vtctld2/app/ directory. Make sure you commit these generated files to your branch when opening your pull request.

To then verify your changes using the built files:

  • Rebuild the vtctld with make build
  • Run Vitess locally following the Local Install guide
  • Verify your changes on http://localhost:15000/app

Troubleshooting

If you run into issues or have questions, we recommend posting in our Slack channel. Click the Slack icon in the top right to join.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Content embed.FS

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL