From df38148149559433cb1b918771b95622cbe336dc Mon Sep 17 00:00:00 2001 From: Eliott van Nuffel Date: Tue, 10 Mar 2026 13:48:45 +0100 Subject: [PATCH] continue beOS rebrand and add native verification --- .gitea/workflows/native-verification.yaml | 85 +++++++++++++++ .../module_appservice_build_main.yaml | 6 +- .github/workflows/native-verification.yaml | 88 +++++++++++++++ build/deps-manifest.sh | 6 +- build/verify-native-in-container.sh | 68 ++++++++++++ cli/.goreleaser.yaml | 10 +- cli/cmd/config/common_flags.go | 8 +- cli/cmd/config/flag_setter.go | 2 +- cli/cmd/ctl/amdgpu/root.go | 2 - cli/cmd/ctl/disk/extend.go | 4 +- cli/cmd/ctl/gpu/disable.go | 2 +- cli/cmd/ctl/gpu/disable_nouveau.go | 2 - cli/cmd/ctl/gpu/enable.go | 2 +- cli/cmd/ctl/gpu/install.go | 2 +- cli/cmd/ctl/gpu/uninstall.go | 2 +- cli/cmd/ctl/os/changeip.go | 2 +- cli/cmd/ctl/os/download.go | 8 +- cli/cmd/ctl/os/info.go | 2 +- cli/cmd/ctl/os/install.go | 10 +- cli/cmd/ctl/os/logs.go | 26 ++--- cli/cmd/ctl/os/release.go | 4 +- cli/cmd/ctl/os/startstop.go | 8 +- cli/cmd/ctl/os/storage.go | 2 +- cli/cmd/ctl/os/uninstall.go | 4 +- cli/cmd/ctl/os/upgrade.go | 12 +-- cli/cmd/ctl/user/activate.go | 22 ++-- cli/cmd/ctl/user/create.go | 4 +- cli/cmd/ctl/user/reset_password.go | 6 +- cli/cmd/ctl/user/utils.go | 2 +- cli/pkg/amdgpu/tasks.go | 2 +- cli/pkg/bootstrap/os/tasks.go | 2 +- cli/pkg/bootstrap/os/templates/swap.go | 2 +- cli/pkg/bootstrap/patch/tasks.go | 2 +- cli/pkg/bootstrap/precheck/tasks.go | 22 ++-- cli/pkg/common/common.go | 8 +- cli/pkg/common/kube_runtime.go | 42 ++++---- cli/pkg/core/common/common.go | 6 +- cli/pkg/daemon/module.go | 6 +- cli/pkg/daemon/task.go | 23 ++-- cli/pkg/files/file.go | 10 +- cli/pkg/gpu/tasks.go | 6 +- cli/pkg/images/load.go | 2 +- cli/pkg/k3s/tasks.go | 2 +- cli/pkg/kubernetes/tasks.go | 4 +- cli/pkg/kubesphere/minikube.go | 4 +- cli/pkg/phase/cluster/changeip.go | 4 +- cli/pkg/phase/cluster/delete_cluster.go | 2 +- cli/pkg/phase/cluster/windows.go | 2 +- cli/pkg/phase/download/check_download.go | 2 +- cli/pkg/phase/download/download_package.go | 2 +- cli/pkg/phase/download/download_wizard.go | 2 +- cli/pkg/phase/root.go | 4 +- cli/pkg/pipelines/add_node.go | 4 +- cli/pkg/pipelines/changeip.go | 4 +- cli/pkg/pipelines/check_download.go | 2 +- cli/pkg/pipelines/download_package.go | 6 +- cli/pkg/pipelines/download_wizard.go | 6 +- cli/pkg/pipelines/gpu_install.go | 2 +- cli/pkg/pipelines/info_terminus.go | 6 +- cli/pkg/pipelines/install_terminus.go | 8 +- cli/pkg/pipelines/masterinfo.go | 2 +- cli/pkg/pipelines/precheck.go | 2 +- cli/pkg/pipelines/prepare_system.go | 6 +- cli/pkg/pipelines/startstop.go | 12 +-- cli/pkg/pipelines/storage.go | 6 +- cli/pkg/pipelines/uninstall_terminus.go | 6 +- cli/pkg/pipelines/upgrade.go | 24 ++--- cli/pkg/release/manifest/manifest.go | 14 +-- cli/pkg/storage/constants.go | 26 ++--- cli/pkg/storage/juicefs.go | 6 +- cli/pkg/storage/module.go | 6 +- cli/pkg/storage/tasks.go | 28 ++--- cli/pkg/terminus/account.go | 8 +- cli/pkg/terminus/apps.go | 8 +- cli/pkg/terminus/launcher.go | 2 +- cli/pkg/terminus/modules.go | 28 ++--- cli/pkg/terminus/natgateway.go | 2 +- cli/pkg/terminus/ossystem.go | 10 +- cli/pkg/terminus/tasks.go | 32 +++--- cli/pkg/terminus/welcome.go | 4 +- cli/pkg/upgrade/1_12_3_20251127.go | 4 +- cli/pkg/upgrade/1_12_3_20251217.go | 4 +- cli/pkg/upgrade/1_12_4.go | 4 +- cli/pkg/upgrade/base.go | 14 +-- cli/pkg/upgrade/interfaces.go | 2 +- cli/pkg/upgrade/modules.go | 4 +- cli/pkg/upgrade/version.go | 4 +- cli/pkg/utils/lvm/lvm.go | 10 +- cli/pkg/utils/utils.go | 2 +- cli/pkg/utils/version.go | 2 +- cli/pkg/web5/crypto/README.md | 8 +- cli/pkg/web5/dids/README.md | 18 ++-- cli/pkg/web5/jws/README.md | 16 +-- cli/pkg/web5/jws/checkjws.go | 16 +-- cli/pkg/web5/jwt/README.md | 8 +- cli/pkg/windows/modules.go | 6 +- cli/pkg/windows/tasks.go | 36 +++---- cli/pkg/wizard/client.go | 48 ++++----- cli/pkg/wizard/http_sender.go | 18 ++-- cli/pkg/wizard/login_terminus.go | 100 +++++++++--------- cli/pkg/wizard/platform.go | 9 +- cli/pkg/wizard/srp.go | 88 +++++++-------- cli/pkg/wizard/types.go | 34 +++--- cli/pkg/wizard/wizard.go | 2 +- daemon/.goreleaser.agent.yml | 10 +- daemon/.goreleaser.yml | 8 +- daemon/.olares/BeOS.yaml | 9 ++ daemon/.olares/Olares.yaml | 8 +- daemon/README.md | 10 +- daemon/cmd/terminusd/main.go | 2 +- .../apiserver/handlers/command_group.go | 6 +- .../apiserver/handlers/handler_did.go | 6 +- .../handlers/handler_olares_upgrade.go | 8 +- .../apiserver/handlers/middlewares.go | 14 +-- .../apiserver/handlers/system_group.go | 2 +- daemon/internel/client/bind.go | 14 +-- daemon/internel/client/validate.go | 2 +- daemon/internel/intranet/dsr_common.go | 4 +- daemon/internel/intranet/dsr_linux.go | 4 +- daemon/internel/mdns/server.go | 2 +- .../watcher/upgrade/upgrade_watcher.go | 6 +- daemon/pkg/cli/terminus_cli.go | 2 +- daemon/pkg/cluster/state/current.go | 12 +-- daemon/pkg/cluster/state/utils.go | 4 +- daemon/pkg/commands/change_ip/cmd.go | 2 +- daemon/pkg/commands/collect_logs/cmd.go | 2 +- daemon/pkg/commands/constants.go | 4 +- daemon/pkg/commands/install/cmd.go | 6 +- daemon/pkg/commands/operations.go | 2 +- daemon/pkg/commands/uninstall/cmd.go | 2 +- daemon/pkg/commands/upgrade/download_cli.go | 16 +-- daemon/pkg/commands/upgrade/install_cli.go | 10 +- .../pkg/commands/upgrade/install_olaresd.go | 48 ++++----- daemon/pkg/commands/upgrade/upgrade.go | 4 +- daemon/pkg/commands/upgrade/utils.go | 8 +- daemon/pkg/containerd/api.go | 2 +- daemon/pkg/utils/jws.go | 4 +- daemon/pkg/utils/system.go | 2 +- docs/code-snippets/docker-compose-GPU.yaml | 6 +- docs/code-snippets/docker-compose.yaml | 4 +- docs/developer/concepts/account.md | 2 +- docs/developer/concepts/application.md | 2 +- .../concepts/{olares-id.md => beos-id.md} | 2 +- docs/developer/concepts/data.md | 8 +- docs/developer/concepts/index.md | 2 +- docs/developer/concepts/network.md | 2 +- docs/developer/concepts/registry.md | 2 +- .../developer/concepts/system-architecture.md | 6 +- .../contribute/olares-id/contract/contract.md | 10 +- docs/developer/contribute/olares.md | 4 +- .../contribute/system-app/deployment.md | 4 +- .../contribute/system-app/olares-manifest.md | 10 +- .../contribute/system-app/overview.md | 2 +- ...{olares-change-ip.md => beos-change-ip.md} | 10 +- .../develop/advanced/cli/beos-cli.md | 50 +++++++++ .../{olares-download.md => beos-download.md} | 24 ++--- .../cli/{olares-info.md => beos-info.md} | 6 +- .../{olares-install.md => beos-install.md} | 8 +- .../{olares-prepare.md => beos-prepare.md} | 10 +- .../{olares-release.md => beos-release.md} | 6 +- ...{olares-uninstall.md => beos-uninstall.md} | 6 +- .../develop/advanced/cli/olares-cli.md | 50 --------- docs/developer/develop/advanced/cookie.md | 2 +- docs/developer/develop/advanced/database.md | 4 +- .../developer/develop/advanced/file-upload.md | 2 +- docs/developer/develop/advanced/index.md | 2 +- docs/developer/develop/advanced/provider.md | 2 +- docs/developer/develop/advanced/secret.md | 2 +- .../develop/advanced/terminus-info.md | 6 +- docs/developer/develop/advanced/websocket.md | 2 +- docs/developer/develop/app-env-index.md | 4 +- docs/developer/develop/app-env-vars.md | 18 ++-- .../develop/app-sys-injected-variables.md | 6 +- docs/developer/develop/index.md | 2 +- .../developer/develop/mw-integrate-with-es.md | 6 +- .../develop/mw-integrate-with-mariadb.md | 6 +- .../develop/mw-integrate-with-minio.md | 6 +- .../develop/mw-integrate-with-mongodb.md | 6 +- .../develop/mw-integrate-with-mysql.md | 6 +- .../developer/develop/mw-integrate-with-pg.md | 6 +- .../develop/mw-integrate-with-rabbitmq.md | 6 +- .../develop/mw-integrate-with-redis.md | 6 +- docs/developer/develop/mw-overview.md | 4 +- docs/developer/develop/package/chart.md | 6 +- docs/developer/develop/package/extension.md | 2 +- docs/developer/develop/package/manifest.md | 54 +++++----- docs/developer/develop/paid-apps.md | 6 +- docs/developer/develop/promote-apps.md | 10 +- docs/developer/develop/submit-apps.md | 2 +- docs/developer/develop/tutorial/assets.md | 2 +- docs/developer/develop/tutorial/deploy.md | 6 +- docs/developer/develop/tutorial/develop.md | 6 +- .../developer/develop/tutorial/note/create.md | 6 +- .../install/{olares-home.md => beos-home.md} | 8 +- docs/developer/install/cli/backups-backup.md | 8 +- .../developer/install/cli/backups-download.md | 4 +- docs/developer/install/cli/backups-region.md | 4 +- docs/developer/install/cli/backups-restore.md | 8 +- .../install/cli/backups-snapshots.md | 8 +- docs/developer/install/cli/beos-cli.md | 66 ++++++++++++ docs/developer/install/cli/change-ip.md | 8 +- docs/developer/install/cli/disk.md | 6 +- docs/developer/install/cli/download.md | 20 ++-- docs/developer/install/cli/gpu.md | 14 +-- docs/developer/install/cli/info.md | 2 +- docs/developer/install/cli/install.md | 4 +- docs/developer/install/cli/logs.md | 12 +-- docs/developer/install/cli/node.md | 14 +-- docs/developer/install/cli/olares-cli.md | 66 ------------ docs/developer/install/cli/osinfo.md | 2 +- docs/developer/install/cli/precheck.md | 4 +- docs/developer/install/cli/prepare.md | 8 +- docs/developer/install/cli/release.md | 4 +- docs/developer/install/cli/start.md | 2 +- docs/developer/install/cli/stop.md | 8 +- docs/developer/install/cli/uninstall.md | 4 +- docs/developer/install/cli/upgrade.md | 10 +- docs/developer/install/cli/user-activate.md | 8 +- docs/developer/install/cli/user-create.md | 10 +- docs/developer/install/cli/user-delete.md | 4 +- docs/developer/install/cli/user-get.md | 6 +- docs/developer/install/cli/user-list.md | 8 +- .../install/cli/user-reset-password.md | 4 +- .../install/environment-variables.md | 2 +- docs/developer/install/index.md | 4 +- .../install/installation-overview.md | 18 ++-- .../developer/install/installation-process.md | 20 ++-- docs/developer/install/reusables.md | 4 +- .../expand-storage-in-olares.md | 4 +- .../install-olares-multi-node.md | 18 ++-- docs/manual/best-practices/local-access.md | 4 +- .../best-practices/set-custom-domain.md | 4 +- ...{create-olares-id.md => create-beos-id.md} | 2 +- docs/manual/get-started/index.md | 4 +- .../get-started/install-linux-docker.md | 7 +- docs/manual/get-started/install-mac-docker.md | 20 ++-- docs/manual/get-started/install-olares.md | 2 +- .../get-started/install-windows-docker.md | 12 +-- .../get-started/install-windows-script.md | 2 +- docs/manual/get-started/next-steps.md | 4 +- docs/manual/get-started/reusables.md | 4 +- docs/manual/help/installation.md | 2 +- docs/manual/help/olares.md | 2 +- docs/manual/larepass/create-account.md | 4 +- docs/manual/larepass/manage-files.md | 8 +- docs/manual/larepass/private-network.md | 4 +- .../larepass/two-factor-verification.md | 4 +- docs/manual/olares/controlhub/terminal.md | 8 +- docs/manual/olares/settings/manage-team.md | 3 +- docs/manual/olares/settings/restore.md | 2 +- docs/manual/olares/settings/update.md | 12 +-- docs/manual/olares/vault/vault-items.md | 10 +- docs/manual/olares/wise/basics.md | 4 +- docs/manual/overview.md | 2 +- docs/one/ace-step.md | 2 +- docs/one/connect-two-olares-one.md | 10 +- docs/one/deploy.md | 4 +- docs/one/dual-boot-single-drive.md | 4 +- docs/one/expand-storage-internal-ssd.md | 10 +- docs/one/first-boot.md | 2 +- docs/one/known-issues.md | 2 +- docs/one/vault.md | 4 +- docs/reusables/larepass-vpn.md | 4 +- docs/use-cases/duix-avatar.md | 3 +- docs/use-cases/remote.reusables.md | 4 +- docs/zh/developer/concepts/account.md | 2 +- docs/zh/developer/concepts/application.md | 3 +- docs/zh/developer/concepts/architecture.md | 2 +- .../concepts/{olares-id.md => beos-id.md} | 0 docs/zh/developer/concepts/data.md | 8 +- docs/zh/developer/concepts/index.md | 2 +- docs/zh/developer/concepts/network.md | 2 +- docs/zh/developer/concepts/registry.md | 2 +- .../developer/concepts/system-architecture.md | 6 +- .../contribute/olares-id/contract/contract.md | 12 +-- docs/zh/developer/contribute/olares.md | 4 +- .../contribute/system-app/deployment.md | 4 +- .../contribute/system-app/olares-manifest.md | 10 +- .../contribute/system-app/overview.md | 2 +- docs/zh/developer/develop/advanced/cli.md | 2 +- docs/zh/developer/develop/advanced/cookie.md | 2 +- .../zh/developer/develop/advanced/database.md | 2 +- .../developer/develop/advanced/file-upload.md | 2 +- .../zh/developer/develop/advanced/provider.md | 2 +- docs/zh/developer/develop/advanced/secret.md | 2 +- .../develop/advanced/terminus-info.md | 6 +- .../developer/develop/advanced/websocket.md | 2 +- docs/zh/developer/develop/app-env-index.md | 4 +- docs/zh/developer/develop/app-env-vars.md | 18 ++-- .../develop/app-sys-injected-variables.md | 6 +- docs/zh/developer/develop/index.md | 2 +- .../developer/develop/mw-integrate-with-es.md | 6 +- .../develop/mw-integrate-with-mariadb.md | 6 +- .../develop/mw-integrate-with-minio.md | 6 +- .../develop/mw-integrate-with-mongodb.md | 6 +- .../develop/mw-integrate-with-mysql.md | 6 +- .../developer/develop/mw-integrate-with-pg.md | 6 +- .../develop/mw-integrate-with-rabbitmq.md | 6 +- .../develop/mw-integrate-with-redis.md | 6 +- docs/zh/developer/develop/mw-overview.md | 4 +- docs/zh/developer/develop/package/chart.md | 6 +- .../zh/developer/develop/package/extension.md | 2 +- docs/zh/developer/develop/package/manifest.md | 54 +++++----- docs/zh/developer/develop/paid-apps.md | 6 +- docs/zh/developer/develop/promote-apps.md | 10 +- docs/zh/developer/develop/submit-apps.md | 2 +- docs/zh/developer/develop/tutorial/assets.md | 2 +- docs/zh/developer/develop/tutorial/deploy.md | 6 +- docs/zh/developer/develop/tutorial/develop.md | 6 +- .../developer/develop/tutorial/note/create.md | 6 +- .../install/{olares-home.md => beos-home.md} | 8 +- .../developer/install/cli/backups-backup.md | 8 +- .../developer/install/cli/backups-download.md | 4 +- .../developer/install/cli/backups-region.md | 4 +- .../developer/install/cli/backups-restore.md | 8 +- .../install/cli/backups-snapshots.md | 8 +- docs/zh/developer/install/cli/beos-cli.md | 66 ++++++++++++ docs/zh/developer/install/cli/change-ip.md | 8 +- docs/zh/developer/install/cli/disk.md | 6 +- docs/zh/developer/install/cli/download.md | 20 ++-- docs/zh/developer/install/cli/gpu.md | 14 +-- docs/zh/developer/install/cli/info.md | 2 +- docs/zh/developer/install/cli/install.md | 4 +- docs/zh/developer/install/cli/logs.md | 12 +-- docs/zh/developer/install/cli/node.md | 14 +-- docs/zh/developer/install/cli/olares-cli.md | 66 ------------ docs/zh/developer/install/cli/osinfo.md | 2 +- docs/zh/developer/install/cli/precheck.md | 4 +- docs/zh/developer/install/cli/prepare.md | 6 +- docs/zh/developer/install/cli/release.md | 4 +- docs/zh/developer/install/cli/start.md | 2 +- docs/zh/developer/install/cli/stop.md | 8 +- docs/zh/developer/install/cli/uninstall.md | 4 +- docs/zh/developer/install/cli/upgrade.md | 10 +- .../zh/developer/install/cli/user-activate.md | 8 +- docs/zh/developer/install/cli/user-create.md | 10 +- docs/zh/developer/install/cli/user-delete.md | 4 +- docs/zh/developer/install/cli/user-get.md | 6 +- docs/zh/developer/install/cli/user-list.md | 8 +- .../install/cli/user-reset-password.md | 4 +- .../install/environment-variables.md | 6 +- docs/zh/developer/install/index.md | 4 +- .../install/installation-overview.md | 18 ++-- .../developer/install/installation-process.md | 22 ++-- docs/zh/developer/install/reusables.md | 4 +- .../expand-storage-in-olares.md | 4 +- .../install-olares-multi-node.md | 18 ++-- docs/zh/manual/best-practices/local-access.md | 4 +- .../manual/best-practices/remote.reusables.md | 4 +- .../best-practices/set-custom-domain.md | 4 +- ...{create-olares-id.md => create-beos-id.md} | 2 +- docs/zh/manual/get-started/index.md | 4 +- .../get-started/install-linux-docker.md | 7 +- .../manual/get-started/install-mac-docker.md | 20 ++-- docs/zh/manual/get-started/install-olares.md | 2 +- .../get-started/install-windows-docker.md | 12 +-- .../get-started/install-windows-script.md | 2 +- docs/zh/manual/get-started/next-steps.md | 2 +- docs/zh/manual/get-started/reusables.md | 4 +- docs/zh/manual/help/installation.md | 2 +- docs/zh/manual/help/olares.md | 2 +- docs/zh/manual/larepass/create-account.md | 4 +- docs/zh/manual/larepass/manage-files.md | 8 +- docs/zh/manual/larepass/private-network.md | 4 +- .../larepass/two-factor-verification.md | 4 +- docs/zh/manual/olares/controlhub/terminal.md | 8 +- docs/zh/manual/olares/settings/manage-team.md | 2 +- docs/zh/manual/olares/settings/restore.md | 2 +- docs/zh/manual/olares/settings/update.md | 10 +- docs/zh/manual/olares/vault/vault-items.md | 10 +- docs/zh/manual/olares/wise/basics.md | 2 +- docs/zh/manual/overview.md | 2 +- docs/zh/one/ace-step.md | 2 +- docs/zh/one/connect-two-olares-one.md | 10 +- docs/zh/one/deploy.md | 4 +- docs/zh/one/dual-boot-single-drive.md | 4 +- docs/zh/one/expand-storage-internal-ssd.md | 10 +- docs/zh/one/first-boot.md | 2 +- docs/zh/one/known-issues.md | 2 +- docs/zh/one/vault.md | 4 +- docs/zh/reusables/larepass-vpn.md | 4 +- .../apiserver/handler_installer_upgrade.go | 2 +- framework/app-service/pkg/apiserver/info.go | 10 +- framework/app-service/pkg/apiserver/utils.go | 15 ++- .../app-service/pkg/appcfg/appcfg_types.go | 44 +++++++- framework/app-service/pkg/appcfg/utils.go | 10 +- .../pkg/appinstaller/helm_utils.go | 13 ++- .../app-service/pkg/constants/constants.go | 7 +- .../pkg/users/userspace/v1/create.go | 23 ++-- framework/app-service/pkg/utils/app/app.go | 9 +- .../app-service/pkg/utils/app/provider.go | 30 +++--- .../app-service/pkg/utils/app/validate.go | 2 +- framework/app-service/pkg/utils/config/app.go | 25 ++++- framework/app-service/pkg/utils/helm.go | 9 +- framework/app-service/pkg/utils/k8sutil.go | 15 ++- .../pkg/integration/integration.go | 12 +-- .../pkg/storage/storage_backup.go | 12 +-- .../.olares/BeOS.yaml | 7 ++ .../kube-state-metrics/.olares/BeOS.yaml | 7 ++ framework/l4-bfl-proxy/.olares/BeOS.yaml | 7 ++ framework/reverse-proxy/.olares/BeOS.yaml | 9 ++ framework/upgrade/.olares/BeOS.yaml | 9 ++ infrastructure/apparmor/.olares/BeOS.yaml | 10 ++ infrastructure/calico/.olares/BeOS.yaml | 18 ++++ infrastructure/cni/.olares/BeOS.yaml | 9 ++ infrastructure/conntrack/.olares/BeOS.yaml | 9 ++ infrastructure/containerd/.olares/BeOS.yaml | 9 ++ infrastructure/coredns/.olares/BeOS.yaml | 12 +++ infrastructure/cri-tools/.olares/BeOS.yaml | 9 ++ infrastructure/cuda/.olares/BeOS.yaml | 23 ++++ infrastructure/etcd/.olares/BeOS.yaml | 9 ++ infrastructure/helm/.olares/BeOS.yaml | 9 ++ infrastructure/k3s/.olares/BeOS.yaml | 9 ++ infrastructure/kubernetes/.olares/BeOS.yaml | 40 +++++++ infrastructure/kubesphere/.olares/BeOS.yaml | 8 ++ infrastructure/minikube/.olares/BeOS.yaml | 12 +++ infrastructure/minio/.olares/BeOS.yaml | 16 +++ infrastructure/openebs/.olares/BeOS.yaml | 9 ++ infrastructure/restic/.olares/BeOS.yaml | 15 +++ infrastructure/runc/.olares/BeOS.yaml | 9 ++ infrastructure/socat/.olares/BeOS.yaml | 9 ++ platform/hami/.olares/BeOS.yaml | 14 +++ platform/juicefs/.olares/BeOS.yaml | 14 +++ platform/kubeblocks/.olares/BeOS.yaml | 10 ++ platform/nats/.olares/BeOS.yaml | 6 ++ platform/open-telemetry/.olares/BeOS.yaml | 10 ++ platform/postgresql/citus/.olares/BeOS.yaml | 8 ++ platform/prometheus/.olares/BeOS.yaml | 17 +++ platform/redis/kvrocks/.olares/BeOS.yaml | 10 ++ platform/redis/redis/.olares/BeOS.yaml | 21 ++++ platform/tapr/.olares/BeOS.yaml | 9 ++ platform/velero/.olares/BeOS.yaml | 17 +++ 432 files changed, 2410 insertions(+), 1642 deletions(-) create mode 100644 .gitea/workflows/native-verification.yaml create mode 100644 .github/workflows/native-verification.yaml create mode 100755 build/verify-native-in-container.sh create mode 100644 daemon/.olares/BeOS.yaml rename docs/developer/concepts/{olares-id.md => beos-id.md} (98%) rename docs/developer/develop/advanced/cli/{olares-change-ip.md => beos-change-ip.md} (91%) create mode 100644 docs/developer/develop/advanced/cli/beos-cli.md rename docs/developer/develop/advanced/cli/{olares-download.md => beos-download.md} (75%) rename docs/developer/develop/advanced/cli/{olares-info.md => beos-info.md} (59%) rename docs/developer/develop/advanced/cli/{olares-install.md => beos-install.md} (84%) rename docs/developer/develop/advanced/cli/{olares-prepare.md => beos-prepare.md} (86%) rename docs/developer/develop/advanced/cli/{olares-release.md => beos-release.md} (96%) rename docs/developer/develop/advanced/cli/{olares-uninstall.md => beos-uninstall.md} (88%) delete mode 100644 docs/developer/develop/advanced/cli/olares-cli.md rename docs/developer/install/{olares-home.md => beos-home.md} (93%) create mode 100644 docs/developer/install/cli/beos-cli.md delete mode 100644 docs/developer/install/cli/olares-cli.md rename docs/manual/get-started/{create-olares-id.md => create-beos-id.md} (98%) rename docs/zh/developer/concepts/{olares-id.md => beos-id.md} (100%) rename docs/zh/developer/install/{olares-home.md => beos-home.md} (90%) create mode 100644 docs/zh/developer/install/cli/beos-cli.md delete mode 100644 docs/zh/developer/install/cli/olares-cli.md rename docs/zh/manual/get-started/{create-olares-id.md => create-beos-id.md} (98%) create mode 100644 framework/docker-nginx-headers-more/.olares/BeOS.yaml create mode 100644 framework/kube-state-metrics/.olares/BeOS.yaml create mode 100644 framework/l4-bfl-proxy/.olares/BeOS.yaml create mode 100644 framework/reverse-proxy/.olares/BeOS.yaml create mode 100644 framework/upgrade/.olares/BeOS.yaml create mode 100644 infrastructure/apparmor/.olares/BeOS.yaml create mode 100644 infrastructure/calico/.olares/BeOS.yaml create mode 100644 infrastructure/cni/.olares/BeOS.yaml create mode 100644 infrastructure/conntrack/.olares/BeOS.yaml create mode 100644 infrastructure/containerd/.olares/BeOS.yaml create mode 100644 infrastructure/coredns/.olares/BeOS.yaml create mode 100644 infrastructure/cri-tools/.olares/BeOS.yaml create mode 100644 infrastructure/cuda/.olares/BeOS.yaml create mode 100644 infrastructure/etcd/.olares/BeOS.yaml create mode 100644 infrastructure/helm/.olares/BeOS.yaml create mode 100644 infrastructure/k3s/.olares/BeOS.yaml create mode 100644 infrastructure/kubernetes/.olares/BeOS.yaml create mode 100644 infrastructure/kubesphere/.olares/BeOS.yaml create mode 100644 infrastructure/minikube/.olares/BeOS.yaml create mode 100644 infrastructure/minio/.olares/BeOS.yaml create mode 100644 infrastructure/openebs/.olares/BeOS.yaml create mode 100644 infrastructure/restic/.olares/BeOS.yaml create mode 100644 infrastructure/runc/.olares/BeOS.yaml create mode 100644 infrastructure/socat/.olares/BeOS.yaml create mode 100644 platform/hami/.olares/BeOS.yaml create mode 100644 platform/juicefs/.olares/BeOS.yaml create mode 100644 platform/kubeblocks/.olares/BeOS.yaml create mode 100644 platform/nats/.olares/BeOS.yaml create mode 100644 platform/open-telemetry/.olares/BeOS.yaml create mode 100644 platform/postgresql/citus/.olares/BeOS.yaml create mode 100644 platform/prometheus/.olares/BeOS.yaml create mode 100644 platform/redis/kvrocks/.olares/BeOS.yaml create mode 100644 platform/redis/redis/.olares/BeOS.yaml create mode 100644 platform/tapr/.olares/BeOS.yaml create mode 100644 platform/velero/.olares/BeOS.yaml diff --git a/.gitea/workflows/native-verification.yaml b/.gitea/workflows/native-verification.yaml new file mode 100644 index 000000000..00f83b3ea --- /dev/null +++ b/.gitea/workflows/native-verification.yaml @@ -0,0 +1,85 @@ +name: Native Verification + +on: + push: + branches: + - main + - release-* + paths: + - .gitea/workflows/native-verification.yaml + - daemon/** + - framework/app-service/** + - docs/** + - build/verify-native-in-container.sh + pull_request: + paths: + - .gitea/workflows/native-verification.yaml + - daemon/** + - framework/app-service/** + - docs/** + - build/verify-native-in-container.sh + workflow_dispatch: + +jobs: + docs-build: + name: Build Docs + runs-on: ubuntu-latest + defaults: + run: + working-directory: docs + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install docs dependencies + run: npm ci + + - name: Build docs + run: npm run build + + appservice-native-build: + name: Build App-Service Native + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.11' + + - name: Install native dependencies + run: | + sudo apt-get update + sudo apt-get install -y btrfs-progs libbtrfs-dev + + - name: Build app-service + run: go build ./... + working-directory: framework/app-service + + daemon-native-build: + name: Build Daemon Native + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.11' + + - name: Install native dependencies + run: | + sudo apt-get update + sudo apt-get install -y libudev-dev libpcap-dev + + - name: Build daemon + run: go build ./cmd/... + working-directory: daemon diff --git a/.github/workflows/module_appservice_build_main.yaml b/.github/workflows/module_appservice_build_main.yaml index acad96763..10e74f46c 100644 --- a/.github/workflows/module_appservice_build_main.yaml +++ b/.github/workflows/module_appservice_build_main.yaml @@ -24,9 +24,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y btrfs-progs libbtrfs-dev - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: '1.24.6' + go-version: '1.24.11' - run: make build working-directory: framework/app-service diff --git a/.github/workflows/native-verification.yaml b/.github/workflows/native-verification.yaml new file mode 100644 index 000000000..41b21887a --- /dev/null +++ b/.github/workflows/native-verification.yaml @@ -0,0 +1,88 @@ +name: Native Verification + +on: + push: + branches: + - main + - 'release-*' + paths: + - '.github/workflows/native-verification.yaml' + - 'daemon/**' + - 'framework/app-service/**' + - 'docs/**' + pull_request: + paths: + - '.github/workflows/native-verification.yaml' + - 'daemon/**' + - 'framework/app-service/**' + - 'docs/**' + workflow_dispatch: + +permissions: + contents: read + +jobs: + docs-build: + name: Build Docs + runs-on: ubuntu-24.04 + defaults: + run: + working-directory: docs + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: npm + cache-dependency-path: docs/package-lock.json + + - name: Install docs dependencies + run: npm ci + + - name: Build docs + run: npm run build + + appservice-native-build: + name: Build App-Service Native + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.11' + + - name: Install native dependencies + run: | + sudo apt-get update + sudo apt-get install -y btrfs-progs libbtrfs-dev + + - name: Build app-service + run: go build ./... + working-directory: framework/app-service + + daemon-native-build: + name: Build Daemon Native + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.11' + + - name: Install native dependencies + run: | + sudo apt-get update + sudo apt-get install -y libudev-dev libpcap-dev + + - name: Build daemon + run: go build ./cmd/... + working-directory: daemon diff --git a/build/deps-manifest.sh b/build/deps-manifest.sh index 5c07bb1a2..67c21c0db 100644 --- a/build/deps-manifest.sh +++ b/build/deps-manifest.sh @@ -35,11 +35,15 @@ if [[ "${REPO_PATH}" != "" && "$REPO_PATH" != "/" ]]; then fi -find $BASE_DIR/../ -type f -name Olares.yaml | while read f; do +find $BASE_DIR/../ -type f \( -name BeOS.yaml -o -name Olares.yaml \) | while read f; do if [[ "$f" == *"/vendor/"* ]]; then echo "skip vendor file $f" continue fi + if [[ "$f" == *"/Olares.yaml"* && -f "${f%Olares.yaml}BeOS.yaml" ]]; then + echo "skip legacy manifest $f" + continue + fi echo "Processing $f" declare -a bins IFS= diff --git a/build/verify-native-in-container.sh b/build/verify-native-in-container.sh new file mode 100755 index 000000000..a610bf66f --- /dev/null +++ b/build/verify-native-in-container.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) + +require_docker() { + if ! command -v docker >/dev/null 2>&1; then + echo "docker is required" >&2 + exit 1 + fi +} + +run_docs() { + echo "==> Building docs in container" + docker run --rm \ + -v "$ROOT_DIR/docs":/src:ro \ + node:20-bookworm \ + bash -lc 'cp -a /src /tmp/docs && cd /tmp/docs && npm ci && npm run build' +} + +run_appservice() { + echo "==> Building app-service in container" + docker run --rm \ + -v "$ROOT_DIR":/src:ro \ + -w /src/framework/app-service \ + golang:1.24-bookworm \ + bash -lc 'export PATH=/usr/local/go/bin:$PATH GOFLAGS=-buildvcs=false && apt-get update && apt-get install -y btrfs-progs libbtrfs-dev && go build ./...' +} + +run_daemon() { + echo "==> Building daemon in container" + docker run --rm \ + -v "$ROOT_DIR":/src:ro \ + -w /src/daemon \ + golang:1.24-bookworm \ + bash -lc 'export PATH=/usr/local/go/bin:$PATH GOFLAGS=-buildvcs=false && apt-get update && apt-get install -y libudev-dev libpcap-dev && go build ./cmd/...' +} + +main() { + require_docker + + local targets=("$@") + if [ ${#targets[@]} -eq 0 ] || { [ ${#targets[@]} -eq 1 ] && [ "${targets[0]}" = "all" ]; }; then + targets=(docs app-service daemon) + fi + + local target + for target in "${targets[@]}"; do + case "$target" in + docs) + run_docs + ;; + app-service|appservice) + run_appservice + ;; + daemon) + run_daemon + ;; + *) + echo "unknown target: $target" >&2 + exit 1 + ;; + esac + done +} + +main "$@" diff --git a/cli/.goreleaser.yaml b/cli/.goreleaser.yaml index c1ba2b325..03e93abf5 100644 --- a/cli/.goreleaser.yaml +++ b/cli/.goreleaser.yaml @@ -1,8 +1,8 @@ -project_name: olares-cli +project_name: beos-cli builds: - env: - CGO_ENABLED=0 - binary: olares-cli + binary: beos-cli main: ./cmd/main.go goos: - linux @@ -26,14 +26,14 @@ builds: ldflags: - -s - -w - - -X github.com/beclab/Olares/cli/version.VERSION={{ .Version }} + - -X github.com/beclab/beOS Pro/cli/version.VERSION={{ .Version }} - >- {{- if index .Env "OLARES_VENDOR_TYPE" }} - -X github.com/beclab/Olares/cli/version.VENDOR={{ .Env.OLARES_VENDOR_TYPE }} + -X github.com/beclab/beOS Pro/cli/version.VENDOR={{ .Env.OLARES_VENDOR_TYPE }} {{- end }} - >- {{- if index .Env "OLARES_VENDOR_REPO_PATH" }} - -X github.com/beclab/Olares/cli/version.VENDOR_REPO_PATH={{ .Env.OLARES_VENDOR_REPO_PATH }} + -X github.com/beclab/beOS Pro/cli/version.VENDOR_REPO_PATH={{ .Env.OLARES_VENDOR_REPO_PATH }} {{- end }} dist: ./output archives: diff --git a/cli/cmd/config/common_flags.go b/cli/cmd/config/common_flags.go index 7a94947ef..78245ccd6 100644 --- a/cli/cmd/config/common_flags.go +++ b/cli/cmd/config/common_flags.go @@ -29,7 +29,7 @@ func AddVersionFlagBy(flagSetter CommandFlagSetter) { flagSetter.Add(common.FlagVersion, "v", version.VERSION, - "Set Olares version, e.g., 1.10.0, 1.10.0-20241109", + "Set beOS version, e.g., 1.10.0, 1.10.0-20241109", ) } @@ -37,7 +37,7 @@ func AddBaseDirFlagBy(flagSetter CommandFlagSetter) { flagSetter.Add(common.FlagBaseDir, "b", "", - "Set Olares package base dir, defaults to $HOME/"+cc.DefaultBaseDir, + "Set beOS package base dir, defaults to $HOME/"+cc.DefaultBaseDir, ) } @@ -60,8 +60,8 @@ func AddKubeTypeFlagBy(flagSetter CommandFlagSetter) { func AddCDNServiceFlagBy(flagSetter CommandFlagSetter) { flagSetter.Add(common.FlagCDNService, "", - cc.DefaultOlaresCDNService, - "Set the CDN accelerated download address in the format https://cdn.olares.cn. If not set, the default download address will be used", + cc.DefaultBeOSCDNService, + "Set an optional CDN download address in the format https://cdn.example.com. If not set, configured defaults will be used", ).WithEnv(common.ENV_OLARES_CDN_SERVICE) } diff --git a/cli/cmd/config/flag_setter.go b/cli/cmd/config/flag_setter.go index 28756d477..f50cd6a33 100644 --- a/cli/cmd/config/flag_setter.go +++ b/cli/cmd/config/flag_setter.go @@ -18,7 +18,7 @@ import ( // 2) Enable viper to read environment variables // 3) Bind environment variables for all known keys we care about func Init() { - godotenv.Load(common.OlaresReleaseFile) + godotenv.Load(common.BeOSReleaseFile) viper.SetEnvPrefix("OLARES") viper.SetEnvKeyReplacer(envKeyReplacer) viper.AutomaticEnv() diff --git a/cli/cmd/ctl/amdgpu/root.go b/cli/cmd/ctl/amdgpu/root.go index 554fe19ab..f2e152807 100644 --- a/cli/cmd/ctl/amdgpu/root.go +++ b/cli/cmd/ctl/amdgpu/root.go @@ -12,5 +12,3 @@ func NewCmdAmdGpu() *cobra.Command { cmd.AddCommand(NewCmdAmdGpuStatus()) return cmd } - - diff --git a/cli/cmd/ctl/disk/extend.go b/cli/cmd/ctl/disk/extend.go index cc969186b..ab616ab6a 100644 --- a/cli/cmd/ctl/disk/extend.go +++ b/cli/cmd/ctl/disk/extend.go @@ -14,7 +14,7 @@ import ( "github.com/spf13/cobra" ) -const defaultOlaresVGName = "olares-vg" +const defaultBeOSVGName = "beos-vg" func NewExtendDiskCommand() *cobra.Command { cmd := &cobra.Command{ @@ -196,7 +196,7 @@ func selectExtendingLV(vgName string, lvs []*lvm.LvItem) (string, error) { return lvs[0].LvName, nil } - if vgName == defaultOlaresVGName { + if vgName == defaultBeOSVGName { selectedLv := "" for _, lv := range lvs { if lv.LvName == "root" { diff --git a/cli/cmd/ctl/gpu/disable.go b/cli/cmd/ctl/gpu/disable.go index 4e08c4f50..c4be6afc0 100644 --- a/cli/cmd/ctl/gpu/disable.go +++ b/cli/cmd/ctl/gpu/disable.go @@ -10,7 +10,7 @@ import ( func NewCmdDisableGpu() *cobra.Command { cmd := &cobra.Command{ Use: "disable", - Short: "Disable GPU drivers for Olares node", + Short: "Disable GPU drivers for beOS node", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.DisableGpuNode(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/gpu/disable_nouveau.go b/cli/cmd/ctl/gpu/disable_nouveau.go index 56be7870d..b3266e6ae 100644 --- a/cli/cmd/ctl/gpu/disable_nouveau.go +++ b/cli/cmd/ctl/gpu/disable_nouveau.go @@ -19,5 +19,3 @@ func NewCmdDisableNouveau() *cobra.Command { } return cmd } - - diff --git a/cli/cmd/ctl/gpu/enable.go b/cli/cmd/ctl/gpu/enable.go index 071846d05..47ed64e35 100644 --- a/cli/cmd/ctl/gpu/enable.go +++ b/cli/cmd/ctl/gpu/enable.go @@ -10,7 +10,7 @@ import ( func NewCmdEnableGpu() *cobra.Command { cmd := &cobra.Command{ Use: "enable", - Short: "Enable GPU drivers for Olares node", + Short: "Enable GPU drivers for beOS node", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.EnableGpuNode(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/gpu/install.go b/cli/cmd/ctl/gpu/install.go index aa0176b01..8d8260967 100644 --- a/cli/cmd/ctl/gpu/install.go +++ b/cli/cmd/ctl/gpu/install.go @@ -11,7 +11,7 @@ import ( func NewCmdInstallGpu() *cobra.Command { cmd := &cobra.Command{ Use: "install", - Short: "Install GPU drivers for Olares", + Short: "Install GPU drivers for beOS Pro", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.InstallGpuDrivers(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/gpu/uninstall.go b/cli/cmd/ctl/gpu/uninstall.go index ef8da0d99..6be767bd6 100644 --- a/cli/cmd/ctl/gpu/uninstall.go +++ b/cli/cmd/ctl/gpu/uninstall.go @@ -10,7 +10,7 @@ import ( func NewCmdUninstallpu() *cobra.Command { cmd := &cobra.Command{ Use: "uninstall", - Short: "uninstall GPU drivers for Olares", + Short: "uninstall GPU drivers for beOS Pro", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.UninstallGpuDrivers(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/os/changeip.go b/cli/cmd/ctl/os/changeip.go index ea89230ce..a2e40d43a 100644 --- a/cli/cmd/ctl/os/changeip.go +++ b/cli/cmd/ctl/os/changeip.go @@ -12,7 +12,7 @@ import ( func NewCmdChangeIP() *cobra.Command { cmd := &cobra.Command{ Use: "change-ip", - Short: "change The IP address of Olares OS", + Short: "change The IP address of beOS Pro", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.ChangeIPPipeline(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/os/download.go b/cli/cmd/ctl/os/download.go index 4ff411f46..3e5d3832f 100644 --- a/cli/cmd/ctl/os/download.go +++ b/cli/cmd/ctl/os/download.go @@ -12,7 +12,7 @@ import ( func NewCmdRootDownload() *cobra.Command { rootDownloadCmd := &cobra.Command{ Use: "download", - Short: "Download the packages and components needed to install Olares", + Short: "Download the packages and components needed to install beOS Pro", } rootDownloadCmd.AddCommand(NewCmdCheckDownload()) @@ -25,7 +25,7 @@ func NewCmdRootDownload() *cobra.Command { func NewCmdDownload() *cobra.Command { cmd := &cobra.Command{ Use: "component", - Short: "Download the packages and components needed to install Olares", + Short: "Download the packages and components needed to install beOS Pro", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.DownloadInstallationPackage(); err != nil { @@ -45,7 +45,7 @@ func NewCmdDownload() *cobra.Command { func NewCmdDownloadWizard() *cobra.Command { cmd := &cobra.Command{ Use: "wizard", - Short: "Download the Olares installation wizard", + Short: "Download the beOS installation wizard", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.DownloadInstallationWizard(); err != nil { @@ -67,7 +67,7 @@ func NewCmdDownloadWizard() *cobra.Command { func NewCmdCheckDownload() *cobra.Command { cmd := &cobra.Command{ Use: "check", - Short: "Check Downloaded Olares Installation Package", + Short: "Check Downloaded beOS Pro Installation Package", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.CheckDownloadInstallationPackage(); err != nil { diff --git a/cli/cmd/ctl/os/info.go b/cli/cmd/ctl/os/info.go index 5deb751e7..a2a51aa70 100644 --- a/cli/cmd/ctl/os/info.go +++ b/cli/cmd/ctl/os/info.go @@ -8,7 +8,7 @@ import ( func NewCmdPrintInfo() *cobra.Command { cmd := &cobra.Command{ Use: "info", - Short: "Print Olares info", + Short: "Print beOS Pro info", Run: func(cmd *cobra.Command, args []string) { pipelines.PrintTerminusInfo() }, diff --git a/cli/cmd/ctl/os/install.go b/cli/cmd/ctl/os/install.go index 44d8edade..bd4e9e399 100644 --- a/cli/cmd/ctl/os/install.go +++ b/cli/cmd/ctl/os/install.go @@ -12,7 +12,7 @@ import ( func NewCmdInstallOs() *cobra.Command { cmd := &cobra.Command{ Use: "install", - Short: "Install Olares", + Short: "Install beOS Pro", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.CliInstallTerminusPipeline(); err != nil { log.Fatalf("error: %v", err) @@ -23,17 +23,17 @@ func NewCmdInstallOs() *cobra.Command { flagSetter.Add(common.FlagOSUserName, "", "", - "Set the username for the Olares instance, if not set, will be prompted for input", + "Set the username for the beOS Pro instance, if not set, will be prompted for input", ).WithEnv(common.EnvLegacyOSUserName) flagSetter.Add(common.FlagOSDomainName, "", "", - "Set the domain name for the Olares instance, if not set, will be prompted for input", + "Set the domain name for the beOS Pro instance, if not set, will be prompted for input", ).WithEnv(common.EnvLegacyOSDomainName) flagSetter.Add(common.FlagOSPassword, "", "", - "Set the inital password for the first user of the Olares instance, if not set, a randomly generated password will be used", + "Set the inital password for the first user of the beOS Pro instance, if not set, a randomly generated password will be used", ) flagSetter.Add(common.FlagEnableReverseProxy, "", @@ -43,7 +43,7 @@ func NewCmdInstallOs() *cobra.Command { flagSetter.Add(common.FlagEnableJuiceFS, "", false, - "Use JuiceFS as the rootfs for Olares workloads, rather than the local disk.", + "Use JuiceFS as the rootfs for beOS workloads, rather than the local disk.", ).WithAlias(common.FlagLegacyEnableJuiceFS).WithEnv(common.EnvLegacyEnableJuiceFS) flagSetter.Add(common.FlagEnablePodSwap, "", diff --git a/cli/cmd/ctl/os/logs.go b/cli/cmd/ctl/os/logs.go index 1f7f210f6..353f33808 100644 --- a/cli/cmd/ctl/os/logs.go +++ b/cli/cmd/ctl/os/logs.go @@ -43,7 +43,7 @@ type LogCollectOptions struct { SkipKubeAPISserver bool } -var servicesToCollectLogs = []string{"k3s", "containerd", "olaresd", "kubelet", "juicefs", "redis", "minio", "etcd", "NetworkManager"} +var servicesToCollectLogs = []string{"k3s", "containerd", "beosd", "olaresd", "kubelet", "juicefs", "redis", "minio", "etcd", "NetworkManager"} // setSkipIfK8sNotReachable checks if the Kubernetes API server port is reachable // and automatically sets skip-kube-apiserver to true if not reachable @@ -124,9 +124,9 @@ func collectLogs(options *LogCollectOptions) error { return fmt.Errorf("failed to collect kubernetes logs: %v", err) } - fmt.Println("collecting olares-cli logs...") - if err := collectOlaresCLILogs(tw, options); err != nil { - return fmt.Errorf("failed to collect OlaresCLI logs: %v", err) + fmt.Println("collecting beos-cli logs...") + if err := collectBeOSCLILogs(tw, options); err != nil { + return fmt.Errorf("failed to collect BeOSCLI logs: %v", err) } fmt.Println("collecting network configs...") @@ -138,14 +138,14 @@ func collectLogs(options *LogCollectOptions) error { return nil } -func collectOlaresCLILogs(tw *tar.Writer, options *LogCollectOptions) error { +func collectBeOSCLILogs(tw *tar.Writer, options *LogCollectOptions) error { basedir, err := getBaseDir() if err != nil { return err } cliLogDir := filepath.Join(basedir, "logs") if _, err := os.Stat(cliLogDir); err != nil { - fmt.Printf("warning: directory %s does not exist, skipping collecting olares-cli logs\n", cliLogDir) + fmt.Printf("warning: directory %s does not exist, skipping collecting beos-cli logs\n", cliLogDir) return nil } err = filepath.Walk(cliLogDir, func(path string, info os.FileInfo, err error) error { @@ -169,7 +169,7 @@ func collectOlaresCLILogs(tw *tar.Writer, options *LogCollectOptions) error { } header := &tar.Header{ - Name: filepath.Join("olares-cli", relPath), + Name: filepath.Join("beos-cli", relPath), Mode: 0644, Size: info.Size(), ModTime: info.ModTime(), @@ -185,7 +185,7 @@ func collectOlaresCLILogs(tw *tar.Writer, options *LogCollectOptions) error { return nil }) if err != nil { - return fmt.Errorf("failed to collect olares-cli logs from %s: %v", cliLogDir, err) + return fmt.Errorf("failed to collect beos-cli logs from %s: %v", cliLogDir, err) } return nil } @@ -652,16 +652,16 @@ func NewCmdLogs() *cobra.Command { cmd := &cobra.Command{ Use: "logs", - Short: "Collect logs from all Olares system components", - Long: `Collect logs from various Olares system components, that may or may not be installed on this machine, including: + Short: "Collect logs from all beOS Pro system components", + Long: `Collect logs from various beOS Pro system components, that may or may not be installed on this machine, including: - K3s/Kubelet logs - Containerd logs - JuiceFS logs - Redis logs - MinIO logs - etcd logs -- Olaresd logs -- olares-cli logs +- BeOSd logs +- beos-cli logs - network configurations - Kubernetes pod info and logs - Kubernetes node info`, @@ -675,7 +675,7 @@ func NewCmdLogs() *cobra.Command { cmd.Flags().StringVar(&options.Since, "since", options.Since, "Only return logs newer than a relative duration like 5s, 2m, or 3h, to limit the log file") cmd.Flags().IntVar(&options.MaxLines, "max-lines", options.MaxLines, "Maximum number of lines to collect per log source, to limit the log file size") cmd.Flags().StringVar(&options.OutputDir, "output-dir", options.OutputDir, "Directory to store collected logs, will be created if not existing") - cmd.Flags().StringSliceVar(&options.Components, "components", nil, "Specific components (systemd service) to collect logs from (comma-separated). If empty, collects from all Olares-related components that can be found") + cmd.Flags().StringSliceVar(&options.Components, "components", nil, "Specific components (systemd service) to collect logs from (comma-separated). If empty, collects from all beOS-related components that can be found") cmd.Flags().BoolVar(&options.IgnoreKubeErrors, "ignore-kube-errors", options.IgnoreKubeErrors, "Continue collecting logs even if kubectl commands fail") cmd.Flags().BoolVar(&options.SkipKubeAPISserver, "skip-kube-apiserver", options.SkipKubeAPISserver, "Skip retrieving logs from kube-apiserver, it's automatically set if apiserver is not reachable. To tolerate other cases, set the ignore-kube-errors") diff --git a/cli/cmd/ctl/os/release.go b/cli/cmd/ctl/os/release.go index 933f0fd75..3cd5d3ea4 100644 --- a/cli/cmd/ctl/os/release.go +++ b/cli/cmd/ctl/os/release.go @@ -21,7 +21,7 @@ import ( func NewCmdRelease() *cobra.Command { cmd := &cobra.Command{ Use: "release", - Short: "Build release based on a local Olares repository", + Short: "Build release based on a local beOS repository", Run: func(cmd *cobra.Command, args []string) { baseDir := viper.GetString(common.FlagBaseDir) version := viper.GetString(common.FlagVersion) @@ -35,7 +35,7 @@ func NewCmdRelease() *cobra.Command { os.Exit(1) } if !strings.HasPrefix(strings.ToLower(filepath.Base(cwd)), "olares") { - fmt.Println("error: please run release command under the root path of Olares repo") + fmt.Println("error: please run release command under the root path of beOS repo") os.Exit(1) } if baseDir == "" { diff --git a/cli/cmd/ctl/os/startstop.go b/cli/cmd/ctl/os/startstop.go index 30a74c071..3b46842d8 100644 --- a/cli/cmd/ctl/os/startstop.go +++ b/cli/cmd/ctl/os/startstop.go @@ -12,9 +12,9 @@ import ( func NewCmdStart() *cobra.Command { cmd := &cobra.Command{ Use: "start", - Short: "Start the Olares OS", + Short: "Start the beOS Pro", Run: func(cmd *cobra.Command, args []string) { - if err := pipelines.StartOlares(); err != nil { + if err := pipelines.StartBeOS(); err != nil { log.Fatalf("error: %v", err) } }, @@ -29,9 +29,9 @@ func NewCmdStop() *cobra.Command { ) cmd := &cobra.Command{ Use: "stop", - Short: "Stop the Olares OS", + Short: "Stop the beOS Pro", Run: func(cmd *cobra.Command, args []string) { - if err := pipelines.StopOlares(timeout, checkInterval); err != nil { + if err := pipelines.StopBeOS(timeout, checkInterval); err != nil { log.Fatalf("error: %v", err) } }, diff --git a/cli/cmd/ctl/os/storage.go b/cli/cmd/ctl/os/storage.go index ce43cfc3b..4d392efbe 100644 --- a/cli/cmd/ctl/os/storage.go +++ b/cli/cmd/ctl/os/storage.go @@ -11,7 +11,7 @@ import ( func NewCmdInstallStorage() *cobra.Command { cmd := &cobra.Command{ Use: "storage", - Short: "install a storage backend for the Olares shared filesystem, or in the case of external storage, validate the config", + Short: "install a storage backend for the beOS Pro shared filesystem, or in the case of external storage, validate the config", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.CliInstallStoragePipeline(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/os/uninstall.go b/cli/cmd/ctl/os/uninstall.go index 45969f3f5..ea5bea514 100644 --- a/cli/cmd/ctl/os/uninstall.go +++ b/cli/cmd/ctl/os/uninstall.go @@ -14,7 +14,7 @@ import ( func NewCmdUninstallOs() *cobra.Command { cmd := &cobra.Command{ Use: "uninstall", - Short: "Uninstall Olares", + Short: "Uninstall beOS Pro", Run: func(cmd *cobra.Command, args []string) { err := pipelines.UninstallTerminusPipeline() if err != nil { @@ -31,7 +31,7 @@ func NewCmdUninstallOs() *cobra.Command { // these two flags' names are too general, and only used in cmd options, so we manually bind them to the viper // inside the pipeline creator, it still uses the flag vars to get the values - cmd.Flags().Bool("all", false, "Uninstall Olares completely, including prepared dependencies") + cmd.Flags().Bool("all", false, "Uninstall beOS Pro completely, including prepared dependencies") viper.BindPFlag(common.FlagUninstallAll, cmd.Flags().Lookup("all")) cmd.Flags().String("phase", cluster.PhaseInstall.String(), "Uninstall from a specified phase and revert to the previous one. For example, using --phase install will remove the tasks performed in the 'install' phase, effectively returning the system to the 'prepare' state.") viper.BindPFlag(common.FlagUninstallPhase, cmd.Flags().Lookup("phase")) diff --git a/cli/cmd/ctl/os/upgrade.go b/cli/cmd/ctl/os/upgrade.go index cbf7abfd4..915eddef8 100644 --- a/cli/cmd/ctl/os/upgrade.go +++ b/cli/cmd/ctl/os/upgrade.go @@ -18,9 +18,9 @@ import ( func NewCmdUpgradeOs() *cobra.Command { cmd := &cobra.Command{ Use: "upgrade", - Short: "Upgrade Olares to a newer version", + Short: "Upgrade beOS Pro to a newer version", Run: func(cmd *cobra.Command, args []string) { - if err := pipelines.UpgradeOlaresPipeline(); err != nil { + if err := pipelines.UpgradeBeOSPipeline(); err != nil { log.Fatalf("error: %v", err) } }, @@ -40,7 +40,7 @@ func NewCmdCurrentVersionUpgradeSpec() *cobra.Command { cmd := &cobra.Command{ Use: "spec", Aliases: []string{"current-spec"}, - Short: fmt.Sprintf("Get the upgrade spec of the current olares-cli version (%s)", version.VERSION), + Short: fmt.Sprintf("Get the upgrade spec of the current beos-cli version (%s)", version.VERSION), RunE: func(cmd *cobra.Command, args []string) error { spec, err := upgrade.CurrentVersionSpec() if err != nil { @@ -62,7 +62,7 @@ func NewCmdUpgradeViable() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { if baseVersionStr == "" { var err error - baseVersionStr, err = phase.GetOlaresVersion() + baseVersionStr, err = phase.GetBeOSVersion() if err != nil { return err } @@ -84,14 +84,14 @@ func NewCmdUpgradeViable() *cobra.Command { return nil }, } - cmd.Flags().StringVarP(&baseVersionStr, "base", "b", "", "base version, defaults to the current Olares system's version") + cmd.Flags().StringVarP(&baseVersionStr, "base", "b", "", "base version, defaults to the current beOS Pro system's version") return cmd } func NewCmdUpgradePrecheck() *cobra.Command { cmd := &cobra.Command{ Use: "precheck", - Short: "Precheck Olares for Upgrade", + Short: "Precheck beOS Pro for Upgrade", Run: func(cmd *cobra.Command, args []string) { if err := pipelines.UpgradePreCheckPipeline(); err != nil { log.Fatalf("error: %v", err) diff --git a/cli/cmd/ctl/user/activate.go b/cli/cmd/ctl/user/activate.go index 972273442..9c688dc3a 100644 --- a/cli/cmd/ctl/user/activate.go +++ b/cli/cmd/ctl/user/activate.go @@ -14,7 +14,7 @@ type activateUserOptions struct { BflUrl string VaultUrl string Password string - OlaresId string + BeOSId string ResetPassword string Location string @@ -27,11 +27,11 @@ type activateUserOptions struct { func NewCmdActivateUser() *cobra.Command { o := &activateUserOptions{} cmd := &cobra.Command{ - Use: "activate {Olares ID (e.g., user@example.com)}", + Use: "activate {beOS ID (e.g., user@example.com)}", Short: "activate a new user", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { - o.OlaresId = args[0] + o.BeOSId = args[0] if err := o.Validate(); err != nil { log.Fatal(err) } @@ -58,8 +58,8 @@ func (o *activateUserOptions) AddFlags(cmd *cobra.Command) { } func (o *activateUserOptions) Validate() error { - if o.OlaresId == "" { - return fmt.Errorf("Olares ID is required") + if o.BeOSId == "" { + return fmt.Errorf("beOS ID is required") } if o.Password == "" { return fmt.Errorf("Password is required") @@ -76,24 +76,24 @@ func (o *activateUserOptions) Validate() error { func (c *activateUserOptions) Run() error { log.Println("=== TermiPass CLI - User Bind Terminus ===") - localName := c.OlaresId - if strings.Contains(c.OlaresId, "@") { - localName = strings.Split(c.OlaresId, "@")[0] + localName := c.BeOSId + if strings.Contains(c.BeOSId, "@") { + localName = strings.Split(c.BeOSId, "@")[0] } log.Printf("Parameters:") log.Printf(" BflUrl: %s", c.BflUrl) log.Printf(" VaultUrl: %s", c.VaultUrl) - log.Printf(" Terminus Name: %s", c.OlaresId) + log.Printf(" Terminus Name: %s", c.BeOSId) log.Printf(" Local Name: %s", localName) log.Printf("Initializing global stores with mnemonic...") - err := wizard.InitializeGlobalStores(c.Mnemonic, c.OlaresId) + err := wizard.InitializeGlobalStores(c.Mnemonic, c.BeOSId) if err != nil { return fmt.Errorf("failed to initialize global stores: %v", err) } - accessToken, err := wizard.UserBindTerminus(c.Mnemonic, c.BflUrl, c.VaultUrl, c.Password, c.OlaresId, localName) + accessToken, err := wizard.UserBindTerminus(c.Mnemonic, c.BflUrl, c.VaultUrl, c.Password, c.BeOSId, localName) if err != nil { return fmt.Errorf("user bind failed: %v", err) } diff --git a/cli/cmd/ctl/user/create.go b/cli/cmd/ctl/user/create.go index 138ea41e5..f3e21d64e 100644 --- a/cli/cmd/ctl/user/create.go +++ b/cli/cmd/ctl/user/create.go @@ -51,7 +51,7 @@ func NewCmdCreateUser() *cobra.Command { func (o *createUserOptions) AddFlags(cmd *cobra.Command) { cmd.Flags().StringVar(&o.displayName, "display-name", "", "display name (optional)") - cmd.Flags().StringVar(&o.domain, "domain", "", "domain (optional, defaults to the Olares system's domain)") + cmd.Flags().StringVar(&o.domain, "domain", "", "domain (optional, defaults to the beOS Pro system's domain)") cmd.Flags().StringVarP(&o.role, "role", "r", "normal", "owner role (optional, one of owner, admin, normal)") cmd.Flags().StringVarP(&o.memoryLimit, "memory-limit", "m", defaultMemoryLimit, "memory limit (optional)") cmd.Flags().StringVarP(&o.cpuLimit, "cpu-limit", "c", defaultCPULimit, "cpu limit (optional)") @@ -146,7 +146,7 @@ func (o *createUserOptions) Run() error { log.Println("generated initial password:", password) o.password = passwordEncrypted } else { - o.password = utils.MD5(o.password + "@Olares2025") + o.password = utils.MD5(o.password + "@beOSPro2025") } olaresName := fmt.Sprintf("%s@%s", o.name, o.domain) diff --git a/cli/cmd/ctl/user/reset_password.go b/cli/cmd/ctl/user/reset_password.go index da5f91b85..bd1809508 100644 --- a/cli/cmd/ctl/user/reset_password.go +++ b/cli/cmd/ctl/user/reset_password.go @@ -23,13 +23,13 @@ import ( const ( resetNamespace = "os-framework" - resetServiceAccount = "olares-cli-sa" + resetServiceAccount = "beos-cli-sa" resetServiceName = "auth-provider-svc" resetServicePortName = "server" defaultServicePort = 28080 - passwordSaltSuffix = "@Olares2025" + passwordSaltSuffix = "@beOSPro2025" authHeaderBearer = "Bearer " - cliAuthHeader = "Olares-CLI-Authorization" + cliAuthHeader = "BeOS-CLI-Authorization" resetRequestPathTmpl = "http://%s:%d/cli/api/reset/%s/password" ) diff --git a/cli/cmd/ctl/user/utils.go b/cli/cmd/ctl/user/utils.go index 49fe99a7d..6f1b0287c 100644 --- a/cli/cmd/ctl/user/utils.go +++ b/cli/cmd/ctl/user/utils.go @@ -6,8 +6,8 @@ import ( "strconv" "time" - "github.com/beclab/beos/framework/app-service/api/sys.bytetrade.io/v1alpha1" iamv1alpha2 "github.com/beclab/api/iam/v1alpha2" + "github.com/beclab/beos/framework/app-service/api/sys.bytetrade.io/v1alpha1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/clientcmd" diff --git a/cli/pkg/amdgpu/tasks.go b/cli/pkg/amdgpu/tasks.go index 1656b461c..7635dad1b 100644 --- a/cli/pkg/amdgpu/tasks.go +++ b/cli/pkg/amdgpu/tasks.go @@ -65,7 +65,7 @@ func (t *InstallAmdRocm) Execute(runtime connector.Runtime) error { rocmV, _ := connector.RocmVersion() min := semver.MustParse("7.1.1") if rocmV != nil && rocmV.LessThan(min) { - return fmt.Errorf("detected ROCm version %s, which is lower than required %s; please uninstall existing ROCm/AMDGPU components before installation with command: olares-cli amdgpu uninstall", rocmV.Original(), min.Original()) + return fmt.Errorf("detected ROCm version %s, which is lower than required %s; please uninstall existing ROCm/AMDGPU components before installation with command: beos-cli amdgpu uninstall", rocmV.Original(), min.Original()) } if rocmV != nil && rocmV.GreaterThan(min) { logger.Warnf("Warning: detected ROCm version %s great than maximum tested version %s") diff --git a/cli/pkg/bootstrap/os/tasks.go b/cli/pkg/bootstrap/os/tasks.go index 4281a950a..2ad7a688e 100644 --- a/cli/pkg/bootstrap/os/tasks.go +++ b/cli/pkg/bootstrap/os/tasks.go @@ -229,7 +229,7 @@ func (n *NodeConfigureOS) Execute(runtime connector.Runtime) error { } // if running in docker container, /etc/hosts file is bind mounting, cannot be replaced via mv command - if !n.KubeConf.Arg.IsOlaresInContainer { + if !n.KubeConf.Arg.IsBeOSInContainer { _, err1 := runtime.GetRunner().SudoCmd(fmt.Sprintf("hostnamectl set-hostname %s && sed -i '/^127.0.1.1/s/.*/127.0.1.1 %s/g' /etc/hosts", host.GetName(), host.GetName()), false, false) if err1 != nil { return errors.Wrap(errors.WithStack(err1), "Failed to override hostname") diff --git a/cli/pkg/bootstrap/os/templates/swap.go b/cli/pkg/bootstrap/os/templates/swap.go index 4446ed7b5..be97540df 100644 --- a/cli/pkg/bootstrap/os/templates/swap.go +++ b/cli/pkg/bootstrap/os/templates/swap.go @@ -8,7 +8,7 @@ import ( var SwapServiceTmpl = template.Must(template.New("olares-swap.service").Parse( dedent.Dedent(`[Unit] -Description=Olares Swap Configuring Service +Description=beOS Pro Swap Configuring Service After=local-fs.target StartLimitIntervalSec=0 diff --git a/cli/pkg/bootstrap/patch/tasks.go b/cli/pkg/bootstrap/patch/tasks.go index 0605bf64a..78c5af67d 100644 --- a/cli/pkg/bootstrap/patch/tasks.go +++ b/cli/pkg/bootstrap/patch/tasks.go @@ -295,7 +295,7 @@ func (t *DisableLocalDNSTask) configResolvConf(runtime connector.Runtime) error } primaryDNSServer, secondaryDNSServer := "1.1.1.1", "114.114.114.114" - if strings.Contains(t.KubeConf.Arg.RegistryMirrors, common.OlaresRegistryMirrorHost) || strings.Contains(t.KubeConf.Arg.RegistryMirrors, common.OlaresRegistryMirrorHostLegacy) { + if strings.Contains(t.KubeConf.Arg.RegistryMirrors, common.BeOSRegistryMirrorHost) || strings.Contains(t.KubeConf.Arg.RegistryMirrors, common.BeOSRegistryMirrorHostLegacy) { primaryDNSServer, secondaryDNSServer = secondaryDNSServer, primaryDNSServer } diff --git a/cli/pkg/bootstrap/precheck/tasks.go b/cli/pkg/bootstrap/precheck/tasks.go index a0b6c7391..1fea6edb6 100644 --- a/cli/pkg/bootstrap/precheck/tasks.go +++ b/cli/pkg/bootstrap/precheck/tasks.go @@ -115,7 +115,7 @@ func (t *RequiredPortsCheck) Check(runtime connector.Runtime) error { defer l.Close() } if len(unbindablePorts) > 0 { - return fmt.Errorf("port %v required by Olares cannot be bound, you can check which process using the command `sudo netstat -tlnp`", unbindablePorts) + return fmt.Errorf("port %v required by beOS Pro cannot be bound, you can check which process using the command `sudo netstat -tlnp`", unbindablePorts) } return nil } @@ -135,14 +135,14 @@ func (t *ConflictingContainerdCheck) Check(runtime connector.Runtime) error { return nil } fixMSG := "\nIf it is installed as a component of Docker, it should be uninstalled per the official doc https://docs.docker.com/engine/install/ubuntu/#uninstall-old-versions" - fixMSG += "\nIf it is left over from a previous installation of Olares, clean it up using the command `sudo olares-cli uninstall --all`" + fixMSG += "\nIf it is left over from a previous installation of beOS Pro, clean it up using the command `sudo beos-cli uninstall --all`" containerdBin, err := util.GetCommand("containerd") if err == nil && containerdBin != "" { - return fmt.Errorf("found existing containerd binary: %s, a containerd managed by Olares is required to ensure normal function%s", containerdBin, fixMSG) + return fmt.Errorf("found existing containerd binary: %s, a containerd managed by beOS Pro is required to ensure normal function%s", containerdBin, fixMSG) } containerdSocket := "/run/containerd/containerd.sock" if util.IsExist(containerdSocket) { - return fmt.Errorf("found existing containerd socket: %s, a containerd managed by Olares is required to ensure normal function%s", containerdSocket, fixMSG) + return fmt.Errorf("found existing containerd socket: %s, a containerd managed by beOS Pro is required to ensure normal function%s", containerdSocket, fixMSG) } return nil } @@ -160,7 +160,7 @@ func (t *SystemdCheck) Check(runtime connector.Runtime) error { if util.IsExist("/run/systemd/system") { return nil } - return errors.New("this system is not inited by systemd, which is required by Olares") + return errors.New("this system is not inited by systemd, which is required by beOS Pro") } type MasterNodeReadyCheck struct{} @@ -288,7 +288,7 @@ func (t *NvidiaCardArchChecker) Check(runtime connector.Runtime) error { return nil } if !slices.Contains(supportedArchs, arch) { - return fmt.Errorf("unsupported NVIDIA card %s of architecture: %s, Olares only supports the following architectures: %s", model, arch, strings.Join(supportedArchs, ", ")) + return fmt.Errorf("unsupported NVIDIA card %s of architecture: %s, beOS Pro only supports the following architectures: %s", model, arch, strings.Join(supportedArchs, ", ")) } return nil } @@ -326,7 +326,7 @@ func (n *NouveauChecker) Check(runtime connector.Runtime) error { } val := strings.TrimSpace(string(data)) if val == "1" || val == "-1" { - return fmt.Errorf("detected nouveau kernel module loaded with modeset=%s; this conflicts with the NVIDIA driver that Olares will install, please disable it by running `sudo olares-cli gpu disable-nouveau`, REBOOT your machine, and try again", val) + return fmt.Errorf("detected nouveau kernel module loaded with modeset=%s; this conflicts with the NVIDIA driver that beOS Pro will install, please disable it by running `sudo beos-cli gpu disable-nouveau`, REBOOT your machine, and try again", val) } return nil } @@ -411,7 +411,7 @@ func (r *RocmChecker) Check(runtime connector.Runtime) error { min := semver.MustParse("7.1.1") if curV.LessThan(min) { - return fmt.Errorf("detected ROCm version %s, which is lower than required %s; please uninstall existing ROCm/AMDGPU components before installation with command: olares-cli amdgpu uninstall", curV.Original(), min.Original()) + return fmt.Errorf("detected ROCm version %s, which is lower than required %s; please uninstall existing ROCm/AMDGPU components before installation with command: beos-cli amdgpu uninstall", curV.Original(), min.Original()) } return nil } @@ -424,7 +424,7 @@ type GreetingsTask struct { } func (h *GreetingsTask) Execute(runtime connector.Runtime) error { - _, err := runtime.GetRunner().Cmd("echo 'Greetings, Olares'", false, true) + _, err := runtime.GetRunner().Cmd("echo 'Greetings, beOS Pro'", false, true) if err != nil { return err } @@ -605,8 +605,8 @@ func (t *RemoveWSLChattr) Execute(runtime connector.Runtime) error { return nil } -var ErrUnsupportedCudaVersion = errors.New("unsupported cuda version, please uninstall it using the command `sudo olares-cli gpu uninstall`, REBOOT your machine, and try again") +var ErrUnsupportedCudaVersion = errors.New("unsupported cuda version, please uninstall it using the command `sudo beos-cli gpu uninstall`, REBOOT your machine, and try again") var ErrKernelDriverUninstalledButRunning = errors.New("NVIDIA driver is uninstalled, but the kernel driver is still running, please REBOOT your machine, and try again") -var ErrNotInstalledByRunfile = errors.New("NVIDIA driver is installed, but not installed by runfile, please uninstall it using the command `sudo olares-cli gpu uninstall`, REBOOT your machine, and try again") +var ErrNotInstalledByRunfile = errors.New("NVIDIA driver is installed, but not installed by runfile, please uninstall it using the command `sudo beos-cli gpu uninstall`, REBOOT your machine, and try again") var ErrDriverLibraryVersionMismatch = errors.New("NVIDIA driver is installed, but the library version with the running version is mismatched, please REBOOT your machine, and try again") var supportedCudaVersions = []string{common.CurrentVerifiedCudaVersion} diff --git a/cli/pkg/common/common.go b/cli/pkg/common/common.go index 90a59b4ea..527fa3a1a 100755 --- a/cli/pkg/common/common.go +++ b/cli/pkg/common/common.go @@ -123,8 +123,8 @@ const ( ) const ( - OlaresRegistryMirrorHost = "mirrors.joinolares.cn" - OlaresRegistryMirrorHostLegacy = "mirrors.jointerminus.cn" + BeOSRegistryMirrorHost = "mirrors.beos.local" + BeOSRegistryMirrorHostLegacy = "mirrors-legacy.beos.local" ) const ( @@ -137,7 +137,7 @@ const ( TerminusStateFilePrepared = ".prepared" TerminusStateFileInstalled = ".installed" MasterHostConfigFile = "master.conf" - OlaresReleaseFile = "/etc/olares/release" + BeOSReleaseFile = "/etc/olares/release" ) const ( @@ -308,5 +308,5 @@ func SetSystemEnv(key, value string) { } const ( - HelmValuesKeyOlaresRootFSPath = "rootPath" + HelmValuesKeyBeOSRootFSPath = "rootPath" ) diff --git a/cli/pkg/common/kube_runtime.go b/cli/pkg/common/kube_runtime.go index e546071d8..d4ff05263 100755 --- a/cli/pkg/common/kube_runtime.go +++ b/cli/pkg/common/kube_runtime.go @@ -46,15 +46,15 @@ type KubeRuntime struct { type Argument struct { KubernetesVersion string `json:"kubernetes_version"` - OlaresVersion string `json:"olares_version"` + BeOSVersion string `json:"olares_version"` SecurityEnhancement bool `json:"security_enhancement"` InCluster bool `json:"in_cluster"` ContainerManager string `json:"container_manager"` Kubetype string `json:"kube_type"` SystemInfo connector.Systems - RegistryMirrors string `json:"registry_mirrors"` - OlaresCDNService string `json:"olares_cdn_service"` + RegistryMirrors string `json:"registry_mirrors"` + BeOSCDNService string `json:"olares_cdn_service"` // Swap config *SwapConfig @@ -84,7 +84,7 @@ type Argument struct { ConsoleLogTruncate bool `json:"console_log_truncate"` HostIP string `json:"host_ip"` - IsOlaresInContainer bool `json:"is_olares_in_container"` + IsBeOSInContainer bool `json:"is_olares_in_container"` } type SwapConfig struct { @@ -199,7 +199,7 @@ func NewArgument() *Argument { }, NetworkSettings: &NetworkSettings{}, RegistryMirrors: viper.GetString(FlagRegistryMirrors), - OlaresCDNService: viper.GetString(FlagCDNService), + BeOSCDNService: viper.GetString(FlagCDNService), HostIP: viper.GetString(ENV_HOST_IP), Environment: os.Environ(), MasterHostConfig: &MasterHostConfig{}, @@ -208,8 +208,8 @@ func NewArgument() *Argument { // default enable GPU unless explicitly set to "0" arg.GPU.Enable = !strings.EqualFold(os.Getenv(ENV_LOCAL_GPU_ENABLE), "0") arg.IsCloudInstance, _ = strconv.ParseBool(os.Getenv(ENV_TERMINUS_IS_CLOUD_VERSION)) - arg.IsOlaresInContainer = os.Getenv(ENV_CONTAINER_MODE) == "oic" - si.IsOIC = arg.IsOlaresInContainer + arg.IsBeOSInContainer = os.Getenv(ENV_CONTAINER_MODE) == "oic" + si.IsOIC = arg.IsBeOSInContainer si.ProductName = arg.GetProductName() // Ensure BaseDir is initialized before loading master.conf @@ -223,22 +223,22 @@ func (a *Argument) SaveReleaseInfo(withoutName bool) error { if a.BaseDir == "" { return errors.New("invalid: empty base directory") } - if a.OlaresVersion == "" { + if a.BeOSVersion == "" { return errors.New("invalid: empty olares version") } releaseInfoMap := map[string]string{ ENV_OLARES_BASE_DIR: a.BaseDir, - ENV_OLARES_VERSION: a.OlaresVersion, + ENV_OLARES_VERSION: a.BeOSVersion, } if !withoutName { if a.User != nil && a.User.UserName != "" && a.User.DomainName != "" { releaseInfoMap["OLARES_NAME"] = fmt.Sprintf("%s@%s", a.User.UserName, a.User.DomainName) } else { - if util.IsExist(OlaresReleaseFile) { + if util.IsExist(BeOSReleaseFile) { // if the user is not set, try to load the user name from the release file - envs, err := godotenv.Read(OlaresReleaseFile) + envs, err := godotenv.Read(BeOSReleaseFile) if err == nil { if userName, ok := envs["OLARES_NAME"]; ok { releaseInfoMap["OLARES_NAME"] = userName @@ -248,12 +248,12 @@ func (a *Argument) SaveReleaseInfo(withoutName bool) error { } } - if !util.IsExist(filepath.Dir(OlaresReleaseFile)) { - if err := os.MkdirAll(filepath.Dir(OlaresReleaseFile), 0755); err != nil { - return fmt.Errorf("failed to create directory %s: %v", filepath.Dir(OlaresReleaseFile), err) + if !util.IsExist(filepath.Dir(BeOSReleaseFile)) { + if err := os.MkdirAll(filepath.Dir(BeOSReleaseFile), 0755); err != nil { + return fmt.Errorf("failed to create directory %s: %v", filepath.Dir(BeOSReleaseFile), err) } } - return godotenv.Write(releaseInfoMap, OlaresReleaseFile) + return godotenv.Write(releaseInfoMap, BeOSReleaseFile) } func (a *Argument) GetWslUserPath() string { @@ -278,12 +278,12 @@ func (a *Argument) GetWslUserPath() string { return res } -func (a *Argument) SetOlaresCDNService(url string) { +func (a *Argument) SetBeOSCDNService(url string) { u := strings.TrimSuffix(url, "/") if u == "" { - u = common.DefaultOlaresCDNService + u = common.DefaultBeOSCDNService } - a.OlaresCDNService = u + a.BeOSCDNService = u } func (a *Argument) SetGPU(enable bool) { @@ -293,7 +293,7 @@ func (a *Argument) SetGPU(enable bool) { a.GPU.Enable = enable } -func (a *Argument) SetOlaresVersion(version string) { +func (a *Argument) SetBeOSVersion(version string) { if version == "" || len(version) <= 2 { return } @@ -301,7 +301,7 @@ func (a *Argument) SetOlaresVersion(version string) { if version[0] == 'v' { version = version[1:] } - a.OlaresVersion = version + a.BeOSVersion = version } func (a *Argument) SetStorage(storage *Storage) { @@ -475,7 +475,7 @@ func NewKubeRuntime(arg Argument) (*KubeRuntime, error) { } base := connector.NewBaseRuntime(cluster.Name, connector.NewDialer(), - arg.BaseDir, arg.OlaresVersion, arg.ConsoleLogFileName, arg.ConsoleLogTruncate, arg.SystemInfo) + arg.BaseDir, arg.BeOSVersion, arg.ConsoleLogFileName, arg.ConsoleLogTruncate, arg.SystemInfo) clusterSpec := &cluster.Spec defaultCluster, roleGroups := clusterSpec.SetDefaultClusterSpec(arg.InCluster, arg.SystemInfo.IsDarwin()) diff --git a/cli/pkg/core/common/common.go b/cli/pkg/core/common/common.go index be370795d..89b5d4b6a 100755 --- a/cli/pkg/core/common/common.go +++ b/cli/pkg/core/common/common.go @@ -36,7 +36,7 @@ const ( WizardDir = "wizard" ComponentsDir = "components" DeployDir = "deploy" - OlaresDir = "olares" + BeOSDir = "olares" DefaultBaseDir = ".beos-pro" DefaultDomainName = "beos.local" @@ -92,8 +92,8 @@ const ( ) const ( - DefaultOlaresCDNService = "" - DefaultBashUrl = "beos.sh" + DefaultBeOSCDNService = "" + DefaultBashUrl = "beos.sh" ) const ( diff --git a/cli/pkg/daemon/module.go b/cli/pkg/daemon/module.go index 0272a6c69..354c6939e 100644 --- a/cli/pkg/daemon/module.go +++ b/cli/pkg/daemon/module.go @@ -39,12 +39,12 @@ func (u *UninstallTerminusdModule) Init() { } } -type ReplaceOlaresdBinaryModule struct { +type ReplaceBeOSdBinaryModule struct { common.KubeModule manifest.ManifestModule } -func (m *ReplaceOlaresdBinaryModule) Init() { +func (m *ReplaceBeOSdBinaryModule) Init() { m.Name = "ReplaceBeOSdBinaryModule" m.Desc = "Replace beosd" @@ -63,7 +63,7 @@ func (m *ReplaceOlaresdBinaryModule) Init() { updateEnv := &task.LocalTask{ Name: "UpdateBeOSdEnv", Desc: "Update beosd env", - Action: new(UpdateOlaresdServiceEnv), + Action: new(UpdateBeOSdServiceEnv), } restart := &task.LocalTask{ diff --git a/cli/pkg/daemon/task.go b/cli/pkg/daemon/task.go index 61e0f9179..471292819 100644 --- a/cli/pkg/daemon/task.go +++ b/cli/pkg/daemon/task.go @@ -25,33 +25,36 @@ func (g *InstallTerminusdBinary) Execute(runtime connector.Runtime) error { return err } - binary, err := g.Manifest.Get("olaresd") + binary, err := g.Manifest.Get("beosd") if err != nil { - return fmt.Errorf("get kube binary olaresd info failed: %w", err) + binary, err = g.Manifest.Get("olaresd") + } + if err != nil { + return fmt.Errorf("get kube binary beosd info failed: %w", err) } path := binary.FilePath(g.BaseDir) dst := filepath.Join(common.TmpDir, binary.Filename) if err := runtime.GetRunner().Scp(path, dst); err != nil { - return errors.Wrap(errors.WithStack(err), "sync olaresd tar.gz failed") + return errors.Wrap(errors.WithStack(err), "sync beosd tar.gz failed") } - installCmd := fmt.Sprintf("tar -zxf %s && cp -f olaresd /usr/local/bin/beosd && cp -f olaresd /usr/local/bin/olaresd && chmod +x /usr/local/bin/beosd /usr/local/bin/olaresd && rm -rf olaresd*", dst) + installCmd := fmt.Sprintf("tar -zxf %s && src=$( [ -f beosd ] && printf beosd || printf olaresd ) && cp -f \"$src\" /usr/local/bin/beosd && cp -f \"$src\" /usr/local/bin/olaresd && chmod +x /usr/local/bin/beosd /usr/local/bin/olaresd && rm -rf beosd* olaresd*", dst) if _, err := runtime.GetRunner().SudoCmd(installCmd, false, false); err != nil { return errors.Wrap(errors.WithStack(err), "install beosd binaries failed") } return nil } -type UpdateOlaresdServiceEnv struct { +type UpdateBeOSdServiceEnv struct { common.KubeAction } -func (a *UpdateOlaresdServiceEnv) Execute(runtime connector.Runtime) error { +func (a *UpdateBeOSdServiceEnv) Execute(runtime connector.Runtime) error { envFilePath := filepath.Join("/etc/systemd/system/", templates.TerminusdEnv.Name()) versionKey := "INSTALLED_VERSION" - updateVersionCMD := fmt.Sprintf("sed -i '/%s/c\\%s=%s' %s ", versionKey, versionKey, a.KubeConf.Arg.OlaresVersion, envFilePath) + updateVersionCMD := fmt.Sprintf("sed -i '/%s/c\\%s=%s' %s ", versionKey, versionKey, a.KubeConf.Arg.BeOSVersion, envFilePath) if _, err := runtime.GetRunner().SudoCmd(updateVersionCMD, false, false); err != nil { return fmt.Errorf("update beosd env failed: %v", err) } @@ -65,11 +68,11 @@ type GenerateTerminusdServiceEnv struct { func (g *GenerateTerminusdServiceEnv) Execute(runtime connector.Runtime) error { var baseDir = runtime.GetBaseDir() templateAction := action.Template{ - Name: "OlaresdServiceEnv", + Name: "BeOSdServiceEnv", Template: templates.TerminusdEnv, Dst: filepath.Join("/etc/systemd/system/", templates.TerminusdEnv.Name()), Data: util.Data{ - "Version": g.KubeConf.Arg.OlaresVersion, + "Version": g.KubeConf.Arg.BeOSVersion, "KubeType": g.KubeConf.Arg.Kubetype, "RegistryMirrors": g.KubeConf.Arg.RegistryMirrors, "BaseDir": baseDir, @@ -91,7 +94,7 @@ type GenerateTerminusdService struct { func (g *GenerateTerminusdService) Execute(runtime connector.Runtime) error { templateAction := action.Template{ - Name: "OlaresdService", + Name: "BeOSdService", Template: templates.TerminusdService, Dst: filepath.Join("/etc/systemd/system/", templates.TerminusdService.Name()), Data: util.Data{}, diff --git a/cli/pkg/files/file.go b/cli/pkg/files/file.go index 851c483f6..09d61a07a 100755 --- a/cli/pkg/files/file.go +++ b/cli/pkg/files/file.go @@ -274,7 +274,7 @@ func NewKubeBinary(name, arch, osType, osVersion, osPlatformFamily, version, pre component.Type = COMPONENT component.FileName = fmt.Sprintf("redis-%s.tar.gz", version) component.FileNameHash = utils.MD5(component.FileName) - component.Url = fmt.Sprintf(RedisUrl, common.DefaultOlaresCDNService, component.FileNameHash) + component.Url = fmt.Sprintf(RedisUrl, common.DefaultBeOSCDNService, component.FileNameHash) component.CheckSum = false component.BaseDir = filepath.Join(prePath, component.Type) case juicefs: @@ -330,21 +330,21 @@ func NewKubeBinary(name, arch, osType, osVersion, osPlatformFamily, version, pre component.Type = GPU component.FileName = fmt.Sprintf("%s_%s_cuda-keyring_%s-1_all.deb", osPlatformFamily, osVersion, version) component.FileNameHash = utils.MD5(component.FileName) - component.Url = fmt.Sprintf(CudaKeyringCNDUrl, common.DefaultOlaresCDNService, getGpuCDNPrefix(arch, component.FileNameHash)) //getCudaKeyringUrl(arch, constants.OsVersion, version) + component.Url = fmt.Sprintf(CudaKeyringCNDUrl, common.DefaultBeOSCDNService, getGpuCDNPrefix(arch, component.FileNameHash)) //getCudaKeyringUrl(arch, constants.OsVersion, version) component.CheckSum = false component.BaseDir = filepath.Join(prePath, component.Type) case gpgkey: component.Type = GPU component.FileName = "gpgkey" component.FileNameHash = utils.MD5(component.FileName) - component.Url = fmt.Sprintf(CudaKeyringCNDUrl, common.DefaultOlaresCDNService, getGpuCDNPrefix(arch, component.FileNameHash)) + component.Url = fmt.Sprintf(CudaKeyringCNDUrl, common.DefaultBeOSCDNService, getGpuCDNPrefix(arch, component.FileNameHash)) component.CheckSum = false component.BaseDir = filepath.Join(prePath, component.Type) case libnvidia: component.Type = GPU component.FileName = fmt.Sprintf("%s_%s_libnvidia-container.list", osPlatformFamily, osVersion) component.FileNameHash = utils.MD5(component.FileName) - component.Url = fmt.Sprintf(CudaKeyringCNDUrl, common.DefaultOlaresCDNService, getGpuCDNPrefix(arch, component.FileNameHash)) + component.Url = fmt.Sprintf(CudaKeyringCNDUrl, common.DefaultBeOSCDNService, getGpuCDNPrefix(arch, component.FileNameHash)) component.CheckSum = false component.BaseDir = filepath.Join(prePath, component.Type) case wsl: // + wsl @@ -377,7 +377,7 @@ func NewKubeBinary(name, arch, osType, osVersion, osPlatformFamily, version, pre func (b *KubeBinary) GetDownloadMirrors(downloadMirrors string) string { if downloadMirrors == "" { - return common.DefaultOlaresCDNService + return common.DefaultBeOSCDNService } return downloadMirrors } diff --git a/cli/pkg/gpu/tasks.go b/cli/pkg/gpu/tasks.go index 55502a8f0..6db500f8c 100644 --- a/cli/pkg/gpu/tasks.go +++ b/cli/pkg/gpu/tasks.go @@ -165,7 +165,7 @@ func (t *UpdateNvidiaContainerToolkitSource) Execute(runtime connector.Runtime) // decide mirror based on OLARES_SYSTEM_CDN_SERVICE var mirrorHost string - cdnService := t.KubeConf.Arg.OlaresCDNService + cdnService := t.KubeConf.Arg.BeOSCDNService if cdnService != "" { cdnRaw := cdnService if !strings.HasPrefix(cdnRaw, "http") { @@ -176,10 +176,10 @@ func (t *UpdateNvidiaContainerToolkitSource) Execute(runtime connector.Runtime) if host == "" { host = cdnService } - if strings.HasSuffix(host, "olares.cn") { + if strings.HasSuffix(host, ".cn") { mirrorHost = "mirrors.ustc.edu.cn" } - } else if strings.HasSuffix(cdnService, "olares.cn") { + } else if strings.HasSuffix(cdnService, ".cn") { mirrorHost = "mirrors.ustc.edu.cn" } } diff --git a/cli/pkg/images/load.go b/cli/pkg/images/load.go index 344ae53d9..20b9c56fe 100644 --- a/cli/pkg/images/load.go +++ b/cli/pkg/images/load.go @@ -104,7 +104,7 @@ func (t *LoadImages) Execute(runtime connector.Runtime) (reserr error) { // loadParm = "--snapshotter=zfs" // } - if t.KubeConf.Arg.IsOlaresInContainer { + if t.KubeConf.Arg.IsBeOSInContainer { loadParm = "--no-unpack" } diff --git a/cli/pkg/k3s/tasks.go b/cli/pkg/k3s/tasks.go index ad13b588a..ea5975e78 100644 --- a/cli/pkg/k3s/tasks.go +++ b/cli/pkg/k3s/tasks.go @@ -233,7 +233,7 @@ func (g *GenerateK3sService) Execute(runtime connector.Runtime) error { "JuiceFSPreCheckEnabled": util.IsExist(storage.JuiceFsServiceFile), "JuiceFSServiceUnit": storagetpl.JuicefsService.Name(), "JuiceFSBinPath": storage.JuiceFsFile, - "JuiceFSMountPoint": storage.OlaresJuiceFSRootDir, + "JuiceFSMountPoint": storage.BeOSJuiceFSRootDir, } templateAction := action.Template{ diff --git a/cli/pkg/kubernetes/tasks.go b/cli/pkg/kubernetes/tasks.go index abd4cbb52..1bd2b81c6 100644 --- a/cli/pkg/kubernetes/tasks.go +++ b/cli/pkg/kubernetes/tasks.go @@ -71,7 +71,7 @@ type GetKubeVersion struct{} func (g *GetKubeVersion) Execute() (string, string, error) { var kubectlpath, err = util.GetCommand(common.CommandKubectl) if err != nil { - return "", "", fmt.Errorf("kubectl not found, Olares might not be installed.") + return "", "", fmt.Errorf("kubectl not found, beOS Pro might not be installed.") } var ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second) @@ -224,7 +224,7 @@ func (t *GenerateKubeletService) Execute(runtime connector.Runtime) error { "JuiceFSPreCheckEnabled": util.IsExist(storage.JuiceFsServiceFile), "JuiceFSServiceUnit": storagetpl.JuicefsService.Name(), "JuiceFSBinPath": storage.JuiceFsFile, - "JuiceFSMountPoint": storage.OlaresJuiceFSRootDir, + "JuiceFSMountPoint": storage.BeOSJuiceFSRootDir, }, } return tplActions.Execute(runtime) diff --git a/cli/pkg/kubesphere/minikube.go b/cli/pkg/kubesphere/minikube.go index 8088a1223..42195ec44 100644 --- a/cli/pkg/kubesphere/minikube.go +++ b/cli/pkg/kubesphere/minikube.go @@ -232,12 +232,12 @@ func (t *CreateSharedPathInMiniKubeContainer) Execute(runtime connector.Runtime) if err != nil { return fmt.Errorf("failed to get minikube command: %w", err) } - createCMD := fmt.Sprintf("%s ssh 'sudo mkdir -p %s' -p %s", minikube, storage.OlaresSharedLibDir, t.KubeConf.Arg.MinikubeProfile) + createCMD := fmt.Sprintf("%s ssh 'sudo mkdir -p %s' -p %s", minikube, storage.BeOSSharedLibDir, t.KubeConf.Arg.MinikubeProfile) _, err = runtime.GetRunner().Cmd(createCMD, false, false) if err != nil { return fmt.Errorf("failed to create shared path in minikube container: %w", err) } - chownCMD := fmt.Sprintf("%s ssh 'sudo chown 1000:1000 %s' -p %s", minikube, storage.OlaresSharedLibDir, t.KubeConf.Arg.MinikubeProfile) + chownCMD := fmt.Sprintf("%s ssh 'sudo chown 1000:1000 %s' -p %s", minikube, storage.BeOSSharedLibDir, t.KubeConf.Arg.MinikubeProfile) _, err = runtime.GetRunner().Cmd(chownCMD, false, false) if err != nil { return fmt.Errorf("failed to change ownership of shared path in minikube container: %w", err) diff --git a/cli/pkg/phase/cluster/changeip.go b/cli/pkg/phase/cluster/changeip.go index ba532c2d5..abf68cb4f 100644 --- a/cli/pkg/phase/cluster/changeip.go +++ b/cli/pkg/phase/cluster/changeip.go @@ -15,7 +15,7 @@ func ChangeIP(runtime *common.KubeRuntime) *pipeline.Pipeline { runtime.Arg.HostIP = si.GetLocalIp() modules = []module.Module{&terminus.ChangeHostIPModule{}} } else { - logger.Infof("changing the Olares OS IP to %s ...", si.GetLocalIp()) + logger.Infof("changing the beOS Pro IP to %s ...", si.GetLocalIp()) modules = []module.Module{ &terminus.CheckPreparedModule{}, &terminus.CheckInstalledModule{}, @@ -24,7 +24,7 @@ func ChangeIP(runtime *common.KubeRuntime) *pipeline.Pipeline { } return &pipeline.Pipeline{ - Name: "Change the IP address of Olares OS components", + Name: "Change the IP address of beOS Pro components", Modules: modules, Runtime: runtime, } diff --git a/cli/pkg/phase/cluster/delete_cluster.go b/cli/pkg/phase/cluster/delete_cluster.go index 2f9205dde..696161a4c 100644 --- a/cli/pkg/phase/cluster/delete_cluster.go +++ b/cli/pkg/phase/cluster/delete_cluster.go @@ -172,7 +172,7 @@ func UninstallTerminus(phase string, runtime *common.KubeRuntime) pipeline.Pipel } return pipeline.Pipeline{ - Name: "Uninstall Olares", + Name: "Uninstall beOS Pro", Runtime: builder.runtime, Modules: builder.modules, } diff --git a/cli/pkg/phase/cluster/windows.go b/cli/pkg/phase/cluster/windows.go index 0adc16435..b3dcfebd2 100644 --- a/cli/pkg/phase/cluster/windows.go +++ b/cli/pkg/phase/cluster/windows.go @@ -27,6 +27,6 @@ type windowsUninstallPhaseBuilder struct { func (w *windowsUninstallPhaseBuilder) build() []module.Module { return []module.Module{ - &windows.UninstallOlaresModule{}, + &windows.UninstallBeOSModule{}, } } diff --git a/cli/pkg/phase/download/check_download.go b/cli/pkg/phase/download/check_download.go index 70a05f4a2..95b4e5632 100644 --- a/cli/pkg/phase/download/check_download.go +++ b/cli/pkg/phase/download/check_download.go @@ -15,7 +15,7 @@ func NewCheckDownload(mainifest string, runtime *common.KubeRuntime) *pipeline.P } return &pipeline.Pipeline{ - Name: "Check Downloaded Olares Installation Package", + Name: "Check Downloaded beOS Pro Installation Package", Modules: m, Runtime: runtime, } diff --git a/cli/pkg/phase/download/download_package.go b/cli/pkg/phase/download/download_package.go index 609de39bb..b2dff9a40 100755 --- a/cli/pkg/phase/download/download_package.go +++ b/cli/pkg/phase/download/download_package.go @@ -12,7 +12,7 @@ func NewDownloadPackage(mainifest string, runtime *common.KubeRuntime) *pipeline m := []module.Module{ &precheck.GreetingsModule{}, - &download.PackageDownloadModule{Manifest: mainifest, BaseDir: runtime.GetBaseDir(), CDNService: runtime.Arg.OlaresCDNService}, + &download.PackageDownloadModule{Manifest: mainifest, BaseDir: runtime.GetBaseDir(), CDNService: runtime.Arg.BeOSCDNService}, } return &pipeline.Pipeline{ diff --git a/cli/pkg/phase/download/download_wizard.go b/cli/pkg/phase/download/download_wizard.go index 1b9fe6495..46f8b3a6b 100644 --- a/cli/pkg/phase/download/download_wizard.go +++ b/cli/pkg/phase/download/download_wizard.go @@ -12,7 +12,7 @@ func NewDownloadWizard(runtime *common.KubeRuntime, urlOverride, releaseID strin m := []module.Module{ &precheck.GreetingsModule{}, - &terminus.InstallWizardDownloadModule{Version: runtime.Arg.OlaresVersion, CDNService: runtime.Arg.OlaresCDNService, UrlOverride: urlOverride, ReleaseID: releaseID}, + &terminus.InstallWizardDownloadModule{Version: runtime.Arg.BeOSVersion, CDNService: runtime.Arg.BeOSCDNService, UrlOverride: urlOverride, ReleaseID: releaseID}, } return &pipeline.Pipeline{ diff --git a/cli/pkg/phase/root.go b/cli/pkg/phase/root.go index 3b9593ddb..e9db39bbd 100644 --- a/cli/pkg/phase/root.go +++ b/cli/pkg/phase/root.go @@ -5,8 +5,8 @@ import ( "github.com/beclab/beos/cli/pkg/terminus" ) -func GetOlaresVersion() (string, error) { - var terminusTask = &terminus.GetOlaresVersion{} +func GetBeOSVersion() (string, error) { + var terminusTask = &terminus.GetBeOSVersion{} return terminusTask.Execute() } diff --git a/cli/pkg/pipelines/add_node.go b/cli/pkg/pipelines/add_node.go index e224b92f4..ec62ac8b7 100644 --- a/cli/pkg/pipelines/add_node.go +++ b/cli/pkg/pipelines/add_node.go @@ -13,11 +13,11 @@ import ( func AddNodePipeline() error { arg := common.NewArgument() if !arg.SystemInfo.IsLinux() { - fmt.Println("error: Only Linux nodes can be added to an Olares cluster!") + fmt.Println("error: Only Linux nodes can be added to an beOS Pro cluster!") os.Exit(1) } - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetConsoleLog("addnode.log", true) if err := arg.MasterHostConfig.Validate(); err != nil { diff --git a/cli/pkg/pipelines/changeip.go b/cli/pkg/pipelines/changeip.go index 3ecacf931..81d663c73 100644 --- a/cli/pkg/pipelines/changeip.go +++ b/cli/pkg/pipelines/changeip.go @@ -14,11 +14,11 @@ func ChangeIPPipeline() error { terminusVersion := viper.GetString(common.FlagVersion) kubeType := phase.GetKubeType() if terminusVersion == "" { - terminusVersion, _ = phase.GetOlaresVersion() + terminusVersion, _ = phase.GetBeOSVersion() } var arg = common.NewArgument() - arg.SetOlaresVersion(terminusVersion) + arg.SetBeOSVersion(terminusVersion) arg.SetConsoleLog("changeip.log", true) arg.SetKubeVersion(kubeType) arg.SetMinikubeProfile(viper.GetString(common.FlagMiniKubeProfile)) diff --git a/cli/pkg/pipelines/check_download.go b/cli/pkg/pipelines/check_download.go index 17e45b2cb..70669884b 100644 --- a/cli/pkg/pipelines/check_download.go +++ b/cli/pkg/pipelines/check_download.go @@ -11,7 +11,7 @@ import ( func CheckDownloadInstallationPackage() error { arg := common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) runtime, err := common.NewKubeRuntime(*arg) if err != nil { diff --git a/cli/pkg/pipelines/download_package.go b/cli/pkg/pipelines/download_package.go index 987f6dfac..abe060d14 100644 --- a/cli/pkg/pipelines/download_package.go +++ b/cli/pkg/pipelines/download_package.go @@ -13,15 +13,15 @@ import ( func DownloadInstallationPackage() error { arg := common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) - arg.SetOlaresCDNService(viper.GetString(common.FlagCDNService)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSCDNService(viper.GetString(common.FlagCDNService)) runtime, err := common.NewKubeRuntime(*arg) if err != nil { return err } - if ok := utils.CheckUrl(arg.OlaresCDNService); !ok { + if ok := utils.CheckUrl(arg.BeOSCDNService); !ok { return fmt.Errorf("invalid cdn service") } diff --git a/cli/pkg/pipelines/download_wizard.go b/cli/pkg/pipelines/download_wizard.go index 34f196dd8..e97653bd2 100644 --- a/cli/pkg/pipelines/download_wizard.go +++ b/cli/pkg/pipelines/download_wizard.go @@ -12,15 +12,15 @@ import ( func DownloadInstallationWizard() error { arg := common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) - arg.SetOlaresCDNService(viper.GetString(common.FlagCDNService)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSCDNService(viper.GetString(common.FlagCDNService)) runtime, err := common.NewKubeRuntime(*arg) if err != nil { return err } - if ok := utils.CheckUrl(arg.OlaresCDNService); !ok { + if ok := utils.CheckUrl(arg.BeOSCDNService); !ok { return fmt.Errorf("invalid cdn service") } diff --git a/cli/pkg/pipelines/gpu_install.go b/cli/pkg/pipelines/gpu_install.go index f6c547d61..a79e4fdea 100644 --- a/cli/pkg/pipelines/gpu_install.go +++ b/cli/pkg/pipelines/gpu_install.go @@ -14,7 +14,7 @@ import ( func InstallGpuDrivers() error { arg := common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetConsoleLog("gpuinstall.log", true) runtime, err := common.NewKubeRuntime(*arg) if err != nil { diff --git a/cli/pkg/pipelines/info_terminus.go b/cli/pkg/pipelines/info_terminus.go index 91da9e093..e5790e05d 100644 --- a/cli/pkg/pipelines/info_terminus.go +++ b/cli/pkg/pipelines/info_terminus.go @@ -7,12 +7,12 @@ import ( ) func PrintTerminusInfo() { - var cli = &terminus.GetOlaresVersion{} + var cli = &terminus.GetBeOSVersion{} terminusVersion, err := cli.Execute() if err != nil { - fmt.Printf("Olares: not installed\n") + fmt.Printf("beOS Pro: not installed\n") return } - fmt.Printf("Olares: %s\n", terminusVersion) + fmt.Printf("beOS Pro: %s\n", terminusVersion) } diff --git a/cli/pkg/pipelines/install_terminus.go b/cli/pkg/pipelines/install_terminus.go index 128955fd0..3d3ffdb7d 100644 --- a/cli/pkg/pipelines/install_terminus.go +++ b/cli/pkg/pipelines/install_terminus.go @@ -14,14 +14,14 @@ import ( ) func CliInstallTerminusPipeline() error { - var terminusVersion, _ = phase.GetOlaresVersion() + var terminusVersion, _ = phase.GetBeOSVersion() if terminusVersion != "" { - return errors.New("Olares is already installed, please uninstall it first.") + return errors.New("beOS Pro is already installed, please uninstall it first.") } arg := common.NewArgument() arg.SetKubeVersion(viper.GetString(common.FlagKubeType)) - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetMinikubeProfile(viper.GetString(common.FlagMiniKubeProfile)) arg.SetStorage(getStorageConfig()) arg.SetSwapConfig(common.SwapConfig{ @@ -49,7 +49,7 @@ func CliInstallTerminusPipeline() error { runtime.Arg.SetManifest(manifest) var p = cluster.InstallSystemPhase(runtime) - logger.InfoInstallationProgress("Start to Install Olares ...") + logger.InfoInstallationProgress("Start to Install beOS Pro ...") if err := p.Start(); err != nil { return err } diff --git a/cli/pkg/pipelines/masterinfo.go b/cli/pkg/pipelines/masterinfo.go index 94122a3ff..74354a873 100644 --- a/cli/pkg/pipelines/masterinfo.go +++ b/cli/pkg/pipelines/masterinfo.go @@ -13,7 +13,7 @@ import ( func MasterInfoPipeline() error { arg := common.NewArgument() if !arg.SystemInfo.IsLinux() { - fmt.Println("error: Only Linux nodes can be added to an Olares cluster!") + fmt.Println("error: Only Linux nodes can be added to an beOS Pro cluster!") os.Exit(1) } arg.SetConsoleLog("masterinfo.log", true) diff --git a/cli/pkg/pipelines/precheck.go b/cli/pkg/pipelines/precheck.go index 2e6438a56..895905473 100644 --- a/cli/pkg/pipelines/precheck.go +++ b/cli/pkg/pipelines/precheck.go @@ -10,7 +10,7 @@ import ( func StartPreCheckPipeline() error { var arg = common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetConsoleLog("precheck.log", true) runtime, err := common.NewKubeRuntime(*arg) diff --git a/cli/pkg/pipelines/prepare_system.go b/cli/pkg/pipelines/prepare_system.go index a623239dc..0c4efdf24 100644 --- a/cli/pkg/pipelines/prepare_system.go +++ b/cli/pkg/pipelines/prepare_system.go @@ -22,7 +22,7 @@ import ( ) func PrepareSystemPipeline(components []string) error { - var terminusVersion, _ = phase.GetOlaresVersion() + var terminusVersion, _ = phase.GetBeOSVersion() if terminusVersion != "" && len(components) == 0 { return errors.New("beOS Pro is already installed; uninstall it first") } @@ -30,7 +30,7 @@ func PrepareSystemPipeline(components []string) error { var arg = common.NewArgument() arg.SetKubeVersion(viper.GetString(common.FlagKubeType)) arg.SetMinikubeProfile(viper.GetString(common.FlagMiniKubeProfile)) - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetStorage(getStorageConfig()) arg.ClearMasterHostConfig() @@ -78,7 +78,7 @@ func PrepareSystemPipeline(components []string) error { p := &pipeline.Pipeline{ Name: "Prepare beOS daemon", Modules: []module.Module{ - &daemon.ReplaceOlaresdBinaryModule{ + &daemon.ReplaceBeOSdBinaryModule{ ManifestModule: manifest.ManifestModule{ Manifest: manifestMap, BaseDir: runtime.GetBaseDir(), diff --git a/cli/pkg/pipelines/startstop.go b/cli/pkg/pipelines/startstop.go index 472e37e91..fd311e657 100644 --- a/cli/pkg/pipelines/startstop.go +++ b/cli/pkg/pipelines/startstop.go @@ -9,7 +9,7 @@ import ( "github.com/beclab/beos/cli/pkg/terminus" ) -func StartOlares() error { +func StartBeOS() error { arg := common.NewArgument() arg.SetConsoleLog("start.log", true) runtime, err := common.NewKubeRuntime(*arg) @@ -18,9 +18,9 @@ func StartOlares() error { } p := &pipeline.Pipeline{ - Name: "StartOlares", + Name: "StartBeOS", Modules: []module.Module{ - &terminus.StartOlaresModule{}, + &terminus.StartBeOSModule{}, }, Runtime: runtime, } @@ -28,7 +28,7 @@ func StartOlares() error { return p.Start() } -func StopOlares(timeout, checkInterval time.Duration) error { +func StopBeOS(timeout, checkInterval time.Duration) error { arg := common.NewArgument() arg.SetConsoleLog("stop.log", true) runtime, err := common.NewKubeRuntime(*arg) @@ -37,9 +37,9 @@ func StopOlares(timeout, checkInterval time.Duration) error { } p := &pipeline.Pipeline{ - Name: "StopOlares", + Name: "StopBeOS", Modules: []module.Module{ - &terminus.StopOlaresModule{ + &terminus.StopBeOSModule{ Timeout: timeout, CheckInterval: checkInterval, }, diff --git a/cli/pkg/pipelines/storage.go b/cli/pkg/pipelines/storage.go index b2458bdd6..07df849f6 100644 --- a/cli/pkg/pipelines/storage.go +++ b/cli/pkg/pipelines/storage.go @@ -12,13 +12,13 @@ import ( ) func CliInstallStoragePipeline() error { - var terminusVersion, _ = phase.GetOlaresVersion() + var terminusVersion, _ = phase.GetBeOSVersion() if terminusVersion != "" { - return errors.New("Olares is already installed, please uninstall it first.") + return errors.New("beOS Pro is already installed, please uninstall it first.") } arg := common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetStorage(getStorageConfig()) runtime, err := common.NewKubeRuntime(*arg) diff --git a/cli/pkg/pipelines/uninstall_terminus.go b/cli/pkg/pipelines/uninstall_terminus.go index ba0e7e290..be8432fa1 100644 --- a/cli/pkg/pipelines/uninstall_terminus.go +++ b/cli/pkg/pipelines/uninstall_terminus.go @@ -15,11 +15,11 @@ func UninstallTerminusPipeline() error { kubeType := phase.GetKubeType() if version == "" { - version, _ = phase.GetOlaresVersion() + version, _ = phase.GetBeOSVersion() } var arg = common.NewArgument() - arg.SetOlaresVersion(version) + arg.SetBeOSVersion(version) arg.SetConsoleLog("uninstall.log", true) arg.SetKubeVersion(kubeType) arg.SetStorage(getStorageConfig()) @@ -43,7 +43,7 @@ func UninstallTerminusPipeline() error { var p = cluster.UninstallTerminus(phase, runtime) if err := p.Start(); err != nil { - logger.Errorf("uninstall Olares failed: %v", err) + logger.Errorf("uninstall beOS Pro failed: %v", err) return err } diff --git a/cli/pkg/pipelines/upgrade.go b/cli/pkg/pipelines/upgrade.go index 6a0e577c0..a7d94e74a 100644 --- a/cli/pkg/pipelines/upgrade.go +++ b/cli/pkg/pipelines/upgrade.go @@ -17,22 +17,22 @@ import ( "github.com/pkg/errors" ) -func UpgradeOlaresPipeline() error { - currentVersionString, err := phase.GetOlaresVersion() +func UpgradeBeOSPipeline() error { + currentVersionString, err := phase.GetBeOSVersion() if err != nil { - return errors.Wrap(err, "failed to get current Olares version") + return errors.Wrap(err, "failed to get current beOS version") } if currentVersionString == "" { - return errors.New("Olares is not installed, please install it first") + return errors.New("beOS Pro is not installed, please install it first") } - currentVersion, err := utils.ParseOlaresVersionString(currentVersionString) + currentVersion, err := utils.ParseBeOSVersionString(currentVersionString) if err != nil { - return fmt.Errorf("error parsing current Olares version: %v", err) + return fmt.Errorf("error parsing current beOS version: %v", err) } - targetVersion, err := utils.ParseOlaresVersionString(version.VERSION) + targetVersion, err := utils.ParseBeOSVersionString(version.VERSION) if err != nil { - return fmt.Errorf("error parsing target Olares version: %v", err) + return fmt.Errorf("error parsing target beOS version: %v", err) } if err := upgrade.Check(currentVersion, targetVersion); err != nil { @@ -40,7 +40,7 @@ func UpgradeOlaresPipeline() error { } arg := common.NewArgument() - arg.SetOlaresVersion(viper.GetString(common.FlagVersion)) + arg.SetBeOSVersion(viper.GetString(common.FlagVersion)) arg.SetConsoleLog("upgrade.log", true) arg.SetKubeVersion(phase.GetKubeType()) @@ -57,17 +57,17 @@ func UpgradeOlaresPipeline() error { } p := &pipeline.Pipeline{ - Name: "UpgradeOlares", + Name: "UpgradeBeOS", Modules: []module.Module{upgradeModule}, Runtime: runtime, } - logger.Infof("Starting Olares upgrade from %s to %s...", currentVersion, targetVersion) + logger.Infof("Starting beOS Pro upgrade from %s to %s...", currentVersion, targetVersion) if err := p.Start(); err != nil { return errors.Wrap(err, "upgrade failed") } - logger.Info("Olares upgrade completed successfully!") + logger.Info("beOS Pro upgrade completed successfully!") return nil } diff --git a/cli/pkg/release/manifest/manifest.go b/cli/pkg/release/manifest/manifest.go index f55442598..e7dee85b2 100644 --- a/cli/pkg/release/manifest/manifest.go +++ b/cli/pkg/release/manifest/manifest.go @@ -18,7 +18,7 @@ import ( "sigs.k8s.io/kustomize/kyaml/yaml" ) -type OlaresManifest struct { +type BeOSManifest struct { APIVersion string `yaml:"apiVersion"` Target string `yaml:"target"` Output OutputManifest `yaml:"output"` @@ -60,7 +60,7 @@ func NewManager(olaresRepoRoot, distPath, cdnURL string, ignoreMissingImages boo func (m *Manager) Generate() error { if err := m.scan(); err != nil { - return fmt.Errorf("failed to scan Olares repository for images and components: %v", err) + return fmt.Errorf("failed to scan beOS repository for images and components: %v", err) } manifestPath := filepath.Join(m.distPath, "installation.manifest") @@ -189,7 +189,7 @@ func (m *Manager) scan() error { return err } - // shortcut to Olares manifest file + // shortcut to beOS Pro manifest file if strings.EqualFold(info.Name(), "olares.yaml") { content, err := os.ReadFile(filePath) if err != nil { @@ -198,7 +198,7 @@ func (m *Manager) scan() error { } return err } - olaresManifest := &OlaresManifest{} + olaresManifest := &BeOSManifest{} err = yaml.Unmarshal(content, olaresManifest) if err != nil { return fmt.Errorf("failed to unmarshal olares manifest %s: %v", filePath, err) @@ -357,16 +357,16 @@ func (m *Manager) patchImage(image string) (string, error) { } func (m *Manager) patchComponent(component BinaryOutput) (BinaryOutput, error) { - if component.ID != "olaresd" { + if component.ID != "beosd" && component.ID != "olaresd" { return component, nil } latestDailyBuildTag, latestDailyBuildCommit, err := m.getLatestDailyBuildTagAndCommit() if err != nil { - return BinaryOutput{}, fmt.Errorf("failed to get latest daily build tag (required to replace olaresd version): %v", err) + return BinaryOutput{}, fmt.Errorf("failed to get latest daily build tag (required to replace beosd version): %v", err) } - fmt.Printf("patching olaresd version to %s\n", latestDailyBuildTag) + fmt.Printf("patching beosd version to %s\n", latestDailyBuildTag) component.Name = strings.ReplaceAll(component.Name, "#__VERSION__", latestDailyBuildTag) component.AMD64 = strings.ReplaceAll(component.AMD64, "#__VERSION__", latestDailyBuildTag) diff --git a/cli/pkg/storage/constants.go b/cli/pkg/storage/constants.go index a98aab1be..b67bec5a1 100644 --- a/cli/pkg/storage/constants.go +++ b/cli/pkg/storage/constants.go @@ -9,14 +9,14 @@ import ( ) var ( - Root = path.Join("/") - StorageDataDir = path.Join(Root, "osdata") - StorageDataOlaresDir = path.Join(StorageDataDir, common.OlaresDir) - OlaresRootDir = path.Join(Root, common.OlaresDir) - OlaresSharedLibDir = path.Join(OlaresRootDir, "share") - OlaresUserDataDir = path.Join(OlaresRootDir, "userdata") + Root = path.Join("/") + StorageDataDir = path.Join(Root, "osdata") + StorageDataBeOSDir = path.Join(StorageDataDir, common.BeOSDir) + BeOSRootDir = path.Join(Root, common.BeOSDir) + BeOSSharedLibDir = path.Join(BeOSRootDir, "share") + BeOSUserDataDir = path.Join(BeOSRootDir, "userdata") - RedisRootDir = path.Join(OlaresRootDir, "data", "redis") + RedisRootDir = path.Join(BeOSRootDir, "data", "redis") RedisConfigDir = path.Join(RedisRootDir, "etc") RedisDataDir = path.Join(RedisRootDir, "data") RedisLogDir = path.Join(RedisRootDir, "log") @@ -28,14 +28,14 @@ var ( RedisServerInstalledFile = path.Join(Root, "usr", "local", "bin", "redis-server") RedisCliInstalledFile = path.Join(Root, "usr", "local", "bin", "redis-cli") - JuiceFsFile = path.Join(Root, "usr", "local", "bin", "juicefs") - JuiceFsDataDir = path.Join(OlaresRootDir, "data", "juicefs") - JuiceFsCacheDir = path.Join(OlaresRootDir, "jfscache") - OlaresJuiceFSRootDir = path.Join(OlaresRootDir, "rootfs") - JuiceFsServiceFile = path.Join(Root, "etc", "systemd", "system", templates.JuicefsService.Name()) + JuiceFsFile = path.Join(Root, "usr", "local", "bin", "juicefs") + JuiceFsDataDir = path.Join(BeOSRootDir, "data", "juicefs") + JuiceFsCacheDir = path.Join(BeOSRootDir, "jfscache") + BeOSJuiceFSRootDir = path.Join(BeOSRootDir, "rootfs") + JuiceFsServiceFile = path.Join(Root, "etc", "systemd", "system", templates.JuicefsService.Name()) MinioRootUser = "minioadmin" - MinioDataDir = path.Join(OlaresRootDir, "data", "minio", "vol1") + MinioDataDir = path.Join(BeOSRootDir, "data", "minio", "vol1") MinioFile = path.Join(Root, "usr", "local", "bin", "minio") MinioServiceFile = path.Join(Root, "etc", "systemd", "system", "minio.service") MinioConfigFile = path.Join(Root, "etc", "default", "minio") diff --git a/cli/pkg/storage/juicefs.go b/cli/pkg/storage/juicefs.go index 4517be6b8..49cb8bbf4 100644 --- a/cli/pkg/storage/juicefs.go +++ b/cli/pkg/storage/juicefs.go @@ -137,7 +137,7 @@ func (t *EnableJuiceFsService) Execute(runtime connector.Runtime) error { "JuiceFsBinPath": JuiceFsFile, "JuiceFsCachePath": JuiceFsCacheDir, "JuiceFsMetaDb": redisService, - "JuiceFsMountPoint": OlaresJuiceFSRootDir, + "JuiceFsMountPoint": BeOSJuiceFSRootDir, } juiceFsServiceStr, err := util.Render(juicefsTemplates.JuicefsService, data) @@ -210,7 +210,7 @@ func (t *CheckJuiceFsState) Execute(runtime connector.Runtime) error { time.Sleep(5 * time.Second) - if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("%s summary %s", JuiceFsFile, OlaresJuiceFSRootDir), false, false); err != nil { + if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("%s summary %s", JuiceFsFile, BeOSJuiceFSRootDir), false, false); err != nil { return err } @@ -266,7 +266,7 @@ func getManagedMinIOAccessFlags(localIp string) (string, error) { return "", errors.Wrap(err, "failed to get password of managed MinIO") } return fmt.Sprintf(" --storage minio --bucket http://%s:9000/%s --access-key %s --secret-key %s", - localIp, cc.OlaresDir, MinioRootUser, minioPassword), nil + localIp, cc.BeOSDir, MinioRootUser, minioPassword), nil } func GetRootFSType() string { diff --git a/cli/pkg/storage/module.go b/cli/pkg/storage/module.go index a996cf2b6..580be6930 100644 --- a/cli/pkg/storage/module.go +++ b/cli/pkg/storage/module.go @@ -129,7 +129,7 @@ func (m *RemoveStorageModule) Init() { } removeTerminusFiles := &task.RemoteTask{ - Name: "RemoveOlaresFiles", + Name: "RemoveBeOSFiles", Hosts: m.Runtime.GetHostsByRole(common.Master), Prepare: &prepare.PrepareCollection{ new(common.OnlyFirstMaster), @@ -239,10 +239,10 @@ type DeleteTerminusDataModule struct { } func (m *DeleteTerminusDataModule) Init() { - m.Name = "DeleteOlaresData" + m.Name = "DeleteBeOSData" deleteTerminusData := &task.RemoteTask{ - Name: "DeleteOlaresData", + Name: "DeleteBeOSData", Hosts: m.Runtime.GetHostsByRole(common.Master), Action: new(DeleteTerminusData), Parallel: false, diff --git a/cli/pkg/storage/tasks.go b/cli/pkg/storage/tasks.go index 1754cacfa..1e0667708 100644 --- a/cli/pkg/storage/tasks.go +++ b/cli/pkg/storage/tasks.go @@ -25,14 +25,14 @@ type MkStorageDir struct { func (t *MkStorageDir) Execute(runtime connector.Runtime) error { if utils.IsExist(StorageDataDir) { - if utils.IsExist(cc.OlaresDir) { - _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf %s", cc.OlaresDir), false, false) + if utils.IsExist(cc.BeOSDir) { + _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf %s", cc.BeOSDir), false, false) } - if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("mkdir -p %s", StorageDataOlaresDir), false, false); err != nil { + if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("mkdir -p %s", StorageDataBeOSDir), false, false); err != nil { return err } - if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("ln -s %s %s", StorageDataOlaresDir, cc.OlaresDir), false, false); err != nil { + if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("ln -s %s %s", StorageDataBeOSDir, cc.BeOSDir), false, false); err != nil { return err } } @@ -229,9 +229,9 @@ func (t *StopJuiceFS) Execute(runtime connector.Runtime) error { _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf /var/jfsCache %s", JuiceFsCacheDir), false, false) - _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("umount %s", OlaresJuiceFSRootDir), false, false) + _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("umount %s", BeOSJuiceFSRootDir), false, false) - _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf %s", OlaresJuiceFSRootDir), false, false) + _, _ = runtime.GetRunner().SudoCmd(fmt.Sprintf("rm -rf %s", BeOSJuiceFSRootDir), false, false) return nil } @@ -331,12 +331,12 @@ type DeleteTerminusUserData struct { func (t *DeleteTerminusUserData) Execute(runtime connector.Runtime) error { userdataDirs := []string{ - OlaresUserDataDir, + BeOSUserDataDir, JuiceFsCacheDir, } if util.IsExist(RedisServiceFile) { - userdataDirs = append(userdataDirs, OlaresJuiceFSRootDir) + userdataDirs = append(userdataDirs, BeOSJuiceFSRootDir) } for _, d := range userdataDirs { @@ -357,13 +357,13 @@ type DeleteTerminusData struct { func (t *DeleteTerminusData) Execute(runtime connector.Runtime) error { var dirs []string var shareExists bool - filepath.WalkDir(OlaresRootDir, func(path string, d fs.DirEntry, err error) error { - if path != OlaresRootDir { + filepath.WalkDir(BeOSRootDir, func(path string, d fs.DirEntry, err error) error { + if path != BeOSRootDir { if !d.IsDir() { return nil } - if strings.HasPrefix(path, OlaresSharedLibDir) { + if strings.HasPrefix(path, BeOSSharedLibDir) { shareExists = true } else { dirs = append(dirs, path) @@ -382,8 +382,8 @@ func (t *DeleteTerminusData) Execute(runtime connector.Runtime) error { } if !shareExists { - if err := util.RemoveDir(OlaresRootDir); err != nil { - logger.Errorf("remove %s failed %v", OlaresRootDir, err) + if err := util.RemoveDir(BeOSRootDir); err != nil { + logger.Errorf("remove %s failed %v", BeOSRootDir, err) } } @@ -405,7 +405,7 @@ func (t *CreateSharedLibDir) Execute(runtime connector.Runtime) error { if runtime.GetSystemInfo().IsDarwin() { return nil } - if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("mkdir -p %s && chown 1000:1000 %s", OlaresSharedLibDir, OlaresSharedLibDir), false, false); err != nil { + if _, err := runtime.GetRunner().SudoCmd(fmt.Sprintf("mkdir -p %s && chown 1000:1000 %s", BeOSSharedLibDir, BeOSSharedLibDir), false, false); err != nil { return errors.Wrap(errors.WithStack(err), "failed to create shared lib dir") } return nil diff --git a/cli/pkg/terminus/account.go b/cli/pkg/terminus/account.go index 5761a06d5..9749a1550 100644 --- a/cli/pkg/terminus/account.go +++ b/cli/pkg/terminus/account.go @@ -39,12 +39,12 @@ func (s *GetUserInfo) Execute(runtime connector.Runtime) error { if err != nil { return err } - logger.Infof("using Olares Local Name: %s", s.KubeConf.Arg.User.UserName) + logger.Infof("using beOS Pro Local Name: %s", s.KubeConf.Arg.User.UserName) s.KubeConf.Arg.User.Email, err = s.getUserEmail() if err != nil { return err } - logger.Infof("using Olares ID: %s", s.KubeConf.Arg.User.Email) + logger.Infof("using beOS ID: %s", s.KubeConf.Arg.User.Email) s.KubeConf.Arg.User.Password, s.KubeConf.Arg.User.EncryptedPassword, err = s.getUserPassword() if err != nil { return err @@ -106,7 +106,7 @@ func (s *GetUserInfo) getUserName() (string, error) { return "", errors.Wrap(err, "failed to get terminal input reader") } LOOP: - fmt.Printf("\nEnter the Olares ID (which you registered in the LarePass app): ") + fmt.Printf("\nEnter your beOS ID: ") userName, err = reader.ReadString('\n') if err != nil && err.Error() != "EOF" { return "", errors.Wrap(errors.WithStack(err), "read username failed") @@ -135,7 +135,7 @@ func (s *GetUserInfo) getUserEmail() (string, error) { } func (s *GetUserInfo) getUserPassword() (string, string, error) { - // currently only used in the installation flow by LarePass -> Olaresd, + // currently only used by the companion-app -> beOSd installation flow, // when this env var is passed in, it is already encrypted // make this one priority over the password set in the arg specailly // to ensure the larepass installation flow works as expected diff --git a/cli/pkg/terminus/apps.go b/cli/pkg/terminus/apps.go index be2fa9303..111862c6d 100644 --- a/cli/pkg/terminus/apps.go +++ b/cli/pkg/terminus/apps.go @@ -123,10 +123,10 @@ func (u *PrepareAppValues) Execute(runtime connector.Runtime) error { "username": u.KubeConf.Arg.User.UserName, }, }, - "gpu": gpuType, - "fs_type": fsType, - "os": appValues, - common.HelmValuesKeyOlaresRootFSPath: storage.OlaresRootDir, + "gpu": gpuType, + "fs_type": fsType, + "os": appValues, + common.HelmValuesKeyBeOSRootFSPath: storage.BeOSRootDir, } u.ModuleCache.Set(common.CacheAppValues, values) diff --git a/cli/pkg/terminus/launcher.go b/cli/pkg/terminus/launcher.go index 9c0e78a90..0231003bb 100644 --- a/cli/pkg/terminus/launcher.go +++ b/cli/pkg/terminus/launcher.go @@ -61,7 +61,7 @@ func (t *InstallBFL) Execute(runtime connector.Runtime) error { "appKey": key, "appSecret": secret, } - vals[common.HelmValuesKeyOlaresRootFSPath] = storage.OlaresRootDir + vals[common.HelmValuesKeyBeOSRootFSPath] = storage.BeOSRootDir if err := utils.UpgradeCharts(ctx, actionConfig, settings, launchName, launchPath, "", ns, vals, false); err != nil { return err diff --git a/cli/pkg/terminus/modules.go b/cli/pkg/terminus/modules.go index e30aaa938..e54f31293 100644 --- a/cli/pkg/terminus/modules.go +++ b/cli/pkg/terminus/modules.go @@ -259,14 +259,14 @@ func serviceExists(serviceName string) bool { return util.IsExist(path.Join(systemdUnitDir, serviceName)) } -type StopOlaresModule struct { +type StopBeOSModule struct { common.KubeModule Timeout time.Duration CheckInterval time.Duration } -func (m *StopOlaresModule) Init() { - m.Name = "StopOlares" +func (m *StopBeOSModule) Init() { + m.Name = "StopBeOS" newStopServiceTask := func(serviceName string) task.Interface { return &task.LocalTask{ @@ -324,21 +324,21 @@ func (m *StopOlaresModule) Init() { } } if len(m.Tasks) == 0 { - logger.Info("found no components of Olares, please install Olares first") + logger.Info("found no components of beOS Pro, please install beOS Pro first") logger.Info("exiting ...") os.Exit(0) } else if !k3sServiceExists && !kubeletServiceExists { - logger.Warn("kubernetes service can not be found, it seems that Olares has not been installed yet") + logger.Warn("kubernetes service can not be found, it seems that beOS Pro has not been installed yet") logger.Warn("will try to stop any other base components that we can find") } } -type StartOlaresModule struct { +type StartBeOSModule struct { common.KubeModule } -func (m *StartOlaresModule) Init() { - m.Name = "StartOlares" +func (m *StartBeOSModule) Init() { + m.Name = "StartBeOS" newStartServiceTask := func(serviceName string) task.Interface { return &task.LocalTask{ @@ -376,13 +376,13 @@ func (m *StartOlaresModule) Init() { m.Tasks = append(m.Tasks, newStartServiceTask(kubeletServiceName)) } if len(m.Tasks) == 0 { - logger.Info("found no components of Olares, please install Olares first") + logger.Info("found no components of beOS Pro, please install beOS Pro first") logger.Info("exiting ...") os.Exit(0) } else if k3sServiceExists || kubeletServiceExists { m.Tasks = append(m.Tasks, &task.LocalTask{ - // when starting an already stopped Olares, which is the normal use case + // when starting an already stopped beOS Pro, which is the normal use case // it's very likely for this program to outrun kubelet // and retrieve a pod list from kube-apiserver that is a "snapshot" of the cluster state // when the kubernetes components was killed, before. i.e. the data will say all the pods are running while they're actually not @@ -399,7 +399,7 @@ func (m *StartOlaresModule) Init() { Retry: 60, }) } else { - logger.Warn("kubernetes service can not be found, it seems that Olares has not been installed yet") + logger.Warn("kubernetes service can not be found, it seems that beOS Pro has not been installed yet") logger.Warn("will try to start any other base components that we can find") } @@ -414,7 +414,7 @@ func (m *ChangeIPModule) Init() { prepared, _ := m.PipelineCache.GetMustBool(common.CachePreparedState) if !prepared { - logger.Info("the Olares OS is not prepared, will only try to update /etc/hosts") + logger.Info("the beOS Pro is not prepared, will only try to update /etc/hosts") } m.Tasks = []task.Interface{ &task.LocalTask{ @@ -429,7 +429,7 @@ func (m *ChangeIPModule) Init() { installed, _ := m.PipelineCache.GetMustBool(common.CacheInstalledState) if !installed && prepared { - logger.Info("the Olares OS is not installed, will only try to update prepared base components") + logger.Info("the beOS Pro is not installed, will only try to update prepared base components") } if installed { @@ -744,7 +744,7 @@ func (m *ChangeHostIPModule) Init() { m.Tasks = append(m.Tasks, &task.LocalTask{ - Name: "CheckOlaresStateInHost", + Name: "CheckBeOSStateInHost", Action: new(CheckTerminusStateInHost), }, &task.LocalTask{ diff --git a/cli/pkg/terminus/natgateway.go b/cli/pkg/terminus/natgateway.go index 5517058ae..5017b0117 100644 --- a/cli/pkg/terminus/natgateway.go +++ b/cli/pkg/terminus/natgateway.go @@ -43,7 +43,7 @@ func (s *GetNATGatewayIP) Execute(runtime connector.Runtime) error { } else { input = hostIP } - case s.KubeConf.Arg.IsOlaresInContainer: + case s.KubeConf.Arg.IsBeOSInContainer: if hostIP == "" { return errors.Errorf("host ip not found") } diff --git a/cli/pkg/terminus/ossystem.go b/cli/pkg/terminus/ossystem.go index 39f9f64b3..3b1f020ef 100644 --- a/cli/pkg/terminus/ossystem.go +++ b/cli/pkg/terminus/ossystem.go @@ -57,11 +57,11 @@ func (t *InstallOsSystem) Execute(runtime connector.Runtime) error { "is_cloud_version": cloudValue(t.KubeConf.Arg.IsCloudInstance), "sync_secret": t.KubeConf.Arg.Storage.StorageSyncSecret, }, - "gpu": getGpuType(t.KubeConf.Arg.GPU.Enable), - "s3_bucket": t.KubeConf.Arg.Storage.StorageBucket, - "fs_type": storage.GetRootFSType(), - common.HelmValuesKeyOlaresRootFSPath: storage.OlaresRootDir, - "sharedlib": storage.OlaresSharedLibDir, + "gpu": getGpuType(t.KubeConf.Arg.GPU.Enable), + "s3_bucket": t.KubeConf.Arg.Storage.StorageBucket, + "fs_type": storage.GetRootFSType(), + common.HelmValuesKeyBeOSRootFSPath: storage.BeOSRootDir, + "sharedlib": storage.BeOSSharedLibDir, } var platformPath = path.Join(runtime.GetInstallerDir(), "wizard", "config", "os-platform") diff --git a/cli/pkg/terminus/tasks.go b/cli/pkg/terminus/tasks.go index 60001bf36..6dda4182e 100644 --- a/cli/pkg/terminus/tasks.go +++ b/cli/pkg/terminus/tasks.go @@ -45,10 +45,10 @@ import ( "github.com/pkg/errors" ) -type GetOlaresVersion struct { +type GetBeOSVersion struct { } -func (t *GetOlaresVersion) Execute() (string, error) { +func (t *GetBeOSVersion) Execute() (string, error) { var kubectlpath, err = util.GetCommand(common.CommandKubectl) if err != nil { return "", fmt.Errorf("kubectl not found, beOS Pro might not be installed") @@ -159,7 +159,7 @@ type Download struct { } func (t *Download) Execute(runtime connector.Runtime) error { - if t.UrlOverride == "" && t.KubeConf.Arg.OlaresVersion == "" { + if t.UrlOverride == "" && t.KubeConf.Arg.BeOSVersion == "" { return errors.New("unknown version to download") } @@ -234,7 +234,7 @@ type PrepareFinished struct { func (t *PrepareFinished) Execute(runtime connector.Runtime) error { var preparedFile = filepath.Join(runtime.GetBaseDir(), common.TerminusStateFilePrepared) - return util.WriteFile(preparedFile, []byte(t.KubeConf.Arg.OlaresVersion), cc.FileMode0644) + return util.WriteFile(preparedFile, []byte(t.KubeConf.Arg.BeOSVersion), cc.FileMode0644) // if _, err := runtime.GetRunner().Cmd(fmt.Sprintf("touch %s", preparedFile), false, true); err != nil { // return err // } @@ -247,8 +247,8 @@ type WriteReleaseFile struct { } func (t *WriteReleaseFile) Execute(runtime connector.Runtime) error { - if util.IsExist(common.OlaresReleaseFile) { - logger.Debugf("found existing release file: %s, overriding ...", common.OlaresReleaseFile) + if util.IsExist(common.BeOSReleaseFile) { + logger.Debugf("found existing release file: %s, overriding ...", common.BeOSReleaseFile) } return t.KubeConf.Arg.SaveReleaseInfo(t.WithoutName) } @@ -258,7 +258,7 @@ type RemoveReleaseFile struct { } func (t *RemoveReleaseFile) Execute(runtime connector.Runtime) error { - err := os.Remove(common.OlaresReleaseFile) + err := os.Remove(common.BeOSReleaseFile) if err != nil && !os.IsNotExist(err) { return err } @@ -304,7 +304,7 @@ type InstallFinished struct { } func (t *InstallFinished) Execute(runtime connector.Runtime) error { - var content = fmt.Sprintf("%s %s", t.KubeConf.Arg.OlaresVersion, t.KubeConf.Arg.Kubetype) + var content = fmt.Sprintf("%s %s", t.KubeConf.Arg.BeOSVersion, t.KubeConf.Arg.Kubetype) var phaseState = path.Join(runtime.GetBaseDir(), common.TerminusStateFileInstalled) if err := util.WriteFile(phaseState, []byte(content), cc.FileMode0644); err != nil { return err @@ -898,9 +898,9 @@ type GetMasterInfo struct { type MasterInfo struct { JuiceFSEnabled bool KubernetesInstalled bool - OlaresInstalled bool + BeOSInstalled bool KubernetesType string - OlaresVersion string + BeOSVersion string MasterNodeName string AllNodes []string } @@ -913,7 +913,7 @@ func (t *GetMasterInfo) Execute(runtime connector.Runtime) (err error) { } if t.Print { logger.Infof("Got master info:\nBeOSVersion: %s\nJuiceFSEnabled: %t\nKubernetesType: %s\nMasterNodeName: %s\nAllNodes: %s\n", - masterInfo.OlaresVersion, masterInfo.JuiceFSEnabled, masterInfo.KubernetesType, masterInfo.MasterNodeName, strings.Join(masterInfo.AllNodes, ",")) + masterInfo.BeOSVersion, masterInfo.JuiceFSEnabled, masterInfo.KubernetesType, masterInfo.MasterNodeName, strings.Join(masterInfo.AllNodes, ",")) } t.PipelineCache.Set(common.MasterInfo, masterInfo) @@ -925,7 +925,7 @@ func (t *GetMasterInfo) Execute(runtime connector.Runtime) (err error) { if !exist { masterInfo.JuiceFSEnabled = false } else { - juiceFSCheckCMD := fmt.Sprintf("%s info %s", storage.JuiceFsFile, storage.OlaresJuiceFSRootDir) + juiceFSCheckCMD := fmt.Sprintf("%s info %s", storage.JuiceFsFile, storage.BeOSJuiceFSRootDir) output, err := runtime.GetRunner().SudoCmd(juiceFSCheckCMD, false, false) if err != nil { return errors.Wrap(err, "failed to check JuiceFS status") @@ -966,13 +966,13 @@ func (t *GetMasterInfo) Execute(runtime connector.Runtime) (err error) { output, err = runtime.GetRunner().SudoCmd(olaresVersionCMD, false, false) if err != nil { if strings.Contains(err.Error(), "the server doesn't have a resource type") { - masterInfo.OlaresInstalled = false + masterInfo.BeOSInstalled = false return nil } return errors.Wrap(err, "failed to get beOS Pro version (is it installed?)") } - masterInfo.OlaresInstalled = true - masterInfo.OlaresVersion = strings.TrimSpace(output) + masterInfo.BeOSInstalled = true + masterInfo.BeOSVersion = strings.TrimSpace(output) return nil } @@ -1004,7 +1004,7 @@ func (a *AddNodePrecheck) Execute(runtime connector.Runtime) error { if !masterInfo.KubernetesInstalled { errs = append(errs, errors.New("[Kubernetes] the master node has not installed Kubernetes")) } - if !masterInfo.OlaresInstalled { + if !masterInfo.BeOSInstalled { errs = append(errs, errors.New("[beOS Pro] the master node has not installed beOS Pro")) } for _, node := range masterInfo.AllNodes { diff --git a/cli/pkg/terminus/welcome.go b/cli/pkg/terminus/welcome.go index 942bb6b96..9b5034608 100644 --- a/cli/pkg/terminus/welcome.go +++ b/cli/pkg/terminus/welcome.go @@ -46,7 +46,7 @@ func (t *WelcomeMessage) Execute(runtime connector.Runtime) error { logger.InfoInstallationProgress("Installation wizard is complete") logger.InfoInstallationProgress("All done") fmt.Printf("\n\n\n\n------------------------------------------------\n\n") - logger.Info("Olares is running locally at:") + logger.Info("beOS Pro is running locally at:") logger.Infof("http://%s:%d", localIP, port) if len(filteredPublicIPs) > 0 { fmt.Println() @@ -86,7 +86,7 @@ type WelcomeModule struct { } func (m *WelcomeModule) Init() { - logger.InfoInstallationProgress("Starting Olares ...") + logger.InfoInstallationProgress("Starting beOS Pro ...") m.Name = "Welcome" waitServicesReady := &task.LocalTask{ diff --git a/cli/pkg/upgrade/1_12_3_20251127.go b/cli/pkg/upgrade/1_12_3_20251127.go index 34ef49c7c..493d69fac 100644 --- a/cli/pkg/upgrade/1_12_3_20251127.go +++ b/cli/pkg/upgrade/1_12_3_20251127.go @@ -18,7 +18,7 @@ func (u upgrader_1_12_3_20251127) NeedRestart() bool { } // put GPU driver upgrade step at the very end right before updating the version -func (u upgrader_1_12_3_20251127) UpdateOlaresVersion() []task.Interface { +func (u upgrader_1_12_3_20251127) UpdateBeOSVersion() []task.Interface { var tasks []task.Interface tasks = append(tasks, &task.LocalTask{ @@ -26,7 +26,7 @@ func (u upgrader_1_12_3_20251127) UpdateOlaresVersion() []task.Interface { Action: new(upgradeGPUDriverIfNeeded), }, ) - tasks = append(tasks, u.upgraderBase.UpdateOlaresVersion()...) + tasks = append(tasks, u.upgraderBase.UpdateBeOSVersion()...) tasks = append(tasks, &task.LocalTask{ Name: "RebootIfNeeded", diff --git a/cli/pkg/upgrade/1_12_3_20251217.go b/cli/pkg/upgrade/1_12_3_20251217.go index 41f4e7902..ae4157152 100644 --- a/cli/pkg/upgrade/1_12_3_20251217.go +++ b/cli/pkg/upgrade/1_12_3_20251217.go @@ -42,7 +42,7 @@ func (u upgrader_1_12_3_20251217) NeedRestart() bool { return true } -func (u upgrader_1_12_3_20251217) UpdateOlaresVersion() []task.Interface { +func (u upgrader_1_12_3_20251217) UpdateBeOSVersion() []task.Interface { var tasks []task.Interface tasks = append(tasks, &task.LocalTask{ @@ -50,7 +50,7 @@ func (u upgrader_1_12_3_20251217) UpdateOlaresVersion() []task.Interface { Action: new(upgradeGPUDriverIfNeeded), }, ) - tasks = append(tasks, u.upgraderBase.UpdateOlaresVersion()...) + tasks = append(tasks, u.upgraderBase.UpdateBeOSVersion()...) tasks = append(tasks, &task.LocalTask{ Name: "RebootIfNeeded", diff --git a/cli/pkg/upgrade/1_12_4.go b/cli/pkg/upgrade/1_12_4.go index 86873858a..eeeba80e4 100644 --- a/cli/pkg/upgrade/1_12_4.go +++ b/cli/pkg/upgrade/1_12_4.go @@ -69,7 +69,7 @@ func (u upgrader_1_12_4) UpgradeSystemComponents() []task.Interface { return append(pre, u.upgraderBase.UpgradeSystemComponents()...) } -func (u upgrader_1_12_4) UpdateOlaresVersion() []task.Interface { +func (u upgrader_1_12_4) UpdateBeOSVersion() []task.Interface { var tasks []task.Interface tasks = append(tasks, &task.LocalTask{ @@ -77,7 +77,7 @@ func (u upgrader_1_12_4) UpdateOlaresVersion() []task.Interface { Action: new(upgradeGPUDriverIfNeeded), }, ) - tasks = append(tasks, u.upgraderBase.UpdateOlaresVersion()...) + tasks = append(tasks, u.upgraderBase.UpdateBeOSVersion()...) tasks = append(tasks, &task.LocalTask{ Name: "RebootIfNeeded", diff --git a/cli/pkg/upgrade/base.go b/cli/pkg/upgrade/base.go index 5310d5fbe..149148cb3 100644 --- a/cli/pkg/upgrade/base.go +++ b/cli/pkg/upgrade/base.go @@ -7,6 +7,7 @@ import ( "path" "time" + iamv1alpha2 "github.com/beclab/api/iam/v1alpha2" "github.com/beclab/beos/cli/pkg/common" "github.com/beclab/beos/cli/pkg/core/connector" "github.com/beclab/beos/cli/pkg/core/logger" @@ -14,7 +15,6 @@ import ( "github.com/beclab/beos/cli/pkg/gpu" "github.com/beclab/beos/cli/pkg/terminus" "github.com/beclab/beos/cli/pkg/utils" - iamv1alpha2 "github.com/beclab/api/iam/v1alpha2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kruntime "k8s.io/apimachinery/pkg/runtime" @@ -143,11 +143,11 @@ func (u upgraderBase) UpgradeSystemComponents() []task.Interface { } } -func (u upgraderBase) UpdateOlaresVersion() []task.Interface { +func (u upgraderBase) UpdateBeOSVersion() []task.Interface { return []task.Interface{ &task.LocalTask{ - Name: "UpdateOlaresVersion", - Action: new(updateOlaresVersion), + Name: "UpdateBeOSVersion", + Action: new(updateBeOSVersion), }, } } @@ -386,11 +386,11 @@ func (u *upgradeSystemComponents) Execute(runtime connector.Runtime) error { return nil } -type updateOlaresVersion struct { +type updateBeOSVersion struct { common.KubeAction } -func (u *updateOlaresVersion) Execute(runtime connector.Runtime) error { +func (u *updateBeOSVersion) Execute(runtime connector.Runtime) error { config, err := ctrl.GetConfig() if err != nil { return fmt.Errorf("failed to get rest config: %s", err) @@ -403,7 +403,7 @@ func (u *updateOlaresVersion) Execute(runtime connector.Runtime) error { defer cancelSettings() settingsChartPath := path.Join(runtime.GetInstallerDir(), "wizard", "config", "settings") - vals := map[string]interface{}{"version": u.KubeConf.Arg.OlaresVersion} + vals := map[string]interface{}{"version": u.KubeConf.Arg.BeOSVersion} if err := utils.UpgradeCharts(ctx, actionConfig, settings, common.ChartNameSettings, settingsChartPath, "", common.NamespaceDefault, vals, true); err != nil { return err } diff --git a/cli/pkg/upgrade/interfaces.go b/cli/pkg/upgrade/interfaces.go index 945977b2a..69c12f98f 100644 --- a/cli/pkg/upgrade/interfaces.go +++ b/cli/pkg/upgrade/interfaces.go @@ -13,7 +13,7 @@ type upgrader interface { UpgradeUserComponents() []task.Interface UpdateReleaseFile() []task.Interface UpgradeSystemComponents() []task.Interface - UpdateOlaresVersion() []task.Interface + UpdateBeOSVersion() []task.Interface PostUpgrade() []task.Interface AddedBreakingChange() bool NeedRestart() bool diff --git a/cli/pkg/upgrade/modules.go b/cli/pkg/upgrade/modules.go index 33eb19729..05041f274 100644 --- a/cli/pkg/upgrade/modules.go +++ b/cli/pkg/upgrade/modules.go @@ -16,7 +16,7 @@ type Module struct { } func (m *Module) Init() { - m.Name = "UpgradeOlares" + m.Name = "UpgradeBeOS" u := getUpgraderByVersion(m.TargetVersion) m.Tasks = append(m.Tasks, u.PrepareForUpgrade()...) @@ -26,7 +26,7 @@ func (m *Module) Init() { m.Tasks = append(m.Tasks, u.UpgradeSystemComponents()...) m.Tasks = append(m.Tasks, u.UpgradeUserComponents()...) m.Tasks = append(m.Tasks, u.UpdateReleaseFile()...) - m.Tasks = append(m.Tasks, u.UpdateOlaresVersion()...) + m.Tasks = append(m.Tasks, u.UpdateBeOSVersion()...) m.Tasks = append(m.Tasks, u.PostUpgrade()...) } diff --git a/cli/pkg/upgrade/version.go b/cli/pkg/upgrade/version.go index fae247808..ffd24035c 100644 --- a/cli/pkg/upgrade/version.go +++ b/cli/pkg/upgrade/version.go @@ -85,9 +85,9 @@ func Check(base *semver.Version, target *semver.Version) error { return fmt.Errorf("base version is nil") } - cliVersion, err := utils.ParseOlaresVersionString(version.VERSION) + cliVersion, err := utils.ParseBeOSVersionString(version.VERSION) if err != nil { - return fmt.Errorf("invalid olares-cli version :\"%s\"", version.VERSION) + return fmt.Errorf("invalid beos-cli version :\"%s\"", version.VERSION) } if target != nil { diff --git a/cli/pkg/utils/lvm/lvm.go b/cli/pkg/utils/lvm/lvm.go index 958e2b423..3f7302aa7 100644 --- a/cli/pkg/utils/lvm/lvm.go +++ b/cli/pkg/utils/lvm/lvm.go @@ -15,9 +15,9 @@ const ( "report": [ { "lv": [ - {"lv_name":"data", "vg_name":"olares-vg", "lv_attr":"-wi-ao----", "lv_size":"1.76t", "pool_lv":"", "origin":"", "data_percent":"", "metadata_percent":"", "move_pv":"", "mirror_log":"", "copy_percent":"", "convert_lv":""}, - {"lv_name":"root", "vg_name":"olares-vg", "lv_attr":"-wi-ao----", "lv_size":"100.00g", "pool_lv":"", "origin":"", "data_percent":"", "metadata_percent":"", "move_pv":"", "mirror_log":"", "copy_percent":"", "convert_lv":""}, - {"lv_name":"swap", "vg_name":"olares-vg", "lv_attr":"-wi-ao----", "lv_size":"1.00g", "pool_lv":"", "origin":"", "data_percent":"", "metadata_percent":"", "move_pv":"", "mirror_log":"", "copy_percent":"", "convert_lv":""} + {"lv_name":"data", "vg_name":"beos-vg", "lv_attr":"-wi-ao----", "lv_size":"1.76t", "pool_lv":"", "origin":"", "data_percent":"", "metadata_percent":"", "move_pv":"", "mirror_log":"", "copy_percent":"", "convert_lv":""}, + {"lv_name":"root", "vg_name":"beos-vg", "lv_attr":"-wi-ao----", "lv_size":"100.00g", "pool_lv":"", "origin":"", "data_percent":"", "metadata_percent":"", "move_pv":"", "mirror_log":"", "copy_percent":"", "convert_lv":""}, + {"lv_name":"swap", "vg_name":"beos-vg", "lv_attr":"-wi-ao----", "lv_size":"1.00g", "pool_lv":"", "origin":"", "data_percent":"", "metadata_percent":"", "move_pv":"", "mirror_log":"", "copy_percent":"", "convert_lv":""} ] } ] @@ -67,7 +67,7 @@ func CommandLVS() *command[LvsResult] { "report": [ { "vg": [ - {"vg_name":"olares-vg", "pv_count":"1", "lv_count":"3", "snap_count":"0", "vg_attr":"wz--n-", "vg_size":"1.86t", "vg_free":"0 "} + {"vg_name":"beos-vg", "pv_count":"1", "lv_count":"3", "snap_count":"0", "vg_attr":"wz--n-", "vg_size":"1.86t", "vg_free":"0 "} ] } ] @@ -110,7 +110,7 @@ func CommandVGS() *command[VgsResult] { "report": [ { "pv": [ - {"pv_name":"/dev/nvme0n1p2", "vg_name":"olares-vg", "pv_fmt":"lvm2", "pv_attr":"a--", "pv_size":"1.86t", "pv_free":"0 "} + {"pv_name":"/dev/nvme0n1p2", "vg_name":"beos-vg", "pv_fmt":"lvm2", "pv_attr":"a--", "pv_size":"1.86t", "pv_free":"0 "} ] } ] diff --git a/cli/pkg/utils/utils.go b/cli/pkg/utils/utils.go index 05d4f0d51..df79194d6 100755 --- a/cli/pkg/utils/utils.go +++ b/cli/pkg/utils/utils.go @@ -228,7 +228,7 @@ func GenerateEncryptedPassword(length int) (string, string, error) { } func EncryptPassword(plainText string) string { - return utils.MD5(plainText + "@Olares2025") + return utils.MD5(plainText + "@beOSPro2025") } func RemoveAnsiCodes(input string) string { diff --git a/cli/pkg/utils/version.go b/cli/pkg/utils/version.go index 11daf55e5..57ceddc89 100644 --- a/cli/pkg/utils/version.go +++ b/cli/pkg/utils/version.go @@ -2,7 +2,7 @@ package utils import "github.com/Masterminds/semver/v3" -func ParseOlaresVersionString(versionString string) (*semver.Version, error) { +func ParseBeOSVersionString(versionString string) (*semver.Version, error) { // todo: maybe some other custom processing only for olares return semver.NewVersion(versionString) } diff --git a/cli/pkg/web5/crypto/README.md b/cli/pkg/web5/crypto/README.md index d410ec6ab..b0eda0a5d 100644 --- a/cli/pkg/web5/crypto/README.md +++ b/cli/pkg/web5/crypto/README.md @@ -34,7 +34,7 @@ This package mostly exists to maintain parity with the structure of other web5 S ### Key Generation -the `dsa` package provides [algorithm IDs](https://github.com/beclab/Olares/cli/pkg/web5/blob/5d50ce8f24e4b47b0a8626724e8a571e9b5c847f/crypto/dsa/dsa.go#L11-L14) that can be passed to the `GenerateKey` function e.g. +the `dsa` package provides [algorithm IDs](https://github.com/beclab/beOS Pro/cli/pkg/web5/blob/5d50ce8f24e4b47b0a8626724e8a571e9b5c847f/crypto/dsa/dsa.go#L11-L14) that can be passed to the `GenerateKey` function e.g. ```go package main @@ -42,7 +42,7 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/crypto/dsa" + "github.com/beclab/beOS Pro/cli/pkg/web5/crypto/dsa" ) func main() { @@ -64,7 +64,7 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/crypto/dsa" + "github.com/beclab/beOS Pro/cli/pkg/web5/crypto/dsa" ) func main() { @@ -95,7 +95,7 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/crypto/dsa" + "github.com/beclab/beOS Pro/cli/pkg/web5/crypto/dsa" ) func main() { diff --git a/cli/pkg/web5/dids/README.md b/cli/pkg/web5/dids/README.md index 695459c23..ab6f70530 100644 --- a/cli/pkg/web5/dids/README.md +++ b/cli/pkg/web5/dids/README.md @@ -55,7 +55,7 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" ) func main() { @@ -81,7 +81,7 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" ) func main() { @@ -110,8 +110,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/dsa" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/dsa" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" ) func main() { @@ -148,8 +148,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/dsa" - "github.com/beclab/Olares/cli/pkg/web5/dids" + "github.com/beclab/beOS Pro/cli/pkg/web5/dsa" + "github.com/beclab/beOS Pro/cli/pkg/web5/dids" ) func main() { @@ -180,8 +180,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/did" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/did" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" ) func main() { @@ -213,7 +213,7 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/did" + "github.com/beclab/beOS Pro/cli/pkg/web5/did" ) func main() { diff --git a/cli/pkg/web5/jws/README.md b/cli/pkg/web5/jws/README.md index 819b7d90e..6c890018d 100644 --- a/cli/pkg/web5/jws/README.md +++ b/cli/pkg/web5/jws/README.md @@ -24,8 +24,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" - "github.com/beclab/Olares/cli/pkg/web5/jws" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/jws" ) func main() { @@ -56,8 +56,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" - "github.com/beclab/Olares/cli/pkg/web5/jws" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/jws" ) func main() { @@ -86,8 +86,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" - "github.com/beclab/Olares/cli/pkg/web5/jws" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/jws" ) func main() { @@ -116,8 +116,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" - "github.com/beclab/Olares/cli/pkg/web5/jws" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/jws" ) func main() { diff --git a/cli/pkg/web5/jws/checkjws.go b/cli/pkg/web5/jws/checkjws.go index 70c301b1a..7712a5954 100644 --- a/cli/pkg/web5/jws/checkjws.go +++ b/cli/pkg/web5/jws/checkjws.go @@ -83,13 +83,13 @@ func initDB() { // CheckJWSResult represents the result of checking a JWS type CheckJWSResult struct { - OlaresID string `json:"olares_id"` - Body interface{} `json:"body"` - KID string `json:"kid"` + BeOSID string `json:"olares_id"` + Body interface{} `json:"body"` + KID string `json:"kid"` } // resolveDID resolves a DID either from cache or from the DID gate -func ResolveOlaresName(gateUrl, olares_id string) (*didcore.ResolutionResult, error) { +func ResolveBeOSName(gateUrl, olares_id string) (*didcore.ResolutionResult, error) { name := strings.Replace(olares_id, "@", ".", -1) // Try to get from cache first cached, err := getDB().Get([]byte(name), nil) @@ -197,7 +197,7 @@ func CheckJWS(gateUrl, jws string, duration int64) (*CheckJWSResult, error) { } // Resolve DID - resolutionResult, err := ResolveOlaresName(gateUrl, name) + resolutionResult, err := ResolveBeOSName(gateUrl, name) if err != nil { return nil, fmt.Errorf("failed to resolve DID: %w", err) } @@ -230,9 +230,9 @@ func CheckJWS(gateUrl, jws string, duration int64) (*CheckJWSResult, error) { } result := CheckJWSResult{ - OlaresID: name, - Body: payload, - KID: kid, + BeOSID: name, + Body: payload, + KID: kid, } return &result, nil diff --git a/cli/pkg/web5/jwt/README.md b/cli/pkg/web5/jwt/README.md index 1ea8da241..eab4c0c79 100644 --- a/cli/pkg/web5/jwt/README.md +++ b/cli/pkg/web5/jwt/README.md @@ -19,8 +19,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/didjwk" - "github.com/beclab/Olares/cli/pkg/web5/jwt" + "github.com/beclab/beOS Pro/cli/pkg/web5/didjwk" + "github.com/beclab/beOS Pro/cli/pkg/web5/jwt" ) func main() { @@ -48,8 +48,8 @@ package main import ( "fmt" - "github.com/beclab/Olares/cli/pkg/web5/dids" - "github.com/beclab/Olares/cli/pkg/web5/jwt" + "github.com/beclab/beOS Pro/cli/pkg/web5/dids" + "github.com/beclab/beOS Pro/cli/pkg/web5/jwt" ) func main() { diff --git a/cli/pkg/windows/modules.go b/cli/pkg/windows/modules.go index 17af1231e..f0a827e3b 100644 --- a/cli/pkg/windows/modules.go +++ b/cli/pkg/windows/modules.go @@ -128,16 +128,16 @@ func (i *InstallTerminusModule) Init() { } } -type UninstallOlaresModule struct { +type UninstallBeOSModule struct { common.KubeModule } -func (u *UninstallOlaresModule) Init() { +func (u *UninstallBeOSModule) Init() { u.Name = "UninstallBeOS" u.Tasks = []task.Interface{ &task.LocalTask{ Name: "UninstallBeOS", - Action: &UninstallOlares{}, + Action: &UninstallBeOS{}, }, &task.LocalTask{ Name: "RemoveFirewallRule", diff --git a/cli/pkg/windows/tasks.go b/cli/pkg/windows/tasks.go index e3112e19d..929c70de4 100644 --- a/cli/pkg/windows/tasks.go +++ b/cli/pkg/windows/tasks.go @@ -28,7 +28,7 @@ const ( ubuntuTool = "ubuntu.exe" distro = "Ubuntu" - OLARES_WINDOWS_FIREWALL_RULE_NAME = "OlaresRule" + OLARES_WINDOWS_FIREWALL_RULE_NAME = "BeOSRule" ) type DownloadAppxPackage struct { @@ -37,7 +37,7 @@ type DownloadAppxPackage struct { func (d *DownloadAppxPackage) Execute(runtime connector.Runtime) error { var systemInfo = runtime.GetSystemInfo() - var cdnService = getCDNService(d.KubeConf.Arg.OlaresCDNService) + var cdnService = getCDNService(d.KubeConf.Arg.BeOSCDNService) appx := files.NewKubeBinary("wsl", systemInfo.GetOsArch(), systemInfo.GetOsType(), systemInfo.GetOsVersion(), systemInfo.GetOsPlatformFamily(), "2204", fmt.Sprintf("%s\\%s\\%s\\%s", systemInfo.GetHomeDir(), cc.DefaultBaseDir, "pkg", "components"), cdnService) @@ -95,7 +95,7 @@ type DownloadWSLInstallPackage struct { func (d *DownloadWSLInstallPackage) Execute(runtime connector.Runtime) error { var systemInfo = runtime.GetSystemInfo() - var cdnService = getCDNService(d.KubeConf.Arg.OlaresCDNService) + var cdnService = getCDNService(d.KubeConf.Arg.BeOSCDNService) var osArch = systemInfo.GetOsArch() var osType = systemInfo.GetOsType() var osVersion = systemInfo.GetOsVersion() @@ -437,7 +437,7 @@ func (c *ConfigWindowsFirewallRule) Execute(runtime connector.Runtime) error { scanner := bufio.NewScanner(os.Stdin) for { - fmt.Print("\nAccessing Olares requires setting up firewall rules, specifically adding TCP inbound rules for ports 80, 443, and 30180.\nDo you want to set up the firewall rules? (yes/no): ") + fmt.Print("\nAccessing beOS Pro requires setting up firewall rules, specifically adding TCP inbound rules for ports 80, 443, and 30180.\nDo you want to set up the firewall rules? (yes/no): ") scanner.Scan() confirmation := scanner.Text() confirmation = strings.TrimSpace(confirmation) @@ -457,7 +457,7 @@ func (c *ConfigWindowsFirewallRule) Execute(runtime connector.Runtime) error { } if !setFirewallRule { - fmt.Printf("\nFirewall settings have been skipped. \nIf you want to access the Olares application, please go to the Windows Defender Firewall rules and add an inbound rule for TCP protocol with port numbers 80, 443, and 30180.\n\n\n") + fmt.Printf("\nFirewall settings have been skipped. \nIf you want to access the beOS Pro application, please go to the Windows Defender Firewall rules and add an inbound rule for TCP protocol with port numbers 80, 443, and 30180.\n\n\n") return nil } @@ -491,7 +491,7 @@ func (i *InstallTerminus) Execute(runtime connector.Runtime) error { fmt.Sprintf("export %s=%s", common.ENV_PREINSTALL, os.Getenv(common.ENV_PREINSTALL)), fmt.Sprintf("export %s=%s", common.ENV_HOST_IP, systemInfo.GetLocalIp()), fmt.Sprintf("export %s=%s", common.ENV_DISABLE_HOST_IP_PROMPT, os.Getenv(common.ENV_DISABLE_HOST_IP_PROMPT)), - fmt.Sprintf("export %s=%s", common.ENV_OLARES_CDN_SERVICE, i.KubeConf.Arg.OlaresCDNService), + fmt.Sprintf("export %s=%s", common.ENV_OLARES_CDN_SERVICE, i.KubeConf.Arg.BeOSCDNService), } var bashUrl = fmt.Sprintf("https://%s", cc.DefaultBashUrl) @@ -504,13 +504,13 @@ func (i *InstallTerminus) Execute(runtime connector.Runtime) error { bashUrl = fmt.Sprintf("https://%s", defaultDomainName) } - var cdnService = i.KubeConf.Arg.OlaresCDNService + var cdnService = i.KubeConf.Arg.BeOSCDNService if cdnService == "" { - cdnService = cc.DefaultOlaresCDNService + cdnService = cc.DefaultBeOSCDNService } var installScript = fmt.Sprintf("curl -fsSL %s | bash -", bashUrl) - if i.KubeConf.Arg.OlaresVersion != "" { - var installFile = fmt.Sprintf("install-wizard-v%s.tar.gz", i.KubeConf.Arg.OlaresVersion) + if i.KubeConf.Arg.BeOSVersion != "" { + var installFile = fmt.Sprintf("install-wizard-v%s.tar.gz", i.KubeConf.Arg.BeOSVersion) installScript = fmt.Sprintf("curl -fsSLO %s/%s && tar -xf %s -C ./ ./install.sh && rm -rf %s && bash ./install.sh", cdnService, installFile, installFile, installFile) } @@ -523,7 +523,7 @@ func (i *InstallTerminus) Execute(runtime connector.Runtime) error { } if _, err := cmd.Exec(); err != nil { - return errors.Wrap(errors.WithStack(err), fmt.Sprintf("install Olares %s failed", distro)) + return errors.Wrap(errors.WithStack(err), fmt.Sprintf("install beOS Pro %s failed", distro)) } exec.Command("cmd", "/C", "wsl", "-d", distro, "--exec", "dbus-launch", "true").Run() @@ -541,11 +541,11 @@ func convertPath(windowsPath string) string { return linuxPath } -type UninstallOlares struct { +type UninstallBeOS struct { common.KubeAction } -func (u *UninstallOlares) Execute(runtime connector.Runtime) error { +func (u *UninstallBeOS) Execute(runtime connector.Runtime) error { var cmd = &utils.DefaultCommandExecutor{ Commands: []string{"--unregister", "Ubuntu"}, } @@ -602,7 +602,7 @@ func (g *GetDiskPartition) Execute(runtime connector.Runtime) error { if len(partitions) == 0 { return fmt.Errorf("Unable to retrieve disk space information") } - fmt.Printf("\nInstalling Olares will create a WSL Ubuntu Distro and occupy at least 80 GB of disk space. \nPlease select the drive where you want to install it. \nAvailable drives and free space:\n") + fmt.Printf("\nInstalling beOS Pro will create a WSL Ubuntu Distro and occupy at least 80 GB of disk space. \nPlease select the drive where you want to install it. \nAvailable drives and free space:\n") for _, v := range partitions { var tmp = strings.Split(v, "_") fmt.Printf("%s Free Disk: %s\n", tmp[0], tmp[1]) @@ -657,7 +657,7 @@ func (g *GetDiskPartition) checkEnter(enterPath string, partitions []string) boo func getCDNService(cdnServiceFromEnv string) string { cdnService := strings.TrimSuffix(cdnServiceFromEnv, "/") if cdnService == "" { - cdnService = cc.DefaultOlaresCDNService + cdnService = cc.DefaultBeOSCDNService } return cdnService } @@ -667,11 +667,11 @@ func showUbuntuErrorMsg(msg string, err error) error { fmt.Printf(` Stop Installation !!!!!!! -Installing Windows Olares will use the Ubuntu Distro. It has been detected that there is already an existing Ubuntu Distro in the system. +Installing Windows beOS Pro will use the Ubuntu Distro. It has been detected that there is already an existing Ubuntu Distro in the system. You can use the 'wsl -l --all' command to view the list of WSL Distros. -To proceed with the installation of Olares, you need to unregister the existing Ubuntu Distro. If your Ubuntu Distro contains important information, please back it up first, then unregister the Ubuntu Distro. +To proceed with the installation of beOS Pro, you need to unregister the existing Ubuntu Distro. If your Ubuntu Distro contains important information, please back it up first, then unregister the Ubuntu Distro. Uninstallation command: 'wsl --unregister Ubuntu' -After the unregister Ubuntu Distro is complete, please reinstall Olares. +After the unregister Ubuntu Distro is complete, please reinstall beOS Pro. Error message: %v `, err) diff --git a/cli/pkg/wizard/client.go b/cli/pkg/wizard/client.go index 2f3bc5663..94641d89b 100644 --- a/cli/pkg/wizard/client.go +++ b/cli/pkg/wizard/client.go @@ -26,52 +26,52 @@ func NewClient(state ClientState, sender Sender) *Client { func (c *Client) StartAuthRequest(params StartAuthRequestParams) (*StartAuthRequestResponse, error) { // Build request parameters requestParams := []interface{}{params} - + // Send request response, err := c.call("startAuthRequest", requestParams) if err != nil { return nil, err } - + // Parse response var result StartAuthRequestResponse if err := c.parseResponse(response.Result, &result); err != nil { return nil, fmt.Errorf("failed to parse StartAuthRequest response: %v", err) } - + return &result, nil } func (c *Client) CompleteAuthRequest(params CompleteAuthRequestParams) (*CompleteAuthRequestResponse, error) { // Build request parameters requestParams := []interface{}{params} - + // Send request response, err := c.call("completeAuthRequest", requestParams) if err != nil { return nil, err } - + // Parse response var result CompleteAuthRequestResponse if err := c.parseResponse(response.Result, &result); err != nil { return nil, fmt.Errorf("failed to parse CompleteAuthRequest response: %v", err) } - + return &result, nil } // Generic RPC call method func (c *Client) call(method string, params []interface{}) (*Response, error) { session := c.State.GetSession() - + // Build request req := &Request{ Method: method, Params: params, Device: c.State.GetDevice(), } - + // If session exists, add authentication info if session != nil { auth, err := c.authenticateRequest(req, session) @@ -79,19 +79,19 @@ func (c *Client) call(method string, params []interface{}) (*Response, error) { return nil, fmt.Errorf("failed to authenticate request: %v", err) } req.Auth = auth - + // Temporary debug: print full request JSON if reqJSON, err := json.Marshal(req); err == nil { log.Printf("Full request JSON: %s", string(reqJSON)) } } - + // Send request response, err := c.Sender.Send(req) if err != nil { return nil, fmt.Errorf("failed to send request: %v", err) } - + // Check response error if response.Error != nil { return nil, NewAuthError( @@ -100,14 +100,14 @@ func (c *Client) call(method string, params []interface{}) (*Response, error) { nil, ) } - + // If session exists, verify response if session != nil { if err := c.verifyResponse(response, session); err != nil { return nil, fmt.Errorf("failed to verify response: %v", err) } } - + return response, nil } @@ -116,18 +116,18 @@ func (c *Client) authenticateRequest(req *Request, session *Session) (*RequestAu if session.Key == nil { return nil, fmt.Errorf("session key is nil") } - + // 1. Build timestamp now := time.Now() - + // 2. Serialize request data (ref: session.ts line 158: data = req.params) data := req.Params // Use entire params array directly, not just first element - + dataJSON, err := json.Marshal(data) if err != nil { return nil, fmt.Errorf("failed to marshal request data: %v", err) } - + // 3. Build signature message (ref: session.ts line 179) // Format: ${session}_${time.toISOString()}_${marshal(data)} // Use same format as ISOTime.MarshalJSON to ensure consistency @@ -137,22 +137,22 @@ func (c *Client) authenticateRequest(req *Request, session *Session) (*RequestAu utcTime.Hour(), utcTime.Minute(), utcTime.Second(), utcTime.Nanosecond()/1000000) message := fmt.Sprintf("%s_%s_%s", session.ID, timeStr, string(dataJSON)) - + // 4. Use HMAC-SHA256 signing (ref: HMACParams in crypto.ts) mac := hmac.New(sha256.New, session.Key) mac.Write([]byte(message)) signature := mac.Sum(nil) - + log.Printf("Session signing: sessionId=%s, message_len=%d", session.ID, len(message)) log.Printf("Signing message: %s", message) log.Printf("Data JSON: %s", string(dataJSON)) log.Printf("Session key for signing: %x", session.Key) log.Printf("Signature (hex): %x", signature) - + return &RequestAuth{ Session: session.ID, - Time: ISOTime(now), // Convert to ISOTime type - Signature: Base64Bytes(signature), // Convert to Base64Bytes type + Time: ISOTime(now), // Convert to ISOTime type + Signature: Base64Bytes(signature), // Convert to Base64Bytes type }, nil } @@ -171,10 +171,10 @@ func (c *Client) parseResponse(result interface{}, target interface{}) error { if err != nil { return fmt.Errorf("failed to marshal result: %v", err) } - + if err := json.Unmarshal(jsonData, target); err != nil { return fmt.Errorf("failed to unmarshal to target: %v", err) } - + return nil } diff --git a/cli/pkg/wizard/http_sender.go b/cli/pkg/wizard/http_sender.go index 42bcf9c4b..38d0b074a 100644 --- a/cli/pkg/wizard/http_sender.go +++ b/cli/pkg/wizard/http_sender.go @@ -29,48 +29,48 @@ func NewHTTPSender(baseURL string) *HTTPSender { func (h *HTTPSender) Send(req *Request) (*Response, error) { // Build request URL url := fmt.Sprintf("%s/api/rpc", h.BaseURL) - + // Serialize request reqBody, err := json.Marshal(req) if err != nil { return nil, fmt.Errorf("failed to marshal request: %w", err) } - + // Create HTTP request httpReq, err := http.NewRequest("POST", url, bytes.NewReader(reqBody)) if err != nil { return nil, fmt.Errorf("failed to create HTTP request: %w", err) } - + // Set request headers httpReq.Header.Set("Content-Type", "application/json") httpReq.Header.Set("Accept", "application/json") - + // Authentication info already included in JSON request body's auth field, no extra HTTP headers needed - + // Send request httpResp, err := h.Client.Do(httpReq) if err != nil { return nil, fmt.Errorf("HTTP request failed: %w", err) } defer httpResp.Body.Close() - + // Read response respBody, err := io.ReadAll(httpResp.Body) if err != nil { return nil, fmt.Errorf("failed to read response body: %w", err) } - + // Check HTTP status code if httpResp.StatusCode != 200 { return nil, fmt.Errorf("HTTP error %d: %s", httpResp.StatusCode, string(respBody)) } - + // Parse response var response Response if err := json.Unmarshal(respBody, &response); err != nil { return nil, fmt.Errorf("failed to unmarshal response: %w", err) } - + return &response, nil } diff --git a/cli/pkg/wizard/login_terminus.go b/cli/pkg/wizard/login_terminus.go index 2131d633f..cb6646e7e 100644 --- a/cli/pkg/wizard/login_terminus.go +++ b/cli/pkg/wizard/login_terminus.go @@ -17,41 +17,41 @@ import ( // LoginTerminus implements Terminus login functionality (ref: BindTerminusBusiness.ts loginTerminus) func LoginTerminus(bflUrl, terminusName, localName, password string, needTwoFactor bool) (*Token, error) { log.Printf("Starting loginTerminus for user: %s", terminusName) - + // 1. Call onFirstFactor to get initial token (ref: loginTerminus line 364-372) token, err := OnFirstFactor(bflUrl, terminusName, localName, password, true, needTwoFactor) if err != nil { return nil, fmt.Errorf("first factor authentication failed: %v", err) } - + log.Printf("First factor completed, session_id: %s, FA2 required: %t", token.SessionID, token.FA2 || needTwoFactor) - + // 2. If second factor authentication is required (ref: loginTerminus line 379-446) if token.FA2 || needTwoFactor { log.Printf("Second factor authentication required") - + // Get TOTP value totpValue, err := getTOTPFromMFA() if err != nil { return nil, fmt.Errorf("failed to get TOTP: %v", err) } - + log.Printf("Generated TOTP: %s", totpValue) - + // Perform second factor authentication secondToken, err := performSecondFactor(bflUrl, terminusName, totpValue) if err != nil { return nil, fmt.Errorf("second factor authentication failed: %v", err) } - + // Update token information token.AccessToken = secondToken.AccessToken token.RefreshToken = secondToken.RefreshToken token.SessionID = secondToken.SessionID - + log.Printf("Second factor completed, updated session_id: %s", token.SessionID) } - + log.Printf("LoginTerminus completed successfully") return token, nil } @@ -63,19 +63,19 @@ func getTOTPFromMFA() (string, error) { if err != nil { return "", fmt.Errorf("MFA token not found: %v", err) } - + log.Printf("Using MFA token for TOTP generation: %s", mfa) - + // Generate TOTP (ref: TypeScript hotp function) currentTime := time.Now().Unix() interval := int64(30) // 30 second interval counter := currentTime / interval - + totp, err := generateHOTP(mfa, counter) if err != nil { return "", fmt.Errorf("failed to generate TOTP: %v", err) } - + return totp, nil } @@ -83,107 +83,107 @@ func getTOTPFromMFA() (string, error) { func generateHOTP(secret string, counter int64) (string, error) { // Process base32 string: remove spaces, convert to uppercase, handle padding cleanSecret := strings.ToUpper(strings.ReplaceAll(secret, " ", "")) - + // Add padding characters if needed padding := len(cleanSecret) % 8 if padding != 0 { cleanSecret += strings.Repeat("=", 8-padding) } - + // Decode base32 encoded secret to bytes secretBytes, err := base32.StdEncoding.DecodeString(cleanSecret) if err != nil { return "", fmt.Errorf("failed to decode base32 secret: %v", err) } - + // Convert counter to 8-byte big-endian counterBytes := make([]byte, 8) for i := 7; i >= 0; i-- { counterBytes[i] = byte(counter & 0xff) counter >>= 8 } - + // Use HMAC-SHA1 to calculate hash (consistent with TypeScript version) h := hmac.New(sha1.New, secretBytes) h.Write(counterBytes) hash := h.Sum(nil) - + // Dynamic truncation (consistent with TypeScript getToken function) offset := hash[len(hash)-1] & 0xf code := ((int(hash[offset]) & 0x7f) << 24) | ((int(hash[offset+1]) & 0xff) << 16) | ((int(hash[offset+2]) & 0xff) << 8) | (int(hash[offset+3]) & 0xff) - + // Generate 6-digit number otp := code % int(math.Pow10(6)) - + return fmt.Sprintf("%06d", otp), nil } // performSecondFactor performs second factor authentication (ref: loginTerminus line 419-446) func performSecondFactor(baseURL, terminusName, totpValue string) (*Token, error) { log.Printf("Performing second factor authentication") - + // Build target URL targetURL := fmt.Sprintf("https://desktop.%s/", strings.ReplaceAll(terminusName, "@", ".")) - + // Build request data reqData := map[string]interface{}{ "targetUrl": targetURL, "token": totpValue, } - + jsonData, err := json.Marshal(reqData) if err != nil { return nil, fmt.Errorf("failed to marshal request: %v", err) } - + // Send HTTP request client := &http.Client{ Timeout: 10 * time.Second, } - + url := fmt.Sprintf("%s/api/secondfactor/totp", baseURL) req, err := http.NewRequest("POST", url, strings.NewReader(string(jsonData))) if err != nil { return nil, fmt.Errorf("failed to create request: %v", err) } - + req.Header.Set("Content-Type", "application/json") req.Header.Set("Access-Control-Allow-Origin", "*") req.Header.Set("X-Unauth-Error", "Non-Redirect") - + log.Printf("Sending second factor request to: %s", url) - + resp, err := client.Do(req) if err != nil { return nil, fmt.Errorf("request failed: %v", err) } defer resp.Body.Close() - + body, err := io.ReadAll(resp.Body) if err != nil { return nil, fmt.Errorf("failed to read response: %v", err) } - + if resp.StatusCode != 200 { return nil, fmt.Errorf("HTTP error %d: %s", resp.StatusCode, string(body)) } - + var response struct { Status string `json:"status"` Data Token `json:"data"` } - + if err := json.Unmarshal(body, &response); err != nil { return nil, fmt.Errorf("failed to unmarshal response: %v", err) } - + if response.Status != "OK" { return nil, fmt.Errorf("second factor authentication failed: %s", response.Status) } - + log.Printf("Second factor authentication successful") return &response.Data, nil } @@ -191,69 +191,69 @@ func performSecondFactor(baseURL, terminusName, totpValue string) (*Token, error // ResetPassword implements password reset functionality (ref: account.ts reset_password) func ResetPassword(baseURL, localName, currentPassword, newPassword, accessToken string) error { log.Printf("Starting reset password for user: %s", localName) - + // Process passwords (salted MD5) processedCurrentPassword := passwordAddSort(currentPassword) processedNewPassword := passwordAddSort(newPassword) - + // Build request data (ref: account.ts line 138-141) reqData := map[string]interface{}{ "current_password": processedCurrentPassword, "password": processedNewPassword, } - + jsonData, err := json.Marshal(reqData) if err != nil { return fmt.Errorf("failed to marshal request: %v", err) } - + // Create HTTP client (ref: account.ts line 128-135) client := &http.Client{ Timeout: 10 * time.Second, } - + // Build request URL (ref: account.ts line 136-137) url := fmt.Sprintf("%s/bfl/iam/v1alpha1/users/%s/password", baseURL, localName) req, err := http.NewRequest("PUT", url, strings.NewReader(string(jsonData))) if err != nil { return fmt.Errorf("failed to create request: %v", err) } - + // Set request headers (ref: account.ts line 131-134) req.Header.Set("Content-Type", "application/json") req.Header.Set("X-Authorization", accessToken) - + log.Printf("Sending reset password request to: %s", url) - + // Send request resp, err := client.Do(req) if err != nil { return fmt.Errorf("request failed: %v", err) } defer resp.Body.Close() - + // Read response body, err := io.ReadAll(resp.Body) if err != nil { return fmt.Errorf("failed to read response: %v", err) } - + // Check HTTP status code (ref: account.ts line 144-146) if resp.StatusCode != 200 { return fmt.Errorf("HTTP error %d: %s", resp.StatusCode, string(body)) } - + // Parse response var response struct { - Code int `json:"code"` - Message string `json:"message"` + Code int `json:"code"` + Message string `json:"message"` Data interface{} `json:"data"` } - + if err := json.Unmarshal(body, &response); err != nil { return fmt.Errorf("failed to unmarshal response: %v", err) } - + // Check response status (ref: account.ts line 148-155) if response.Code != 0 { if response.Message != "" { @@ -261,7 +261,7 @@ func ResetPassword(baseURL, localName, currentPassword, newPassword, accessToken } return fmt.Errorf("password reset failed: network error") } - + log.Printf("Password reset completed successfully") return nil } diff --git a/cli/pkg/wizard/platform.go b/cli/pkg/wizard/platform.go index 91ad80b98..06e2c1358 100644 --- a/cli/pkg/wizard/platform.go +++ b/cli/pkg/wizard/platform.go @@ -34,12 +34,12 @@ func (p *WebPlatform) getAuthClient(authType AuthType) (AuthClient, error) { if authType != AuthTypeSSI { return nil, fmt.Errorf("authentication type not supported: %s", authType) } - + // Check if global storage is initialized if globalUserStore == nil { return nil, fmt.Errorf("global stores not initialized, call InitializeGlobalStores first") } - + // Use global storage return &SSIAuthClient{ UserStore: globalUserStore, @@ -117,6 +117,7 @@ func (p *WebPlatform) CompleteAuthRequest(req *StartAuthRequestResponse) (*Authe // Global variables var platform Platform var globalUserStore *UserStore + // globalJWSSigner removed as UserStore.SignJWS() is actually used func SetPlatform(p Platform) { @@ -130,9 +131,9 @@ func InitializeGlobalStores(mnemonic, terminusName string) error { if err != nil { return fmt.Errorf("failed to create UserStore: %w", err) } - + // Set global variables globalUserStore = userStore - + return nil } diff --git a/cli/pkg/wizard/srp.go b/cli/pkg/wizard/srp.go index 883c5d98c..a9b0cfc74 100644 --- a/cli/pkg/wizard/srp.go +++ b/cli/pkg/wizard/srp.go @@ -103,7 +103,7 @@ func (c *SRPClient) GetM2() []byte { func (c *SRPClient) Initialize(x []byte) error { c.session.X = new(big.Int).SetBytes(x) c.session.V = c.core.V(c.session.X) - + // Generate random a a, err := generateRandomBigInt(32) if err != nil { @@ -111,7 +111,7 @@ func (c *SRPClient) Initialize(x []byte) error { } c.session.A = a c.session.BigA = c.core.A(a) - + return nil } @@ -120,26 +120,26 @@ func (c *SRPClient) SetB(B []byte) error { if c.session.X == nil || c.session.A == nil || c.session.BigA == nil { return fmt.Errorf("client not initialized") } - + c.session.BigB = new(big.Int).SetBytes(B) - + // Calculate K, M1, M2 var err error c.session.K, err = c.getKey() if err != nil { return fmt.Errorf("failed to calculate key: %v", err) } - + c.session.M1, err = c.core.M1(c.session.BigA, c.session.BigB, c.session.K) if err != nil { return fmt.Errorf("failed to calculate M1: %v", err) } - + c.session.M2, err = c.core.M2(c.session.BigA, c.session.M1, c.session.K) if err != nil { return fmt.Errorf("failed to calculate M2: %v", err) } - + return nil } @@ -147,21 +147,21 @@ func (c *SRPClient) getKey() (*big.Int, error) { if c.session.X == nil || c.session.A == nil || c.session.BigA == nil || c.session.BigB == nil { return nil, fmt.Errorf("client not initialized") } - + if c.core.IsZeroWhenModN(c.session.BigB) { return nil, fmt.Errorf("invalid B value") } - + u, err := c.core.U(c.session.BigA, c.session.BigB) if err != nil { return nil, fmt.Errorf("failed to calculate u: %v", err) } - + S, err := c.core.ClientS(c.session.BigB, c.session.X, c.session.A, u) if err != nil { return nil, fmt.Errorf("failed to calculate S: %v", err) } - + return c.core.K(S) } @@ -210,19 +210,19 @@ func (s *SRPServer) GetM2() []byte { // Initialize initializes SRP server func (s *SRPServer) Initialize(v []byte) error { s.session.V = new(big.Int).SetBytes(v) - + // Generate random b b, err := generateRandomBigInt(32) if err != nil { return fmt.Errorf("failed to generate random b: %v", err) } s.session.B = b - + s.session.BigB, err = s.core.B(s.session.V, b) if err != nil { return fmt.Errorf("failed to calculate B: %v", err) } - + return nil } @@ -231,26 +231,26 @@ func (s *SRPServer) SetA(A []byte) error { if s.session.V == nil || s.session.B == nil || s.session.BigB == nil { return fmt.Errorf("server not initialized") } - + s.session.BigA = new(big.Int).SetBytes(A) - + // Calculate K, M1, M2 var err error s.session.K, err = s.getKey() if err != nil { return fmt.Errorf("failed to calculate key: %v", err) } - + s.session.M1, err = s.core.M1(s.session.BigA, s.session.BigB, s.session.K) if err != nil { return fmt.Errorf("failed to calculate M1: %v", err) } - + s.session.M2, err = s.core.M2(s.session.BigA, s.session.M1, s.session.K) if err != nil { return fmt.Errorf("failed to calculate M2: %v", err) } - + return nil } @@ -258,16 +258,16 @@ func (s *SRPServer) getKey() (*big.Int, error) { if s.session.V == nil || s.session.B == nil || s.session.BigB == nil || s.session.BigA == nil { return nil, fmt.Errorf("server not initialized") } - + if s.core.IsZeroWhenModN(s.session.BigA) { return nil, fmt.Errorf("invalid A value") } - + u, err := s.core.U(s.session.BigA, s.session.BigB) if err != nil { return nil, fmt.Errorf("failed to calculate u: %v", err) } - + S := s.core.ServerS(s.session.BigA, s.session.V, u, s.session.B) return s.core.K(S) } @@ -282,7 +282,7 @@ func NewSRPCore(length SRPGroupLength) *SRPCore { if err != nil { panic(fmt.Sprintf("Invalid group length: %v", err)) } - + return &SRPCore{ params: params, } @@ -291,13 +291,13 @@ func NewSRPCore(length SRPGroupLength) *SRPCore { // H hash function (...inp) - ref: TypeScript srp.ts line 384-386 func (c *SRPCore) H(inputs ...*big.Int) (*big.Int, error) { hasher := sha256.New() - + for _, input := range inputs { // Ensure byte array length is correct (ref: TypeScript i2b function line 133-138) bytes := c.bigIntToBytes(input) hasher.Write(bytes) } - + hash := hasher.Sum(nil) return new(big.Int).SetBytes(hash), nil } @@ -305,12 +305,12 @@ func (c *SRPCore) H(inputs ...*big.Int) (*big.Int, error) { // bigIntToBytes converts big integer to byte array, ensuring even length (ref: TypeScript i2b function) func (c *SRPCore) bigIntToBytes(i *big.Int) []byte { hex := i.Text(16) // Convert to hexadecimal string - + // Ensure hexadecimal string has even length (ref: TypeScript srp.ts line 135-136) if len(hex)%2 == 1 { hex = "0" + hex } - + // Convert hexadecimal string to byte array bytes := make([]byte, len(hex)/2) for i := 0; i < len(hex); i += 2 { @@ -318,7 +318,7 @@ func (c *SRPCore) bigIntToBytes(i *big.Int) []byte { fmt.Sscanf(hex[i:i+2], "%02x", &b) bytes[i/2] = b } - + return bytes } @@ -338,13 +338,13 @@ func (c *SRPCore) B(v, b *big.Int) (*big.Int, error) { if err != nil { return nil, err } - + // k * v kv := new(big.Int).Mul(k, v) - + // g^b % N gb := new(big.Int).Exp(c.params.G, b, c.params.N) - + // (k*v + g^b) % N return new(big.Int).Add(kv, gb).Mod(new(big.Int).Add(kv, gb), c.params.N), nil } @@ -360,19 +360,19 @@ func (c *SRPCore) ClientS(B, x, a, u *big.Int) (*big.Int, error) { if err != nil { return nil, err } - + // g^x % N gx := new(big.Int).Exp(c.params.G, x, c.params.N) - + // k * (g^x % N) kgx := new(big.Int).Mul(k, gx) - + // B - k*(g^x % N) base := new(big.Int).Sub(B, kgx) - + // a + u*x exp := new(big.Int).Add(a, new(big.Int).Mul(u, x)) - + // (B - k*(g^x % N))^(a + u*x) % N return new(big.Int).Exp(base, exp, c.params.N), nil } @@ -381,10 +381,10 @@ func (c *SRPCore) ClientS(B, x, a, u *big.Int) (*big.Int, error) { func (c *SRPCore) ServerS(A, v, u, b *big.Int) *big.Int { // v^u % N vu := new(big.Int).Exp(v, u, c.params.N) - + // A * v^u % N base := new(big.Int).Mul(A, vu).Mod(new(big.Int).Mul(A, vu), c.params.N) - + // (A * v^u % N)^b % N return new(big.Int).Exp(base, b, c.params.N) } @@ -424,7 +424,7 @@ func getSRPParams(length SRPGroupLength) (*SRPParams, error) { G: big.NewInt(5), N: hexToBigInt("FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F 83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D 670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9 DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510 15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64 ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7 ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31 43DB5BFC E0FD108E 4B82D120 A93AD2CA FFFFFFFF FFFFFFFF"), }, nil - + case SRPGroup4096: return &SRPParams{ Length: 4096, @@ -432,7 +432,7 @@ func getSRPParams(length SRPGroupLength) (*SRPParams, error) { G: big.NewInt(5), N: hexToBigInt("FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F 83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D 670C354E 4ABC9804 F1746C08 CA18217C 32905E46 2E36CE3B E39E772C 180E8603 9B2783A2 EC07A28F B5C55DF0 6F4C52C9 DE2BCBF6 95581718 3995497C EA956AE5 15D22618 98FA0510 15728E5A 8AAAC42D AD33170D 04507A33 A85521AB DF1CBA64 ECFB8504 58DBEF0A 8AEA7157 5D060C7D B3970F85 A6E1E4C7 ABF5AE8C DB0933D7 1E8C94E0 4A25619D CEE3D226 1AD2EE6B F12FFA06 D98A0864 D8760273 3EC86A64 521F2B18 177B200C BBE11757 7A615D6C 770988C0 BAD946E2 08E24FA0 74E5AB31 43DB5BFC E0FD108E 4B82D120 A9210801 1A723C12 A787E6D7 88719A10 BDBA5B26 99C32718 6AF4E23C 1A946834 B6150BDA 2583E9CA 2AD44CE8 DBBBC2DB 04DE8EF9 2E8EFC14 1FBECAA6 287C5947 4E6BC05D 99B2964F A090C3A2 233BA186 515BE7ED 1F612970 CEE2D7AF B81BDD76 2170481C D0069127 D5B05AA9 93B4EA98 8D8FDDC1 86FFB7DC 90A6C08F 4DF435C9 34063199 FFFFFFFF FFFFFFFF"), }, nil - + default: return nil, fmt.Errorf("unsupported group length: %d", length) } @@ -447,12 +447,12 @@ func hexToBigInt(hex string) *big.Int { cleanHex += string(char) } } - + result, success := new(big.Int).SetString(cleanHex, 16) if !success { panic(fmt.Sprintf("Failed to parse hex string: %s", hex)) } - + return result } @@ -463,7 +463,7 @@ func generateRandomBigInt(bytes int) (*big.Int, error) { if err != nil { return nil, err } - + return new(big.Int).SetBytes(randomBytes), nil } @@ -471,7 +471,7 @@ func generateRandomBigInt(bytes int) (*big.Int, error) { func generateUUID() string { randomBytes := make([]byte, 16) rand.Read(randomBytes) - + return fmt.Sprintf("%x-%x-%x-%x-%x", randomBytes[0:4], randomBytes[4:6], diff --git a/cli/pkg/wizard/types.go b/cli/pkg/wizard/types.go index be10a8d57..3b90e7aef 100644 --- a/cli/pkg/wizard/types.go +++ b/cli/pkg/wizard/types.go @@ -345,11 +345,11 @@ func (b Base64Bytes) Bytes() []byte { type VaultType int const ( - VaultTypeDefault VaultType = 0 - VaultTypeLogin VaultType = 1 - VaultTypeCard VaultType = 2 - VaultTypeTerminusTotp VaultType = 3 - VaultTypeOlaresSSHPassword VaultType = 4 + VaultTypeDefault VaultType = 0 + VaultTypeLogin VaultType = 1 + VaultTypeCard VaultType = 2 + VaultTypeTerminusTotp VaultType = 3 + VaultTypeBeOSSSHPassword VaultType = 4 ) // FieldType represents the type of field in a vault item @@ -393,19 +393,19 @@ type VaultItem struct { // Vault represents a vault containing items type Vault struct { - Kind string `json:"kind"` // Always "vault" for Vault objects - ID string `json:"id"` - Name string `json:"name"` - Owner string `json:"owner"` - Created string `json:"created"` // ISO 8601 format - Updated string `json:"updated"` // ISO 8601 format - Revision string `json:"revision,omitempty"` - Items []VaultItem `json:"items,omitempty"` - KeyParams interface{} `json:"keyParams,omitempty"` + Kind string `json:"kind"` // Always "vault" for Vault objects + ID string `json:"id"` + Name string `json:"name"` + Owner string `json:"owner"` + Created string `json:"created"` // ISO 8601 format + Updated string `json:"updated"` // ISO 8601 format + Revision string `json:"revision,omitempty"` + Items []VaultItem `json:"items,omitempty"` + KeyParams interface{} `json:"keyParams,omitempty"` EncryptionParams interface{} `json:"encryptionParams,omitempty"` - Accessors interface{} `json:"accessors,omitempty"` - EncryptedData interface{} `json:"encryptedData,omitempty"` - Version string `json:"version,omitempty"` // Serialization version + Accessors interface{} `json:"accessors,omitempty"` + EncryptedData interface{} `json:"encryptedData,omitempty"` + Version string `json:"version,omitempty"` // Serialization version } // ItemTemplate represents a template for creating vault items diff --git a/cli/pkg/wizard/wizard.go b/cli/pkg/wizard/wizard.go index d1c7d5710..9b9bc8578 100644 --- a/cli/pkg/wizard/wizard.go +++ b/cli/pkg/wizard/wizard.go @@ -38,7 +38,7 @@ type PasswordConfig struct { // TerminusInfo Terminus information response type TerminusInfo struct { WizardStatus string `json:"wizardStatus"` - OlaresId string `json:"olaresId"` + BeOSId string `json:"olaresId"` // Other fields... } diff --git a/daemon/.goreleaser.agent.yml b/daemon/.goreleaser.agent.yml index 7970c7ab0..acacf0b5a 100644 --- a/daemon/.goreleaser.agent.yml +++ b/daemon/.goreleaser.agent.yml @@ -1,11 +1,11 @@ # Official documentation at http://goreleaser.com -project_name: olaresd +project_name: beosd builds: -- id: olaresd-proxy +- id: beosd-proxy env: - CGO_ENABLED=0 main: ./cmd/mdns_agent/main.go - binary: olaresd-proxy + binary: beosd-proxy goarch: - amd64 - arm64 @@ -23,7 +23,7 @@ builds: - -s dist: bin archives: -- name_template: "olaresd-proxy-v{{ .Version }}-{{ .Os }}-{{ .Arch }}" +- name_template: "beosd-proxy-v{{ .Version }}-{{ .Os }}-{{ .Arch }}" replacements: linux: linux amd64: amd64 @@ -40,4 +40,4 @@ changelog: - '^docs:' - '^test:' release: - disable: true \ No newline at end of file + disable: true diff --git a/daemon/.goreleaser.yml b/daemon/.goreleaser.yml index 75b6509f1..eff355ceb 100644 --- a/daemon/.goreleaser.yml +++ b/daemon/.goreleaser.yml @@ -1,11 +1,11 @@ -project_name: olaresd +project_name: beosd builds: - env: - CGO_ENABLED=1 # - CC=aarch64-linux-gnu-gcc # - CXX=aarch64-linux-gnu-g++ main: ./cmd/terminusd/main.go - binary: olaresd + binary: beosd goarch: - amd64 - arm64 @@ -28,10 +28,10 @@ builds: ldflags: - -w - -s - - -X 'github.com/beclab/Olares/daemon/cmd/terminusd/version.version=v{{ .Version }}' + - -X 'github.com/beclab/beos/daemon/cmd/terminusd/version.version=v{{ .Version }}' - >- {{- if index .Env "OLARES_VENDOR_TYPE" }} - -X github.com/beclab/Olares/daemon/cmd/terminusd/version.VENDOR={{ .Env.OLARES_VENDOR_TYPE }} + -X github.com/beclab/beos/daemon/cmd/terminusd/version.VENDOR={{ .Env.OLARES_VENDOR_TYPE }} {{- end }} dist: output archives: diff --git a/daemon/.olares/BeOS.yaml b/daemon/.olares/BeOS.yaml new file mode 100644 index 000000000..ad6d08254 --- /dev/null +++ b/daemon/.olares/BeOS.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +target: prebuilt +output: + binaries: + - + id: beosd + name: beosd-v#__VERSION__#__RELEASE_ID_SUFFIX__.tar.gz + amd64: https://cdn.olares.com#__REPO_PATH__beosd-v#__VERSION__-linux-amd64#__RELEASE_ID_SUFFIX__.tar.gz + arm64: https://cdn.olares.com#__REPO_PATH__beosd-v#__VERSION__-linux-arm64#__RELEASE_ID_SUFFIX__.tar.gz diff --git a/daemon/.olares/Olares.yaml b/daemon/.olares/Olares.yaml index 49a92be7d..ad6d08254 100644 --- a/daemon/.olares/Olares.yaml +++ b/daemon/.olares/Olares.yaml @@ -3,7 +3,7 @@ target: prebuilt output: binaries: - - id: olaresd - name: olaresd-v#__VERSION__#__RELEASE_ID_SUFFIX__.tar.gz - amd64: https://cdn.olares.com#__REPO_PATH__olaresd-v#__VERSION__-linux-amd64#__RELEASE_ID_SUFFIX__.tar.gz - arm64: https://cdn.olares.com#__REPO_PATH__olaresd-v#__VERSION__-linux-arm64#__RELEASE_ID_SUFFIX__.tar.gz + id: beosd + name: beosd-v#__VERSION__#__RELEASE_ID_SUFFIX__.tar.gz + amd64: https://cdn.olares.com#__REPO_PATH__beosd-v#__VERSION__-linux-amd64#__RELEASE_ID_SUFFIX__.tar.gz + arm64: https://cdn.olares.com#__REPO_PATH__beosd-v#__VERSION__-linux-arm64#__RELEASE_ID_SUFFIX__.tar.gz diff --git a/daemon/README.md b/daemon/README.md index 2346b44a3..7f7c58169 100644 --- a/daemon/README.md +++ b/daemon/README.md @@ -127,13 +127,13 @@ The daemon provides an authenticated REST API (using signature-based auth): 2. **Build for your host OS/architecture:** ```bash - go build -o olaresd ./cmd/olaresd/main.go + go build -o beosd ./cmd/terminusd/main.go ``` 3. **Cross-compile for another target (e.g., Linux AMD64):** ```bash - GOOS=linux GOARCH=amd64 go build -o olaresd ./cmd/olaresd/main.go + GOOS=linux GOARCH=amd64 go build -o beosd ./cmd/terminusd/main.go ``` 4. **Produce release artifacts (optional):** @@ -142,7 +142,7 @@ The daemon provides an authenticated REST API (using signature-based auth): goreleaser release --snapshot --clean ``` -## Extend `olaresd` +## Extend `beosd` To add a new command API: @@ -161,10 +161,10 @@ To add a new command API: ```bash # Move the new binary into place - sudo cp -f /tmp/olaresd /usr/local/bin/ + sudo cp -f /tmp/beosd /usr/local/bin/ 3. Restart the daemon to apply changes: ``` - sudo systemctl restart olaresd + sudo systemctl restart beosd ``` diff --git a/daemon/cmd/terminusd/main.go b/daemon/cmd/terminusd/main.go index b0a0b03d8..9228be0b9 100644 --- a/daemon/cmd/terminusd/main.go +++ b/daemon/cmd/terminusd/main.go @@ -66,7 +66,7 @@ func main() { go wait.UntilWithContext(mainCtx, utils.UpdateNetworkTraffic, time.Second) - state.CurrentState.OlaresdVersion = version.RawVersion() + state.CurrentState.BeOSdVersion = version.RawVersion() bleService, err := ble.NewBleService(mainCtx) if err != nil { diff --git a/daemon/internel/apiserver/handlers/command_group.go b/daemon/internel/apiserver/handlers/command_group.go index bf3f4b4f2..b55f940be 100644 --- a/daemon/internel/apiserver/handlers/command_group.go +++ b/daemon/internel/apiserver/handlers/command_group.go @@ -32,14 +32,14 @@ func init() { cmd.Post("/upgrade", handlers.RequireSignature( handlers.RequireOwner( handlers.WaitServerRunning( - handlers.RunCommand(handlers.RequestOlaresUpgrade, upgrade.NewCreateUpgradeTarget))))) + handlers.RunCommand(handlers.RequestBeOSUpgrade, upgrade.NewCreateUpgradeTarget))))) cmd.Delete("/upgrade", handlers.RequireSignature( handlers.RequireOwner( - handlers.RunCommand(handlers.CancelOlaresUpgrade, upgrade.NewRemoveUpgradeTarget)))) + handlers.RunCommand(handlers.CancelBeOSUpgrade, upgrade.NewRemoveUpgradeTarget)))) cmd.Post("/upgrade/confirm", handlers.RequireSignature( - handlers.RequireOwner(handlers.ConfirmOlaresUpgrade))) + handlers.RequireOwner(handlers.ConfirmBeOSUpgrade))) cmd.Post("/reboot", handlers.RequireSignature( handlers.RequireOwner( diff --git a/daemon/internel/apiserver/handlers/handler_did.go b/daemon/internel/apiserver/handlers/handler_did.go index b38d3aa0f..64a8b9874 100644 --- a/daemon/internel/apiserver/handlers/handler_did.go +++ b/daemon/internel/apiserver/handlers/handler_did.go @@ -10,7 +10,7 @@ import ( "k8s.io/klog/v2" ) -func (h *Handlers) ResolveOlaresName(c *fiber.Ctx) error { +func (h *Handlers) ResolveBeOSName(c *fiber.Ctx) error { olaresName := c.Params("olaresName") if olaresName == "" { klog.Error("olaresName parameter is missing") @@ -23,7 +23,7 @@ func (h *Handlers) ResolveOlaresName(c *fiber.Ctx) error { if err != nil { return h.ErrJSON(c, fiber.StatusInternalServerError, "Failed to get DID gate URL") } - result, err := jws.ResolveOlaresName(didServiceURL, olaresName) + result, err := jws.ResolveBeOSName(didServiceURL, olaresName) if err != nil { klog.Errorf("Failed to resolve DID for %s: %v", olaresName, err) return h.ErrJSON(c, fiber.StatusInternalServerError, "Failed to resolve DID") @@ -70,7 +70,7 @@ func (h *Handlers) CheckJWS(c *fiber.Ctx) error { func getDidGateURL() (string, error) { didServiceURL, err := url.JoinPath(commands.OLARES_REMOTE_SERVICE, "/did/1.0/name/") if err != nil { - klog.Errorf("failed to parse DID gate service URL: %v, Olares remote service: %s", err, commands.OLARES_REMOTE_SERVICE) + klog.Errorf("failed to parse DID gate service URL: %v, beOS remote service: %s", err, commands.OLARES_REMOTE_SERVICE) return "", err } return didServiceURL, nil diff --git a/daemon/internel/apiserver/handlers/handler_olares_upgrade.go b/daemon/internel/apiserver/handlers/handler_olares_upgrade.go index d3422e26a..b1bc0b2f2 100644 --- a/daemon/internel/apiserver/handlers/handler_olares_upgrade.go +++ b/daemon/internel/apiserver/handlers/handler_olares_upgrade.go @@ -9,7 +9,7 @@ import ( "k8s.io/klog/v2" ) -func (h *Handlers) RequestOlaresUpgrade(ctx *fiber.Ctx, cmd commands.Interface) error { +func (h *Handlers) RequestBeOSUpgrade(ctx *fiber.Ctx, cmd commands.Interface) error { var req state.UpgradeTarget if err := h.ParseBody(ctx, &req); err != nil { klog.Error("parse request error, ", err) @@ -26,7 +26,7 @@ func (h *Handlers) RequestOlaresUpgrade(ctx *fiber.Ctx, cmd commands.Interface) return h.OkJSON(ctx, "successfully created upgrade target") } -func (h *Handlers) CancelOlaresUpgrade(ctx *fiber.Ctx, cmd commands.Interface) error { +func (h *Handlers) CancelBeOSUpgrade(ctx *fiber.Ctx, cmd commands.Interface) error { if _, err := cmd.Execute(ctx.Context(), nil); err != nil { return h.ErrJSON(ctx, http.StatusBadRequest, err.Error()) } @@ -34,8 +34,8 @@ func (h *Handlers) CancelOlaresUpgrade(ctx *fiber.Ctx, cmd commands.Interface) e return h.OkJSON(ctx, "successfully cancelled upgrade/download") } -func (h *Handlers) ConfirmOlaresUpgrade(ctx *fiber.Ctx) error { - target, err := state.GetOlaresUpgradeTarget() +func (h *Handlers) ConfirmBeOSUpgrade(ctx *fiber.Ctx) error { + target, err := state.GetBeOSUpgradeTarget() if err != nil { return h.ErrJSON(ctx, http.StatusInternalServerError, err.Error()) } diff --git a/daemon/internel/apiserver/handlers/middlewares.go b/daemon/internel/apiserver/handlers/middlewares.go index 03e5e37ad..6c856e70e 100644 --- a/daemon/internel/apiserver/handlers/middlewares.go +++ b/daemon/internel/apiserver/handlers/middlewares.go @@ -33,7 +33,7 @@ func (h *Handlers) RequireSignature(next func(ctx *fiber.Ctx) error) func(ctx *f return h.ErrJSON(ctx, http.StatusForbidden, "request is forbidden") } - if c, err := client.NewTermipassClient(ctx.Context(), signature[0]); err != nil { + if c, err := client.NewBeOSClient(ctx.Context(), signature[0]); err != nil { return h.ErrJSON(ctx, http.StatusForbidden, err.Error()) } else { // store client in the context, will be used in the next phase. @@ -58,14 +58,14 @@ func (h *Handlers) RequireOwner(next func(ctx *fiber.Ctx) error) func(ctx *fiber } // get owner from release file - envOlaresID, err := utils.GetOlaresNameFromReleaseFile() + envBeOSID, err := utils.GetBeOSNameFromReleaseFile() if err != nil { - return h.ErrJSON(ctx, http.StatusInternalServerError, fmt.Sprintf("failed to get Olares ID from release file: %v", err)) + return h.ErrJSON(ctx, http.StatusInternalServerError, fmt.Sprintf("failed to get beOS ID from release file: %v", err)) } - if envOlaresID == "" { + if envBeOSID == "" { if isInstalled, err := state.IsTerminusInstalled(); err != nil { - return h.ErrJSON(ctx, http.StatusInternalServerError, fmt.Sprintf("failed to check if Olares is installed: %v", err)) + return h.ErrJSON(ctx, http.StatusInternalServerError, fmt.Sprintf("failed to check if beOS Pro is installed: %v", err)) } else { // not installed, skip owner check if !isInstalled { @@ -74,8 +74,8 @@ func (h *Handlers) RequireOwner(next func(ctx *fiber.Ctx) error) func(ctx *fiber } } - if c.OlaresID() != envOlaresID { - return h.ErrJSON(ctx, http.StatusForbidden, "not the owner of this Olares") + if c.BeOSID() != envBeOSID { + return h.ErrJSON(ctx, http.StatusForbidden, "not the owner of this beOS Pro instance") } return next(ctx) diff --git a/daemon/internel/apiserver/handlers/system_group.go b/daemon/internel/apiserver/handlers/system_group.go index d24acffca..0f3e27480 100644 --- a/daemon/internel/apiserver/handlers/system_group.go +++ b/daemon/internel/apiserver/handlers/system_group.go @@ -20,7 +20,7 @@ func init() { system.Get("/mounted-hdd-incluster", handlers.RequireLocal(handlers.GetMountedHddInCluster)) system.Get("/mounted-smb-incluster", handlers.RequireLocal(handlers.GetMountedSmbInCluster)) system.Get("/mounted-path-incluster", handlers.RequireLocal(handlers.GetMountedPathInCluster)) - system.Get("/1.0/name/:olaresName", handlers.RequireLocal(handlers.ResolveOlaresName)) + system.Get("/1.0/name/:olaresName", handlers.RequireLocal(handlers.ResolveBeOSName)) system.Post("/checkjws", handlers.RequireLocal(handlers.CheckJWS)) system.Get("/check-ssh-password", handlers.RequireLocal(handlers.CheckDefaultSSHPwd)) diff --git a/daemon/internel/client/bind.go b/daemon/internel/client/bind.go index 17de363f9..91bc2118a 100644 --- a/daemon/internel/client/bind.go +++ b/daemon/internel/client/bind.go @@ -7,23 +7,23 @@ const ( ) type Client interface { - OlaresID() string + BeOSID() string } -var _ Client = &termipass{} +var _ Client = &beosClient{} -type termipass struct { +type beosClient struct { jws string olaresID string } -// OlaresID implements Client. -func (c *termipass) OlaresID() string { +// BeOSID implements Client. +func (c *beosClient) BeOSID() string { return c.olaresID } -func NewTermipassClient(ctx context.Context, jws string) (Client, error) { - c := &termipass{jws: jws} +func NewBeOSClient(ctx context.Context, jws string) (Client, error) { + c := &beosClient{jws: jws} err, olaresID := c.validateJWS(ctx) if err != nil { return nil, err diff --git a/daemon/internel/client/validate.go b/daemon/internel/client/validate.go index ee86c03a7..7d82c2fe3 100644 --- a/daemon/internel/client/validate.go +++ b/daemon/internel/client/validate.go @@ -10,7 +10,7 @@ import ( "k8s.io/klog/v2" ) -func (c *termipass) validateJWS(_ context.Context) (error, string) { +func (c *beosClient) validateJWS(_ context.Context) (error, string) { if strings.TrimSpace(c.jws) == "" { klog.Error("jws is empty") return errors.New("invalid jws, jws is empty"), "" diff --git a/daemon/internel/intranet/dsr_common.go b/daemon/internel/intranet/dsr_common.go index fc1e446b3..7cafd5386 100644 --- a/daemon/internel/intranet/dsr_common.go +++ b/daemon/internel/intranet/dsr_common.go @@ -1,5 +1,5 @@ -//go:build !linux -// +build !linux +//go:build !linux || !cgo +// +build !linux !cgo package intranet diff --git a/daemon/internel/intranet/dsr_linux.go b/daemon/internel/intranet/dsr_linux.go index 8a557e171..19136adef 100644 --- a/daemon/internel/intranet/dsr_linux.go +++ b/daemon/internel/intranet/dsr_linux.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux && cgo +// +build linux,cgo package intranet diff --git a/daemon/internel/mdns/server.go b/daemon/internel/mdns/server.go index 94f88f943..0ccb0a749 100644 --- a/daemon/internel/mdns/server.go +++ b/daemon/internel/mdns/server.go @@ -14,7 +14,7 @@ import ( const ( SERVICE_NAME = "_terminus._tcp" - INSTANCE_NAME = "olaresd" + INSTANCE_NAME = "beosd" ) type server struct { diff --git a/daemon/internel/watcher/upgrade/upgrade_watcher.go b/daemon/internel/watcher/upgrade/upgrade_watcher.go index 648601f6e..16177fd6c 100644 --- a/daemon/internel/watcher/upgrade/upgrade_watcher.go +++ b/daemon/internel/watcher/upgrade/upgrade_watcher.go @@ -36,7 +36,7 @@ func NewUpgradeWatcher() watcher.Watcher { func (w *upgradeWatcher) Watch(ctx context.Context) { var err error - w.target, err = state.GetOlaresUpgradeTarget() + w.target, err = state.GetBeOSUpgradeTarget() if err != nil { klog.Errorf("failed to check upgrade target: %v", err) return @@ -201,7 +201,7 @@ var downloadPhases = []upgradePhase{ var upgradePhases = []upgradePhase{ {upgrade.NewPreCheck, 0, 10}, {upgrade.NewInstallCLI, 10, 10}, - {upgrade.NewInstallOlaresd, 20, 10}, + {upgrade.NewInstallBeOSd, 20, 10}, {upgrade.NewImportImages, 30, 30}, {upgrade.NewUpgrade, 60, 35}, {upgrade.NewRemoveTarget, 95, 5}, @@ -350,7 +350,7 @@ func doUpgradePhases(ctx context.Context, target state.UpgradeTarget) (err error } func markDownloaded() error { - target, err := state.GetOlaresUpgradeTarget() + target, err := state.GetBeOSUpgradeTarget() if err != nil { return err } diff --git a/daemon/pkg/cli/terminus_cli.go b/daemon/pkg/cli/terminus_cli.go index 6b960795b..d49d2c37c 100644 --- a/daemon/pkg/cli/terminus_cli.go +++ b/daemon/pkg/cli/terminus_cli.go @@ -10,7 +10,7 @@ import ( ) const ( - TERMINUS_CLI = "/usr/local/bin/olares-cli" + TERMINUS_CLI = "/usr/local/bin/beos-cli" ) type terminusCli struct { diff --git a/daemon/pkg/cluster/state/current.go b/daemon/pkg/cluster/state/current.go index 3fb3f7875..6274e8f73 100644 --- a/daemon/pkg/cluster/state/current.go +++ b/daemon/pkg/cluster/state/current.go @@ -27,7 +27,7 @@ type state struct { TerminusVersion *string `json:"terminusVersion,omitempty"` InstalledTime *int64 `json:"installedTime,omitempty"` InitializedTime *int64 `json:"initializedTime,omitempty"` - OlaresdVersion *string `json:"olaresdVersion,omitempty"` + BeOSdVersion *string `json:"olaresdVersion,omitempty"` InstallFinishedTime *time.Time `json:"-"` // sys info @@ -106,7 +106,7 @@ func bToGb(b uint64) string { func CheckCurrentStatus(ctx context.Context) error { TerminusStateMu.Lock() - name, err := utils.GetOlaresNameFromReleaseFile() + name, err := utils.GetBeOSNameFromReleaseFile() if err != nil { klog.Error("get olares name from release file error, ", err) } else { @@ -131,7 +131,7 @@ func CheckCurrentStatus(ctx context.Context) error { klog.Info("current state: ", CurrentState.TerminusState) }() - // Deprecated, only for Olares Zero + // Deprecated, only for beOS Pro Zero // utils.ForceMountHdd(ctx) // set default value @@ -279,7 +279,7 @@ func CheckCurrentStatus(ctx context.Context) error { } if CurrentState.TerminusState != IPChanging { - // if olaresd restarted, retain ip changing state + // if beosd restarted, retain ip changing state if ipChanging, err := IsIpChangeRunning(); err != nil { if err == ErrChangeIpFailed { klog.Error("check state, change ip process failed") @@ -387,9 +387,9 @@ func CheckCurrentStatus(ctx context.Context) error { // only set system state to Upgrading if actual upgrade should be in progress // (not during download phase) - upgradeTarget, err := GetOlaresUpgradeTarget() + upgradeTarget, err := GetBeOSUpgradeTarget() if err != nil { - return fmt.Errorf("error getting Olares upgrade target: %v", err.Error()) + return fmt.Errorf("error getting beOS Pro upgrade target: %v", err.Error()) } if upgradeTarget != nil && upgradeTarget.Downloaded && !upgradeTarget.DownloadOnly { currentTerminusState = Upgrading diff --git a/daemon/pkg/cluster/state/utils.go b/daemon/pkg/cluster/state/utils.go index f16c6fd4e..9934d9204 100644 --- a/daemon/pkg/cluster/state/utils.go +++ b/daemon/pkg/cluster/state/utils.go @@ -176,7 +176,7 @@ type UpgradeTarget struct { } func (t *UpgradeTarget) IsValidRequest() error { - existingTarget, err := GetOlaresUpgradeTarget() + existingTarget, err := GetBeOSUpgradeTarget() if err == nil && existingTarget != nil && !t.Version.Equal(&existingTarget.Version) { return fmt.Errorf("different upgrade version: %s already exists, please cancel it first", existingTarget.Version) } @@ -204,7 +204,7 @@ func (t *UpgradeTarget) Save() error { return nil } -func GetOlaresUpgradeTarget() (*UpgradeTarget, error) { +func GetBeOSUpgradeTarget() (*UpgradeTarget, error) { b, err := os.ReadFile(commands.UPGRADE_TARGET_FILE) if err != nil { if os.IsNotExist(err) { diff --git a/daemon/pkg/commands/change_ip/cmd.go b/daemon/pkg/commands/change_ip/cmd.go index a9368acfb..17ee0170e 100644 --- a/daemon/pkg/commands/change_ip/cmd.go +++ b/daemon/pkg/commands/change_ip/cmd.go @@ -157,7 +157,7 @@ func (i *changeIp) tailLog() (finished bool) { return false } - keyWords := "Olares OS components execute successfully!" + keyWords := "beOS Pro components execute successfully!" var line *tail.Line for line = range t.Lines { if strings.Contains(line.Text, keyWords) { diff --git a/daemon/pkg/commands/collect_logs/cmd.go b/daemon/pkg/commands/collect_logs/cmd.go index 38202c0e6..d420219ef 100644 --- a/daemon/pkg/commands/collect_logs/cmd.go +++ b/daemon/pkg/commands/collect_logs/cmd.go @@ -94,7 +94,7 @@ func (i *collectLogs) Execute(ctx context.Context, p any) (res any, err error) { "--ignore-kube-errors", "true", } - _, err = i.BaseCommand.Run_(ctx, "olares-cli", cmds...) + _, err = i.BaseCommand.Run_(ctx, "beos-cli", cmds...) if err != nil { state.CurrentState.CollectingLogsState = state.Failed state.CurrentState.CollectingLogsError = err.Error() diff --git a/daemon/pkg/commands/constants.go b/daemon/pkg/commands/constants.go index fd247ae6a..f3325aa60 100644 --- a/daemon/pkg/commands/constants.go +++ b/daemon/pkg/commands/constants.go @@ -15,8 +15,8 @@ var ( INSTALLED_VERSION = "" KUBE_TYPE = "k3s" COMMAND_BASE_DIR = "" // deprecated shell command base dir - OLARES_CDN_SERVICE = "https://cdn.olares.com" - OLARES_REMOTE_SERVICE = "https://api.olares.com" + OLARES_CDN_SERVICE = "" + OLARES_REMOTE_SERVICE = "" OS_ROOT_DIR = "/olares" INSTALLING_PID_FILE = "installing.pid" diff --git a/daemon/pkg/commands/install/cmd.go b/daemon/pkg/commands/install/cmd.go index 6b4ce54a9..a20d0e788 100644 --- a/daemon/pkg/commands/install/cmd.go +++ b/daemon/pkg/commands/install/cmd.go @@ -172,9 +172,9 @@ type Progress struct { var ( ProgressWords = []Progress{ - // {"Start to Install Olares ...", "1%", 1}, + // {"Start to Install beOS Pro ...", "1%", 1}, // {"Precheck and Installing dependencies ...", "2%", 2}, - // {"Installing Olares ...", "2%", 2}, + // {"Installing beOS Pro ...", "2%", 2}, // {"Setup your first user ...", "2%", 2}, // {"parse user info from env or stdin", "2%", 2}, // {"generate app values", "2%", 2}, @@ -193,7 +193,7 @@ var ( {"Performing the final configuration ...", "65%", 65}, {"Installing backup component ...", "70%", 70}, {"Waiting for Vault ...", "80%", 80}, - {"Starting Olares ...", "90%", 90}, + {"Starting beOS Pro ...", "90%", 90}, {"Installation wizard is complete", "95%", 95}, {"All done", "100%", 100}, } diff --git a/daemon/pkg/commands/operations.go b/daemon/pkg/commands/operations.go index 94f4eeecc..ce32ab269 100644 --- a/daemon/pkg/commands/operations.go +++ b/daemon/pkg/commands/operations.go @@ -25,7 +25,7 @@ const ( DownloadSpaceCheck Operations = "downloadSpaceCheck" DownloadComponent Operations = "downloadComponent" ImportImages Operations = "importImages" - InstallOlaresd Operations = "installOlaresd" + InstallBeOSd Operations = "installBeOSd" Upgrade Operations = "upgrade" InstallCLI Operations = "installCLI" Reboot Operations = "reboot" diff --git a/daemon/pkg/commands/uninstall/cmd.go b/daemon/pkg/commands/uninstall/cmd.go index 2942b42a3..d48d09e58 100644 --- a/daemon/pkg/commands/uninstall/cmd.go +++ b/daemon/pkg/commands/uninstall/cmd.go @@ -152,6 +152,6 @@ var ( {"[Module] KillContainerdProcess", "60%", 60}, {"[Module] DeleteUserData", "80%", 80}, {"[Module] DeletePhaseFlag", "95%", 95}, - {"Uninstall Olares execute successfully!!!", "100%", 100}, + {"Uninstall beOS Pro execute successfully!!!", "100%", 100}, } ) diff --git a/daemon/pkg/commands/upgrade/download_cli.go b/daemon/pkg/commands/upgrade/download_cli.go index 2397925e9..1b03be693 100644 --- a/daemon/pkg/commands/upgrade/download_cli.go +++ b/daemon/pkg/commands/upgrade/download_cli.go @@ -45,26 +45,26 @@ func (i *downloadCLI) Execute(ctx context.Context, p any) (res any, err error) { downloadURL := target.CliURL if downloadURL == "" { - downloadURL = fmt.Sprintf("%s/olares-cli-v%s_linux_%s.tar.gz", commands.OLARES_CDN_SERVICE, target.Version.Original(), arch) + downloadURL = fmt.Sprintf("%s/beos-cli-v%s_linux_%s.tar.gz", commands.OLARES_CDN_SERVICE, target.Version.Original(), arch) } - tarFile := filepath.Join(destDir, fmt.Sprintf("olares-cli-v%s.tar.gz", target.Version.Original())) + tarFile := filepath.Join(destDir, fmt.Sprintf("beos-cli-v%s.tar.gz", target.Version.Original())) if err := downloadFile(downloadURL, tarFile); err != nil { - return nil, fmt.Errorf("failed to download olares-cli: %v", err) + return nil, fmt.Errorf("failed to download beos-cli: %v", err) } if err := extractTarGz(tarFile, destDir); err != nil { - return nil, fmt.Errorf("failed to extract olares-cli: %v", err) + return nil, fmt.Errorf("failed to extract beos-cli: %v", err) } - binaryPath := filepath.Join(destDir, "olares-cli") - versionedPath := filepath.Join(destDir, fmt.Sprintf("olares-cli-v%s", target.Version.Original())) + binaryPath := filepath.Join(destDir, "beos-cli") + versionedPath := filepath.Join(destDir, fmt.Sprintf("beos-cli-v%s", target.Version.Original())) if err := os.Rename(binaryPath, versionedPath); err != nil { - return nil, fmt.Errorf("failed to rename olares-cli binary: %v", err) + return nil, fmt.Errorf("failed to rename beos-cli binary: %v", err) } if err := os.Chmod(versionedPath, 0755); err != nil { - return nil, fmt.Errorf("failed to make olares-cli executable: %v", err) + return nil, fmt.Errorf("failed to make beos-cli executable: %v", err) } os.Remove(tarFile) diff --git a/daemon/pkg/commands/upgrade/install_cli.go b/daemon/pkg/commands/upgrade/install_cli.go index d0bce986c..d51563ba9 100644 --- a/daemon/pkg/commands/upgrade/install_cli.go +++ b/daemon/pkg/commands/upgrade/install_cli.go @@ -32,21 +32,21 @@ func (i *installCLI) Execute(ctx context.Context, p any) (res any, err error) { return nil, errors.New("invalid param") } - preDownloadedPath := filepath.Join(commands.TERMINUS_BASE_DIR, "pkg", "components", fmt.Sprintf("olares-cli-v%s", target.Version.Original())) + preDownloadedPath := filepath.Join(commands.TERMINUS_BASE_DIR, "pkg", "components", fmt.Sprintf("beos-cli-v%s", target.Version.Original())) if _, err := os.Stat(preDownloadedPath); err != nil { klog.Warningf("Failed to find pre-downloaded binary path %s: %v", preDownloadedPath, err) return newExecutionRes(false, nil), err } - cmd := exec.Command("cp", "-f", preDownloadedPath, "/usr/local/bin/olares-cli") + cmd := exec.Command("cp", "-f", preDownloadedPath, "/usr/local/bin/beos-cli") err = cmd.Run() if err != nil { - klog.Warningf("Failed to install olares-cli: %v", err) + klog.Warningf("Failed to install beos-cli: %v", err) return newExecutionRes(false, nil), err } - if err := os.Chmod("/usr/local/bin/olares-cli", 0755); err != nil { - return nil, fmt.Errorf("failed to make olares-cli executable: %v", err) + if err := os.Chmod("/usr/local/bin/beos-cli", 0755); err != nil { + return nil, fmt.Errorf("failed to make beos-cli executable: %v", err) } return newExecutionRes(true, nil), nil diff --git a/daemon/pkg/commands/upgrade/install_olaresd.go b/daemon/pkg/commands/upgrade/install_olaresd.go index f048c6b1f..57170c677 100644 --- a/daemon/pkg/commands/upgrade/install_olaresd.go +++ b/daemon/pkg/commands/upgrade/install_olaresd.go @@ -17,7 +17,7 @@ import ( "k8s.io/klog/v2" ) -type prepareOlaresd struct { +type prepareBeOSd struct { commands.Operation logFile string progressKeywords []progressKeyword @@ -25,30 +25,30 @@ type prepareOlaresd struct { progressChan chan<- int } -var _ commands.Interface = &prepareOlaresd{} +var _ commands.Interface = &prepareBeOSd{} -func NewInstallOlaresd() commands.Interface { - return &prepareOlaresd{ +func NewInstallBeOSd() commands.Interface { + return &prepareBeOSd{ Operation: commands.Operation{ - Name: commands.InstallOlaresd, + Name: commands.InstallBeOSd, }, progressKeywords: []progressKeyword{ - {"ReplaceOlaresdBinary success", 30}, - // if executed by olaresd - // this will be the last log printed by olares-cli - // as the olares-cli process will exit along with - // the olaresd when olares-cli restarts olaresd - {"UpdateOlaresdEnv success", commands.ProgressNumFinished}, + {"ReplaceBeOSdBinary success", 30}, + // if executed by beosd + // this will be the last log printed by beos-cli + // as the beos-cli process will exit along with + // the beosd when beos-cli restarts beosd + {"UpdateBeOSdEnv success", commands.ProgressNumFinished}, // if executed manually by user // these logs will be seen, // but they're very likely to never be processed by us - {"RestartOlaresd success", commands.ProgressNumFinished}, - {"[Job] Prepare Olaresd daemon execute successfully", commands.ProgressNumFinished}, + {"RestartBeOSd success", commands.ProgressNumFinished}, + {"[Job] Prepare BeOSd daemon execute successfully", commands.ProgressNumFinished}, }, } } -func (i *prepareOlaresd) Execute(ctx context.Context, p any) (res any, err error) { +func (i *prepareBeOSd) Execute(ctx context.Context, p any) (res any, err error) { target, ok := p.(state.UpgradeTarget) if !ok { return nil, errors.New("invalid param") @@ -56,7 +56,7 @@ func (i *prepareOlaresd) Execute(ctx context.Context, p any) (res any, err error currentVersion, err := getCurrentDaemonVersion() if err != nil { - klog.Warningf("Failed to get current olaresd version: %v, proceeding with installation", err) + klog.Warningf("Failed to get current beosd version: %v, proceeding with installation", err) } else { if !currentVersion.LessThan(&target.Version) { return newExecutionRes(true, nil), nil @@ -65,7 +65,7 @@ func (i *prepareOlaresd) Execute(ctx context.Context, p any) (res any, err error i.logFile = filepath.Join(commands.TERMINUS_BASE_DIR, "versions", "v"+target.Version.Original(), "logs", "install.log") if err := i.refreshProgress(); err != nil { - return nil, fmt.Errorf("could not determine whether olaresd prepare is finished: %v", err) + return nil, fmt.Errorf("could not determine whether beosd prepare is finished: %v", err) } if i.progress == commands.ProgressNumFinished { return newExecutionRes(true, nil), nil @@ -78,7 +78,7 @@ func (i *prepareOlaresd) Execute(ctx context.Context, p any) (res any, err error cmd.WithWatchDog_(i.watch) params := []string{ - "prepare", "olaresd", + "prepare", "beosd", "--version", target.Version.Original(), "--base-dir", commands.TERMINUS_BASE_DIR, } @@ -89,7 +89,7 @@ func (i *prepareOlaresd) Execute(ctx context.Context, p any) (res any, err error return newExecutionRes(false, progressChan), nil } -func (i *prepareOlaresd) watch(ctx context.Context) { +func (i *prepareBeOSd) watch(ctx context.Context) { go func() { defer close(i.progressChan) ticker := time.NewTicker(2 * time.Second) @@ -99,27 +99,27 @@ func (i *prepareOlaresd) watch(ctx context.Context) { case <-ctx.Done(): if i.progress != commands.ProgressNumFinished { if err := i.refreshProgress(); err != nil { - klog.Errorf("failed to refresh olaresd prepare progress upon context done: %v", err) + klog.Errorf("failed to refresh beosd prepare progress upon context done: %v", err) } } return case <-ticker.C: if err := i.refreshProgress(); err != nil { - klog.Errorf("failed to refresh olaresd prepare progress: %v", err) + klog.Errorf("failed to refresh beosd prepare progress: %v", err) } } } }() } -// todo: check finish state by current olaresd binary version after the version of olaresd and olaresd has been unified -func (i *prepareOlaresd) refreshProgress() error { +// todo: check finish state by current beosd binary version after the version of beosd and the running daemon have been unified +func (i *prepareBeOSd) refreshProgress() error { info, err := os.Stat(i.logFile) if err != nil { if os.IsNotExist(err) { return nil } - klog.Errorf("error stat olaresd prepare log file %s: %v", i.logFile, err) + klog.Errorf("error stat beosd prepare log file %s: %v", i.logFile, err) return err } @@ -129,7 +129,7 @@ func (i *prepareOlaresd) refreshProgress() error { t, err := tail.TailFile(i.logFile, tail.Config{Follow: false, Location: &tail.SeekInfo{Offset: -tailsize, Whence: io.SeekEnd}}) if err != nil { - klog.Errorf("error tail olaresd prepare file %s: %v", i.logFile, err) + klog.Errorf("error tail beosd prepare file %s: %v", i.logFile, err) return err } diff --git a/daemon/pkg/commands/upgrade/upgrade.go b/daemon/pkg/commands/upgrade/upgrade.go index efcc0b60d..f1ee5cbc2 100644 --- a/daemon/pkg/commands/upgrade/upgrade.go +++ b/daemon/pkg/commands/upgrade/upgrade.go @@ -40,9 +40,9 @@ func NewUpgrade() commands.Interface { {"UpgradeSystemComponents success", 40}, {"UpgradeUserComponents success", 50}, {"UpdateReleaseFile success", 55}, - {"UpdateOlaresVersion success", 60}, + {"UpdateBeOSVersion success", 60}, {"EnsurePodsUpAndRunningAgain", 70}, - {"[Job] UpgradeOlares execute successfully", commands.ProgressNumFinished}, + {"[Job] UpgradeBeOS execute successfully", commands.ProgressNumFinished}, }, } } diff --git a/daemon/pkg/commands/upgrade/utils.go b/daemon/pkg/commands/upgrade/utils.go index 3b20897c0..7f74af727 100644 --- a/daemon/pkg/commands/upgrade/utils.go +++ b/daemon/pkg/commands/upgrade/utils.go @@ -17,14 +17,14 @@ import ( ) func getCurrentCliVersion() (*semver.Version, error) { - cmd := exec.Command("olares-cli", "-v") + cmd := exec.Command("beos-cli", "-v") output, err := cmd.Output() if err != nil { - return nil, fmt.Errorf("failed to execute olares-cli -v: %v", err) + return nil, fmt.Errorf("failed to execute beos-cli -v: %v", err) } // parse version from output - // expected format: "olares-cli version ${VERSION}" + // expected format: "beos-cli version ${VERSION}" parts := strings.Split(string(output), " ") if len(parts) != 3 { return nil, fmt.Errorf("unexpected version output format: %s", string(output)) @@ -41,7 +41,7 @@ func getCurrentCliVersion() (*semver.Version, error) { func getCurrentDaemonVersion() (*semver.Version, error) { v, err := semver.NewVersion(*version.RawVersion()) if err != nil { - return nil, fmt.Errorf("invalid version of olaresd: %v", err) + return nil, fmt.Errorf("invalid version of beosd: %v", err) } return v, nil diff --git a/daemon/pkg/containerd/api.go b/daemon/pkg/containerd/api.go index d0acffd57..6008e0c19 100644 --- a/daemon/pkg/containerd/api.go +++ b/daemon/pkg/containerd/api.go @@ -328,7 +328,7 @@ func PruneImages(ctx *fiber.Ctx) (*PruneImageResult, error) { for _, tag := range image.RepoTags { // temporary hack to avoid prune critical sandbox images // it can be removed later when we upgrade containerd to at least v1.6.30 - // and adds image pinning logics to olares-cli and/or app-service + // and adds image pinning logics to beos-cli and/or app-service if strings.Contains(tag, "pause") { continue } diff --git a/daemon/pkg/utils/jws.go b/daemon/pkg/utils/jws.go index 38499da5f..ea750aa8c 100644 --- a/daemon/pkg/utils/jws.go +++ b/daemon/pkg/utils/jws.go @@ -15,7 +15,7 @@ import ( func ValidateJWS(token string) (bool, string, error) { didServiceURL, err := url.JoinPath(commands.OLARES_REMOTE_SERVICE, "/did/1.0/name/") if err != nil { - klog.Errorf("failed to parse DID gate service URL: %v, Olares remote service: %s", err, commands.OLARES_REMOTE_SERVICE) + klog.Errorf("failed to parse DID gate service URL: %v, beOS remote service: %s", err, commands.OLARES_REMOTE_SERVICE) return false, "", err } @@ -42,5 +42,5 @@ func ValidateJWS(token string) (bool, string, error) { } klog.Infof("JWS validation successful: %s", string(bytes)) - return true, checkJWS.OlaresID, nil + return true, checkJWS.BeOSID, nil } diff --git a/daemon/pkg/utils/system.go b/daemon/pkg/utils/system.go index e7041d779..ee9926ab4 100644 --- a/daemon/pkg/utils/system.go +++ b/daemon/pkg/utils/system.go @@ -123,7 +123,7 @@ func GetDataFromReleaseFile() (map[string]string, error) { return data, nil } -func GetOlaresNameFromReleaseFile() (string, error) { +func GetBeOSNameFromReleaseFile() (string, error) { data, err := GetDataFromReleaseFile() if err != nil { return "", err diff --git a/docs/code-snippets/docker-compose-GPU.yaml b/docs/code-snippets/docker-compose-GPU.yaml index cc37a9130..bc3d37928 100644 --- a/docs/code-snippets/docker-compose-GPU.yaml +++ b/docs/code-snippets/docker-compose-GPU.yaml @@ -20,12 +20,12 @@ services: count: 1 capabilities: [gpu] - olaresd-proxy: - image: beclab/olaresd:proxy-v0.1.0 + beosd-proxy: + image: beclab/beosd:proxy-v0.1.0 network_mode: host depends_on: olares: condition: service_started volumes: - oic-data: \ No newline at end of file + oic-data: diff --git a/docs/code-snippets/docker-compose.yaml b/docs/code-snippets/docker-compose.yaml index 9c6332685..2a6c2d1d4 100644 --- a/docs/code-snippets/docker-compose.yaml +++ b/docs/code-snippets/docker-compose.yaml @@ -13,8 +13,8 @@ services: environment: - HOST_IP=${HOST_IP} - olaresd-proxy: - image: beclab/olaresd:proxy-v0.1.0 + beosd-proxy: + image: beclab/beosd:proxy-v0.1.0 network_mode: host depends_on: olares: diff --git a/docs/developer/concepts/account.md b/docs/developer/concepts/account.md index 5703ca1ec..178560feb 100644 --- a/docs/developer/concepts/account.md +++ b/docs/developer/concepts/account.md @@ -63,7 +63,7 @@ When users perform sensitive operations such as login, beOS Pro requires users t ### Users -- [Create beOS ID](../../manual/get-started/create-olares-id.md) +- [Create beOS ID](../../manual/get-started/create-beos-id.md) - [User roles and permissions](../../manual/olares/settings/roles-permissions.md) ### Developers diff --git a/docs/developer/concepts/application.md b/docs/developer/concepts/application.md index 429abb9d2..ab1896427 100644 --- a/docs/developer/concepts/application.md +++ b/docs/developer/concepts/application.md @@ -73,7 +73,7 @@ beOS Pro supports multiple users and provides two distinct namespaces for system Community applications are applications created and maintained by third-party developers. They encompass a wide range of purposes, from productivity tools and entertainment applications to data analysis utilities. -The namespace of community applications consists of two parts: application name and the user's [local name](olares-id.md#olares-id-structure), for example: +The namespace of community applications consists of two parts: application name and the user's [local name](beos-id.md#beos-id-structure), for example: ``` n8n-alice diff --git a/docs/developer/concepts/olares-id.md b/docs/developer/concepts/beos-id.md similarity index 98% rename from docs/developer/concepts/olares-id.md rename to docs/developer/concepts/beos-id.md index 5359ea145..099981335 100644 --- a/docs/developer/concepts/olares-id.md +++ b/docs/developer/concepts/beos-id.md @@ -70,6 +70,6 @@ Each beOS ID is bound to a DID. When a user creates an account using beOS Pro, a ## Learn more -* [Create an beOS ID](../../manual/get-started/create-olares-id) +* [Create an beOS ID](../../manual/get-started/create-beos-id) * [Decentralized identifier (DID)](did.md) * [Gmail issuer service](/developer/contribute/olares-id/verifiable-credential/olares.md#gmail-issuer-service) diff --git a/docs/developer/concepts/data.md b/docs/developer/concepts/data.md index 5095982c5..b2d00682d 100644 --- a/docs/developer/concepts/data.md +++ b/docs/developer/concepts/data.md @@ -30,7 +30,7 @@ beOS Pro uses [JuiceFS](https://juicefs.com) as the underlying multi-physical no As for the back-end object storage solution of JuiceFS, we also provide two solutions: S3 and MinIO. -By default, beOS Pro uses the local file system (FS) when installed locally. However, if the `--with-juicefs=true` option is specified when running the [`olares-cli prepare`](../install/cli/prepare.md) command, JuiceFS will be installed and used. Additionally, a MinIO instance will be set up as the backend storage. +By default, beOS Pro uses the local file system (FS) when installed locally. However, if the `--with-juicefs=true` option is specified when running the [`beos-cli prepare`](../install/cli/prepare.md) command, JuiceFS will be installed and used. Additionally, a MinIO instance will be set up as the backend storage. ### Local disk @@ -46,19 +46,19 @@ For applications, there are 3 different storage paths to deal with different usa The `UserData` storage path stores files that change infrequently but require cross-application access, such as documents, photos, and videos. -Applications can obtain access permissions to a directory under the Home directory by applying for [UserData](../develop/package/manifest.md#userdata) permissions in `beOS ProManifest.yaml`. For example, you can request permissions to the Picture directory for PhotoPrism, and permissions to the Downloads directory for qBittorrent and Jellyfin. +Applications can obtain access permissions to a directory under the Home directory by applying for [UserData](../develop/package/manifest.md#userdata) permissions in `BeOSManifest.yaml`. For example, you can request permissions to the Picture directory for PhotoPrism, and permissions to the Downloads directory for qBittorrent and Jellyfin. ### AppData The `AppData` storage path stores data that does not change frequently but needs to span across nodes. For example, configuration files. -Applications can apply for [AppData](../develop/package/manifest.md#appdata) permissions in `beOS ProManifest.yaml`. +Applications can apply for [AppData](../develop/package/manifest.md#appdata) permissions in `BeOSManifest.yaml`. ### AppCache The `AppCache` storage path is allocated for applications that directly operate the disk with good performance. The disadvantage is that it cannot be accessed across nodes. For example, the system database, application log, and cache. -Applications can apply for [AppCache](../develop/package/manifest.md#appcache) permissions in `beOS ProManifest.yaml`. +Applications can apply for [AppCache](../develop/package/manifest.md#appcache) permissions in `BeOSManifest.yaml`. ## [PostgreSQL](../develop/advanced/database.md#rds) diff --git a/docs/developer/concepts/index.md b/docs/developer/concepts/index.md index b2332670f..4f60d0a37 100644 --- a/docs/developer/concepts/index.md +++ b/docs/developer/concepts/index.md @@ -13,7 +13,7 @@ The Concepts section helps you learn about the parts of the beOS Pro system and Understand beOS Pro with the following concepts: - [Architectural components](system-architecture.md) -- [beOS ID](olares-id.md) +- [beOS ID](beos-id.md) - [Account](account.md) - [Application](application.md) - [Network](network.md) diff --git a/docs/developer/concepts/network.md b/docs/developer/concepts/network.md index 69232e8ee..260cd399f 100644 --- a/docs/developer/concepts/network.md +++ b/docs/developer/concepts/network.md @@ -53,7 +53,7 @@ A route ID is a unique identifier used to identify specific applications or appl ::: tip Note - The URL of the application is derived from beOS ID. -- Entrance index refers to the position of entrance in multiple entrances defined in [`beOS ProManifest.yaml`](../develop/package/manifest.md). +- Entrance index refers to the position of entrance in multiple entrances defined in [`BeOSManifest.yaml`](../develop/package/manifest.md). ::: ## beOS Pro internal network diff --git a/docs/developer/concepts/registry.md b/docs/developer/concepts/registry.md index 65baab3ad..d71d34bce 100644 --- a/docs/developer/concepts/registry.md +++ b/docs/developer/concepts/registry.md @@ -6,7 +6,7 @@ Once a DID is generated, users need to register their ownership in a **DID Regis - **Censorship resistance**: The structure is robust against censorship and interference. - **Universal discoverability**: DIDs can be easily discovered by users across the network. -Issuers can upload essential DID metadata to the Registry, including the DID itself, [beOS ID](olares-id.md), RSA public keys, and other relevant information. +Issuers can upload essential DID metadata to the Registry, including the DID itself, [beOS ID](beos-id.md), RSA public keys, and other relevant information. DID metadata require minimal storage and infrequent updates. This allows existing mainstream blockchain technologies to manage these efficiently. Storing and retrieving DID metadata on blockchain results in low overhead and system efficiency. diff --git a/docs/developer/concepts/system-architecture.md b/docs/developer/concepts/system-architecture.md index 4936086f8..cddef3b5e 100644 --- a/docs/developer/concepts/system-architecture.md +++ b/docs/developer/concepts/system-architecture.md @@ -56,7 +56,7 @@ beOS Pro leverages components like CUDA driver, NVIDIA device plugin, and nvShar :::info Currently, beOS Pro GPU support is restricted to deployments with one GPU per node. ::: -Starting with beOS Pro v1.11, [CUDA](https://developer.nvidia.com/cuda-toolkit) (12.4 and above) is supported. Changes in the host environment's CUDA configuration can be synchronized with the beOS Pro cluster using `olares-cli`. +Starting with beOS Pro v1.11, [CUDA](https://developer.nvidia.com/cuda-toolkit) (12.4 and above) is supported. Changes in the host environment's CUDA configuration can be synchronized with the beOS Pro cluster using `beos-cli`. ### Container management beOS Pro uses [containerd](../install/installation-overview.md#container-runtime-containerd), a lightweight container runtime, for containerized deployments. @@ -65,8 +65,8 @@ beOS Pro uses [containerd](../install/installation-overview.md#container-runtime The management of beOS Pro is implemented through the following: -- [olares-cli](../install/cli/olares-cli.md): A command-line tool for managing beOS Pro clusters, applications, and hardware nodes. -- [olaresd](../install/installation-overview.md#container-runtime-containerd): A daemon process that monitors hardware and network changes, while also managing cluster upgrades, restarts, and other maintenance operations. +- [beos-cli](../install/cli/beos-cli.md): A command-line tool for managing beOS Pro clusters, applications, and hardware nodes. +- [beosd](../install/installation-overview.md#container-runtime-containerd): A daemon process that monitors hardware and network changes, while also managing cluster upgrades, restarts, and other maintenance operations. These tools streamline installation, maintenance, and scaling for beOS Pro. diff --git a/docs/developer/contribute/olares-id/contract/contract.md b/docs/developer/contribute/olares-id/contract/contract.md index 66cab54a9..a5fde0f8c 100644 --- a/docs/developer/contribute/olares-id/contract/contract.md +++ b/docs/developer/contribute/olares-id/contract/contract.md @@ -22,7 +22,7 @@ Snowinning Protocol's smart contract has two parts. # TerminusDID -The TerminusDID contract manages a hierarchical structure derived from [Domain](/developer/concepts/olares-id.md#domain-types. +The TerminusDID contract manages a hierarchical structure derived from [Domain](/developer/concepts/beos-id.md#domain-types). ![alt text](/images/developer/contribute/smart-contract-tree.jpg) @@ -32,7 +32,7 @@ Each node possesses several default attributes. | Attribute | Description | | -------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | Specifies the [Domain Name](/developer/concepts/olares-id.md#domain-types). Certain Domain Names can interchange with Terminus Names | +| name | Specifies the [Domain Name](/developer/concepts/beos-id.md#domain-types). Certain Domain Names can interchange with Terminus Names | | id | Each node is also a NFT, adhering to the **ERC-721** standard. Its id serves as the unique identifier for this NFT, computed through `keccak256(name)` | | did,owner | The `owner` and `did` of the node, derived from the same mnemonic words. Further details on this can be found [here](/developer/concepts/did.md).
. Additionally, storing owner is advantageous because it complies with the **BIP44** specification, facilitating gas-efficient signature verification within EVM contracts. Each node is affiliated with an `owner`, who holds the authority to modify node details. | | note | Currently, there are three types: Individual, Organization, and Entity | @@ -59,15 +59,15 @@ Ownership of different nodes is as follows: Abstract nodes such as `root`, `com`, `io` belong to the Terminus team. - **Individual**
- `myterminus.com` belongs to the [Individual Domain](/developer/concepts/olares-id.md#domain-types), owned by the Terminus team. + `myterminus.com` belongs to the [Individual Domain](/developer/concepts/beos-id.md#domain-types), owned by the Terminus team. `alice.myterminus.com` and `bob.myterminus.com` belong to individual Terminus Names, and are owned by the respective users. - **Organization**
- `org1.com` and `org.io` belong to the [Organization Domain](/developer/concepts/olares-id.md#domain-types), owned by the domain admin. + `org1.com` and `org.io` belong to the [Organization Domain](/developer/concepts/beos-id.md#domain-types), owned by the domain admin. `alice.org1.com` and `bob.org2.io` belong to Organization Terminus Names, and are owned by the respective users. - **Entity**
- The `Application Score` belongs to the [Entity Domain](/developer/concepts/olares-id.md#domain-types), and is owned by the applicant of the entity. Organization admins and users can refer to [Domain Management](../contract/manage/contract.md#register-did) to manage their own nodes and sub-nodes. + The `Application Score` belongs to the [Entity Domain](/developer/concepts/beos-id.md#domain-types), and is owned by the applicant of the entity. Organization admins and users can refer to [Domain Management](../contract/manage/contract.md#register-did) to manage their own nodes and sub-nodes. :::info After the project stabilizes, ownership will be transferred to the multisig address of the DAO organization by the Terminus team. diff --git a/docs/developer/contribute/olares.md b/docs/developer/contribute/olares.md index e0222fa84..bc10b25df 100644 --- a/docs/developer/contribute/olares.md +++ b/docs/developer/contribute/olares.md @@ -58,7 +58,7 @@ olares ## How to install ``` -curl -fsSL https://olares.sh | bash - +curl -fsSL https://beos.sh | bash - ``` ## How to build @@ -88,5 +88,5 @@ make install VERSION=0.0.0-DEBUG ## How to uninstall ```bash -olares-cli uninstall --all +beos-cli uninstall --all ``` diff --git a/docs/developer/contribute/system-app/deployment.md b/docs/developer/contribute/system-app/deployment.md index 033a32ea4..5235ef79a 100644 --- a/docs/developer/contribute/system-app/deployment.md +++ b/docs/developer/contribute/system-app/deployment.md @@ -33,7 +33,7 @@ The system application need to be installed under the `user-space` namespace. Th applications.app.bytetrade.io/title: Desktop-dev applications.app.bytetrade.io/version: '0.0.1' - # Configuration of entrances here should be consistent with the configuration in beOS ProManifest.yaml. + # Configuration of entrances here should be consistent with the configuration in BeOSManifest.yaml. applications.app.bytetrade.io/entrances: '[{"name":"desktop-frontend-dev", "host":"desktop-svc-dev", "port":80,"title":"Desktop-dev"}]' ``` @@ -55,7 +55,7 @@ The system application need to be installed under the `user-space` namespace. Th targetPort: 8080 # Please note, the port of the Node.js dev container is 8080. please switch to this port. ``` -5. Modify the section of entrances in `beOS ProManifest.yaml` +5. Modify the section of entrances in `BeOSManifest.yaml` ```Yaml entrances: diff --git a/docs/developer/contribute/system-app/olares-manifest.md b/docs/developer/contribute/system-app/olares-manifest.md index fc0fe6af9..7d6d93151 100644 --- a/docs/developer/contribute/system-app/olares-manifest.md +++ b/docs/developer/contribute/system-app/olares-manifest.md @@ -1,8 +1,8 @@ -# beOS ProManifest.yaml +# BeOSManifest.yaml ## Permission -If you need to access the interface of `provider`, you can add following content in the `permissions` section of the `beOS ProManifest.yaml` file. +If you need to access the interface of `provider`, you can add following content in the `permissions` section of the `BeOSManifest.yaml` file. ```Yaml permission: sysData: @@ -28,10 +28,10 @@ env: ``` --- -:::details Example of a complete `beOS ProManifest.yaml` file +:::details Example of a complete `BeOSManifest.yaml` file ```Yaml -olaresManifest.version: 1 -olaresManifest.type: app +beosManifest.version: 1 +beosManifest.type: app metadata: name: desktop icon: https://app.cdn.beos.local/appstore/default/defaulticon.webp diff --git a/docs/developer/contribute/system-app/overview.md b/docs/developer/contribute/system-app/overview.md index 22ee4e212..f7b10f863 100644 --- a/docs/developer/contribute/system-app/overview.md +++ b/docs/developer/contribute/system-app/overview.md @@ -12,7 +12,7 @@ After a year and a half of work, the beOS Pro team now uses **Studio** for devel We will show you how to debug issues in the frontend code of **Desktop** using **Studio**. 1. Create an application in Studio 2. Configure [deployment.yaml](./deployment) -3. Configure [beOS ProManifest.yaml](./olares-manifest) +3. Configure [BeOSManifest.yaml](./olares-manifest) 4. Install the application 5. Configure [nginx.conf](./install) diff --git a/docs/developer/develop/advanced/cli/olares-change-ip.md b/docs/developer/develop/advanced/cli/beos-change-ip.md similarity index 91% rename from docs/developer/develop/advanced/cli/olares-change-ip.md rename to docs/developer/develop/advanced/cli/beos-change-ip.md index b2de864dd..1d79177a0 100644 --- a/docs/developer/develop/advanced/cli/olares-change-ip.md +++ b/docs/developer/develop/advanced/cli/beos-change-ip.md @@ -1,4 +1,4 @@ -# `olares change-ip` +# `beos-cli change-ip` :::warning When manually updating IP address is required When beOS Pro is deployed _inside_ a virtualized environment, such as macOS (via Minikube) or Windows (via WSL), a change in the host system's IP address (e.g., due to switching Wi-Fi networks) may cause beOS Pro to become inaccessible. This happens because the NAT gateway and DNS configuration no longer match the new IP. In such cases, you need to manually update the IP address to ensure that beOS Pro can route traffic correctly. ::: @@ -7,7 +7,7 @@ When beOS Pro is deployed _inside_ a virtualized environment, such as macOS (via Change the local IP address for all beOS Pro components. ```bash -olares-cli olares change-ip [option] +beos-cli change-ip [option] ``` ## Options @@ -18,16 +18,16 @@ olares-cli olares change-ip [option] | `--distribution` | `-d` | Sets the WSL distribution name. Only applicable on Windows.
Defaults to `Ubuntu`. | | `--help` | `-h` | Displays help information. | | `--profile` | `-p` | Sets the Minikube profile name. Only applicable on macOS.
Defaults to `olares-0`. | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | ## Examples - For macOS: ```bash # Specify the Minikube profile name and change the IP. -olares-cli olares change-ip --profile olares-0 +beos-cli change-ip --profile olares-0 ``` - For Windows WSL: ```bash # Specify the Linux distribution in WSL and change the IP. -olares-cli olares change-ip --distribution Ubuntu +beos-cli change-ip --distribution Ubuntu ``` \ No newline at end of file diff --git a/docs/developer/develop/advanced/cli/beos-cli.md b/docs/developer/develop/advanced/cli/beos-cli.md new file mode 100644 index 000000000..16a1a5e1c --- /dev/null +++ b/docs/developer/develop/advanced/cli/beos-cli.md @@ -0,0 +1,50 @@ +--- +outline: [2, 3] +--- +# beOS Pro CLI + +beOS Pro provides beOS Pro CLI, a command-line tool for developers and system administrators to customize or troubleshoot the beOS Pro installation process. + +The recommended [one-liner installation command](../../../../manual/get-started/install-olares.md) retrieves a shell script from https://beos.sh/ that downloads and installs beOS Pro CLI. Once installed, the CLI orchestrates the remainder of the setup. + +In general, beOS Pro CLI manages installation through three main phases: +1. **Download**: beOS Pro CLI fetches the necessary components. +2. **Prepare**: beOS Pro CLI prepares the environment for installation. +3. **Install**: beOS Pro CLI installs the core services of beOS Pro. + +This page explains the beOS Pro CLI syntax and describes the command operations. + +:::info Root privileges required +Most `beos-cli` commands require root privileges. Use the root user or prepend commands with `sudo`. +::: + +## Syntax +The beOS Pro CLI uses the following syntax: + +> `beos-cli command [subcommand] [option]` + +where +- `command`: Specifies the main operation you want to perform. For example, `beos-cli download`. +- `subcommand`: Further specifies the task of `command`. For example, `wizard` or `component`. +- `option`: Optional arguments that modify the behavior of the `command`. Options include flags and options with arguments. + +beOS Pro CLI allows you to temporarily override certain beOS Pro default settings. Each option applies only to the command in which it is used. + +For example, if you use the `--base-dir` option with `beos-cli download wizard`, it will only affect the wizard downloading process and will not change the base directory for other commands, such as during the "install" phase. + +To get detailed help for any command, run `beos-cli help`. + +## Available CLI commands + +| Operation | Syntax | Description | +|--------------------|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| +| `info` | `beos-cli info [option]` | Displays general information about the downloaded beOS Pro. | +| `download` | `beos-cli download [subcommand] [option]` | Downloads specific resources. | +| `prepare` | `beos-cli prepare [option]` | Prepares the environment for the installation process, including setting up essential services and configurations of beOS Pro. | +| `install` | `beos-cli install [option]` | Deploys system-level and user-level components of beOS Pro. | +| `change-ip` | `beos-cli change-ip [option]` | Changes the IP address of the beOS Pro. | +| `release` | `beos-cli release [option]` | Packages beOS Pro installation resources for distribution or deployment. | +| `uninstall` | `beos-cli uninstall [option]` | Uninstalls beOS Pro completely, or roll back the installation to a specific phase. | + + + diff --git a/docs/developer/develop/advanced/cli/olares-download.md b/docs/developer/develop/advanced/cli/beos-download.md similarity index 75% rename from docs/developer/develop/advanced/cli/olares-download.md rename to docs/developer/develop/advanced/cli/beos-download.md index bcda5cc1e..ac24c1d99 100644 --- a/docs/developer/develop/advanced/cli/olares-download.md +++ b/docs/developer/develop/advanced/cli/beos-download.md @@ -1,19 +1,19 @@ -# `olares download` +# `beos-cli download` ## Synopsis -The `olares download` command downloads the necessary packages and components required to install beOS Pro on your local machine. It supports downloading components, checking the status of installation packages, and fetching the manifest file. +The `beos-cli download` command downloads the necessary packages and components required to install beOS Pro on your local machine. It supports downloading components, checking the status of installation packages, and fetching the manifest file. ```bash -olares-cli olares download [subcommand] [option] +beos-cli download [subcommand] [option] ``` ## Subcommands | Name | Shorthand | Usage | Example | |-------------|-----------|-------------------------------------------------------|----------------------------------------| -| `check` | | Checks the status of the beOS Pro installation package. | `olares-cli olares download check` | -| `component` | `c` | Downloads beOS Pro components. | `olares-cli olares download component` | -| `wizard` | `w` | Downloads the manifest file. | `olares-cli olares download wizard` | +| `check` | | Checks the status of the beOS Pro installation package. | `beos-cli download check` | +| `component` | `c` | Downloads beOS Pro components. | `beos-cli download component` | +| `wizard` | `w` | Downloads the manifest file. | `beos-cli download wizard` | ## Options @@ -23,24 +23,24 @@ olares-cli olares download [subcommand] [option] | `--download-cdn-url` | | Sets the CDN accelerated download URL in the format `https://example.cdn.com`.
If not provided, the default URL will be used. | | `--help` | `-h` | Displays help information. | | `--kube` | | Specifies the Kubernetes type.
Supported types are `k3s` (default) and `k8s`. | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | ## Examples ```bash # Specifies the base directory where all downloaded components will be stored. -olares-cli olares download component -b /custom/path +beos-cli download component -b /custom/path # Specifies a CDN-accelerated URL for downloading beOS Pro components. -olares-cli olares download component --download-cdn-url https://my.cdn.com +beos-cli download component --download-cdn-url https://my.cdn.com # Specifies the Kubernetes type for the installation. -olares-cli olares download component --kube k8s +beos-cli download component --kube k8s # Sets the path to the package manifest file. -olares-cli olares download component --manifest /custom/path/manifest.json +beos-cli download component --manifest /custom/path/manifest.json # Specifies the version of beOS Pro packages and components to download. -olares-cli olares download component -v 1.11.0 +beos-cli download component -v 1.11.0 ``` diff --git a/docs/developer/develop/advanced/cli/olares-info.md b/docs/developer/develop/advanced/cli/beos-info.md similarity index 59% rename from docs/developer/develop/advanced/cli/olares-info.md rename to docs/developer/develop/advanced/cli/beos-info.md index ddd8c8379..4ebb63666 100644 --- a/docs/developer/develop/advanced/cli/olares-info.md +++ b/docs/developer/develop/advanced/cli/beos-info.md @@ -1,10 +1,10 @@ -# `olares info` +# `beos-cli info` ## Synopsis -The `olares info` command displays general information about the installed beOS Pro version. +The `beos-cli info` command displays general information about the installed beOS Pro version. ```bash -olares-cli olares info +beos-cli info ``` ## Flags diff --git a/docs/developer/develop/advanced/cli/olares-install.md b/docs/developer/develop/advanced/cli/beos-install.md similarity index 84% rename from docs/developer/develop/advanced/cli/olares-install.md rename to docs/developer/develop/advanced/cli/beos-install.md index eaafe7b87..36c35490a 100644 --- a/docs/developer/develop/advanced/cli/olares-install.md +++ b/docs/developer/develop/advanced/cli/beos-install.md @@ -1,10 +1,10 @@ -# `olares install` +# `beos-cli install` ## Synopsis -The `olares install` command installs beOS Pro on your system. It supports various options to customize the installation process, such as specifying directories, Kubernetes types, or Minikube profiles. +The `beos-cli install` command installs beOS Pro on your system. It supports various options to customize the installation process, such as specifying directories, Kubernetes types, or Minikube profiles. ```bash -olares-cli olares install [option] +beos-cli install [option] ``` ## Options @@ -15,5 +15,5 @@ olares-cli olares install [option] | `--help` | `-h` | Displays help information. | | `--kube` | | Specifies the Kubernetes type.
Supported types are `k3s` (default) and `k8s`. | | `--profile` | `-p` | Sets the Minikube profile name. Only applicable on macOS.
Defaults to `olares-0`. | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | diff --git a/docs/developer/develop/advanced/cli/olares-prepare.md b/docs/developer/develop/advanced/cli/beos-prepare.md similarity index 86% rename from docs/developer/develop/advanced/cli/olares-prepare.md rename to docs/developer/develop/advanced/cli/beos-prepare.md index c874e0924..238583ca5 100644 --- a/docs/developer/develop/advanced/cli/olares-prepare.md +++ b/docs/developer/develop/advanced/cli/beos-prepare.md @@ -1,9 +1,9 @@ -# `olares prepare` +# `beos-cli prepare` ## Synopsis -The `olares prepare` command sets up the environment required for beOS Pro to function. This includes installing dependencies, importing container images, and starting the beOS Pro daemon (`olaresd`). +The `beos-cli prepare` command sets up the environment required for beOS Pro to function. This includes installing dependencies, importing container images, and starting the beOS Pro daemon (`beosd`). ```bash -olares-cli olares prepare [option] +beos-cli prepare [option] ``` ## Options @@ -16,10 +16,10 @@ olares-cli olares prepare [option] | `--profile` | `-p` | Sets the Minikube profile name. Only applicable on macOS.
Defaults to `olares-0`. | | `--registry-mirrors` | `-r` | Specifies Docker container registry mirrors.
Multiple mirrors should be separated by commas. | | `--with-juicefs` | | Configures JuiceFS as the root filesystem (rootfs) for beOS Pro workloads instead of the local disk. | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | ## Example ```bash # Uses JuiceFS as the root filesystem -olares-cli olares prepare --with-juicefs=true +beos-cli prepare --with-juicefs=true ``` \ No newline at end of file diff --git a/docs/developer/develop/advanced/cli/olares-release.md b/docs/developer/develop/advanced/cli/beos-release.md similarity index 96% rename from docs/developer/develop/advanced/cli/olares-release.md rename to docs/developer/develop/advanced/cli/beos-release.md index 9ef38ce6c..08f2d4ee3 100644 --- a/docs/developer/develop/advanced/cli/olares-release.md +++ b/docs/developer/develop/advanced/cli/beos-release.md @@ -1,10 +1,10 @@ -# `olares release` +# `beos-cli release` ## Synopsis Build a release version based on a local beOS Pro repository. This command should be run in the root directory of the beOS Pro repository. ```bash -olares-cli olares release [option] +beos-cli release [option] ``` ## Options @@ -16,5 +16,5 @@ olares-cli olares release [option] | `--extract` | `-e` | Extracts the release to the `--base-dir` after the build. Set to `false` if only the release file itself is needed.
Defaults to `true`. | | `--help` | `-h` | Displays help information. | | `---ignore-missing-images` | | Ignores missing images when downloading checksums from the CDN.
Disable this only if no new images are added, as the build may fail if the image is not uploaded to the CDN yet.
Defaults to `true`. | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | diff --git a/docs/developer/develop/advanced/cli/olares-uninstall.md b/docs/developer/develop/advanced/cli/beos-uninstall.md similarity index 88% rename from docs/developer/develop/advanced/cli/olares-uninstall.md rename to docs/developer/develop/advanced/cli/beos-uninstall.md index c287d9ff1..63ceac6ec 100644 --- a/docs/developer/develop/advanced/cli/olares-uninstall.md +++ b/docs/developer/develop/advanced/cli/beos-uninstall.md @@ -1,10 +1,10 @@ -# `olares uninstall` +# `beos-cli uninstall` ## Synopsis Uninstall beOS Pro from your machine. ```bash -olares-cli olares uninstall [option] +beos-cli uninstall [option] ``` ## Options @@ -16,4 +16,4 @@ olares-cli olares uninstall [option] | `--help` | `-h` | Displays help information. | | `--phase` | | Uninstalls beOS Pro from a specific phase and revert to the previous one.
For example, `--phase install` removes tasks performed during the "install" phase, reverting the system to the "prepare" stage.
Defaults to `install`. | | `--quiet` | | Enables quiet mode (suppress output).
Defaults to `false`. | -| `--version` | `-v` | Specifies the beOS Pro version to uninstall.
Use `olares-cli olares info` to check the downloaded version first. | +| `--version` | `-v` | Specifies the beOS Pro version to uninstall.
Use `beos-cli info` to check the downloaded version first. | diff --git a/docs/developer/develop/advanced/cli/olares-cli.md b/docs/developer/develop/advanced/cli/olares-cli.md deleted file mode 100644 index ab59f5558..000000000 --- a/docs/developer/develop/advanced/cli/olares-cli.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -outline: [2, 3] ---- -# beOS Pro CLI - -beOS Pro provides beOS Pro CLI, a command-line tool for developers and system administrators to customize or troubleshoot the beOS Pro installation process. - -The recommended [one-liner installation command](../../../../manual/get-started/install-olares.md) retrieves a shell script from https://olares.sh/ that downloads and installs beOS Pro CLI. Once installed, the CLI orchestrates the remainder of the setup. - -In general, beOS Pro CLI manages installation through three main phases: -1. **Download**: beOS Pro CLI fetches the necessary components. -2. **Prepare**: beOS Pro CLI prepares the environment for installation. -3. **Install**: beOS Pro CLI installs the core services of beOS Pro. - -This page explains the beOS Pro CLI syntax and describes the command operations. - -:::info Root privileges required -Most `olares-cli` commands require root privileges. Use the root user or prepend commands with `sudo`. -::: - -## Syntax -The beOS Pro CLI uses the following syntax: - -> `olares-cli command [subcommand] [option]` - -where -- `command`: Specifies the main operation you want to perform. For example, `olares download`. -- `subcommand`: Further specifies the task of `command`. For example, `wizard` or `component`. -- `option`: Optional arguments that modify the behavior of the `command`. Options include flags and options with arguments. - -beOS Pro CLI allows you to temporarily override certain beOS Pro default settings. Each option applies only to the command in which it is used. - -For example, if you use the `--base-dir` option with `olares-cli olares download wizard`, it will only affect the wizard downloading process and will not change the base directory for other commands, such as during the "install" phase. - -To get detailed help for any command, run `olares-cli help`. - -## Available CLI commands - -| Operation | Syntax | Description | -|--------------------|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| -| `olares info` | `olares-cli olares info [option]` | Displays general information about the downloaded beOS Pro. | -| `olares download` | `olares-cli olares download [subcommand] [option]` | Downloads specific resources. | -| `olares prepare` | `olares-cli olares prepare [option]` | Prepares the environment for the installation process, including setting up essential services and configurations of beOS Pro. | -| `olares install` | `olares-cli olares install [option]` | Deploys system-level and user-level components of beOS Pro. | -| `olares change-ip` | `olares-cli olares change-ip [option]` | Changes the IP address of the beOS Pro. | -| `olares release` | `olares-cli olares release [option]` | Packages beOS Pro installation resources for distribution or deployment. | -| `olares uninstall` | `olares-cli olares uninstall [option]` | Uninstalls beOS Pro completely, or roll back the installation to a specific phase. | - - - diff --git a/docs/developer/develop/advanced/cookie.md b/docs/developer/develop/advanced/cookie.md index 0d2731913..dbc822f39 100644 --- a/docs/developer/develop/advanced/cookie.md +++ b/docs/developer/develop/advanced/cookie.md @@ -16,7 +16,7 @@ To prevent cookie conflicts, **no application** (whether it's a built-in system Every application in **beOS Pro** operates under two domains: <`app id>..beos.local` and `.local..beos.local`. As a result, beOS Pro incorporates a cookie-setting `rewrite` mechanism within the beOS Pro Application Runtime. This ensures that the application automatically assigns cookies for both domains in the Set-`Cookie` field of the **HTTP response**. -To use this feature, you just need to define it in the application chart's [beOS ProManifest.yaml](../package/manifest.md#resetcookie) +To use this feature, you just need to define it in the application chart's [BeOSManifest.yaml](../package/manifest.md#resetcookie) ```yaml options: diff --git a/docs/developer/develop/advanced/database.md b/docs/developer/develop/advanced/database.md index 62c9118a5..be465d4d5 100644 --- a/docs/developer/develop/advanced/database.md +++ b/docs/developer/develop/advanced/database.md @@ -9,7 +9,7 @@ The system has deployed **PostgreSQL** and provides two types of databases. - **Standalone PostgreSQL**, providing the most commonly used `RDS` database layer functions. - **Distributed PostgreSQL** extension, powered by **Citus**. Provides the ability to horizontally scale the database. -When setting up a **PostgreSQL** database, you can specify the type of database to be used in [beOS ProManifest.yaml](../package/manifest.md#middleware). +When setting up a **PostgreSQL** database, you can specify the type of database to be used in [BeOSManifest.yaml](../package/manifest.md#middleware). ```yaml middleware: @@ -26,7 +26,7 @@ If you use **Citus**, **beOS Pro** will automatically shard the database tables The NoSQL cluster is not deployed by default in beOS Pro, but it can be easily installed from the Market. To set up a NoSQL cluster, the administrator needs to install the [**MongoDB**](https://market.beos.local/middleware/mongodb) middleware. Once installed, the [Percona Operator for MongoDB](https://github.com/percona/percona-server-mongodb-operator) automatically manages the **MongoDB** cluster. Users can then horizontally scale **MongoDB** cluster replicas, as well as perform backup and restore operations on databases. -You can specify detailed configuration for MongoDB in [beOS ProManifest.yaml](../package/manifest.md#middleware) as follows: +You can specify detailed configuration for MongoDB in [BeOSManifest.yaml](../package/manifest.md#middleware) as follows: ```yaml middleware: diff --git a/docs/developer/develop/advanced/file-upload.md b/docs/developer/develop/advanced/file-upload.md index 7060e8568..f5da90ee5 100644 --- a/docs/developer/develop/advanced/file-upload.md +++ b/docs/developer/develop/advanced/file-upload.md @@ -8,7 +8,7 @@ There are many situations where you might need to upload local files to your edg ## How to install -To use this feature, simply add the following configuration to the [beOS ProManifest.yaml](../package/manifest.md#upload) file in the application chart. +To use this feature, simply add the following configuration to the [BeOSManifest.yaml](../package/manifest.md#upload) file in the application chart. ```yaml upload: fileType: diff --git a/docs/developer/develop/advanced/index.md b/docs/developer/develop/advanced/index.md index 91f7c7aa6..cd3a4d8d3 100644 --- a/docs/developer/develop/advanced/index.md +++ b/docs/developer/develop/advanced/index.md @@ -1,6 +1,6 @@ # Advanced -1. [beOS Pro CLI](cli/olares-cli.md) +1. [beOS Pro CLI](cli/beos-cli.md) 2. [beOS Pro Info](./terminus-info) 3. [Service Provider](./provider.md) 4. [AI](./ai.md) diff --git a/docs/developer/develop/advanced/provider.md b/docs/developer/develop/advanced/provider.md index c7c1519e7..ac77c96d7 100644 --- a/docs/developer/develop/advanced/provider.md +++ b/docs/developer/develop/advanced/provider.md @@ -39,7 +39,7 @@ status: ## Request Permission to Call Provider -You can configure it in the [beOS ProManifest.yaml](../package/manifest.md#sysdata) as follows: +You can configure it in the [BeOSManifest.yaml](../package/manifest.md#sysdata) as follows: ```Yaml sysData: diff --git a/docs/developer/develop/advanced/secret.md b/docs/developer/develop/advanced/secret.md index 196395cd2..52ac0eb25 100644 --- a/docs/developer/develop/advanced/secret.md +++ b/docs/developer/develop/advanced/secret.md @@ -6,7 +6,7 @@ outline: [2, 3] In an app, it's often necessary to save some important user information, such as `passwords` and `Access Tokens` for external systems. beOS Pro provides a unified Vault, based on Infisical, to securely store various keys. -To retrieve this information, the app only needs a simple application for API access permission. This can be done by adding a `sysData` permission to the [beOS ProManifest.yaml](../package/manifest.md#sysdata) in the application chart. +To retrieve this information, the app only needs a simple application for API access permission. This can be done by adding a `sysData` permission to the [BeOSManifest.yaml](../package/manifest.md#sysdata) in the application chart. ```yaml permission: diff --git a/docs/developer/develop/advanced/terminus-info.md b/docs/developer/develop/advanced/terminus-info.md index e10651da5..223374d34 100644 --- a/docs/developer/develop/advanced/terminus-info.md +++ b/docs/developer/develop/advanced/terminus-info.md @@ -1,11 +1,11 @@ -# olares-info +# beos-info -olares-info is an API without authentication. It displays publicly available system information. You can think of it as a house number sign. +beos-info is an API without authentication. It displays publicly available system information. You can think of it as a house number sign. ## API Call ``` -https://.beos.local/api/olares-info +https://.beos.local/api/beos-info ``` ## Data Structure diff --git a/docs/developer/develop/advanced/websocket.md b/docs/developer/develop/advanced/websocket.md index 86fc90713..9846e62df 100644 --- a/docs/developer/develop/advanced/websocket.md +++ b/docs/developer/develop/advanced/websocket.md @@ -160,7 +160,7 @@ Cookie: .... // New feature in version v1.0.3 ## Deploy WebSocket Service in App -To use this feature, simply add the `websocket configuration` to the [beOS ProManifest.yaml](../package/manifest.md#websocket) file in the application chart. +To use this feature, simply add the `websocket configuration` to the [BeOSManifest.yaml](../package/manifest.md#websocket) file in the application chart. ```yaml options: websocket: diff --git a/docs/developer/develop/app-env-index.md b/docs/developer/develop/app-env-index.md index 0dde57666..df3ef54f6 100644 --- a/docs/developer/develop/app-env-index.md +++ b/docs/developer/develop/app-env-index.md @@ -1,6 +1,6 @@ --- outline: [2, 3] -description: Learn how variables are injected during beOS Pro app deployment, including declarative environment variables (.Values.olaresEnv) and system-injected runtime Helm values (.Values.*). +description: Learn how variables are injected during beOS Pro app deployment, including declarative environment variables (.Values.beosEnv) and system-injected runtime Helm values (.Values.*). --- # Environment variables overview @@ -15,7 +15,7 @@ In this document, "variables" mainly refer to Helm values. They are not automati beOS Pro injects variables through two channels: -- **Declarative environment variables**: The developer declares variables under `envs` in `beOS ProManifest.yaml`. At deployment, app-service resolves and injects the values into `.Values.olaresEnv` in `values.yaml`. +- **Declarative environment variables**: The developer declares variables under `envs` in `BeOSManifest.yaml`. At deployment, app-service resolves and injects the values into `.Values.beosEnv` in `values.yaml`. - **System-injected runtime variables**: Injected automatically by beOS Pro at deployment time. No declaration is required, though some values are only available after you declare the relevant dependency, such as middleware. diff --git a/docs/developer/develop/app-env-vars.md b/docs/developer/develop/app-env-vars.md index b29bcf4b5..990b2a263 100644 --- a/docs/developer/develop/app-env-vars.md +++ b/docs/developer/develop/app-env-vars.md @@ -1,10 +1,10 @@ --- outline: [2, 4] -description: Declare and validate app configuration via envs in `beOS ProManifest.yaml`, and reference values in templates through `.Values.olaresEnv`. +description: Declare and validate app configuration via envs in `BeOSManifest.yaml`, and reference values in templates through `.Values.beosEnv`. --- # Declarative environment variables -Use `envs` in `beOS ProManifest.yaml` to declare the configuration parameters, such as passwords, API endpoints, or feature flags. During deployment, app-service resolves the values and injects them into `.Values.olaresEnv` in `values.yaml`. Reference them in Helm templates as {{ .Values.olaresEnv.<envName> }}. +Use `envs` in `BeOSManifest.yaml` to declare the configuration parameters, such as passwords, API endpoints, or feature flags. During deployment, app-service resolves the values and injects them into `.Values.beosEnv` in `values.yaml`. Reference them in Helm templates as {{ .Values.beosEnv.<envName> }}. ## Variable sources @@ -21,12 +21,12 @@ Both system environment variables and user environment variables use the same ma The following example maps the system variable `OLARES_SYSTEM_CDN_SERVICE` to an application variable `APP_CDN_ENDPOINT`: -1. In `beOS ProManifest.yaml`, declare an app variable under `envs` and set `valueFrom.envName` to the system variable name. +1. In `BeOSManifest.yaml`, declare an app variable under `envs` and set `valueFrom.envName` to the system variable name. ```yaml # Map system variable OLARES_SYSTEM_CDN_SERVICE to app variable APP_CDN_ENDPOINT - olaresManifest.version: '0.10.0' - olaresManifest.type: app + beosManifest.version: '0.10.0' + beosManifest.type: app envs: - envName: APP_CDN_ENDPOINT @@ -36,20 +36,20 @@ The following example maps the system variable `OLARES_SYSTEM_CDN_SERVICE` to an envName: OLARES_SYSTEM_CDN_SERVICE ``` -2. In your Helm template, reference the app variable via `.Values.olaresEnv.`. +2. In your Helm template, reference the app variable via `.Values.beosEnv.`. ```yaml # Use APP_CDN_ENDPOINT in a container environment variable env: - name: CDN_ENDPOINT - value: "{{ .Values.olaresEnv.APP_CDN_ENDPOINT }}" + value: "{{ .Values.beosEnv.APP_CDN_ENDPOINT }}" ``` At deployment, app-service resolves the referenced variable and injects the value into `values.yaml`: ```yaml # Injected by app-service into values.yaml at deployment -olaresEnv: +beosEnv: APP_CDN_ENDPOINT: "https://cdn.beos.local" ``` @@ -61,7 +61,7 @@ The following fields are available under each `envs` entry. ### envName -The name of the variable as injected into `values.yaml`. Reference it in templates as {{ .Values.olaresEnv.<envName> }}. +The name of the variable as injected into `values.yaml`. Reference it in templates as {{ .Values.beosEnv.<envName> }}. ### default diff --git a/docs/developer/develop/app-sys-injected-variables.md b/docs/developer/develop/app-sys-injected-variables.md index a5d097c24..c76db974f 100644 --- a/docs/developer/develop/app-sys-injected-variables.md +++ b/docs/developer/develop/app-sys-injected-variables.md @@ -31,7 +31,7 @@ For the full list of available values, see [Value reference](#value-reference). ## Value references -The Type column describes the Helm value data type. It does not correspond to the `type` field in `beOS ProManifest.yaml`. +The Type column describes the Helm value data type. It does not correspond to the `type` field in `BeOSManifest.yaml`. ### User and identity @@ -101,7 +101,7 @@ Each entry in `.Values.nodes` follows this structure: ### Application dependencies -When an app declares a dependency in `beOS ProManifest.yaml`, beOS Pro injects connection information into `values.yaml`. +When an app declares a dependency in `BeOSManifest.yaml`, beOS Pro injects connection information into `values.yaml`. | Value | Type | Description | | --- | --- | --- | @@ -128,7 +128,7 @@ When an app declares a dependency in `beOS ProManifest.yaml`, beOS Pro injects c ### Middleware values -Middleware values are injected only after you declare the middleware dependency in the `middleware` section of `beOS ProManifest.yaml`. +Middleware values are injected only after you declare the middleware dependency in the `middleware` section of `BeOSManifest.yaml`. PostgreSQL and Redis are preinstalled. MongoDB, MinIO, RabbitMQ, MySQL and MariaDB must be installed separately before your app can use them. diff --git a/docs/developer/develop/index.md b/docs/developer/develop/index.md index 5df50831f..c5b95f5b5 100644 --- a/docs/developer/develop/index.md +++ b/docs/developer/develop/index.md @@ -21,7 +21,7 @@ beOS Pro Studio is a development platform that accelerates your build cycle. It To publish your application to the beOS Pro Market, you must structure it according to the beOS Pro Application Chart (OAC) specification. This format extends Helm Charts to support beOS Pro-specific features like permission management and sandboxing. * **[Understand the beOS Pro Application Chart](./package/chart.md)**: Understand the file structure and requirements of an application package. -* **[Understand `beOS ProManifest.yaml`](./package/manifest.md)**: A comprehensive guide to the `beOS ProManifest.yaml` file, which defines your app's metadata, permissions, and system integration points. +* **[Understand `BeOSManifest.yaml`](./package/manifest.md)**: A comprehensive guide to the `BeOSManifest.yaml` file, which defines your app's metadata, permissions, and system integration points. * **[Understand Helm extensions](./package/extension.md)**: Learn about the custom fields and capabilities beOS Pro adds to standard Helm deployments. ## Step 3: Submit your application diff --git a/docs/developer/develop/mw-integrate-with-es.md b/docs/developer/develop/mw-integrate-with-es.md index 133648e47..44fe00f00 100644 --- a/docs/developer/develop/mw-integrate-with-es.md +++ b/docs/developer/develop/mw-integrate-with-es.md @@ -4,7 +4,7 @@ description: Learn how to integrate your app with Elasticsearch service in beOS --- # Integrate with Elasticsearch -Use beOS Pro Elasticsearch middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro Elasticsearch middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. ## Install Elasticsearch service @@ -15,9 +15,9 @@ Install the Elasticsearch service from Market. Once installed, the service and its connection details will appear in the Middleware list in Control Hub. -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `username` field to specify the Elasticsearch user. - Use the `indexes` field to request one or more indexes. Each index name is used as the key in `.Values.elasticsearch.indexes`. diff --git a/docs/developer/develop/mw-integrate-with-mariadb.md b/docs/developer/develop/mw-integrate-with-mariadb.md index e091607c5..a569de682 100644 --- a/docs/developer/develop/mw-integrate-with-mariadb.md +++ b/docs/developer/develop/mw-integrate-with-mariadb.md @@ -4,7 +4,7 @@ description: Learn how to integrate your app with MariaDB service in beOS Pro. --- # Integrate with MariaDB -Use beOS Pro MariaDB middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro MariaDB middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. ## Install MariaDB service @@ -15,9 +15,9 @@ Install the MariaDB service from Market. Once installed, the service and its connection details will appear in the Middleware list in Control Hub. -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `username` field to specify the database username. - Use the `databases` field to request one or more databases. Each database name is used as the key in `.Values.mariadb.databases`. diff --git a/docs/developer/develop/mw-integrate-with-minio.md b/docs/developer/develop/mw-integrate-with-minio.md index 697b9621f..4fee3a7f6 100644 --- a/docs/developer/develop/mw-integrate-with-minio.md +++ b/docs/developer/develop/mw-integrate-with-minio.md @@ -4,7 +4,7 @@ description: Learn how to integrate your app with MinIO service in beOS Pro. --- # Integrate with MinIO -Use beOS Pro MinIO middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro MinIO middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. ## Install MinIO service @@ -15,9 +15,9 @@ Install the MinIO service from Market. Once installed, the service and its connection details will appear in the Middleware list in Control Hub. -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `username` field to specify the MinIO access key. - Use the `buckets` field to request one or more buckets. Each bucket name is used as the key in `.Values.minio.buckets`. diff --git a/docs/developer/develop/mw-integrate-with-mongodb.md b/docs/developer/develop/mw-integrate-with-mongodb.md index f865da22c..d91f7cad7 100644 --- a/docs/developer/develop/mw-integrate-with-mongodb.md +++ b/docs/developer/develop/mw-integrate-with-mongodb.md @@ -4,7 +4,7 @@ description: Learn how to integrate your app with MongoDB service in beOS Pro. --- # Integrate with MongoDB -Use beOS Pro MongoDB middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro MongoDB middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. ## Install MongoDB service @@ -15,9 +15,9 @@ Install the MongoDB service from Market. Once installed, the service and its connection details will appear in the Middleware list in Control Hub. -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `username` field to specify the MongoDB database user. - Use the `databases` field to request one or more databases. diff --git a/docs/developer/develop/mw-integrate-with-mysql.md b/docs/developer/develop/mw-integrate-with-mysql.md index bb1e535df..5dd5911a5 100644 --- a/docs/developer/develop/mw-integrate-with-mysql.md +++ b/docs/developer/develop/mw-integrate-with-mysql.md @@ -4,7 +4,7 @@ description: Learn how to integrate your app with MySQL service in beOS Pro. --- # Integrate with MySQL -Use beOS Pro MySQL middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro MySQL middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. ## Install MySQL service @@ -15,9 +15,9 @@ Install the MySQL service from Market. Once installed, the service and its connection details will appear in the Middleware list in Control Hub. -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `username` field to specify the MySQL database user. - Use the `databases` field to request one or more databases. Each database name is used as the key in `.Values.mysql.databases`. diff --git a/docs/developer/develop/mw-integrate-with-pg.md b/docs/developer/develop/mw-integrate-with-pg.md index 344e41e4b..a20eadb5a 100644 --- a/docs/developer/develop/mw-integrate-with-pg.md +++ b/docs/developer/develop/mw-integrate-with-pg.md @@ -4,15 +4,15 @@ description: Learn how to integrate your app with the built-in PostgreSQL servic --- # Integrate with PostgreSQL -Use beOS Pro PostgreSQL middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro PostgreSQL middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. :::info PosgreSQL installed PostgreSQL service has been installed by default. ::: -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `scripts` field to specify scripts that should be executed after the database is created. - Use the `extensions` field to add the corresponding extension in the database. diff --git a/docs/developer/develop/mw-integrate-with-rabbitmq.md b/docs/developer/develop/mw-integrate-with-rabbitmq.md index 6dd70106e..09121fa41 100644 --- a/docs/developer/develop/mw-integrate-with-rabbitmq.md +++ b/docs/developer/develop/mw-integrate-with-rabbitmq.md @@ -4,7 +4,7 @@ description: Learn how to integrate your app with RabbitMQ service in beOS Pro. --- # Integrate with RabbitMQ -Use beOS Pro RabbitMQ middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro RabbitMQ middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. ## Install RabbitMQ service @@ -15,9 +15,9 @@ Install the RabbitMQ service from Market. Once installed, the service and its connection details will appear in the Middleware list in Control Hub. -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required middleware configuration. +In `BeOSManifest.yaml`, add the required middleware configuration. - Use the `username` field to specify the RabbitMQ user. - Use the `vhosts` field to request one or more virtual hosts (vhosts). Each vhost name is used as the key in `.Values.rabbitmq.vhosts`. diff --git a/docs/developer/develop/mw-integrate-with-redis.md b/docs/developer/develop/mw-integrate-with-redis.md index 25cca8e3b..d328f04e1 100644 --- a/docs/developer/develop/mw-integrate-with-redis.md +++ b/docs/developer/develop/mw-integrate-with-redis.md @@ -4,15 +4,15 @@ description: Learn how to integrate your app with the built-in Redis service in --- # Integrate with Redis -Use beOS Pro Redis middleware by declaring it in `beOS ProManifest.yaml`, then mapping the injected values to your container environment variables. +Use beOS Pro Redis middleware by declaring it in `BeOSManifest.yaml`, then mapping the injected values to your container environment variables. :::info Redis installed Redis service has been installed by default. ::: -## Configure `beOS ProManifest.yaml` +## Configure `BeOSManifest.yaml` -In `beOS ProManifest.yaml`, add the required Redis middleware configuration. +In `BeOSManifest.yaml`, add the required Redis middleware configuration. - Use the `password` field to specify the Redis access password. - Use the `namespace` field to request a Redis namespace. diff --git a/docs/developer/develop/mw-overview.md b/docs/developer/develop/mw-overview.md index 1761c8830..6a1ba8b10 100644 --- a/docs/developer/develop/mw-overview.md +++ b/docs/developer/develop/mw-overview.md @@ -8,7 +8,7 @@ Middleware refers to infrastructure services that sit between your application a Our middleware documentation is organized into two types of guides: - **Access and manage data**: Connect to a running service to inspect data and troubleshoot issues. -- **App integrate**: Configure your app to use a middleware service in beOS Pro using `beOS ProManifest.yaml`. +- **App integrate**: Configure your app to use a middleware service in beOS Pro using `BeOSManifest.yaml`. ## Document types @@ -29,7 +29,7 @@ The access method (e.g., CLI, Dashboard, or Bytebase) depends on the service. App integration guides explain how to connect your application to a middleware service. Use these guides when you want your application to: -- Declare dependencies in `beOS ProManifest.yaml`. +- Declare dependencies in `BeOSManifest.yaml`. - Request service resources. - Read system-injected connection values in your application. diff --git a/docs/developer/develop/package/chart.md b/docs/developer/develop/package/chart.md index 1479a738a..f51f60da8 100644 --- a/docs/developer/develop/package/chart.md +++ b/docs/developer/develop/package/chart.md @@ -3,7 +3,7 @@ The beOS Pro Application Chart is built upon the structure of **Helm Chart**, with extensions to accommodate specific **beOS Pro** information. A standard application chart contains the following files: ``` |-- Chart.yaml # chart metadata -|-- beOS ProManifest.yaml # beOS Pro Application configuration +|-- BeOSManifest.yaml # beOS Pro Application configuration |-- templates/ # chart deployment template files | |-- deployment.yaml # APP deployment script |-- crds/ # OPTIONAL: Custom Resource Definitions @@ -19,7 +19,7 @@ To make the templates directory easier to understand, you can split the deployme ``` AppName |-- Chart.yaml # Required: YAML file containing chart metadata -|-- beOS ProManifest.yaml # Required: containing App configuration +|-- BeOSManifest.yaml # Required: containing App configuration |-- values.yaml # Required: default configuration values of the chart |-- templates # Required: template directory, when combined with values, it can generate valid Kubernetes manifest files | |-- NOTES.txt # Optional: plain text file containing brief usage instructions @@ -35,7 +35,7 @@ AppName ``` RecommendName |-- Chart.yaml # Required: YAML file containing chart metadata -|-- beOS ProManifest.yaml # Required: containing Recommend configuration +|-- BeOSManifest.yaml # Required: containing Recommend configuration |-- values.yaml # Required: default configuration values of the chart |-- templates # Required: template directory, when combined with values, it can generate valid Kubernetes manifest files | |-- NOTES.txt # Optional: plain text file containing brief usage instructions diff --git a/docs/developer/develop/package/extension.md b/docs/developer/develop/package/extension.md index 83d2bd49a..a3041f6e2 100644 --- a/docs/developer/develop/package/extension.md +++ b/docs/developer/develop/package/extension.md @@ -1,6 +1,6 @@ # Extensions field to Helm in beOS Pro -During installation, beOS Pro injects extended field into the APP, using the configuration from [beOS ProManifest.yaml](manifest.md). +During installation, beOS Pro injects extended field into the APP, using the configuration from [BeOSManifest.yaml](manifest.md). The information from these extended fields can be directly referenced in the template without being defined in values.yaml. If there are definitions in values.yaml with the same name, the system value will overwrite them. diff --git a/docs/developer/develop/package/manifest.md b/docs/developer/develop/package/manifest.md index 7be7aa57b..b5d39c16f 100644 --- a/docs/developer/develop/package/manifest.md +++ b/docs/developer/develop/package/manifest.md @@ -4,7 +4,7 @@ outline: [2, 3] # beOS ProManifest Specification -Every **beOS Pro Application Chart** should include an `beOS ProManifest.yaml` file in the root directory. `beOS ProManifest.yaml` provides all the essential information about an beOS Pro App. Both the **beOS Pro Market protocol** and the beOS Pro depend on this information to distribute and install applications. +Every **beOS Pro Application Chart** should include an `BeOSManifest.yaml` file in the root directory. `BeOSManifest.yaml` provides all the essential information about an beOS Pro App. Both the **beOS Pro Market protocol** and the beOS Pro depend on this information to distribute and install applications. :::info NOTE Latest beOS Pro Manifest version: `0.11.0` @@ -46,13 +46,13 @@ Latest beOS Pro Manifest version: `0.11.0` - Change `spec`>`language` to `spec`>`locale` and support i18n ::: -Here's an example of what a `beOS ProManifest.yaml` file might look like: +Here's an example of what a `BeOSManifest.yaml` file might look like: -::: details beOS ProManifest.yaml Example +::: details BeOSManifest.yaml Example ```yaml -olaresManifest.version: '0.10.0' -olaresManifest.type: app +beosManifest.version: '0.10.0' +beosManifest.type: app metadata: name: helloworld title: Hello World @@ -108,7 +108,7 @@ options: ``` ::: -## olaresManifest.type +## beosManifest.type - Type: `string` - Accepted Value: `app`, `recommend`, `middleware` @@ -120,22 +120,22 @@ beOS Pro currently supports 3 types of applications, each requiring different fi `recommend` apps will not be listed in the beOS Pro Market, but you can install recommendation algorithms for Wise by uploading a custom Chart. ::: -## olaresManifest.version +## beosManifest.version - Type: `string` -As beOS Pro evolves, the configuration specification of `beOS ProManifest.yaml` may change. You can identify whether these changes will affect your application by checking the `olaresManifest.version`. The `olaresManifest.version` consists of three integers separated by periods. +As beOS Pro evolves, the configuration specification of `BeOSManifest.yaml` may change. You can identify whether these changes will affect your application by checking the `beosManifest.version`. The `beosManifest.version` consists of three integers separated by periods. -- An increase in the **first digit** indicates the introduction of incompatible configuration items. Applications that haven't updated their `beOS ProManifest.yaml` will be unable to distribute or install. -- An increase in the **second digit** signifies changes in the mandatory fields for distribution and installation. However, the beOS Pro remains compatible with the application distribution and installation of previous configuration versions. We recommend developers to promptly update and upgrade the application's `beOS ProManifest.yaml` file. +- An increase in the **first digit** indicates the introduction of incompatible configuration items. Applications that haven't updated their `BeOSManifest.yaml` will be unable to distribute or install. +- An increase in the **second digit** signifies changes in the mandatory fields for distribution and installation. However, the beOS Pro remains compatible with the application distribution and installation of previous configuration versions. We recommend developers to promptly update and upgrade the application's `BeOSManifest.yaml` file. - A change in the **third digit** does not affect the application's distribution and installation. Developers can use 1-3 digit version numbers to indicate the application's configuration version. Here are some examples of valid versions: ```yaml -olaresManifest.version: 1 -olaresManifest.version: 1.1.0 -olaresManifest.version: '2.2' -olaresManifest.version: "3.0.122" +beosManifest.version: 1 +beosManifest.version: 1.1.0 +beosManifest.version: '2.2' +beosManifest.version: "3.0.122" ``` ## apiVersion - Type: `string` @@ -541,20 +541,20 @@ To add multi-language support for your app in beOS Pro Market: 1. Create an `i18n` folder in the beOS Pro Application Chart root directory. 2. In the `i18n` folder, create separate subdirectories for each supported locale. -3. In each locale subdirectory, place a localized version of the `beOS ProManifest.yaml` file. +3. In each locale subdirectory, place a localized version of the `BeOSManifest.yaml` file. -beOS Pro Market will automatically display the content of the corresponding "beOS ProManifest.yaml" file based on users' locale settings. +beOS Pro Market will automatically display the content of the corresponding "BeOSManifest.yaml" file based on users' locale settings. :::info Example ``` . ├── Chart.yaml ├── README.md -├── beOS ProManifest.yaml +├── BeOSManifest.yaml ├── i18n │ ├── en-US -│ │ └── beOS ProManifest.yaml +│ │ └── BeOSManifest.yaml │ └── zh-CN -│ └── beOS ProManifest.yaml +│ └── BeOSManifest.yaml ├── owners ├── templates │ └── deployment.yaml @@ -976,7 +976,7 @@ This configuration requires beOS Pro version 1.12.2 or later to take effect. ```yaml envs: - envName: ENV_NAME - # This key will be injected as .Values.olaresEnv.ENV_NAME during deployment. + # This key will be injected as .Values.beosEnv.ENV_NAME during deployment. required: true # Specifies whether a value is required for installation. If set to true and no default is provided, users must input a value, and the value cannot be deleted. @@ -1018,15 +1018,15 @@ envs: ``` ::: -To use the values of environment variables in your deployment YAML file, simply use `.Values.olaresEnv.ENV_NAME` in the appropriate place. The system will automatically inject the olaresEnv variables into the Values.yaml during deployment. For example: +To use the values of environment variables in your deployment YAML file, simply use `.Values.beosEnv.ENV_NAME` in the appropriate place. The system will automatically inject the beosEnv variables into the Values.yaml during deployment. For example: :::info deployment.yaml ```yaml - BACKEND_MAIL_HOST: "{{ .Values.olaresEnv.MAIL_HOST }}" - BACKEND_MAIL_PORT: "{{ .Values.olaresEnv.MAIL_PORT }}" - BACKEND_MAIL_AUTH_USER: "{{ .Values.olaresEnv.MAIL_AUTH_USER }}" - BACKEND_MAIL_AUTH_PASS: "{{ .Values.olaresEnv.MAIL_AUTH_PASS }}" - BACKEND_MAIL_SECURE: "{{ .Values.olaresEnv.MAIL_SECURE }}" - BACKEND_MAIL_SENDER: "{{ .Values.olaresEnv.MAIL_SENDER }}" + BACKEND_MAIL_HOST: "{{ .Values.beosEnv.MAIL_HOST }}" + BACKEND_MAIL_PORT: "{{ .Values.beosEnv.MAIL_PORT }}" + BACKEND_MAIL_AUTH_USER: "{{ .Values.beosEnv.MAIL_AUTH_USER }}" + BACKEND_MAIL_AUTH_PASS: "{{ .Values.beosEnv.MAIL_AUTH_PASS }}" + BACKEND_MAIL_SECURE: "{{ .Values.beosEnv.MAIL_SECURE }}" + BACKEND_MAIL_SENDER: "{{ .Values.beosEnv.MAIL_SENDER }}" ``` ::: diff --git a/docs/developer/develop/paid-apps.md b/docs/developer/develop/paid-apps.md index 9157e2f2e..ed1f924a9 100644 --- a/docs/developer/develop/paid-apps.md +++ b/docs/developer/develop/paid-apps.md @@ -152,10 +152,10 @@ Your app can read the user's purchase credential via an injected environment var Add the env var in the pod template where you need purchase enforcement: ```yaml - name: VERIFIABLE_CREDENTIAL - value: "{{ .Values.olaresEnv.VERIFIABLE_CREDENTIAL }}" + value: "{{ .Values.beosEnv.VERIFIABLE_CREDENTIAL }}" ``` -Declare the variable in `beOS ProManifest.yaml`: +Declare the variable in `BeOSManifest.yaml`: ```yaml envs: - envName: VERIFIABLE_CREDENTIAL @@ -164,7 +164,7 @@ envs: editable: false applyOnChange: true ``` -For detailed environment variable behavior, see [environment variables in `beOS ProManifest.yaml`](/developer/develop/package/manifest.md#envs). +For detailed environment variable behavior, see [environment variables in `BeOSManifest.yaml`](/developer/develop/package/manifest.md#envs). ### Submit your app diff --git a/docs/developer/develop/promote-apps.md b/docs/developer/develop/promote-apps.md index e5b5443ae..4282b7824 100644 --- a/docs/developer/develop/promote-apps.md +++ b/docs/developer/develop/promote-apps.md @@ -8,12 +8,12 @@ High-quality visuals help your application stand out in beOS Pro Market. This gu ## Application assets -Configure these assets in your [`beOS ProManifest.yaml`](/developer/develop/package/manifest.md). +Configure these assets in your [`BeOSManifest.yaml`](/developer/develop/package/manifest.md). ### Application icon **Required**. Displayed on the Launchpad and in the Market list. -- **Location**: Configure the icon URL in the icon field under `metadata` or `entrances` in `beOS ProManifest.yaml`. +- **Location**: Configure the icon URL in the icon field under `metadata` or `entrances` in `BeOSManifest.yaml`. - **Format**: PNG or WEBP - **Dimensions**: 256 × 256 pixels - **Size**: No larger than 512 KB @@ -21,7 +21,7 @@ Configure these assets in your [`beOS ProManifest.yaml`](/developer/develop/pack ### Promote images **Recommended**. Displayed on the application details page. We recommend uploading at least 2 images. -- **Location**: Configure image URLs in the `promoteImage` field under `spec` in `beOS ProManifest.yaml`. +- **Location**: Configure image URLs in the `promoteImage` field under `spec` in `BeOSManifest.yaml`. - **Format**: JPEG, PNG, or WEBP - **Dimensions**: 1440 × 900 pixels - **Size**: No larger than 8 MB per image @@ -30,7 +30,7 @@ Configure these assets in your [`beOS ProManifest.yaml`](/developer/develop/pack ### Featured image **Optional**. Used for recommendations in beOS Pro Market or displayed on the "My beOS Pro" section. -- **Location**: Configure the image URL in the `featuredImage` field under `spec` in `beOS ProManifest.yaml`. +- **Location**: Configure the image URL in the `featuredImage` field under `spec` in `BeOSManifest.yaml`. - **Format**: JPEG, PNG, or WEBP - **Dimensions**: 1440 × 900 pixels - **Size**: No larger than 8 MB @@ -43,4 +43,4 @@ You can also host images on your own server or use the beOS Pro image hosting se 1. Open [beOS Pro Market image hosting](https://imghost.beos.local/). 2. Select the image type: **app icon**, **featured image** or **promotional image**. 3. Upload and preview the image. -4. Copy the generated URL and paste it into your `beOS ProManifest.yaml`. \ No newline at end of file +4. Copy the generated URL and paste it into your `BeOSManifest.yaml`. \ No newline at end of file diff --git a/docs/developer/develop/submit-apps.md b/docs/developer/develop/submit-apps.md index 004a8ba21..575e80fc5 100644 --- a/docs/developer/develop/submit-apps.md +++ b/docs/developer/develop/submit-apps.md @@ -48,7 +48,7 @@ To pass the Terminus-Gitbot automated checks, your PR must strictly follow these |--|--| | PR type |
  • **NEW**: Submit a new application.
  • **UPDATE**: Update an already successfully merged application.
  • **REMOVE**: Remove an already successfully merged application.
  • **SUSPEND**: Suspend an already successfully merged application from
    distribution through the application store.
| | Chart folder name | The directory name of your OAC. Must match the naming convention. | -| Version | Chart version of your app. It must match:
  • `version` in `Chart.yaml`
  • `version` under `metadata` in `beOS ProManifest.yaml`
| +| Version | Chart version of your app. It must match:
  • `version` in `Chart.yaml`
  • `version` under `metadata` in `BeOSManifest.yaml`
| | Title content | A brief summary of your PR. | 2. **File scope**: The PR only adds or modifies content under the chart folder name declared in the title. diff --git a/docs/developer/develop/tutorial/assets.md b/docs/developer/develop/tutorial/assets.md index 1222a85a9..64fdc6ac0 100644 --- a/docs/developer/develop/tutorial/assets.md +++ b/docs/developer/develop/tutorial/assets.md @@ -23,4 +23,4 @@ Before uploading, ensure your images are in the correct format. 5. When you are ready, click **Upload**. 6. After the upload, the service will provide a direct URL for the image. Click content_copy to copy the URL to your clipboard. 7. Open your app project in **Studio**. -8. Paste the URL into the corresponding field in your `beOS ProManifest.yaml` file. \ No newline at end of file +8. Paste the URL into the corresponding field in your `BeOSManifest.yaml` file. \ No newline at end of file diff --git a/docs/developer/develop/tutorial/deploy.md b/docs/developer/develop/tutorial/deploy.md index 6e73be0c9..c2e8d3653 100644 --- a/docs/developer/develop/tutorial/deploy.md +++ b/docs/developer/develop/tutorial/deploy.md @@ -154,13 +154,13 @@ When enabled, Studio provides dynamic variables. You must use these variables in Apps deployed from Studio include a `-dev` suffix in the title to distinguish them from Market installations. ![Check deployed app](/images/manual/olares/studio-app-with-dev-suffix.png#bordered) -You can click on files like `beOS ProManifest.yaml` to review and make changes. For example, to change the app's display name and logo: +You can click on files like `BeOSManifest.yaml` to review and make changes. For example, to change the app's display name and logo: 1. Click **box_editEdit** in the top-right to open the editor. -2. Click `beOS ProManifest.yaml` to view the content. +2. Click `BeOSManifest.yaml` to view the content. 3. Change the `title` field under `entrance` and `metadata`. For example, change `wallos` to `Wallos`. 4. Replace the default icon image address under `entrance` and `metadata`. - ![Edit `beOS ProManifest.yaml`](/images/manual/olares/studio-edit-olaresmanifest1.png#bordered) + ![Edit `BeOSManifest.yaml`](/images/manual/olares/studio-edit-olaresmanifest1.png#bordered) 5. Click save in the top-right to save changes. 6. Click **Apply** to reinstall with the updated package. diff --git a/docs/developer/develop/tutorial/develop.md b/docs/developer/develop/tutorial/develop.md index 3b2ec44ae..fc6e15689 100644 --- a/docs/developer/develop/tutorial/develop.md +++ b/docs/developer/develop/tutorial/develop.md @@ -125,11 +125,11 @@ This example demonstrates creating a basic web page manually. ## 4. Configure port forwarding If you need to expose additional ports after the container is created (e.g., adding port `8081`), you must manually edit the container configuration manifests. :::tip -You can follow the same steps to modify `beOS ProManifest.yaml` and `deployment.yaml` to change the port number. +You can follow the same steps to modify `BeOSManifest.yaml` and `deployment.yaml` to change the port number. ::: ### Modify configuration manifests 1. In Studio, click **box_editEdit** in the top-right to open the editor. -2. Edit `beOS ProManifest.yaml`. +2. Edit `BeOSManifest.yaml`. a. Append the new port to the `entrances` list: ```yaml @@ -162,7 +162,7 @@ You can follow the same steps to modify `beOS ProManifest.yaml` and `deployment. annotations: applications.app.bytetrade.io/default-thirdlevel-domains: '[{"appName":"myweb","entranceName":"myweb-dev-8080"},{"appName":"myweb","entranceName":"myweb-dev-8081"}]' - # entranceName must match the name used in beOS ProManifest.yaml + # entranceName must match the name used in BeOSManifest.yaml ``` b. Update the `studio-expose-ports` annotation under `spec` > `template` > `metadata`: ```yaml diff --git a/docs/developer/develop/tutorial/note/create.md b/docs/developer/develop/tutorial/note/create.md index 9250b2640..5f9bb27ed 100644 --- a/docs/developer/develop/tutorial/note/create.md +++ b/docs/developer/develop/tutorial/note/create.md @@ -33,9 +33,9 @@ After creating the application, you can see the beOS Pro Application Chart files The `Chart.yaml` file is a required file in the Helm Chart specification. It contains the application's `Name` and `Chart Version`. You can [learn more here](https://helm.sh/docs/topics/charts/). For now, we're not going to change the default `Chart.yaml` yet. -### beOS ProManifest.yaml +### BeOSManifest.yaml -In the `beOS ProManifest.yaml `file, you can change many configurations. This includes but is not limited to: +In the `BeOSManifest.yaml `file, you can change many configurations. This includes but is not limited to: - Changing the app's title, icon, and other details - Adding system `middleware` @@ -87,7 +87,7 @@ These parameters should not be hardcoded, they must reference the variables pass #### Adding [Access Permissions to the File System](../../package/manifest.md#permission) -To read and save files in the beOS Pro system, we need to configure Access Permissions for certain file directories. These directories can be specified in the `Permissions` section of the `beOS ProManifest.yaml` file: +To read and save files in the beOS Pro system, we need to configure Access Permissions for certain file directories. These directories can be specified in the `Permissions` section of the `BeOSManifest.yaml` file: - `appData`: This applies for independent cloud storage space for the app. - `appCache`: This applies for local disk data cache space, usually on an SSD disk, for the app. diff --git a/docs/developer/install/olares-home.md b/docs/developer/install/beos-home.md similarity index 93% rename from docs/developer/install/olares-home.md rename to docs/developer/install/beos-home.md index 771064bf9..5cdd85756 100644 --- a/docs/developer/install/olares-home.md +++ b/docs/developer/install/beos-home.md @@ -7,11 +7,11 @@ description: Internal structure of beOS Pro Home directory organizing images, lo ## Path configuration -By default, beOS Pro Home is located at `~/.olares`. You can customize its location using the `--base-dir` option with a specific `olares-cli` command, for example: +By default, beOS Pro Home is located at `~/.olares`. You can customize its location using the `--base-dir` option with a specific `beos-cli` command, for example: ```bash # Specifies the base directory where all downloaded components will be saved -olares-cli download component --base-dir /custom/path +beos-cli download component --base-dir /custom/path ``` ## Directory structure @@ -27,7 +27,7 @@ A typical beOS Pro Home directory might look like this: ├── pkg # Stores downloaded system dependency components │ ├── cni # Container Network Interface (K8s network plugins) │ ├── components # beOS Pro foundation software dependencies (not directly related to K8s) -│ │ such as olaresd, JuiceFS, Redis, etc. +│ │ such as beosd, JuiceFS, Redis, etc. │ ├── containerd # Container Runtime Interface (CRI) runtime │ ├── crictl # CRI command-line tool │ ├── etcd # Persistent database for K8s @@ -61,6 +61,6 @@ The structure of beOS Pro Home is designed to optimize file management, version - The `images` and `pkg` directories are shared across all beOS Pro versions. This design reduces redundancy, minimizes duplicate downloads, and saves disk space. ## Learn more -- [beOS Pro CLI](../install/cli/olares-cli.md) +- [beOS Pro CLI](../install/cli/beos-cli.md) - [beOS Pro installation breakdown](installation-process.md) - [beOS Pro environment variables](environment-variables.md) diff --git a/docs/developer/install/cli/backups-backup.md b/docs/developer/install/cli/backups-backup.md index daf7e8ecc..f3e4e5792 100644 --- a/docs/developer/install/cli/backups-backup.md +++ b/docs/developer/install/cli/backups-backup.md @@ -3,13 +3,13 @@ outline: [2, 3] --- # `backup` :::warning -The `olares-cli backups download` command must be run first to install Restic. Otherwise, this command will return an error. +The `beos-cli backups download` command must be run first to install Restic. Otherwise, this command will return an error. ::: ## Synopsis The `backup` subcommand allows you to back up data to the specified storage backend. It ensures your data is securely stored and can be restored whenever needed. ```bash -olares-cli backups backup --path --repo-name [options] +beos-cli backups backup --path --repo-name [options] ``` ## Common options @@ -68,13 +68,13 @@ These options apply to all backends: ## Examples ```bash # Backup to Tencent COS -olares-cli backups backup cos --path /data --repo-name my_repo \ +beos-cli backups backup cos --path /data --repo-name my_repo \ --access-key YOUR_KEY \ --secret-access-key YOUR_SECRET \ --endpoint https://cos.region.myqcloud.com/bucket/prefix # Backup to Remote Space -olares-cli backups backup space --path /data --repo-name my_repo \ +beos-cli backups backup space --path /data --repo-name my_repo \ --access-token YOUR_ACCESS_TOKEN \ --cloud-api-mirror https://api-mirror.example.com \ --cloud-name my_cloud \ diff --git a/docs/developer/install/cli/backups-download.md b/docs/developer/install/cli/backups-download.md index eb8875910..4bc66547a 100644 --- a/docs/developer/install/cli/backups-download.md +++ b/docs/developer/install/cli/backups-download.md @@ -4,7 +4,7 @@ The `download` subcommand downloads the Restic dependency tool. Restic is required for performing backup and restore operations, as well as managing snapshots. ```bash -olares-cli backups download [options] +beos-cli backups download [options] ``` ## Options @@ -15,5 +15,5 @@ olares-cli backups download [options] ## Examples ```bash d # Download Restic using a custom CDN URL -olares-cli backups download --download-cdn-url https://custom-cdn.example.com/restic +beos-cli backups download --download-cdn-url https://custom-cdn.example.com/restic ``` \ No newline at end of file diff --git a/docs/developer/install/cli/backups-region.md b/docs/developer/install/cli/backups-region.md index 4efc8aacd..0366b8bdf 100644 --- a/docs/developer/install/cli/backups-region.md +++ b/docs/developer/install/cli/backups-region.md @@ -3,7 +3,7 @@ ## Synopsis The `region` subcommand is used to retrieve the cloud name and region ID. It is specifically used when the storage backend is Remote Space. ```bash -olares-cli backups region space [options] +beos-cli backups region space [options] ``` ## Options @@ -20,7 +20,7 @@ olares-cli backups region space [options] ## Examples ```bash # Query cloud name and region ID -olares-cli backups region space \ +beos-cli backups region space \ --access-token YOUR_ACCESS_TOKEN \ --cloud-api-mirror https://api-mirror.example.com \ --olares-did did:xyz123 diff --git a/docs/developer/install/cli/backups-restore.md b/docs/developer/install/cli/backups-restore.md index 997cf0f80..d80e682a9 100644 --- a/docs/developer/install/cli/backups-restore.md +++ b/docs/developer/install/cli/backups-restore.md @@ -3,13 +3,13 @@ outline: [2, 3] --- # `restore` :::warning -The `olares-cli backups download` command must be run first to install Restic. Otherwise, this command will return an error. +The `beos-cli backups download` command must be run first to install Restic. Otherwise, this command will return an error. ::: ## Synopsis The `restore` subcommand allows you to restore data from a specified backup repository and snapshot to a target directory. ```bash -olares-cli backups restore --path --repo-name --snapshot-id [options] +beos-cli backups restore --path --repo-name --snapshot-id [options] ``` ## Common options @@ -72,13 +72,13 @@ These options apply to all backends: ## Examples ```bash # Restore the data from Tencent COS -olares-cli backups restore cos --path /data_restore --repo-name my_repo \ +beos-cli backups restore cos --path /data_restore --repo-name my_repo \ --snapshot-id snapshot_12345 \ --access-key YOUR_KEY \ --secret-access-key YOUR_SECRET \ --endpoint https://cos.region.myqcloud.com/bucket/prefix # Restore the data from local filesystem -olares-cli backups restore fs --path /data_restore --repo-name my_repo \ +beos-cli backups restore fs --path /data_restore --repo-name my_repo \ --snapshot-id snapshot_12345 --endpoint /backup_repo ``` \ No newline at end of file diff --git a/docs/developer/install/cli/backups-snapshots.md b/docs/developer/install/cli/backups-snapshots.md index b7d9ed4ca..18a8e4510 100644 --- a/docs/developer/install/cli/backups-snapshots.md +++ b/docs/developer/install/cli/backups-snapshots.md @@ -3,13 +3,13 @@ outline: [2, 3] --- # `snapshots` :::warning -The `olares-cli backups download` subcommand must be run first to install Restic. Otherwise, this command will return an error. +The `beos-cli backups download` subcommand must be run first to install Restic. Otherwise, this command will return an error. ::: ## Synopsis The `snapshots` subcommand lists all available snapshots for a specific backup repository. It supports multiple storage backends and provides the necessary options to authenticate and query snapshots. ```bash -olares-cli backups snapshots --repo-name [options] +beos-cli backups snapshots --repo-name [options] ``` ## Common options These options apply to all backends: @@ -64,11 +64,11 @@ These options apply to all backends: ## Examples ```bash # List snapshots for Tencent COS -olares-cli backups snapshots cos --repo-name my_repo \ +beos-cli backups snapshots cos --repo-name my_repo \ --access-key YOUR_KEY \ --secret-access-key YOUR_SECRET \ --endpoint https://cos.region.myqcloud.com/bucket/prefix # List snapshots for local filesystem -olares-cli backups snapshots fs --repo-name my_repo --endpoint /backup_repo +beos-cli backups snapshots fs --repo-name my_repo --endpoint /backup_repo ``` \ No newline at end of file diff --git a/docs/developer/install/cli/beos-cli.md b/docs/developer/install/cli/beos-cli.md new file mode 100644 index 000000000..3277254ff --- /dev/null +++ b/docs/developer/install/cli/beos-cli.md @@ -0,0 +1,66 @@ +--- +outline: [2, 3] +--- +# beOS Pro CLI + +:::warning Note +Use this version of beOS Pro CLI if your beOS Pro version is 1.12.X. +::: + +The beOS Pro CLI is a versatile command-line tool designed to help developers and system administrators manage and troubleshoot beOS Pro systems. It offers a wide range of features, from installation and configuration to resource management and diagnostics. + +With the beOS Pro CLI, you can streamline tasks such as verifying system compatibility, downloading resources, managing nodes, collecting logs, and more. This guide provides an overview of the CLI's syntax and details the commands available for different operations. + +:::info Root privileges required +Most `beos-cli` commands require root privileges. Use the root user or prepend commands with `sudo`. +::: + +:::info Using beOS Pro CLI with WSL +If you installed beOS Pro using the WSL (Windows Subsystem for Linux) method, you need to use `beos-cli` inside the WSL environment. + +To enter the WSL environment, run the following command in PowerShell: + +```powershell +wsl -d Ubuntu +``` +::: + +## Syntax +The beOS Pro CLI uses the following syntax: + +> `beos-cli command [subcommand] [argument] [options] ` + +where +- `command`: Specifies the main operation you want to perform. For example, `beos-cli install`. +- `subcommand`: Further specifies the task for commands that support additional operations. For example, `wizard` or `component`. +- `argument`: Specifies the target resource or input data for the command, typically an ID, name, or file path. For example, in `beos-cli user activate [options]`, `` is the argument. +- `options`: Optional arguments that modify the behavior of the `command`. Options include flags and options with arguments. + +beOS Pro CLI allows you to temporarily override certain beOS Pro default settings. Each option applies only to the command in which it is used. + +For example, if you use the `--base-dir` option with `beos-cli download wizard`, it will only affect the wizard downloading process and will not change the base directory for other commands, such as during the "install" phase. + +To get detailed help for any command, run `beos-cli help`. + +## Available CLI commands + +| Operation | Syntax | Description | +|--|--|--| +| `backups` | `beos-cli backups [options]` | Manages backup-related operations. | +| `change-ip` | `beos-cli change-ip [options]` | Changes the IP address of the beOS Pro. | +| `disk` | `beos-cli disk ` | Manages storage resources in the beOS Pro system. | +| `download` | `beos-cli download [options]` | Downloads specific resources. | +| `gpu` | `beos-cli gpu [options]` | Manages GPU-related operations. | +| `info` | `beos-cli info [options]` | Displays general information about the downloaded beOS Pro. | +| `install` | `beos-cli install [options]` | Deploys system-level and user-level components of beOS Pro. | +| `logs` | `beos-cli logs [options]` | Collects logs from beOS Pro system components for debugging and troubleshooting. | +| `node` | `beos-cli node [options]` | Manages node-related operations. | +| `osinfo` | `beos-cli osinfo [options]` | Displays general information about the operating system of the current device. | +| `precheck` | `beos-cli precheck [options]` | Verifies whether the system environment meets all requirements for beOS Pro installation. | +| `prepare` | `beos-cli prepare [options]` | Prepares the environment for the installation process, including setting up essential services and configurations of beOS Pro. | +| `release` | `beos-cli release [options]` | Packages beOS Pro installation resources for distribution or deployment. | +| `start` | `beos-cli start [options]` | Starts beOS Pro services and components. | +| `stop` | `beos-cli stop [options]` | Stops beOS Pro services and components. | +| `uninstall` | `beos-cli uninstall [options]` | Uninstalls beOS Pro completely, or roll back the installation to a specific phase. | +| `upgrade` | `beos-cli upgrade [options]` | Upgrades beOS Pro and checks upgrade readiness and compatibility.| +| `user` | `beos-cli user [options]`| Manages users in the beOS Pro system | \ No newline at end of file diff --git a/docs/developer/install/cli/change-ip.md b/docs/developer/install/cli/change-ip.md index 3dd447793..712db7cf0 100644 --- a/docs/developer/install/cli/change-ip.md +++ b/docs/developer/install/cli/change-ip.md @@ -7,7 +7,7 @@ When beOS Pro is deployed _inside_ a virtualized environment, such as macOS (via Change the local IP address for all beOS Pro components. ```bash -olares-cli change-ip [option] +beos-cli change-ip [option] ``` ## Options @@ -19,16 +19,16 @@ olares-cli change-ip [option] | `--help` | `-h` | Displays help information. | No | N/A | | `--new-master-host` | | Specifies the new IP address of the master node on the worker node.
Only applicable for a multi-node beOS Pro cluster. | No | N/A | | `--profile` | `-p` | Sets the Minikube profile name. Only applicable on macOS. | No | `olares-0` | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | ## Examples - For macOS: ```bash # Specify the Minikube profile name and change the IP. -olares-cli change-ip --profile olares-0 +beos-cli change-ip --profile olares-0 ``` - For Windows WSL: ```bash # Specify the Linux distribution in WSL and change the IP. -olares-cli change-ip --distribution Ubuntu +beos-cli change-ip --distribution Ubuntu ``` \ No newline at end of file diff --git a/docs/developer/install/cli/disk.md b/docs/developer/install/cli/disk.md index 111998554..f5c0bb9c4 100644 --- a/docs/developer/install/cli/disk.md +++ b/docs/developer/install/cli/disk.md @@ -6,7 +6,7 @@ The `disk` command provides a set of tools to manage storage resources in the be ```bash -olares-cli disk +beos-cli disk ``` ## Subcommands @@ -26,8 +26,8 @@ olares-cli disk ```bash # List all disks that are connected but not mounted -olares-cli disk list-unmounted +beos-cli disk list-unmounted # Extend beOS Pro storage by adding newly detected unmounted disks -olares-cli disk extend +beos-cli disk extend ``` \ No newline at end of file diff --git a/docs/developer/install/cli/download.md b/docs/developer/install/cli/download.md index 9790531c3..8c2f5553b 100644 --- a/docs/developer/install/cli/download.md +++ b/docs/developer/install/cli/download.md @@ -4,16 +4,16 @@ The `download` command downloads the necessary packages and components required to install beOS Pro on your local machine. It supports downloading components, checking the status of installation packages, and fetching the manifest file. ```bash -olares-cli download [option] +beos-cli download [option] ``` ## Subcommands | Name | Shorthand | Usage | Example | |-------------|-----------|-------------------------------------------------------|----------------------------------------| -| `check` | | Checks the status of the beOS Pro installation package. | `olares-cli download check` | -| `component` | `c` | Downloads beOS Pro components. | `olares-cli download component` | -| `wizard` | `w` | Downloads the manifest file. | `olares-cli download wizard` | +| `check` | | Checks the status of the beOS Pro installation package. | `beos-cli download check` | +| `component` | `c` | Downloads beOS Pro components. | `beos-cli download component` | +| `wizard` | `w` | Downloads the manifest file. | `beos-cli download wizard` | ## Options @@ -23,24 +23,24 @@ olares-cli download [option] | `--download-cdn-url`| | Sets the CDN accelerated download URL in the format `https://example.cdn.com`. | No | System default URL | | `--help` | `-h` | Displays help information. | No | N/A | | `--kube` | | Specifies the Kubernetes type.
Supported types are `k3s` and `k8s`. | No | `k3s` | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`). Defaults to the current version.
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`). Defaults to the current version.
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | ## Examples ```bash # Specifies the base directory where all downloaded components will be stored. -olares-cli download component -b /custom/path +beos-cli download component -b /custom/path # Specifies a CDN-accelerated URL for downloading beOS Pro components. -olares-cli download component --download-cdn-url https://my.cdn.com +beos-cli download component --download-cdn-url https://my.cdn.com # Specifies the Kubernetes type for the installation. -olares-cli download component --kube k8s +beos-cli download component --kube k8s # Sets the path to the package manifest file. -olares-cli download component --manifest /custom/path/manifest.json +beos-cli download component --manifest /custom/path/manifest.json # Specifies the version of beOS Pro packages and components to download. -olares-cli download component -v 1.11.0 +beos-cli download component -v 1.11.0 ``` diff --git a/docs/developer/install/cli/gpu.md b/docs/developer/install/cli/gpu.md index 0c3a26a1e..78c27142d 100644 --- a/docs/developer/install/cli/gpu.md +++ b/docs/developer/install/cli/gpu.md @@ -5,7 +5,7 @@ The `gpu` command manages GPU-related operations, including installing, enabling, disabling, and uninstalling GPU drivers and related components, as well as checking the GPU status. ```bash -olares-cli gpu [options] +beos-cli gpu [options] ``` :::info @@ -29,26 +29,26 @@ olares-cli gpu [options] | Option | Shorthand | Usage | Required | Default | |------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|--------------------------------| | `--base-dir`| `-b` | Specifies the base installation directory for the GPU components. | No | `$HOME/.olares` | -| `--version`| `-v` | Specifies the beOS Pro version for GPU drivers and components.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | +| `--version`| `-v` | Specifies the beOS Pro version for GPU drivers and components.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | | `--help` | `-h` | Displays help information. | No | N/A | ## Examples ```bash # Install GPU drivers and dependencies to a specific directory -olares-cli gpu install --base-dir /home/olares/.olares --version 1.11.1-rc.4 +beos-cli gpu install --base-dir /home/olares/.olares --version 1.11.1-rc.4 # Enable GPU functionality -olares-cli gpu enable +beos-cli gpu enable # View the status of GPU drivers and services -olares-cli gpu status +beos-cli gpu status # Disable GPU functionality -olares-cli gpu disable +beos-cli gpu disable # Uninstall GPU drivers and components -olares-cli gpu uninstall +beos-cli gpu uninstall ``` diff --git a/docs/developer/install/cli/info.md b/docs/developer/install/cli/info.md index 6089a6270..88edbb4cd 100644 --- a/docs/developer/install/cli/info.md +++ b/docs/developer/install/cli/info.md @@ -4,7 +4,7 @@ The `info` command displays general information about the installed beOS Pro version. ```bash -olares-cli info +beos-cli info ``` ## Options diff --git a/docs/developer/install/cli/install.md b/docs/developer/install/cli/install.md index 10ab9716e..592f5dcc9 100644 --- a/docs/developer/install/cli/install.md +++ b/docs/developer/install/cli/install.md @@ -4,7 +4,7 @@ The `install` command installs beOS Pro on your system. It supports various options to customize the installation process, such as specifying directories, Kubernetes types, or Minikube profiles. ```bash -olares-cli install [option] +beos-cli install [option] ``` ## Options @@ -15,4 +15,4 @@ olares-cli install [option] | `--help` | `-h` | Displays help information. | No | N/A | | `--kube` | | Specifies the Kubernetes type.
Supported types are `k3s` and `k8s`. | No | `k3s` | | `--profile`| `-p` | Sets the Minikube profile name. Only applicable on macOS. | No | `olares-0` | -| `--version`| `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Version installed in the `prepare` phase | \ No newline at end of file +| `--version`| `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Version installed in the `prepare` phase | \ No newline at end of file diff --git a/docs/developer/install/cli/logs.md b/docs/developer/install/cli/logs.md index 1fff8d0e8..2a276e17e 100644 --- a/docs/developer/install/cli/logs.md +++ b/docs/developer/install/cli/logs.md @@ -9,19 +9,19 @@ The `logs` command retrieves logs from beOS Pro components and services found on * Redis logs * MinIO logs * etcd logs -* olaresd logs +* beosd logs * Kubernetes pod info and logs * Kubernetes node info ```bash -olares-cli logs [option] +beos-cli logs [option] ``` ## Options | Option | Shorthand | Usage | Required | Default | |------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|--------------------------------| -| `--components` | | Collects logs from specific components (comma-separated).
Supported values: `k3s`, `containerd`, `olaresd`, `kubelet`, `juicefs`, `redis`, `minio`, `etcd`, `NetworkManager`. | No | All detectable components | +| `--components` | | Collects logs from specific components (comma-separated).
Supported values: `k3s`, `containerd`, `beosd`, `kubelet`, `juicefs`, `redis`, `minio`, `etcd`, `NetworkManager`. | No | All detectable components | | `--help` | `-h` | Displays help information. | No | N/A | | `--ignore-kube-errors` | | Ignores errors from `kubectl` commands (e.g., when Kubernetes API is unreachable) and continues collecting logs. | No | `false` | | `--max-lines` | | Limits the maximum number of lines for each component's logs to prevent large log files. | No | `3000` | @@ -31,11 +31,11 @@ olares-cli logs [option] ## Examples ```bash # Collect all logs with default settings -olares-cli logs +beos-cli logs # Collect logs for specific components -olares-cli logs --components k3s,redis,minio +beos-cli logs --components k3s,redis,minio # Collect logs for the last 3 hours only -olares-cli logs --since 3h +beos-cli logs --since 3h ``` \ No newline at end of file diff --git a/docs/developer/install/cli/node.md b/docs/developer/install/cli/node.md index 1d16d5560..b5d68d71d 100644 --- a/docs/developer/install/cli/node.md +++ b/docs/developer/install/cli/node.md @@ -5,7 +5,7 @@ The `node` command manages node-related operations. ```bash -olares-cli node [options] +beos-cli node [options] ``` ## Subcommands @@ -26,26 +26,26 @@ olares-cli node [options] | `--master-ssh-password` | | Provides the password for the Linux user. | Yes if a non-root `master-ssh-user` is specified. | N/A | | `--master-ssh-private-key-path` | | Specifies the path to the private SSH key for authenticating as the Linux user. | No | `/root/.ssh/id_rsa` | | `--master-ssh-port` | | Sets the SSH service's listening port on the master node. | No | `22` | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | | `--help` | `-h` | Displays help information. | No | N/A | | ## Examples ```bash # Retrieve system information from a master node at IP 192.168.1.15 -olares-cli node masterinfo --master-host 192.168.1.15 +beos-cli node masterinfo --master-host 192.168.1.15 # If a specific SSH key is required for authentication -olares-cli node masterinfo --master-host 192.168.1.15 --master-ssh-private-key-path /home/olares/.ssh/id_rsa +beos-cli node masterinfo --master-host 192.168.1.15 --master-ssh-private-key-path /home/olares/.ssh/id_rsa # For non-root SSH users, specify the username and password -olares-cli node masterinfo --master-host 192.168.1.15 --master-ssh-user olares --master-ssh-password password123 +beos-cli node masterinfo --master-host 192.168.1.15 --master-ssh-user olares --master-ssh-password password123 # Add the current node to a cluster with the master node at IP 192.168.1.15 -olares-cli node add --master-host 192.168.1.15 +beos-cli node add --master-host 192.168.1.15 # Specify a custom base directory for the installation -olares-cli node add --base-dir /custom/path --master-host 192.168.1.15 +beos-cli node add --base-dir /custom/path --master-host 192.168.1.15 ``` diff --git a/docs/developer/install/cli/olares-cli.md b/docs/developer/install/cli/olares-cli.md deleted file mode 100644 index 5646b9297..000000000 --- a/docs/developer/install/cli/olares-cli.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -outline: [2, 3] ---- -# beOS Pro CLI - -:::warning Note -Use this version of beOS Pro CLI if your beOS Pro version is 1.12.X. -::: - -The beOS Pro CLI is a versatile command-line tool designed to help developers and system administrators manage and troubleshoot beOS Pro systems. It offers a wide range of features, from installation and configuration to resource management and diagnostics. - -With the beOS Pro CLI, you can streamline tasks such as verifying system compatibility, downloading resources, managing nodes, collecting logs, and more. This guide provides an overview of the CLI's syntax and details the commands available for different operations. - -:::info Root privileges required -Most `olares-cli` commands require root privileges. Use the root user or prepend commands with `sudo`. -::: - -:::info Using beOS Pro CLI with WSL -If you installed beOS Pro using the WSL (Windows Subsystem for Linux) method, you need to use `olares-cli` inside the WSL environment. - -To enter the WSL environment, run the following command in PowerShell: - -```powershell -wsl -d Ubuntu -``` -::: - -## Syntax -The beOS Pro CLI uses the following syntax: - -> `olares-cli command [subcommand] [argument] [options] ` - -where -- `command`: Specifies the main operation you want to perform. For example, `olares-cli install`. -- `subcommand`: Further specifies the task for commands that support additional operations. For example, `wizard` or `component`. -- `argument`: Specifies the target resource or input data for the command, typically an ID, name, or file path. For example, in `olares-cli user activate [options]`, `` is the argument. -- `options`: Optional arguments that modify the behavior of the `command`. Options include flags and options with arguments. - -beOS Pro CLI allows you to temporarily override certain beOS Pro default settings. Each option applies only to the command in which it is used. - -For example, if you use the `--base-dir` option with `olares-cli download wizard`, it will only affect the wizard downloading process and will not change the base directory for other commands, such as during the "install" phase. - -To get detailed help for any command, run `olares-cli help`. - -## Available CLI commands - -| Operation | Syntax | Description | -|--|--|--| -| `backups` | `olares-cli backups [options]` | Manages backup-related operations. | -| `change-ip` | `olares-cli change-ip [options]` | Changes the IP address of the beOS Pro. | -| `disk` | `olares-cli disk ` | Manages storage resources in the beOS Pro system. | -| `download` | `olares-cli download [options]` | Downloads specific resources. | -| `gpu` | `olares-cli gpu [options]` | Manages GPU-related operations. | -| `info` | `olares-cli info [options]` | Displays general information about the downloaded beOS Pro. | -| `install` | `olares-cli install [options]` | Deploys system-level and user-level components of beOS Pro. | -| `logs` | `olares-cli logs [options]` | Collects logs from beOS Pro system components for debugging and troubleshooting. | -| `node` | `olares-cli node [options]` | Manages node-related operations. | -| `osinfo` | `olares-cli osinfo [options]` | Displays general information about the operating system of the current device. | -| `precheck` | `olares-cli precheck [options]` | Verifies whether the system environment meets all requirements for beOS Pro installation. | -| `prepare` | `olares-cli prepare [options]` | Prepares the environment for the installation process, including setting up essential services and configurations of beOS Pro. | -| `release` | `olares-cli release [options]` | Packages beOS Pro installation resources for distribution or deployment. | -| `start` | `olares-cli start [options]` | Starts beOS Pro services and components. | -| `stop` | `olares-cli stop [options]` | Stops beOS Pro services and components. | -| `uninstall` | `olares-cli uninstall [options]` | Uninstalls beOS Pro completely, or roll back the installation to a specific phase. | -| `upgrade` | `olares-cli upgrade [options]` | Upgrades beOS Pro and checks upgrade readiness and compatibility.| -| `user` | `olares-cli user [options]`| Manages users in the beOS Pro system | \ No newline at end of file diff --git a/docs/developer/install/cli/osinfo.md b/docs/developer/install/cli/osinfo.md index e4fedc781..a15a82823 100644 --- a/docs/developer/install/cli/osinfo.md +++ b/docs/developer/install/cli/osinfo.md @@ -5,7 +5,7 @@ The `osinfo` command provides detailed information about the operating system of the current device. Specifically, it retrieves and displays metadata such as `OS_TYPE`, `OS_PLATFORM`, `OS_ARCH`, `OS_VERSION`, `OS_KERNEL`, and `OS_INFO`. ```bash -olares-cli osinfo [options] +beos-cli osinfo [options] ``` ## Subcommands diff --git a/docs/developer/install/cli/precheck.md b/docs/developer/install/cli/precheck.md index f411e22e3..2bdf7c119 100644 --- a/docs/developer/install/cli/precheck.md +++ b/docs/developer/install/cli/precheck.md @@ -4,7 +4,7 @@ The `precheck` command verifies whether the system environment satisfies all prerequisites required for beOS Pro installation. ```bash -olares-cli precheck [option] +beos-cli precheck [option] ``` ## Options @@ -13,4 +13,4 @@ olares-cli precheck [option] |------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|-----------------------------------| | `--base-dir`| `-b` | Sets the base directory for beOS Pro. | No | `$HOME/.olares` | | `--help` | `-h` | Displays help information. | No | N/A | -| `--version`| `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | \ No newline at end of file +| `--version`| `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | \ No newline at end of file diff --git a/docs/developer/install/cli/prepare.md b/docs/developer/install/cli/prepare.md index 02f64faa0..055071195 100644 --- a/docs/developer/install/cli/prepare.md +++ b/docs/developer/install/cli/prepare.md @@ -1,9 +1,9 @@ # `prepare` ## Synopsis -The `prepare` command sets up the environment required for beOS Pro to function. This includes installing dependencies, importing container images, and starting the beOS Pro daemon (`olaresd`). +The `prepare` command sets up the environment required for beOS Pro to function. This includes installing dependencies, importing container images, and starting the beOS Pro daemon (`beosd`). ```bash -olares-cli prepare [option] +beos-cli prepare [option] ``` ## Options @@ -15,11 +15,11 @@ olares-cli prepare [option] | `--profile` | `-p` | Sets the Minikube profile name. Only applicable on macOS. | No | `olares-0` | | `--registry-mirrors`| `-r` | Specifies Docker container registry mirrors.
Multiple mirrors should be separated by commas. | No | N/A | | `--with-juicefs` | | Configures JuiceFS as the root filesystem (rootfs) for beOS Pro workloads instead of the local disk. | No | N/A | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | ## Examples ```bash # Uses JuiceFS as the root filesystem -olares-cli prepare --with-juicefs=true +beos-cli prepare --with-juicefs=true ``` \ No newline at end of file diff --git a/docs/developer/install/cli/release.md b/docs/developer/install/cli/release.md index f1ff104ae..dce3e5f58 100644 --- a/docs/developer/install/cli/release.md +++ b/docs/developer/install/cli/release.md @@ -4,7 +4,7 @@ Build a release version based on a local beOS Pro repository. This command should be run in the root directory of the beOS Pro repository. ```bash -olares-cli release [option] +beos-cli release [option] ``` ## Options @@ -16,4 +16,4 @@ olares-cli release [option] | `--extract` | `-e` | Extracts the release to the `--base-dir` after the build. Set to `false` if only the release file itself is needed. | No | `true` | | `--help` | `-h` | Displays help information. | No | N/A | | `--ignore-missing-images` | | Ignores missing images when downloading checksums from the CDN.
Disable this only if no new images are added, as the build may fail if the image is not uploaded to the CDN yet. | No | `true` | -| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beOS Pro/releases) for available versions. | No | Current version | \ No newline at end of file +| `--version` | `-v` | Specifies the beOS Pro version.
Version values follow the format `x.y.z` (e.g., `1.10.0`) or include a build date (e.g., `1.10.0-20241109`).
Refer to the [GitHub Releases page](https://github.com/beclab/beos/releases) for available versions. | No | Current version | \ No newline at end of file diff --git a/docs/developer/install/cli/start.md b/docs/developer/install/cli/start.md index d0c1624c8..efc5dd667 100644 --- a/docs/developer/install/cli/start.md +++ b/docs/developer/install/cli/start.md @@ -5,7 +5,7 @@ The `start` command is used to start the beOS Pro system, including its componen ```bash -olares-cli start [option] +beos-cli start [option] ``` :::tip NOTE diff --git a/docs/developer/install/cli/stop.md b/docs/developer/install/cli/stop.md index 5a57df6b1..c7944f17c 100644 --- a/docs/developer/install/cli/stop.md +++ b/docs/developer/install/cli/stop.md @@ -4,7 +4,7 @@ The `stop` command is used to stop the components of an installed (or partially installed) beOS Pro system. ```bash -olares-cli stop [option] +beos-cli stop [option] ``` ## Options @@ -18,11 +18,11 @@ olares-cli stop [option] ## Examples ```bash # Stop the beOS Pro system -olares-cli stop +beos-cli stop # Adjust the timeout for shutdown -olares-cli stop --timeout 2m +beos-cli stop --timeout 2m # Specify a custom check interval -olares-cli stop --check-interval 5s +beos-cli stop --check-interval 5s ``` \ No newline at end of file diff --git a/docs/developer/install/cli/uninstall.md b/docs/developer/install/cli/uninstall.md index 0cfd936e4..0cbb85a50 100644 --- a/docs/developer/install/cli/uninstall.md +++ b/docs/developer/install/cli/uninstall.md @@ -4,7 +4,7 @@ Uninstall beOS Pro from your machine. ```bash -olares-cli uninstall [option] +beos-cli uninstall [option] ``` ## Options @@ -16,4 +16,4 @@ olares-cli uninstall [option] | `--help` | `-h` | Displays help information. | No | Not applicable | | `--phase` | | Uninstalls beOS Pro from a specific phase and revert to the previous one.
For example, `--phase install` removes tasks performed during the "install" phase, reverting the system to the "prepare" stage. | No | `install` | | `--quiet` | | Enables quiet mode (suppress output). | No | `false` | -| `--version` | `-v` | Specifies the beOS Pro version to uninstall.
Use `olares-cli info` to check the downloaded version first. | No | Current version | \ No newline at end of file +| `--version` | `-v` | Specifies the beOS Pro version to uninstall.
Use `beos-cli info` to check the downloaded version first. | No | Current version | \ No newline at end of file diff --git a/docs/developer/install/cli/upgrade.md b/docs/developer/install/cli/upgrade.md index fec2812e8..45f4f07a9 100644 --- a/docs/developer/install/cli/upgrade.md +++ b/docs/developer/install/cli/upgrade.md @@ -5,7 +5,7 @@ The `upgrade` command provides a set of tools for upgrading beOS Pro and checking upgrade readiness and compatibility. ```bash -olares-cli upgrade [options] +beos-cli upgrade [options] ``` ## Subcommands @@ -40,14 +40,14 @@ The `-b` shorthand is used by the parent command for `--base-dir`. However, when ```bash # Check whether the current system can be upgraded directly -olares-cli upgrade viable +beos-cli upgrade viable # Check upgrade viability from a specific base version -olares-cli upgrade viable --base 1.9.0 +beos-cli upgrade viable --base 1.9.0 # Run pre-upgrade checks -olares-cli upgrade precheck +beos-cli upgrade precheck # View the upgrade spec of the current CLI -olares-cli upgrade spec +beos-cli upgrade spec ``` \ No newline at end of file diff --git a/docs/developer/install/cli/user-activate.md b/docs/developer/install/cli/user-activate.md index fe618bf4d..7259da5fd 100644 --- a/docs/developer/install/cli/user-activate.md +++ b/docs/developer/install/cli/user-activate.md @@ -6,7 +6,7 @@ The `activate` subcommand activates an existing beOS Pro account. It requires th ```bash -olares-cli user activate [options] +beos-cli user activate [options] ``` ## Arguments @@ -34,11 +34,11 @@ olares-cli user activate [options] ```bash # Activate an beOS Pro user account -olares-cli user activate alic123e@beos.local -p "HerPassWord" --mnemonic "apple banana cherry door eagle forest grape house island jacket kite lemon" +beos-cli user activate alic123e@beos.local -p "HerPassWord" --mnemonic "apple banana cherry door eagle forest grape house island jacket kite lemon" # Activate an beOS Pro user account with tunnel mode enabled -olares-cli user activate david456@beos.local -p "HisPassWord" --enable-tunnel --host "frp-gateway.beos.local" --jws "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo.signature" --bfl http://127.0.0.1:30180 --vault http://127.0.0.1:30180/server --mnemonic "apple banana cherry door eagle forest grape house island jacket kite lemon" +beos-cli user activate david456@beos.local -p "HisPassWord" --enable-tunnel --host "frp-gateway.beos.local" --jws "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo.signature" --bfl http://127.0.0.1:30180 --vault http://127.0.0.1:30180/server --mnemonic "apple banana cherry door eagle forest grape house island jacket kite lemon" # Activate an beOS Pro user account with specific language and timezone settings -olares-cli user activate carol789@beos.local -p "AnotherPassWord" --mnemonic "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu" --language "en-US" --location "America/New_York" +beos-cli user activate carol789@beos.local -p "AnotherPassWord" --mnemonic "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu" --language "en-US" --location "America/New_York" ``` \ No newline at end of file diff --git a/docs/developer/install/cli/user-create.md b/docs/developer/install/cli/user-create.md index 6b6cb1a5e..b5b4635f1 100644 --- a/docs/developer/install/cli/user-create.md +++ b/docs/developer/install/cli/user-create.md @@ -7,7 +7,7 @@ The `create` subcommand creates a new user account in the beOS Pro system. It al **Aliases**: `create`, `add`, `new` ```bash -olares-cli user create [options] +beos-cli user create [options] ``` ## Arguments @@ -33,14 +33,14 @@ olares-cli user create [options] ```bash # Create a basic user with default settings -olares-cli user create alice123 +beos-cli user create alice123 # Create a user with a specified password and role -olares-cli user create blake123 -p "StrongPassword123" -r admin +beos-cli user create blake123 -p "StrongPassword123" -r admin # Create a user with custom resource limits (2 CPU cores, 4 GB memory) -olares-cli user create carol123 --cpu-limit 2 --memory-limit 4G +beos-cli user create carol123 --cpu-limit 2 --memory-limit 4G # Create a user with display name and description -olares-cli user create david123 --display-name "David Smith" --description "Data platform administrator" +beos-cli user create david123 --display-name "David Smith" --description "Data platform administrator" ``` \ No newline at end of file diff --git a/docs/developer/install/cli/user-delete.md b/docs/developer/install/cli/user-delete.md index 5f861c7bd..3f77f5bab 100644 --- a/docs/developer/install/cli/user-delete.md +++ b/docs/developer/install/cli/user-delete.md @@ -7,7 +7,7 @@ The `delete` subcommand permanently removes an existing user account from the be **Aliases**: `delete`, `d`, `del`, `rm`, `remove` ```bash -olares-cli user delete [options] +beos-cli user delete [options] ``` ## Arguments @@ -26,5 +26,5 @@ olares-cli user delete [options] ```bash # Delete a user named alice123 -olares-cli user delete alice123 +beos-cli user delete alice123 ``` \ No newline at end of file diff --git a/docs/developer/install/cli/user-get.md b/docs/developer/install/cli/user-get.md index dcca2f613..8370df2f7 100644 --- a/docs/developer/install/cli/user-get.md +++ b/docs/developer/install/cli/user-get.md @@ -5,7 +5,7 @@ The `get` subcommand retrieves detailed information about a specific beOS Pro user account. The output can be formatted as a table or JSON. ```bash -olares-cli user get [options] +beos-cli user get [options] ``` ## Arguments @@ -26,8 +26,8 @@ olares-cli user get [options] ```bash # Get details for user named alice123 in default table format -olares-cli user get alice123 +beos-cli user get alice123 # Get details for user named blake123 in JSON format -olares-cli user get blake123 -o json +beos-cli user get blake123 -o json ``` \ No newline at end of file diff --git a/docs/developer/install/cli/user-list.md b/docs/developer/install/cli/user-list.md index 02a739245..e1407e92a 100644 --- a/docs/developer/install/cli/user-list.md +++ b/docs/developer/install/cli/user-list.md @@ -7,7 +7,7 @@ The `list` subcommand displays a list of all registered users in the beOS Pro sy **Aliases**: `list`, `ls`, `l` ```bash -olares-cli user list [options] +beos-cli user list [options] ``` ## Options @@ -24,11 +24,11 @@ olares-cli user list [options] ```bash # List all users in a table format -olares-cli user list +beos-cli user list # List all users in JSON format -olares-cli user list -o json +beos-cli user list -o json # List users sorted by role -olares-cli user list --sort role +beos-cli user list --sort role ``` \ No newline at end of file diff --git a/docs/developer/install/cli/user-reset-password.md b/docs/developer/install/cli/user-reset-password.md index 479a3084e..f54474d7e 100644 --- a/docs/developer/install/cli/user-reset-password.md +++ b/docs/developer/install/cli/user-reset-password.md @@ -5,7 +5,7 @@ The `reset-password` subcommand forcefully resets the login password for a specific user via the authentication provider. ```bash -olares-cli user reset-password [options] +beos-cli user reset-password [options] ``` ## Arguments @@ -25,5 +25,5 @@ olares-cli user reset-password [options] ```bash # Reset password for user named alice123 -olares-cli user reset-password alice123 -p "NewSecurePassword456!" +beos-cli user reset-password alice123 -p "NewSecurePassword456!" ``` \ No newline at end of file diff --git a/docs/developer/install/environment-variables.md b/docs/developer/install/environment-variables.md index 9124a49e4..ceccfac1a 100644 --- a/docs/developer/install/environment-variables.md +++ b/docs/developer/install/environment-variables.md @@ -13,7 +13,7 @@ To customize the installation process, you can set the environment variables bef ```bash # Specify Kubernetes (k8s) instead of k3s export KUBE_TYPE=k8s \ -&& curl -sSfL https://olares.sh | bash - +&& curl -sSfL https://beos.sh | bash - ``` Or, if you have already downloaded the installation script `install.sh`: diff --git a/docs/developer/install/index.md b/docs/developer/install/index.md index 11df3e3bd..c66c844b2 100644 --- a/docs/developer/install/index.md +++ b/docs/developer/install/index.md @@ -7,7 +7,7 @@ This section provides in-depth information, command references, and instructions - [beOS Pro installation overview](installation-process.md): Learn how beOS Pro is installed from the perspectives of overall architecture and core components. - [beOS Pro installation breakdown](installation-process.md): Explore the beOS Pro installation process in detail, broken down into four key phases. -- [beOS Pro Home introduction](olares-home.md): Understand the structure of the base installation directory. +- [beOS Pro Home introduction](beos-home.md): Understand the structure of the base installation directory. - [beOS Pro environment variables reference](environment-variables.md): Find the right environment variables for you to customize the installation. -- [beOS Pro CLI reference](cli/olares-cli.md): Uses the beOS Pro CLI for advanced customization and troubleshooting during installation. +- [beOS Pro CLI reference](cli/beos-cli.md): Uses the beOS Pro CLI for advanced customization and troubleshooting during installation. - [beOS Pro versioning](versioning.md): Learn versioning rules, release types, branch management practices, and upgrade guidelines of beOS Pro. \ No newline at end of file diff --git a/docs/developer/install/installation-overview.md b/docs/developer/install/installation-overview.md index 96913bc91..c834f625e 100644 --- a/docs/developer/install/installation-overview.md +++ b/docs/developer/install/installation-overview.md @@ -13,7 +13,7 @@ The beOS Pro installation is structured into three key layers: - **Container orchestration layer**: Deploys the Kubernetes cluster to enable automated service management and scaling. - **Containerization layer**: Launches containerized core system services and user applications, providing the final runtime environment. -The installation process is managed by the `olares-cli` tool. This command-line tool orchestrates the installation, configuration, and lifecycle management of all components. +The installation process is managed by the `beos-cli` tool. This command-line tool orchestrates the installation, configuration, and lifecycle management of all components. ![Install arch](/images/developer/install/olares-install.png) @@ -41,7 +41,7 @@ The root file system (rootfs) is used to store and access system core components - **JuiceFS**: Provides a distributed file system for multi-node cluster. File data are stored in locally installed MinIO instances or remote storage buckets such as Amazon S3. This setup allows different storage nodes to share a unified storage view. :::tip Enable JuiceFS - JuiceFS and MinIO are not installed by default. To enable them, set the necessary [environment variables](environment-variables.md#juicefs) or use `olares-cli` with JuiceFS-specific flags. + JuiceFS and MinIO are not installed by default. To enable them, set the necessary [environment variables](environment-variables.md#juicefs) or use `beos-cli` with JuiceFS-specific flags. ::: ### Container runtime: containerd @@ -56,13 +56,13 @@ beOS Pro uses containerd, a lightweight container runtime, for containerized dep If containerd is already installed on your machine (for example, as part of Docker), it may cause compatibility issues with the containerd used by beOS Pro. Please uninstall the existing containerd before installing beOS Pro. ::: -### System daemon: olaresd -olaresd is the system daemon that runs in the background, providing essential management functionalities such as: +### System daemon: beosd +beosd is the system daemon that runs in the background, providing essential management functionalities such as: - **Automated configuration updates**: Automatically adjusts configurations when system changes (e.g. IP changes) are detected. -- **Remote system management**: Executes remote system operations, such as beOS Pro installation and activation, based on requests issued from the beOS Pro app client or `olares-cli`. +- **Remote system management**: Executes remote system operations, such as beOS Pro installation and activation, based on requests issued from the beOS Pro app client or `beos-cli`. ### CUDA support -To enable GPU acceleration for local AI models and applications, beOS Pro supports automatic installation of the CUDA toolkit and drivers through [`olares-cli`](./cli/gpu.md). +To enable GPU acceleration for local AI models and applications, beOS Pro supports automatic installation of the CUDA toolkit and drivers through [`beos-cli`](./cli/gpu.md). ## Container orchestration layer The container orchestration layer integrates system components into an efficient runtime environment using Kubernetes. @@ -91,6 +91,6 @@ Once beOS Pro is installed and activated, you can view the running containers th ## Learn more - [beOS Pro installation breakdown](installation-process.md) -- [beOS Pro Home](olares-home.md) -- [beOS Pro CLI](../install/cli/olares-cli.md) -- [beOS Pro environment variables](environment-variables.md) \ No newline at end of file +- [beOS Pro Home](beos-home.md) +- [beOS Pro CLI](../install/cli/beos-cli.md) +- [beOS Pro environment variables](environment-variables.md) diff --git a/docs/developer/install/installation-process.md b/docs/developer/install/installation-process.md index 2aea5a5fc..97601ca29 100644 --- a/docs/developer/install/installation-process.md +++ b/docs/developer/install/installation-process.md @@ -15,7 +15,7 @@ The beOS Pro installation process is divided into four phases, each ensuring a s ## Precheck phase -The precheck phase focuses on verifying that your system meets the necessary requirements for installing beOS Pro. The `olares-cli precheck` command is used to run a series of validation checks. Any issues identified during this phase must be resolved before continuing with the installation. +The precheck phase focuses on verifying that your system meets the necessary requirements for installing beOS Pro. The `beos-cli precheck` command is used to run a series of validation checks. Any issues identified during this phase must be resolved before continuing with the installation. Key checks include: - Checks the compatibility with the operating system type, version, and CPU architecture @@ -53,7 +53,7 @@ where: ```bash ➜ ~ ./install.sh the KUBE_TYPE env var is not set, defaulting to "k3s" -olares-cli already installed and is the expected version +beos-cli already installed and is the expected version downloading installation wizard... @@ -88,7 +88,7 @@ Greetings, beOS Pro 2024-12-17T19:41:36.879+0800 [Module] PackageDownloadModule 2024-12-17T19:41:36.879+0800 checking local cache ... 2024-12-17T19:41:44.614+0800 5 out of 177 files need to be downloaded -2024-12-17T19:41:44.615+0800 (1/5) downloading package olaresd, file: olaresd-v0.0.50.tar.gz +2024-12-17T19:41:44.615+0800 (1/5) downloading package beosd, file: beosd-v0.0.50.tar.gz 2024-12-17T19:41:51.814+0800 (2/5) downloading image calico/kube-controllers:v3.23.2, file: 521564c4b60ae73c78899b7b40ae655e.tar.gz ... ``` @@ -154,20 +154,20 @@ The container runtime is a critical component for running containerized applicat ``` ::: ### Install system daemon -The beOS Pro system daemon, olaresd, is then installed and started to monitor the system and automatically perform maintenance tasks. +The beOS Pro system daemon, beosd, is then installed and started to monitor the system and automatically perform maintenance tasks. :::details Example script output ```bash -024-12-17T19:52:31.862+0800 [A] ubuntu: GeneratebeOS ProdEnv success (23.829684ms) -2024-12-17T19:52:31.862+0800 template beOS ProdService result: [Unit] -Description=olaresd +024-12-17T19:52:31.862+0800 [A] ubuntu: GenerateBeOSdEnv success (23.829684ms) +2024-12-17T19:52:31.862+0800 template BeOSdService result: [Unit] +Description=beOSd After=network.target StartLimitIntervalSec=0 [Service] User=root -EnvironmentFile=/etc/systemd/system/olaresd.service.env -ExecStart=/usr/local/bin/olaresd +EnvironmentFile=/etc/systemd/system/beosd.service.env +ExecStart=/usr/local/bin/beosd RestartSec=10s LimitNOFILE=40000 Restart=always @@ -325,4 +325,4 @@ After activation, your beOS Pro will be fully operational and ready to use. ## Learn more - [beOS Pro installation overview](installation-overview.md) -- [beOS Pro environment variables](environment-variables.md) \ No newline at end of file +- [beOS Pro environment variables](environment-variables.md) diff --git a/docs/developer/install/reusables.md b/docs/developer/install/reusables.md index 224db1dd0..b00659bc2 100644 --- a/docs/developer/install/reusables.md +++ b/docs/developer/install/reusables.md @@ -3,7 +3,7 @@ search: false --- ```bash -curl -fsSL https://olares.sh | bash - +curl -fsSL https://beos.sh | bash - ``` :::tip Root user password @@ -14,7 +14,7 @@ During the installation, you may be prompted to enter your root password. If an error occurs during installation, use the following command to uninstall first: ```bash -olares-cli uninstall --all +beos-cli uninstall --all ``` diff --git a/docs/manual/best-practices/expand-storage-in-olares.md b/docs/manual/best-practices/expand-storage-in-olares.md index eb62e759e..6b47b8915 100644 --- a/docs/manual/best-practices/expand-storage-in-olares.md +++ b/docs/manual/best-practices/expand-storage-in-olares.md @@ -238,13 +238,13 @@ In this example, `sda` is the system drive which is mounted at `/` and `/boot`, 1. Verify that beOS Pro recognizes the unmounted disk: ```bash - olares-cli disk list-unmounted + beos-cli disk list-unmounted ``` 2. Add the disk to the system volume: ```bash - olares-cli disk extend + beos-cli disk extend ``` 3. Type `YES` to proceed when the command prompts for confirmation. diff --git a/docs/manual/best-practices/install-olares-multi-node.md b/docs/manual/best-practices/install-olares-multi-node.md index 555485dad..de5da5868 100644 --- a/docs/manual/best-practices/install-olares-multi-node.md +++ b/docs/manual/best-practices/install-olares-multi-node.md @@ -36,14 +36,14 @@ Before you begin, make sure the following requirements are met: ## Step 1: Set up the master node ::: tip Uninstall existing beOS Pro cluster -If you have already installed an beOS Pro cluster using the default installation command, uninstall it using `olares-cli uninstall --all` before you set up your master node. +If you have already installed an beOS Pro cluster using the default installation command, uninstall it using `beos-cli uninstall --all` before you set up your master node. ::: To set up the master node with the JuiceFS support, run the following command: ```bash export JUICEFS = 1 \ -&& curl -sSfL https://olares.sh | bash - +&& curl -sSfL https://beos.sh | bash - ``` This command installs beOS Pro with a built-in MinIO instance as the backend storage. The installation process is identical to a single-node one and will prompt you to enter the domain name, and provide username of your beOS ID. @@ -134,7 +134,7 @@ export MASTER_HOST=192.168.1.15 \ On the worker node, run the following: ```bash -olares-cli olares uninstall +beos-cli uninstall ``` ## Handle network changes @@ -143,12 +143,12 @@ Once your cluster is set up, changes in network configurations can disrupt the m ### If the network of master node changes -- **If the master node moves to a different LAN**: The beOS Pro system daemon (olaresd) will detect this and trigger a `changeip` event with `olares-cli`. The master node will continue working, but worker nodes will lose communication with it and stop functioning. +- **If the master node moves to a different LAN**: The beOS Pro system daemon (beosd) will detect this and trigger a `changeip` event with `beos-cli`. The master node will continue working, but worker nodes will lose communication with it and stop functioning. -- **If the master node's IP changes within the same LAN**: The worker nodes will still lose communication because they cannot detect the new IP automatically. To resolve this, use the `olares-cli` command on the worker nodes to update the master node's IP address and restart the dependent services: +- **If the master node's IP changes within the same LAN**: The worker nodes will still lose communication because they cannot detect the new IP automatically. To resolve this, use the `beos-cli` command on the worker nodes to update the master node's IP address and restart the dependent services: ```bash - sudo olares-cli olares change-ip -b /home/olares/.olares --new-master-host 192.168.1.18 + sudo beos-cli change-ip -b /home/olares/.olares --new-master-host 192.168.1.18 ``` where: @@ -160,13 +160,13 @@ Once your cluster is set up, changes in network configurations can disrupt the m - **If a worker node moves to a different LAN**: The worker node will lose communication with the master node and stop functioning. -- **If the worker node's IP changes within the same LAN**: olaresd will automatically report the new IP to the master node, and no manual intervention is required. +- **If the worker node's IP changes within the same LAN**: beosd will automatically report the new IP to the master node, and no manual intervention is required. ## Learn more - [beOS Pro system architecture](../../developer/concepts/system-architecture.md#distributed-file-system): Understand the distributed file system that underpins beOS Pro, ensuring scalability, high availability, and seamless data management. -- [The system daemon: olaresd](../../developer/install/installation-overview.md#system-daemon-olaresd): Learn about the central system process that orchestrates and manages core beOS Pro functions. +- [The system daemon: beosd](../../developer/install/installation-overview.md#system-daemon-beosd): Learn about the central system process that orchestrates and manages core beOS Pro functions. - [Data](../../developer/concepts/data.md#juicefs): Dive into how beOS Pro leverages JuiceFS to provide a unified file system for efficient data storage and retrieval. -- [beOS Pro CLI](../../developer/install/cli/olares-cli.md): Explore the command-line interface for managing beOS Pro installation. +- [beOS Pro CLI](../../developer/install/cli/beos-cli.md): Explore the command-line interface for managing beOS Pro installation. - [beOS Pro environment variables](../../developer/install/environment-variables.md): Learn about the environment variables that enable advanced configurations of beOS Pro. - [Install beOS Pro](../get-started/install-olares.md): Understand how to install and activate beOS Pro. diff --git a/docs/manual/best-practices/local-access.md b/docs/manual/best-practices/local-access.md index 71909691e..b6de7c37e 100644 --- a/docs/manual/best-practices/local-access.md +++ b/docs/manual/best-practices/local-access.md @@ -82,7 +82,7 @@ For a seamless experience where standard URLs resolve to your local IP address a ### Find the internal IP for beOS Pro device To configure DNS, first you need to find the internal IP for your beOS Pro device. -