Skip to content

How to Build Distros of Dashboard

Suhaha edited this page Sep 3, 2021 · 5 revisions
  1. Prepare distro resources
/distro_resource
|- distro_info.go      // Required. All distribution texts
|- favicon.ico         // Browser tab icon
|- landing.svg         // Landing pic on the signin page
|- logo-icon-light.svg // Logo on the top of sidebar
|- logo.svg            // Logo on the signin page

distro_info.go

package distro

var Resource = map[string]string{
	"tidb":    "TiDB",
	"tikv":    "TiKV",
	"tiflash": "TiFlash",
	"pd":      "PD",
}
  1. Replace distro resources
cd tidb-dashboard
DISTRIBUTION_DIR=path/to/distro_resource scripts/replace_distro_resource.sh
  1. Dev & Build

Dev

# server
DISTRO_BUILD_TAG=1 make server
make run

# ui
cd ui
yarn
DISTRO_BUILD_TAG=1 yarn start

Build

DISTRO_BUILD_TAG=1 make server
DISTRO_BUILD_TAG=1 make ui