Anonymitaet commented on a change in pull request #13665:
URL: https://github.com/apache/pulsar/pull/13665#discussion_r815558539



##########
File path: site2/docs/administration-pulsar-manager.md
##########
@@ -114,69 +68,116 @@ or
 jwt.broker.token.mode=SECRET
 jwt.broker.secret.key=file:///path/broker-secret.key
 ```
+•      `backend.jwt.token`: token for the superuser. You need to configure 
this parameter during cluster initialization.   
+•      `jwt.broker.token.mode`: multiple modes of generating token, including 
PUBLIC, PRIVATE, and SECRET.  
+•      `jwt.broker.public.key`: configure this option if you use the PUBLIC 
mode.  
+•      `jwt.broker.private.key`: configure this option if you use the PRIVATE 
mode.  
+•      `jwt.broker.secret.key`: configure this option if you use the SECRET 
mode.  
+For more information, see [Token Authentication Admin of 
Pulsar](https://pulsar.apache.org/docs/en/security-token-admin/). 
 
-* Method 3: use Docker and enable token authentication.
+Docker command to add profile and key files mount.
 
-```
-export JWT_TOKEN="your-token"
-docker run -it -p 9527:9527 -p 7750:7750 -e REDIRECT_HOST=http://localhost -e 
REDIRECT_PORT=9527 -e DRIVER_CLASS_NAME=org.postgresql.Driver -e 
URL='jdbc:postgresql://127.0.0.1:5432/pulsar_manager' -e USERNAME=pulsar -e 
PASSWORD=pulsar -e LOG_LEVEL=DEBUG -e JWT_TOKEN=$JWT_TOKEN -v $PWD:/data 
apachepulsar/pulsar-manager:v0.2.0 /bin/sh
+```bash
+docker pull apachepulsar/pulsar-manager:v0.2.0
+docker run -it \
+    -p 9527:9527 -p 7750:7750 \
+    -v /your-path/application.properties:/pulsar-manager/pulsar-
+manager/application.properties
+    -v /your-path/private.key:/pulsar-manager/private.key
+    -e 
SPRING_CONFIGURATION_FILE=/pulsar-manager/pulsar-manager/application.properties 
\
+    apachepulsar/pulsar-manager:v0.2.0
 ```
 
-* `JWT_TOKEN`: the token of superuser configured for the broker. It is 
generated by the  `bin/pulsar tokens create --secret-key` or `bin/pulsar tokens 
create --private-key` command.
-* `REDIRECT_HOST`: the IP address of the front-end server.
-* `REDIRECT_PORT`: the port of the front-end server.
-* `DRIVER_CLASS_NAME`: the driver class name of the PostgreSQL database.
-* `URL`: the JDBC URL of your PostgreSQL database, such as 
jdbc:postgresql://127.0.0.1:5432/pulsar_manager. The docker image automatically 
start a local instance of the PostgreSQL database.
-* `USERNAME`: the username of PostgreSQL.
-* `PASSWORD`: the password of PostgreSQL.
-* `LOG_LEVEL`: the level of log.
 
-* Method 4: use Docker and turn on **token authentication** and **token 
management** by private key and public key.
+### Set the administrator account and password  
 
+```bash
+CSRF_TOKEN=$(curl http://localhost:7750/pulsar-manager/csrf-token)
+curl \
+   -H 'X-XSRF-TOKEN: $CSRF_TOKEN' \
+   -H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \
+   -H "Content-Type: application/json" \
+   -X PUT http://localhost:7750/pulsar-manager/users/superuser \
+   -d '{"name": "admin", "password": "apachepulsar", "description": "test", 
"email": "[email protected]"}'
 ```
-export JWT_TOKEN="your-token"
-export PRIVATE_KEY="file:///pulsar-manager/secret/my-private.key"
-export PUBLIC_KEY="file:///pulsar-manager/secret/my-public.key"
-docker run -it -p 9527:9527 -p 7750:7750 -e REDIRECT_HOST=http://localhost -e 
REDIRECT_PORT=9527 -e DRIVER_CLASS_NAME=org.postgresql.Driver -e 
URL='jdbc:postgresql://127.0.0.1:5432/pulsar_manager' -e USERNAME=pulsar -e 
PASSWORD=pulsar -e LOG_LEVEL=DEBUG -e JWT_TOKEN=$JWT_TOKEN -e 
PRIVATE_KEY=$PRIVATE_KEY -e PUBLIC_KEY=$PUBLIC_KEY -v $PWD:/data -v 
$PWD/secret:/pulsar-manager/secret apachepulsar/pulsar-manager:v0.2.0 /bin/sh
+The request parameter in curl command:
+```json
+{"name": "admin", "password": "apachepulsar", "description": "test", "email": 
"[email protected]"}
 ```
+- `name` is the Pulsar Manager login username, currently `admin`. 
+- `password` is the password of the current user of Pulsar Manager, currently 
`apachepulsar`. The password should be more than or equal to 6 digits.
 
-* `JWT_TOKEN`: the token of superuser configured for the broker. It is 
generated by the `bin/pulsar tokens create --private-key` command.
-* `PRIVATE_KEY`: private key path mounted in container, generated by 
`bin/pulsar tokens create-key-pair` command.
-* `PUBLIC_KEY`: public key path mounted in container, generated by `bin/pulsar 
tokens create-key-pair` command.
-* `$PWD/secret`: the folder where the private key and public key generated by 
the `bin/pulsar tokens create-key-pair` command are placed locally
-* `REDIRECT_HOST`: the IP address of the front-end server.
-* `REDIRECT_PORT`: the port of the front-end server.
-* `DRIVER_CLASS_NAME`: the driver class name of the PostgreSQL database.
-* `URL`: the JDBC URL of your PostgreSQL database, such as 
jdbc:postgresql://127.0.0.1:5432/pulsar_manager. The docker image automatically 
start a local instance of the PostgreSQL database.
-* `USERNAME`: the username of PostgreSQL.
-* `PASSWORD`: the password of PostgreSQL.
-* `LOG_LEVEL`: the level of log.
 
-* Method 5: use Docker and turn on **token authentication** and **token 
management** by secret key.
 
+### Configure the environment  
+  1. Login to the system, Visit http://localhost:9527 to login.  The current 
default account is  `admin/apachepulsar`
 
-```
-export JWT_TOKEN="your-token"
-export SECRET_KEY="file:///pulsar-manager/secret/my-secret.key"
-docker run -it -p 9527:9527 -p 7750:7750 -e REDIRECT_HOST=http://localhost -e 
REDIRECT_PORT=9527 -e DRIVER_CLASS_NAME=org.postgresql.Driver -e 
URL='jdbc:postgresql://127.0.0.1:5432/pulsar_manager' -e USERNAME=pulsar -e 
PASSWORD=pulsar -e LOG_LEVEL=DEBUG -e JWT_TOKEN=$JWT_TOKEN -e 
SECRET_KEY=$SECRET_KEY -v $PWD:/data -v $PWD/secret:/pulsar-manager/secret 
apachepulsar/pulsar-manager:v0.2.0 /bin/sh
-```
+  2. Click "New Environment" button to add an environment.
 
-* `JWT_TOKEN`: the token of superuser configured for the broker. It is 
generated by the `bin/pulsar tokens create --secret-key` command.
-* `SECRET_KEY`: secret key path mounted in container, generated by `bin/pulsar 
tokens create-secret-key` command.
-* `$PWD/secret`: the folder where the secret key generated by the `bin/pulsar 
tokens create-secret-key` command are placed locally
-* `REDIRECT_HOST`: the IP address of the front-end server.
-* `REDIRECT_PORT`: the port of the front-end server.
-* `DRIVER_CLASS_NAME`: the driver class name of the PostgreSQL database.
-* `URL`: the JDBC URL of your PostgreSQL database, such as 
jdbc:postgresql://127.0.0.1:5432/pulsar_manager. The docker image automatically 
start a local instance of the PostgreSQL database.
-* `USERNAME`: the username of PostgreSQL.
-* `PASSWORD`: the password of PostgreSQL.
-* `LOG_LEVEL`: the level of log.
+  3. Input the "Environment Name". The environment name is used for 
identifying an environment.
 
-* For more information about backend configurations, see 
[here](https://github.com/apache/pulsar-manager/blob/master/src/README.md).
-* For more information about frontend configurations, see 
[here](https://github.com/apache/pulsar-manager/tree/master/front-end).
+  4. Input the "Service URL". The Service URL is the admin service url of your 
Pulsar cluster.
+
+
+## Other Installation  
+  ### Bare-metal installation
+
+When using binary packages for direct deployment, you can follow these steps.
+
+- Download and unzip the binary package, which is available on the [Pulsar 
Download](https://pulsar.apache.org/en/download/) page.
+
+  ```bash
+       wget 
https://dist.apache.org/repos/dist/release/pulsar/pulsar-manager/apache-pulsar-manager-0.2.0/apache-pulsar-manager-0.2.0-bin.tar.gz
+       tar -zxvf apache-pulsar-manager-0.2.0-bin.tar.gz
+  ```
+- Extract the back-end service binary package and place the front-end 
resources in the back-end service directory.
 
-## Log in
+  ```bash
+       cd pulsar-manager
+       tar -zxvf pulsar-manager.tar
+       cd pulsar-manager
+       cp -r ../dist ui
+  ```
+- Modify `application.properties` configuration on demand.
+  
+  > If you don't want to modify the `application.properties` file, you can add 
the configuration to the startup parameters via `. /bin/pulsar-manager 
--backend.jwt.token=token` to add the configuration to the startup parameters. 
This is a capability of the spring boot framework.
 
-[Set the administrator account and 
password](#set-administrator-account-and-password).
+- Start Pulsar Manager 
+  ```bash
+  ./bin/pulsar-manager 
+  ```
+
+ ### custom docker image installation

Review comment:
       ```suggestion
    ### Custom Docker image installation
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to