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

fix: Update admin password related documents since 1.3.0 supports admin initialization workflow #186

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ helm install higress higress.io/higress -n higress-system --create-namespace
| higress-console.domain | Domain used to access Higress Console | console.higress.io |
| higress-console.tlsSecretName | Name of Secret resource used by TLS connections. | "" |
| higress-console.web.login.prompt | Prompt message to be displayed on the login page | "" |
| higress-console.admin.password.value | If not empty, the admin password will be configured to the specified value. | "" |
| higress-console.admin.password.length | The length of random admin password generated during installation. Only works when `higress-console.admin.password.value` is not set. | 8 |
| higress-console.admin.password | If not empty, the admin password will be configured to the specified value. | "" |
| higress-console.o11y.enabled | If `true`, o11y suite (Grafana + Promethues) will be installed. | false |
| higress-console.pvc.rwxSupported | Set to `false` when installing to a standard K8s cluster and the target cluster doesn't support the ReadWriteMany access mode of PersistentVolumeClaim. | true |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ helm repo add higress.io https://higress.io/helm-charts
helm install higress -n higress-system higress.io/higress --create-namespace --render-subchart-notes --set higress-console.domain=console.higress.io
```

Note: A short note will be printed on the screen after installation, which contains the commands used to obtain the console login credential. Please execute them and record the output username and password.

![image](/img/user/quickstart/zh-cn/console-credentials.png)

Obtain the LoadBalancer IP of Higress Gateway and write it down. You can use it and port 80 and 443 to access Higress Gateway.
```bash
kubectl get svc -n higress-system higress-gateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
Expand Down Expand Up @@ -117,7 +113,7 @@ in the future, we will use `--set global.local=true` for unambiguous.

```bash
helm repo add higress.io https://higress.io/helm-charts
helm install higress -n higress-system higress.io/higress --create-namespace --render-subchart-notes --set global.local=true --set higress-console.o11y.enabled=false --set higress-console.domain=console.higress.io --set higress-console.admin.password.value=<YOUR-PASSWORD>
helm install higress -n higress-system higress.io/higress --create-namespace --render-subchart-notes --set global.local=true --set higress-console.o11y.enabled=false --set higress-console.domain=console.higress.io
```

> If you'd like to enable the built-in o11y suite, please refer to the [Deploy by Helm](../ops/deploy-by-helm) document.
Expand Down Expand Up @@ -169,7 +165,11 @@ Edit the hosts file and point domain `console.higress.io` to the IP of Higress G
GatewayIP console.higress.io
```

Open `http://console.higress.io` in browser and log into Higress Console using the credential obtained above.
Open `http://console.higress.io` in browser. For the first time, you will need to configure the admin credentials.

![image](/img/user/quickstart/en-us/init.png)

After configuration, log into Higress Console using the credential just configured.

![image](/img/user/quickstart/en-us/login.png)

Expand Down Expand Up @@ -220,22 +220,26 @@ curl http://GatewayIP/foo -H "Host: foo.bar.com"
**Installation Command 1: Use a separated-deployed Nacos service**

```bash
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- -c nacos://192.168.0.1:8848 --nacos-username=nacos --nacos-password=nacos -p <YOUR-PASSWORD>
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- -a -c nacos://192.168.0.1:8848 --nacos-username=nacos --nacos-password=nacos
```

Please replace `192.168.0.1` with the actual IP address of Nacos service (if Nacos is deployed locally, please use a non-loopback address such as `localhost` or `127.0.0.1`), and update the value of `--nacos-username` and `--nacos-password` based on actual configurations. If authentication isn't enabled in Nacos, you can remove these two arguments.

**Installation Command 2: Use the Higress Built-In Nacos**

```bash
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- --use-builtin-nacos -p <YOUR-PASSWORD>
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- -a --use-builtin-nacos
```

Note: On Windows, you can use Unix-like shells such as Cygwin, Git Bash to execute the command above.

### Stage 2: Configuration

Open `http://127.0.0.1:8080` in browser and log into Higress Console using username `admin` and the previously set password.
Open `http://127.0.0.1:8080` in browser. For the first time, you will need to configure the admin credentials.

![image](/img/user/quickstart/en-us/init.png)

After configuration, log into Higress Console using the credential just configured.

![image](/img/user/quickstart/en-us/login.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ if [ "$IS_INSTALLED_CRD" = true ]; then

echo "Step3: Installing Higress "
helm repo add higress.io https://higress.io/helm-charts
helm install higress -n higress-system higress.io/higress --devel --create-namespace --render-subchart-notes --set global.enableIstioAPI=true --set global.kind=true --set higress-console.o11y.enabled=true --set higress-controller.domain=console.higress.io --set higress-console.admin.password.value=admin
helm install higress -n higress-system higress.io/higress --devel --create-namespace --render-subchart-notes --set global.enableIstioAPI=true --set global.kind=true --set higress-console.o11y.enabled=true --set higress-controller.domain=console.higress.io --set higress-console.admin.password=admin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this parameter higress-console.admin.password still needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If removing it, the following steps need to be updated as well (regarding the login part).

echo "Step3: Installing Higress finished."
else
echo "Step2: Installing Higress "
helm repo add higress.io https://higress.io/helm-charts
helm install higress -n higress-system higress.io/higress --devel --create-namespace --render-subchart-notes --set global.enableIstioAPI=true --set global.kind=true --set higress-console.o11y.enabled=true --set higress-controller.domain=console.higress.io --set higress-console.admin.password.value=admin
helm install higress -n higress-system higress.io/higress --devel --create-namespace --render-subchart-notes --set global.enableIstioAPI=true --set global.kind=true --set higress-console.o11y.enabled=true --set higress-controller.domain=console.higress.io --set higress-console.admin.password=admin
echo "Step2: Installing Higress finished."
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
t ---
title: 基于 Docker Compose 进行独立部署
keywords: [deploy,docker compose,docker,ops]
description: 如何使用 Docker Compose 实现 Higress 的独立部署
Expand Down Expand Up @@ -30,13 +30,12 @@ curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- [DESTINATIO
|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|--------------|
|DESTINATION |目标安装目录 |./higress |
|-a<br/>--auto-run |配置完成后自动启动 Higress 网关 |无 |
|-c CONFIG_URL<br/>--config-url CONFIG_URL |配置服务的 URL。<br/>- 若使用独立部署的 Nacos 服务,URL 格式为:nacos://192.168.0.1:8848<br/>- 若在本地磁盘上保存配置,URL 格式为:file://opt/higress/conf|无 |
|-c CONFIG_URL<br/>--config-url CONFIG_URL |配置服务的 URL。<br/>- 若使用独立部署的 Nacos 服务(版本不低于 2.0.0),URL 格式为:nacos://192.168.0.1:8848<br/>- 若在本地磁盘上保存配置,URL 格式为:file://opt/higress/conf|无 |
|--use-builtin-nacos |使用内置的 Nacos 服务。不建议用于生产环境。如果设置本参数,则无需设置`-c`参数 |无 |
|--nacos-ns=NACOS_NAMESPACE |用于保存 Higress 配置的 Nacos 命名空间 ID |higress-system|
|--nacos-username=NACOS_USERNAME |用于访问 Nacos 的用户名。仅用于 Nacos 启动了认证的情况下 |无 |
|--nacos-password=NACOS_PASSWORD |用于访问 Nacos 的用户密码。仅用于 Nacos 启动了认证的情况下 |无 |
|-k KEY<br/>--data-enc-key=KEY |用于加密敏感配置数据的密钥。长度必须为 32 个字符。若未设置,Higress 将自动生成一个随机的密钥。若需集群部署,此项必须设置 |随机字符串 |
|-p CONSOLE_PASSWORD<br/>--console-password=CONSOLE_PASSWORD|后续用户访问 Higress Console 的密码(用户名固定为`admin`) |随机字符串 |
|--nacos-port=NACOS_PORT |内置 NACOS 服务在服务器本地监听的端口 |8848 |
|--gateway-http-port=GATEWAY_HTTP_PORT |Higress Gateway 在服务器本地监听的 HTTP 端口 |80 |
|--gateway-https-port=GATEWAY_HTTPS_PORT |Higress Gateway 在服务器本地监听的 HTTPS 端口 |443 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ helm install higress higress.io/higress -n higress-system --create-namespace
| higress-console.domain | 对外用于访问 Higress Console 的域名 | console.higress.io |
| higress-console.tlsSecretName | Higress Console 提供 HTTPS 访问所使用的 Secret 证书资源名称 | "" |
| higress-console.web.login.prompt | 登录页面上显示的提示信息 | "" |
| higress-console.admin.password.value | 若值不为空,则 admin 账号的密码将被配置为指定值 | "" |
| higress-console.admin.password.length | 安装时自动为 admin 账号生成的随机密码的长度。仅在 `higress-console.admin.password.value` 值为空时生效。 | 8 |
| higress-console.admin.password | 若值不为空,则 admin 账号的密码将被配置为指定值 | "" |
| higress-console.o11y.enabled | 若为 `true`,将同时安装可观测性套件(Grafana + Promethues) | false |
| higress-console.pvc.rwxSupported | 标识目标 K8s 集群是否支持 PersistentVolumeClaim 的 ReadWriteMany 操作方式。 | true |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ custom_edit_url: https://github.com/higress-group/higress-group.github.io/blob/m
| higress-console.web.login.prompt | 登录页面上显示的提示信息,默认为空。 | "" |
| higress-console.admin.username | 指定的用户名。 | admin |
| higress-console.admin.displayName | 显示的用户名。 | Admin |
| higress-console.admin.password.length | 安装时自动为 admin 账号生成的随机密码的长度。仅在 higress-console.admin.password.value 值为空时生效。 | 8 |
| higress-console.admin.password.value | 若值不为空,则 admin 账号的密码将被配置为指定值。 | "" |
| higress-console.admin.password | 若值不为空,则 admin 账号的密码将被配置为指定值。 | "" |
| higress-console.certmanager.enabled | 指定是否启用证书管理器。 | false |
| higress-console.certmanager.replicas | Certmanage pod 的数量。 | 1 |
| higress-console.o11y.enabled | 若为 true,将同时安装可观测性套件(Grafana + Promethues)。 | false |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ helm repo add higress.io https://higress.io/helm-charts
helm install higress -n higress-system higress.io/higress --create-namespace --render-subchart-notes --set higress-console.domain=console.higress.io
```

注意:安装完成后会输出一段文本,其中包含获取控制台登录信息的命令。请执行该命令并记录用户名和密码。

![image](/img/user/quickstart/zh-cn/console-credentials.png)

例如安装在 higress-system 命名空间下时,执行下面命令获取用户名密码:
```bash
export ADMIN_USERNAME=$(kubectl get secret --namespace higress-system higress-console -o jsonpath="{.data.adminUsername}" | base64 -d)
export ADMIN_PASSWORD=$(kubectl get secret --namespace higress-system higress-console -o jsonpath="{.data.adminPassword}" | base64 -d)
echo -e "Username: ${ADMIN_USERNAME}\nPassword: ${ADMIN_PASSWORD}"
```

获取 Higress Gateway 的 LoadBalancer IP,并记录下来。后续可以通过该 IP 的 80 和 443 端口访问 Higress Gateway。
```bash
kubectl get svc -n higress-system higress-gateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
Expand Down Expand Up @@ -123,7 +112,7 @@ kubectl.exe config use-context kind-higress

```bash
helm repo add higress.io https://higress.io/helm-charts
helm install higress -n higress-system higress.io/higress --create-namespace --render-subchart-notes --set global.local=true --set higress-console.o11y.enabled=false --set higress-console.domain=console.higress.io --set higress-console.admin.password.value=<你的密码>
helm install higress -n higress-system higress.io/higress --create-namespace --render-subchart-notes --set global.local=true --set higress-console.o11y.enabled=false --set higress-console.domain=console.higress.io
```

> 若要启用 Higress 内置的套件,可参阅[安装部署](../ops/deploy-by-helm.md)文档。
Expand Down Expand Up @@ -174,7 +163,11 @@ spec:
GatewayIP console.higress.io
```

在浏览器中输入`http://console.higress.io`,使用前面获取或设置的用户名密码登录 Higress 控制台(本地集群用户名固定为 admin)。
在浏览器中输入`http://console.higress.io`。首次访问时需要先初始化管理员账号。

![image](/img/user/quickstart/zh-cn/init.png)

初始化完成后,界面会自动跳转至登录页面。请使用前面设置的用户名密码登录 Higress 控制台。

![image](/img/user/quickstart/zh-cn/login.png)

Expand Down Expand Up @@ -225,22 +218,26 @@ curl http://GatewayIP/foo -H 'host: foo.bar.com'
**安装命令一:使用独立部署的 Nacos**

```bash
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- -c nacos://192.168.0.1:8848 --nacos-username=nacos --nacos-password=nacos -p <你的密码>
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- -a -c nacos://192.168.0.1:8848 --nacos-username=nacos --nacos-password=nacos
```

请将 `192.168.0.1` 替换为 Nacos 服务器的 IP(如果 Nacos 部署在本机,请不要使用如 `localhost` 或 `127.0.0.1` 的 Loopback 地址),并按需调整 `--nacos-username` 和 `--nacos-password` 的取值。如果 Nacos 服务未开启认证功能,则可以移除这两个参数。

**安装命令二:使用 Higress 内置 Nacos**

```bash
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- --use-builtin-nacos -p <你的密码>
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- -a --use-builtin-nacos
```

注:Windows 系统下可以使用 Cygwin、Git Bash 等类 Unix Shell 中执行上述命令。

### 阶段二:配置

在浏览器中输入`http://127.0.0.1:8080`,使用用户名 `admin` 和安装时设置的密码登录 Higress 控制台。
在浏览器中输入`http://127.0.0.1:8080` 进入 Higress 控制台。首次访问时需要先初始化管理员账号。

![image](/img/user/quickstart/zh-cn/init.png)

初始化完成后,界面会自动跳转至登录页面。请使用前面设置的用户名密码登录 Higress 控制台。

![image](/img/user/quickstart/zh-cn/login.png)

Expand Down
Binary file added static/img/user/quickstart/en-us/init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/user/quickstart/zh-cn/init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading