68e5398008
* [cli] [vtctl] Migrate all vtctl commands to `pflag` Closes #11304. Signed-off-by: Andrew Mason <andrew@planetscale.com> * fix test flags Signed-off-by: Andrew Mason <andrew@planetscale.com> * Handle subflag argument parsing without fully moving to cobra (yet!) Signed-off-by: Andrew Mason <andrew@planetscale.com> * update examples Signed-off-by: Andrew Mason <andrew@planetscale.com> * strip off double-dash Signed-off-by: Andrew Mason <andrew@planetscale.com> * Fix pflag getting tripped on shard 0 bounded shard names Signed-off-by: Andrew Mason <andrew@planetscale.com> * remove commented-out code Signed-off-by: Andrew Mason <andrew@planetscale.com> * update release notes Signed-off-by: Andrew Mason <andrew@planetscale.com> * fix ExecuteHook, which takes no flags Signed-off-by: Andrew Mason <andrew@planetscale.com> * add deprecation notice around interspersal Signed-off-by: Andrew Mason <andrew@planetscale.com> * fix flags for vtctld2 web calls Signed-off-by: Andrew Mason <andrew@planetscale.com> * Run make web_build Signed-off-by: notfelineit <notfelineit@gmail.com> * test: fix vtctld_web_test Signed-off-by: deepthi <deepthi@planetscale.com> * update test assertions Signed-off-by: Andrew Mason <andrew@planetscale.com> * just double-dash everything Signed-off-by: Andrew Mason <andrew@planetscale.com> * Run make web_build Signed-off-by: notfelineit <notfelineit@gmail.com> Signed-off-by: Andrew Mason <andrew@planetscale.com> Signed-off-by: notfelineit <notfelineit@gmail.com> Signed-off-by: deepthi <deepthi@planetscale.com> Co-authored-by: notfelineit <notfelineit@gmail.com> Co-authored-by: deepthi <deepthi@planetscale.com> |
||
---|---|---|
.. | ||
app | ||
config | ||
e2e | ||
src | ||
.editorconfig | ||
.gitignore | ||
README.md | ||
angular-cli.json | ||
embed.go | ||
package-lock.json | ||
package.json | ||
proxy.conf.json | ||
tslint.json |
README.md
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.
- Install nvm using the installation guide.
- Install node (and npm):
nvm install 8.17.0
- In the shell you're using for vtctld UI development:
nvm use 8.17.0
Starting the dev server
From the root vitess/
directory:
-
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
-
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 thenpm 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.