Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Edits developer docs layout #15

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/developer/getting-started/building-kibana.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[building-kibana]]
=== Building a {kib} distributable
== Building a {kib} distributable

The following commands will build a {kib} production distributable.

Expand All @@ -15,8 +15,9 @@ You can get all build options using the following command:
yarn build --help
----

[float]
==== Building OS packages
[discrete]
[[building-kibana-os]]
=== Building OS packages

Packages are built using fpm, dpkg, and rpm. Package building has only been tested on Linux and is not supported on any other platform.

Expand Down
12 changes: 7 additions & 5 deletions docs/developer/getting-started/debugging.asciidoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[[kibana-debugging]]
=== Debugging {kib}
== Debugging {kib}

* <<debugging-unit-tests>>

[float]
==== Server Code
[discrete]
[[kibana-debugging-server]]
=== Server code

`yarn debug` will start the server with Node's inspect flag. {kib}'s development mode will start three processes on ports `9229`, `9230`, and `9231`. Chrome's developer tools need to be configured to connect to all three connections. Add `localhost:<port>` for each {kib} process in Chrome's developer tools connection tab.

[float]
==== Instrumenting with Elastic APM
[discrete]
[[kibana-debugging-apm]]
=== Instrumenting with Elastic APM

{kib} ships with the
https://github.com/elastic/apm-agent-nodejs[Elastic APM Node.js Agent]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[[development-plugin-resources]]
=== Plugin Resources
== Plugin resources

Here are some resources that are helpful for getting started with plugin development.

[float]
==== Some light reading
[discrete]
[[development-plugin-resources-light]]
=== Some light reading

If you haven't already, start with <<development-getting-started>>. If you are planning to add your plugin to the {kib} repo, read the <<contributing>> guide, if you are building a plugin externally, read <<external-plugin-development>>. In both cases, read up on our recommended <<development-best-practices>>.

[float]
==== Creating an empty plugin
[discrete]
[[development-empty-plugin]]
=== Creating an empty plugin

You can use the <<automatic-plugin-generator>> to get a basic structure for a new plugin. Plugins that are not part of the
{kib} repo should be developed inside the `plugins` folder. If you are building a new plugin to check in to the {kib} repo,
Expand All @@ -18,15 +21,19 @@ you will choose between a few locations:
- {kib-repo}tree/{branch}/src/plugins[src/plugins] for open source licensed plugins
- {kib-repo}tree/{branch}/examples[examples] for developer example plugins (these will not be included in the distributables)

[float]
==== Elastic UI Framework
[discrete]
[[development-plugin-resources-ui-framework]]
=== Elastic UI Framework

If you're developing a plugin that has a user interface, take a look at our https://elastic.github.io/eui[Elastic UI Framework].
It documents the CSS and React components we use to build {kib}'s user interface.

You're welcome to use these components, but be aware that they are rapidly evolving, and we might introduce breaking changes that will disrupt your plugin's UI.

[float]
==== TypeScript Support
[discrete]
[[development-plugin-resources-typescript]]
=== TypeScript support

We recommend your plugin code is written in http://www.typescriptlang.org/[TypeScript].
To enable TypeScript support, create a `tsconfig.json` file at the root of your plugin that looks something like this:

Expand All @@ -48,14 +55,16 @@ TypeScript code is automatically converted into JavaScript during development,
but not in the distributable version of {kib}. If you use the
{kib-repo}blob/{branch}/packages/kbn-plugin-helpers[@kbn/plugin-helpers] to build your plugin, then your `.ts` and `.tsx` files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of {kib}.

[float]
==== {kib} platform migration guide
[discrete]
[[development-plugin-resources-platform-migration]]
=== {kib} platform migration guide

{kib-repo}blob/{branch}/src/core/MIGRATION.md#migrating-legacy-plugins-to-the-new-platform[This guide]
provides an action plan for moving a legacy plugin to the new platform.

[float]
==== Externally developed plugins
[discrete]
[[development-plugin-resources-external]]
=== Externally developed plugins

If you are building a plugin outside of the {kib} repo, read <<external-plugin-development>>.

34 changes: 14 additions & 20 deletions docs/developer/getting-started/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Get started building your own plugins, or contributing directly to the {kib} repo.

[float]
[discrete]
[[get-kibana-code]]
=== Get the code

Expand All @@ -15,7 +15,8 @@ git clone https://github.com/[YOUR_USERNAME]/kibana.git kibana
cd kibana
----

[float]
[discrete]
[[development-getting-started-dependencies]]
=== Install dependencies

Install the version of Node.js listed in the `.node-version` file. This
Expand Down Expand Up @@ -67,11 +68,12 @@ corrupted packages in your yarn cache which you can clean with;
yarn cache clean
----

[float]
[discrete]
[[development-getting-started-env-settings]]
=== Configure environmental settings

[discrete]
[[increase-nodejs-heap-size]]
[float]
==== Increase node.js heap size

{kib} is a big project and for some commands it can happen that the
Expand All @@ -81,7 +83,8 @@ 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"`.

[float]
[discrete]
[[development-getting-started-elasticsearch]]
=== Run Elasticsearch

Run the latest Elasticsearch snapshot. Specify an optional license with the `--license` flag.
Expand All @@ -96,7 +99,8 @@ yarn es snapshot --license trial
Read about more options for <<running-elasticsearch>>, like connecting to a remote host, running from source,
preserving data inbetween runs, running remote cluster, etc.

[float]
[discrete]
[[development-getting-started-kibana]]
=== Run {kib}

In another terminal window, start up {kib}. Include developer examples by adding an optional `--run-examples` flag.
Expand All @@ -110,13 +114,15 @@ View all available options by running `yarn start --help`

Read about more advanced options for <<running-kibana-advanced>>.

[float]
[discrete]
[[development-getting-started-next-steps]]
=== Code away!

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.

[float]
[discrete]
[[development-getting-started-links]]
=== More information

* <<running-kibana-advanced>>
Expand All @@ -130,15 +136,3 @@ cause the {kib} server to reboot.
* <<building-kibana>>

* <<development-plugin-resources>>

include::running-kibana-advanced.asciidoc[]

include::sample-data.asciidoc[]

include::debugging.asciidoc[]

include::sass.asciidoc[]

include::building-kibana.asciidoc[]

include::development-plugin-resources.asciidoc[]
22 changes: 13 additions & 9 deletions docs/developer/getting-started/running-kibana-advanced.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[running-kibana-advanced]]
=== Running {kib}
== Running {kib}

Change to your local {kib} directory. Start the development server.

Expand All @@ -24,6 +24,7 @@ By default, you can log in with username `elastic` and password
you’d like to configure a different password.

[float]
[[running-kibana-open]]
==== Running {kib} in Open-Source mode

If you’re looking to only work with the open-source software, supply the
Expand All @@ -41,8 +42,9 @@ And start {kib} with only open-source code:
yarn start --oss
----

[float]
==== Unsupported URL Type
[discrete]
[[running-kibana-unsupported-url]]
=== Unsupported URL Type

If you’re installing dependencies and seeing an error that looks
something like
Expand All @@ -56,9 +58,9 @@ need to run `yarn kbn bootstrap`. For more info, see
link:#setting-up-your-development-environment[Setting Up Your
Development Environment] above.

[float]
[discrete]
[[customize-kibana-yml]]
==== Customizing `config/kibana.dev.yml`
=== Customizing `config/kibana.dev.yml`

The `config/kibana.yml` file stores user configuration directives.
Since this file is checked into source control, however, developer
Expand All @@ -70,17 +72,19 @@ non-dev version and accepts any of the
https://www.elastic.co/guide/en/kibana/current/settings.html[standard
settings].

[float]
==== Potential Optimization Pitfalls
[discrete]
[[running-kibana-pitfalls]]
=== Potential optimization pitfalls

* Webpack is trying to include a file in the bundle that I deleted and
is now complaining about it is missing
* A module id that used to resolve to a single file now resolves to a
directory, but webpack isn’t adapting
* (if you discover other scenarios, please send a PR!)

[float]
==== Setting Up SSL
[discrete]
[[running-kibana-ssl]]
=== Setting up SSL

{kib} includes self-signed certificates that can be used for
development purposes in the browser and for communicating with
Expand Down
17 changes: 10 additions & 7 deletions docs/developer/getting-started/sample-data.asciidoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
[[sample-data]]
=== Installing sample data
== Installing sample data

There are a couple ways to easily get data ingested into Elasticsearch.

[float]
==== Sample data packages available for one click installation
[discrete]
[[sample-data-packages]]
=== Sample data packages available for one click installation

The easiest is to install one or more of our vailable sample data packages. If you have no data, you should be
prompted to install when running {kib} for the first time. You can also access and install the sample data packages
by going to the home page and clicking "add sample data".

[float]
==== makelogs script
[discrete]
[[sample-data-makelogs]]
=== makelogs script

The provided `makelogs` script will generate sample data.

Expand All @@ -24,8 +26,9 @@ The default username and password combination are `elastic:changeme`

Make sure to execute `node scripts/makelogs` *after* elasticsearch is up and running!

[float]
==== CSV upload
[discrete]
[[sample-data-csv]]
=== CSV upload

If running with a platinum or trial license, you can also use the CSV uploader provided inside the Machine learning app.
Navigate to the Data visualizer to upload your data from a file.
2 changes: 1 addition & 1 deletion docs/developer/getting-started/sass.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[kibana-sass]]
=== Styling with SASS
== Styling with SASS

When writing a new component, create a sibling SASS file of the same
name and import directly into the JS/TS component file. Doing so ensures
Expand Down
7 changes: 7 additions & 0 deletions docs/developer/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ running in no time. If you have any problems, file an issue in the https://githu

include::getting-started/index.asciidoc[]

include::running-kibana-advanced.asciidoc[leveloffset=+1]
include::sample-data.asciidoc[leveloffset=+1]
include::debugging.asciidoc[leveloffset=+1]
include::sass.asciidoc[leveloffset=+1]
include::building-kibana.asciidoc[leveloffset=+1]
include::development-plugin-resources.asciidoc[leveloffset=+1]

include::best-practices/index.asciidoc[]

include::architecture/index.asciidoc[]
Expand Down