forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[website][upgrade]feat: website upgrade / docs migration - 2.6.3 / de…
…velopment/reference (apache#12865) * [website][upgrade]feat: website upgrade / docs migration - 2.6.3 / functions/io/sql Signed-off-by: LiLi <[email protected]> * [website][upgrade]feat: website upgrade / docs migration - 2.6.3 / helm/deployment/administration Signed-off-by: LiLi <[email protected]> * [website][upgrade]feat: website upgrade / docs migration - 2.6.3 / security/performance/clients Signed-off-by: LiLi <[email protected]> * [website][upgrade]feat: website upgrade / docs migration - 2.6.3 / admin/adaptors/cookbooks Signed-off-by: LiLi <[email protected]> * [website][upgrade]feat: website upgrade / docs migration - 2.6.3 / development/reference Signed-off-by: LiLi <[email protected]> Co-authored-by: Anonymitaet <[email protected]>
- Loading branch information
1 parent
1fa1e05
commit aa371fb
Showing
43 changed files
with
10,725 additions
and
66 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
site2/website-next/versioned_docs/version-2.6.3/administration-dashboard.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
id: administration-dashboard | ||
title: Pulsar dashboard | ||
sidebar_label: "Dashboard" | ||
original_id: administration-dashboard | ||
--- | ||
|
||
:::note | ||
|
||
Pulsar dashboard is deprecated. If you want to manage and monitor the stats of your topics, use [Pulsar Manager](administration-pulsar-manager). | ||
|
||
::: | ||
|
||
Pulsar dashboard is a web application that enables users to monitor current stats for all [topics](reference-terminology.md#topic) in tabular form. | ||
|
||
The dashboard is a data collector that polls stats from all the brokers in a Pulsar instance (across multiple clusters) and stores all the information in a [PostgreSQL](https://www.postgresql.org/) database. | ||
|
||
You can use the [Django](https://www.djangoproject.com) web app to render the collected data. | ||
|
||
## Install | ||
|
||
The easiest way to use the dashboard is to run it inside a [Docker](https://www.docker.com/products/docker) container. | ||
|
||
```shell | ||
|
||
$ SERVICE_URL=http://broker.example.com:8080/ | ||
$ docker run -p 80:80 \ | ||
-e SERVICE_URL=$SERVICE_URL \ | ||
apachepulsar/pulsar-dashboard:@pulsar:version@ | ||
|
||
``` | ||
|
||
You can find the {@inject: github:Dockerfile:/dashboard/Dockerfile} in the `dashboard` directory and build an image from scratch as well: | ||
|
||
```shell | ||
|
||
$ docker build -t apachepulsar/pulsar-dashboard dashboard | ||
|
||
``` | ||
|
||
If token authentication is enabled: | ||
> Provided token should have super-user access. | ||
```shell | ||
|
||
$ SERVICE_URL=http://broker.example.com:8080/ | ||
$ JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c | ||
$ docker run -p 80:80 \ | ||
-e SERVICE_URL=$SERVICE_URL \ | ||
-e JWT_TOKEN=$JWT_TOKEN \ | ||
apachepulsar/pulsar-dashboard | ||
|
||
``` | ||
|
||
|
||
You need to specify only one service URL for a Pulsar cluster. Internally, the collector figures out all the existing clusters and the brokers from where it needs to pull the metrics. If you connect the dashboard to Pulsar running in standalone mode, the URL is `http://<broker-ip>:8080` by default. `<broker-ip>` is the ip address or hostname of the machine running Pulsar standalone. The ip address or hostname should be accessible from the docker instance running dashboard. | ||
|
||
Once the Docker container runs, the web dashboard is accessible via `localhost` or whichever host that Docker uses. | ||
|
||
> The `SERVICE_URL` that the dashboard uses needs to be reachable from inside the Docker container | ||
If the Pulsar service runs in standalone mode in `localhost`, the `SERVICE_URL` has to | ||
be the IP of the machine. | ||
|
||
Similarly, given the Pulsar standalone advertises itself with localhost by default, you need to | ||
explicitly set the advertise address to the host IP. For example: | ||
|
||
```shell | ||
|
||
$ bin/pulsar standalone --advertised-address 1.2.3.4 | ||
|
||
``` | ||
|
||
### Known issues | ||
|
||
Currently, only Pulsar Token [authentication](security-overview.md#authentication-providers) is supported. |
579 changes: 579 additions & 0 deletions
579
site2/website-next/versioned_docs/version-2.6.3/client-libraries-cgo.md
Large diffs are not rendered by default.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
site2/website-next/versioned_docs/version-2.6.3/develop-schema.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
id: develop-schema | ||
title: Custom schema storage | ||
sidebar_label: "Custom schema storage" | ||
original_id: develop-schema | ||
--- | ||
|
||
By default, Pulsar stores data type [schemas](concepts-schema-registry) in [Apache BookKeeper](https://bookkeeper.apache.org) (which is deployed alongside Pulsar). You can, however, use another storage system if you wish. This doc walks you through creating your own schema storage implementation. | ||
|
||
In order to use a non-default (i.e. non-BookKeeper) storage system for Pulsar schemas, you need to implement two Java interfaces: [`SchemaStorage`](#schemastorage-interface) and [`SchemaStorageFactory`](#schemastoragefactory-interface). | ||
|
||
## SchemaStorage interface | ||
|
||
The `SchemaStorage` interface has the following methods: | ||
|
||
```java | ||
|
||
public interface SchemaStorage { | ||
// How schemas are updated | ||
CompletableFuture<SchemaVersion> put(String key, byte[] value, byte[] hash); | ||
|
||
// How schemas are fetched from storage | ||
CompletableFuture<StoredSchema> get(String key, SchemaVersion version); | ||
|
||
// How schemas are deleted | ||
CompletableFuture<SchemaVersion> delete(String key); | ||
|
||
// Utility method for converting a schema version byte array to a SchemaVersion object | ||
SchemaVersion versionFromBytes(byte[] version); | ||
|
||
// Startup behavior for the schema storage client | ||
void start() throws Exception; | ||
|
||
// Shutdown behavior for the schema storage client | ||
void close() throws Exception; | ||
} | ||
|
||
``` | ||
|
||
> For a full-fledged example schema storage implementation, see the [`BookKeeperSchemaStorage`](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java) class. | ||
## SchemaStorageFactory interface | ||
|
||
```java | ||
|
||
public interface SchemaStorageFactory { | ||
@NotNull | ||
SchemaStorage create(PulsarService pulsar) throws Exception; | ||
} | ||
|
||
``` | ||
|
||
> For a full-fledged example schema storage factory implementation, see the [`BookKeeperSchemaStorageFactory`](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorageFactory.java) class. | ||
## Deployment | ||
|
||
In order to use your custom schema storage implementation, you'll need to: | ||
|
||
1. Package the implementation in a [JAR](https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html) file. | ||
1. Add that jar to the `lib` folder in your Pulsar [binary or source distribution](getting-started-standalone.md#installing-pulsar). | ||
1. Change the `schemaRegistryStorageClassName` configuration in [`broker.conf`](reference-configuration.md#broker) to your custom factory class (i.e. the `SchemaStorageFactory` implementation, not the `SchemaStorage` implementation). | ||
1. Start up Pulsar. |
Oops, something went wrong.