Get started building your own plugins, or contributing directly to the {kib} repo.
In order to support Windows development we currently require you to use one of the following:
As well as installing Visual C++ Redistributable for Visual Studio 2015.
In addition we also require you to do the following:
-
Enable the Windows Developer Mode
-
Enable 8.3 filename support by running the following command in a windows command prompt with admin rights
fsutil 8dot3name set 0
Before running the steps listed below, please make sure you have installed everything that we require and listed above and that you are running all the commands from now on through Git bash or WSL.
git clone https://github.com/[YOUR_USERNAME]/kibana.git kibana
cd kibanaInstall the version of Node.js listed in the .node-version file. This
can be automated with tools such as
nvm,
nvm-windows or
avn. As we also include a .nvmrc file
you can switch to the correct version when using nvm by running:
nvm useInstall the latest version of yarn v1.
Bootstrap {kib} and install all the dependencies:
yarn kbn bootstrapNode.js native modules could be in use and node-gyp is the tool used to build them. There are tools you need to install per platform and python versions you need to be using. Please see https://github.com/nodejs/node-gyp#installation and follow the guide according your platform.
In case you don’t have an internet connection, the yarn kbn bootstrap command will
fail. As it is likely you have the required node_modules in the
offline mirror, you can try to run the step in offline mode by using:
yarn kbn bootstrap --offlineIn any other circumstance where you want to force the node_modules install step you can use:
yarn kbn bootstrap --force-install(You can also run yarn kbn to see the other available commands. For
more info about this tool, see
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}/packages/kbn-pm]. If you want more
information about how to actively develop over packages please read [monorepo-packages])
When switching branches which use different versions of npm packages you may need to run:
yarn kbn clean|
Note
|
Running this command is only necessary in rare circumstance where you need to recover a consistent state when problems arise. If you need to run this command often, complete this form to provide feedback: https://ela.st/yarn-kbn-clean |
If you have failures during yarn kbn bootstrap you may have some
corrupted packages in your yarn cache which you can clean with:
yarn cache clean{kib} is a big project and for some commands it can happen that the
process hits the default heap limit and crashes with an out-of-memory
error. If you run into this problem, you can increase maximum heap size
by setting the --max_old_space_size option on the command line. To set
the limit for all commands, simply add the following line to your shell
config: export NODE_OPTIONS="--max_old_space_size=2048".
Run the latest {es} snapshot. Specify an optional license with the --license flag.
yarn es snapshot --license trialtrial will give you access to all capabilities.
Read about more options for [running-elasticsearch], like connecting to a remote host, running from source, preserving data inbetween runs, running remote cluster, etc.
In another terminal window, start up {kib}. Include {kib-repo}tree/{branch}/examples[developer examples] by adding an optional --run-examples flag.
yarn start --run-examplesView all available options by running yarn start --help
Read about more advanced options for [running-kibana-advanced].
In case you want to run a couple of checks like linting or check the file casing of the files to commit, we provide a way to install a pre-commit hook. To configure it you just need to run the following:
node scripts/register_git_hookAfter the script completes the pre-commit hook will be created within the file .git/hooks/pre-commit.
If you choose to not install it, don’t worry, we still run a quick ci check to provide feedback earliest as we can about the same checks.
You are now ready to start developing. Changes to your files should be picked up automatically. Server side changes will cause the {kib} server to reboot.