From f2a6037503328b60c4c57a96cc522df7d7a9605a Mon Sep 17 00:00:00 2001 From: spaceoddity91719 Date: Mon, 12 Aug 2024 10:12:30 +0800 Subject: [PATCH] fix(ptk):PTK 2.0 EN --- .../en/docs-ptk/v2.0/appendix/yaml-grammar.md | 232 ++++ .../en/docs-ptk/v2.0/commands/ptk-cache.md | 99 ++ .../v2.0/commands/ptk-candidate-cpu.md | 86 ++ .../v2.0/commands/ptk-candidate-db.md | 86 ++ .../v2.0/commands/ptk-candidate-os.md | 101 ++ .../v2.0/commands/ptk-candidate-plugin.md | 101 ++ .../docs-ptk/v2.0/commands/ptk-candidate.md | 85 ++ .../en/docs-ptk/v2.0/commands/ptk-checkos.md | 169 +++ .../commands/ptk-cluster-add-kerberos-auth.md | 119 ++ .../v2.0/commands/ptk-cluster-build.md | 121 ++ .../commands/ptk-cluster-del-kerberos-auth.md | 107 ++ .../v2.0/commands/ptk-cluster-demote.md | 118 ++ .../v2.0/commands/ptk-cluster-failover.md | 108 ++ .../commands/ptk-cluster-gen-cert-files.md | 92 ++ .../v2.0/commands/ptk-cluster-inspect.md | 93 ++ .../v2.0/commands/ptk-cluster-install-cm.md | 160 +++ .../ptk-cluster-install-kerberos-server.md | 120 ++ .../commands/ptk-cluster-install-mogha.md | 155 +++ .../commands/ptk-cluster-install-plugin.md | 132 +++ .../commands/ptk-cluster-is-in-upgrade.md | 83 ++ .../v2.0/commands/ptk-cluster-list-plugins.md | 100 ++ .../v2.0/commands/ptk-cluster-load-cm-vip.md | 106 ++ .../commands/ptk-cluster-modify-comment.md | 101 ++ .../v2.0/commands/ptk-cluster-promote.md | 109 ++ .../v2.0/commands/ptk-cluster-refresh.md | 109 ++ .../v2.0/commands/ptk-cluster-rename.md | 103 ++ .../v2.0/commands/ptk-cluster-restart.md | 140 +++ .../v2.0/commands/ptk-cluster-scale-in.md | 140 +++ .../v2.0/commands/ptk-cluster-scale-out.md | 164 +++ .../v2.0/commands/ptk-cluster-set-guc.md | 113 ++ .../v2.0/commands/ptk-cluster-set-hba.md | 113 ++ .../v2.0/commands/ptk-cluster-shell.md | 119 ++ .../v2.0/commands/ptk-cluster-show-config.md | 93 ++ .../v2.0/commands/ptk-cluster-show-guc.md | 101 ++ .../v2.0/commands/ptk-cluster-show-hba.md | 112 ++ .../v2.0/commands/ptk-cluster-start.md | 140 +++ .../v2.0/commands/ptk-cluster-status.md | 133 +++ .../v2.0/commands/ptk-cluster-stop.md | 133 +++ .../v2.0/commands/ptk-cluster-switchover.md | 114 ++ .../v2.0/commands/ptk-cluster-takeover.md | 158 +++ .../v2.0/commands/ptk-cluster-throwout.md | 118 ++ .../v2.0/commands/ptk-cluster-uninstall-cm.md | 92 ++ .../ptk-cluster-uninstall-kerberos-server.md | 102 ++ .../commands/ptk-cluster-uninstall-mogha.md | 93 ++ .../commands/ptk-cluster-upgrade-commit.md | 93 ++ .../commands/ptk-cluster-upgrade-rollback.md | 113 ++ .../v2.0/commands/ptk-cluster-upgrade.md | 164 +++ .../en/docs-ptk/v2.0/commands/ptk-cluster.md | 128 +++ .../en/docs-ptk/v2.0/commands/ptk-collect.md | 101 ++ .../v2.0/commands/ptk-completion-bash.md | 111 ++ .../v2.0/commands/ptk-completion-fish.md | 101 ++ .../commands/ptk-completion-powershell.md | 95 ++ .../v2.0/commands/ptk-completion-zsh.md | 115 ++ .../docs-ptk/v2.0/commands/ptk-completion.md | 81 ++ product/en/docs-ptk/v2.0/commands/ptk-demo.md | 108 ++ .../en/docs-ptk/v2.0/commands/ptk-download.md | 129 +++ .../en/docs-ptk/v2.0/commands/ptk-encrypt.md | 108 ++ product/en/docs-ptk/v2.0/commands/ptk-env.md | 91 ++ product/en/docs-ptk/v2.0/commands/ptk-exec.md | 134 +++ .../docs-ptk/v2.0/commands/ptk-gen-om-xml.md | 111 ++ .../en/docs-ptk/v2.0/commands/ptk-gen-ptkc.md | 107 ++ .../v2.0/commands/ptk-gen-static-config.md | 101 ++ .../v2.0/commands/ptk-init-cluster.md | 94 ++ .../en/docs-ptk/v2.0/commands/ptk-install.md | 253 ++++ product/en/docs-ptk/v2.0/commands/ptk-ls.md | 95 ++ .../en/docs-ptk/v2.0/commands/ptk-manage.md | 107 ++ .../docs-ptk/v2.0/commands/ptk-meta-dump.md | 111 ++ .../docs-ptk/v2.0/commands/ptk-meta-home.md | 87 ++ .../docs-ptk/v2.0/commands/ptk-meta-merge.md | 95 ++ .../docs-ptk/v2.0/commands/ptk-meta-prune.md | 107 ++ product/en/docs-ptk/v2.0/commands/ptk-meta.md | 86 ++ .../en/docs-ptk/v2.0/commands/ptk-rec-guc.md | 99 ++ .../en/docs-ptk/v2.0/commands/ptk-register.md | 83 ++ .../v2.0/commands/ptk-self-upgrade.md | 109 ++ product/en/docs-ptk/v2.0/commands/ptk-self.md | 78 ++ .../v2.0/commands/ptk-template-create.md | 95 ++ .../v2.0/commands/ptk-template-mogha.md | 107 ++ .../v2.0/commands/ptk-template-scale-out.md | 96 ++ .../en/docs-ptk/v2.0/commands/ptk-template.md | 135 +++ .../docs-ptk/v2.0/commands/ptk-uninstall.md | 117 ++ .../en/docs-ptk/v2.0/commands/ptk-version.md | 77 ++ product/en/docs-ptk/v2.0/commands/ptk.md | 111 ++ product/en/docs-ptk/v2.0/debug.md | 336 ++++++ product/en/docs-ptk/v2.0/faq.md | 152 +++ .../en/docs-ptk/v2.0/guide/guide-checkos.md | 83 ++ .../en/docs-ptk/v2.0/guide/guide-collectos.md | 23 + .../v2.0/guide/guide-download-package.md | 40 + .../en/docs-ptk/v2.0/guide/guide-encrypt.md | 38 + .../v2.0/guide/guide-inject-metadata.md | 37 + .../v2.0/guide/guide-install-cluster.md | 171 +++ .../v2.0/guide/guide-prepare-config.md | 205 ++++ .../en/docs-ptk/v2.0/guide/guide-ptkc-tool.md | 84 ++ .../docs-ptk/v2.0/guide/guide-self-upgrade.md | 37 + .../v2.0/guide/guide-uninstall-cluster.md | 27 + .../manage-cluster/manage-cluster-build-db.md | 33 + .../manage-cluster/manage-cluster-failover.md | 25 + .../manage-cluster-init-empty-cluster.md | 51 + .../manage-cluster/manage-cluster-inspect.md | 17 + .../manage-cluster-install-cm.md | 37 + .../manage-cluster-install-mogha.md | 112 ++ .../manage-cluster-install-plugin.md | 102 ++ .../manage-cluster-list-clusters.md | 30 + .../manage-cluster-list-plugins.md | 67 ++ .../manage-cluster/manage-cluster-manage.md | 31 + .../manage-cluster-modify-comment.md | 17 + .../manage-cluster/manage-cluster-refresh.md | 33 + .../manage-cluster-rename-cluster.md | 34 + .../manage-cluster-restart-db.md | 41 + .../manage-cluster-role-change.md | 91 ++ .../manage-cluster/manage-cluster-scale-in.md | 113 ++ .../manage-cluster-scale-out.md | 128 +++ .../manage-cluster/manage-cluster-set-guc.md | 37 + .../manage-cluster/manage-cluster-set-hba.md | 47 + .../manage-cluster-show-config.md | 15 + .../manage-cluster/manage-cluster-show-guc.md | 23 + .../manage-cluster/manage-cluster-show-hba.md | 31 + .../manage-cluster/manage-cluster-start-db.md | 39 + .../manage-cluster/manage-cluster-status.md | 60 + .../manage-cluster/manage-cluster-stop-db.md | 41 + .../manage-cluster-switchover.md | 23 + .../manage-cluster/manage-cluster-takeover.md | 70 ++ .../manage-cluster/manage-cluster-throwout.md | 40 + .../manage-cluster-uninstall-cm.md | 15 + .../manage-cluster-uninstall-mogha.md | 15 + .../manage-cluster/manage-cluster-upgrade.md | 147 +++ .../manage-cluster/manage-cluster-vip.md | 57 + product/en/docs-ptk/v2.0/overview.md | 85 ++ .../en/docs-ptk/v2.0/quick-start/demo-db.md | 130 +++ .../en/docs-ptk/v2.0/quick-start/install.md | 51 + .../en/docs-ptk/v2.0/reference/ref-config.md | 1020 +++++++++++++++++ .../v2.0/reference/ref-environment.md | 34 + .../docs-ptk/v2.0/reference/ref-metadata.md | 24 + .../v2.0/reference/ref-recommend-guc.md | 141 +++ .../v2.0/reference/ref-support-mogdb.md | 35 + .../v2.0/release-notes/release-0xx.md | 150 +++ .../v2.0/release-notes/release-10x.md | 72 ++ .../v2.0/release-notes/release-11x.md | 59 + .../v2.0/release-notes/release-12x.md | 28 + .../v2.0/release-notes/release-13x.md | 71 ++ .../v2.0/release-notes/release-14x.md | 134 +++ .../v2.0/release-notes/release-15x.md | 68 ++ .../v2.0/release-notes/release-16x.md | 40 + .../v2.0/samples/samples-db-cluster.md | 83 ++ .../v2.0/samples/samples-double-ip.md | 43 + .../v2.0/samples/samples-dss-cluster.md | 40 + .../en/docs-ptk/v2.0/samples/samples-index.md | 17 + .../v2.0/samples/samples-local-single.md | 21 + .../v2.0/samples/samples-remote-single.md | 29 + product/en/docs-ptk/v2.0/toc.md | 135 +-- 149 files changed, 14604 insertions(+), 67 deletions(-) create mode 100644 product/en/docs-ptk/v2.0/appendix/yaml-grammar.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cache.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-candidate-cpu.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-candidate-db.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-candidate-os.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-candidate-plugin.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-candidate.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-checkos.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-add-kerberos-auth.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-build.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-del-kerberos-auth.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-demote.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-failover.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-gen-cert-files.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-inspect.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-install-cm.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-install-kerberos-server.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-install-mogha.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-install-plugin.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-is-in-upgrade.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-list-plugins.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-load-cm-vip.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-modify-comment.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-promote.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-refresh.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-rename.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-restart.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-in.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-out.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-set-guc.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-set-hba.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-shell.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-show-config.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-show-guc.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-show-hba.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-start.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-status.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-stop.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-switchover.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-takeover.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-throwout.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-cm.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-kerberos-server.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-mogha.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-commit.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-rollback.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-cluster.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-collect.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-completion-bash.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-completion-fish.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-completion-powershell.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-completion-zsh.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-completion.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-demo.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-download.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-encrypt.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-env.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-exec.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-gen-om-xml.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-gen-ptkc.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-gen-static-config.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-init-cluster.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-install.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-ls.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-manage.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-meta-dump.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-meta-home.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-meta-merge.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-meta-prune.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-meta.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-rec-guc.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-register.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-self-upgrade.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-self.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-template-create.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-template-mogha.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-template-scale-out.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-template.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-uninstall.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk-version.md create mode 100644 product/en/docs-ptk/v2.0/commands/ptk.md create mode 100644 product/en/docs-ptk/v2.0/debug.md create mode 100644 product/en/docs-ptk/v2.0/faq.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-checkos.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-collectos.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-download-package.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-encrypt.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-inject-metadata.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-install-cluster.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-prepare-config.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-ptkc-tool.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-self-upgrade.md create mode 100644 product/en/docs-ptk/v2.0/guide/guide-uninstall-cluster.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-build-db.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-failover.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-init-empty-cluster.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-inspect.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-cm.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-mogha.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-plugin.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-clusters.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-plugins.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-manage.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-modify-comment.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-refresh.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-rename-cluster.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-restart-db.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-role-change.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-in.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-out.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-guc.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-hba.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-config.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-guc.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-hba.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-start-db.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-status.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-stop-db.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-switchover.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-takeover.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-throwout.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-cm.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-mogha.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-upgrade.md create mode 100644 product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-vip.md create mode 100644 product/en/docs-ptk/v2.0/overview.md create mode 100644 product/en/docs-ptk/v2.0/quick-start/demo-db.md create mode 100644 product/en/docs-ptk/v2.0/quick-start/install.md create mode 100644 product/en/docs-ptk/v2.0/reference/ref-config.md create mode 100644 product/en/docs-ptk/v2.0/reference/ref-environment.md create mode 100644 product/en/docs-ptk/v2.0/reference/ref-metadata.md create mode 100644 product/en/docs-ptk/v2.0/reference/ref-recommend-guc.md create mode 100644 product/en/docs-ptk/v2.0/reference/ref-support-mogdb.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-0xx.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-10x.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-11x.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-12x.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-13x.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-14x.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-15x.md create mode 100644 product/en/docs-ptk/v2.0/release-notes/release-16x.md create mode 100644 product/en/docs-ptk/v2.0/samples/samples-db-cluster.md create mode 100644 product/en/docs-ptk/v2.0/samples/samples-double-ip.md create mode 100644 product/en/docs-ptk/v2.0/samples/samples-dss-cluster.md create mode 100644 product/en/docs-ptk/v2.0/samples/samples-index.md create mode 100644 product/en/docs-ptk/v2.0/samples/samples-local-single.md create mode 100644 product/en/docs-ptk/v2.0/samples/samples-remote-single.md diff --git a/product/en/docs-ptk/v2.0/appendix/yaml-grammar.md b/product/en/docs-ptk/v2.0/appendix/yaml-grammar.md new file mode 100644 index 00000000..5a359b72 --- /dev/null +++ b/product/en/docs-ptk/v2.0/appendix/yaml-grammar.md @@ -0,0 +1,232 @@ +--- +title: Appendix-YAML Syntax +summary: Appendix-YAML Syntax +author: Yao Qian +date: 2022-09-16 +--- + +# Appendix: YAML Syntax + +PTK uses the configuration file in the YAML format because YAML is simple in syntax, intuitive in data structure, and convenient in comment addition. + +> **Note**: Spaces are used to show the hierarchical structure in YAML. Therefore, during configuration editing, pay attention to indentation. + +This document describes the YAML syntax to help users understand the PTK configuration file format easily. + +## Scalar and Collection + +According to [YAML specification](https://yaml.org/spec/1.2/spec.html), there are two types of collections and multiple types of scalars. + +The two types of collections include map and sequence. + +```yaml +map: + one: 1 + two: 2 + three: 3 + +sequence: + - one + - two + - three +``` + +The scalar value is a single value (which is contrary to the collection). + +## Scalar Type in YAML + +An integer or floating-point number is usually considered numeric if it is not quoted. + +```yaml +count: 1 +size: 2.34 +``` + +If An integer or floating-point number is quoted, it is considered a string. + +```yaml +count: "1" # <-- string, not int +size: '2.34' # <-- string, not float +``` + +Boolean is the same. + +```yaml +isGood: true # bool +answer: "true" # string +``` + +An empty string is called `null` not `nil`. + +**Note**: `port: "80"` is legal. It is possible to pass values through the template engine and YAML interpreter, but if PTK expects the port to be an integer, it will fail. + +In some cases, YAML node tags can be used to force inference of a specific type. + +```yaml +coffee: "yes, please" +age: !!str 21 +port: !!int "80" +``` + +As shown above, the `!!str` tells the interpreter that `age` is a string, even though it looks like an integer. Even if `port` is enclosed in quotes, it is treated as an integer. + +## String in YAML + +The data type of most data in YAML is string. There are multiple string methods in YAML. This section describes these methods and introduces how to use some of the methods. + +The following shows three single-row methods to declare a string. + +```yaml +way1: bare words +way2: "double-quoted strings" +way3: 'single-quoted strings' +``` + +Single row indicates that all characters must be put in one line. + +- Bare words are not quoted and escaped. Therefore, use characters with caution. + +- A double-quoted string can have specified characters escaped with a backslash. For example, you can use `\n` to wrap lines for `"\"Hello\", she said"`. +- A single-quoted string is not escaped, and only the single quotes need to be escaped with `'`. + +Additionally, you can declare a multi-row string. + +```yaml +coffee: | + Latte + Cappuccino + Espresso +``` + +The above refers to the string value of `coffee`, which is equivalent to `Latte\nCappuccino\nEspresso\n`. + +The second line following `|` must be correctly indented. + +```yaml +coffee: | + Latte + Cappuccino + Espresso + +``` + +As shown in the above example, `Latte` is indented incorrectly. As a result, the following error is reported: + +```shell +Error parsing file: error converting YAML to JSON: yaml: line 7: did not find expected key +``` + +In a template, adding a line similar to "# commented first line" in multi-row text can avoid this error. + +```yaml +coffee: | + # Commented first line + Latte + Cappuccino + Espresso + +``` + +No matter what the first line is, it will be saved and output to a string. If you need to output the file text to a configuration mapping, the comment should be the type required for reading this item. + +### Spaces in a Multi-Row String + +In the above example, `|` is used to express a multi-row string. Note that the string is followed by `\n`. If you need to remove the line break using the YAML processor, add `-` behind `|`. + +```yaml +coffee: |- + Latte + Cappuccino + Espresso +``` + +Here, the value of `coffee` is `Latte\nCappuccino\nEspresso` without `\n` at the end. + +In some cases, you may hope to reserve the spaces behind `|`, use `|+`. + +```yaml +coffee: |+ + Latte + Cappuccino + Espresso + + +another: value +``` + +Here, the value of `coffee` is `Latte\nCappuccino\nEspresso\n\n\n`. + +The indentation and line break will be reserved in the text. + +```yaml +coffee: |- + Latte + 12 oz + 16 oz + Cappuccino + Espresso +``` + +In the above example, the value of `coffee` is `Latte\n 12 oz\n 16 oz\nCappuccino\nEspresso`. + +### Collapsing a Multi-Row String + +Sometimes you need to show a string in multiple rows, but it can be interpreted as a long row. This is called collapse. To express a collapsed block, replace `|` with `>`. + +```yaml +coffee: > + Latte + Cappuccino + Espresso + + +``` + +In the above example, the value of `coffee` is `Latte Cappuccino Espresso\n`. Note that all line breaks will be converted to spaces except the last one. + +You can use `>-` to combine the space symbol and collapsing symbol to replace or cancel all new rows. + +In the collapsing syntax, indenting a text will reserve a symbol. + +```yaml +coffee: >- + Latte + 12 oz + 16 oz + Cappuccino + Espresso +``` + +The value of `coffee` is `Latte\n 12 oz\n 16 oz\nCappuccino Espresso`. Both the space and line break are reserved as part of the string. + +## YAML Is the Superset of JSON + +YAML is the superset of JSON, any legal JSON file should be a legal YAML file. + +```json +{ + "coffee": "yes, please", + "coffees": [ + "Latte", "Cappuccino", "Espresso" + ] +} +``` + +Another expression method of the above JSON is as follows: + +```yaml +coffee: yes, please +coffees: +- Latte +- Cappuccino +- Espresso +``` + +The two expression methods can be together used, therefore, use them with caution. + +```yaml +coffee: "yes, please" +coffees: [ "Latte", "Cappuccino", "Espresso"] +``` + +All three types can be interpreted into the same meaning. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cache.md b/product/en/docs-ptk/v2.0/commands/ptk-cache.md new file mode 100644 index 00000000..f37f1a72 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cache.md @@ -0,0 +1,99 @@ +--- +title: ptk cache +summary: ptk cache +author: ptk +date: 2023-07-20T10:59:15+08:00 +--- + +# ptk cache + +`ptk cache` lists cache files. + +## Syntax + +```bash +ptk cache [flags] +``` + +## Example + +```bash +# Print a list of cached files +ptk cache + +# Clear all cache files +ptk cache --clear +``` + +## Option + +### --clear + +* Description: clears all cache files. +* ata type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v1.0.0 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-candidate-cpu.md b/product/en/docs-ptk/v2.0/commands/ptk-candidate-cpu.md new file mode 100644 index 00000000..2b51335c --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-candidate-cpu.md @@ -0,0 +1,86 @@ +--- +title: ptk candidate cpu +summary: ptk candidate cpu +author: ptk +date: 2022-9-14 +--- + +# ptk candidate cpu + +`ptk candidate cpu` lists the supported CPUs. + +## Syntax + +```bash +ptk candidate cpu [flags] +``` + +## Example + +```bash +ptk candidate cpu +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk candidate](./ptk-candidate.md) - Lists the software versions supported by PTK. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-candidate-db.md b/product/en/docs-ptk/v2.0/commands/ptk-candidate-db.md new file mode 100644 index 00000000..1059da11 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-candidate-db.md @@ -0,0 +1,86 @@ +--- +title: ptk candidate db +summary: ptk candidate db +author: ptk +date: 2022-6-28 +--- + +# ptk candidate db + +`ptk candidate db` lists the supported MogDB database versions. + +## Syntax + +```bash +ptk candidate db [flags] +``` + +## Example + +```bash +ptk candidate db +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +- [ptk candidate](./ptk-candidate.md) - Lists the software versions supported by PTK. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-candidate-os.md b/product/en/docs-ptk/v2.0/commands/ptk-candidate-os.md new file mode 100644 index 00000000..6e83599a --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-candidate-os.md @@ -0,0 +1,101 @@ +--- +title: ptk candidate os +summary: ptk candidate os +author: ptk +date: 2022-6-28 +--- + +# ptk candidate os + +`ptk candidate os` lists the operating systems supported for installing MogDB. + +## Syntax + +```bash +ptk candidate os [flags] +``` + +## Example + +```bash +ptk candidate os [--arm64] [--x86_64] +``` + +## Options + +### --arm64 + +* Description: Only print arm64 OS list +* Data type: bool +* Default value: false + +### --x86_64 + +* Description: Only print x86_64 OS list +* Data type: bool +* Default value: false + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +- [ptk candidate](./ptk-candidate.md) - Lists the software versions supported by PTK. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-candidate-plugin.md b/product/en/docs-ptk/v2.0/commands/ptk-candidate-plugin.md new file mode 100644 index 00000000..cffc5246 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-candidate-plugin.md @@ -0,0 +1,101 @@ +--- +title: ptk candidate plugin +summary: ptk candidate plugin +author: ptk +date: 2023-07-20T10:59:15+08:00 +--- + +# ptk candidate plugin + +`ptk candidate plugin` lists plugins supported by MogDB. + +## Syntax + +```bash +ptk candidate plugin [flags] +``` + +## Example + +```bash +ptk candidate plugin [-t] +``` + +## Options + +### --db-version string + +* Description: Query plugins of a fixed version. This flag only support MogDB. +* Data type: boolean +* Default value: **false** + +### -t, --transpose + +* Description: whether to transpose a list. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v1.0.0 + +## More Command + +* [ptk candidate](./ptk-candidate.md) - Prints the software version list supported by PTK. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-candidate.md b/product/en/docs-ptk/v2.0/commands/ptk-candidate.md new file mode 100644 index 00000000..4b1294d0 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-candidate.md @@ -0,0 +1,85 @@ +--- +title: ptk candidate +summary: ptk candidate +author: ptk +date: 2022-6-28 +--- + +# ptk candidate + +`ptk candidate` lists the software versions supported by PTK. + +## Syntax + +```bash +ptk candidate [flags] +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. +- [ptk candidate cpu](./ptk-candidate-cpu.md) - Lists the supported CPUs. +- [ptk candidate db](./ptk-candidate-db.md) - Lists the supported database versions. +- [ptk candidate os](./ptk-candidate-os.md) - Lists the operating systems supported for MogDB installation. +- [ptk candidate plugin](./ptk-candidate-plugin.md) - Lists plugins supported by MogDB. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-checkos.md b/product/en/docs-ptk/v2.0/commands/ptk-checkos.md new file mode 100644 index 00000000..d86e438f --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-checkos.md @@ -0,0 +1,169 @@ +--- +title: ptk checkos +summary: ptk checkos +author: ptk +date: 2022-6-28 +--- + +# ptk checkos + +`ptk checkos` checks whether the dependencies of servers in a cluster meet database installation requirements. + +## Description + +``` +Check cluster servers os dependencies. +To check all items, enter "-i A". +To check multiple status, enter the items in the following format: "-i A1,A2,A3". +Item number description: + 'A1':[ OS version status ] + 'A2':[ Kernel version status ] + 'A3':[ Unicode status ] + 'A4':[ Time zone status ] + 'A5':[ Swap memory status ] + 'A6':[ System control parameters ] + 'A7':[ File system configuration status ] + 'A8':[ Disk configuration status ] + 'A9':[ Pre-read block size status ] + 'A10':[ IO scheduler status ] + 'A11':[ Network card status ] + 'A12':[ Time consistency status ] + 'A13':[ Firewall service status ] + 'A14':[ THP service status ] + 'A15':[ System dependency packages ] + 'A16':[ CPU Instruction Set ] + 'A17':[ Port status ] + 'A18':[ Selinux status ] + 'A19':[ User ulimit config ] +``` + +## Syntax + +```bash +ptk checkos [flags] +``` + +## Example + +```bash +# Check the current host +ptk checkos + +# Check for specific items and show details +ptk checkos -i A1,A2,A3 --detail + +# Check the cluster machine by specifying config.yaml and show only abormal details +ptk checkos -f config.yaml --only-abnormal-detail + +# Check the cluster machine by specifying config.yaml and include warning level repair commands when generating the repair commands +ptk checkos -f config.yaml --gen-warning-fix +``` + +## Option + +### --detail + +* Description: prints details of each check item. +* Data type: boolean +* Default value: **false** + +### -f, --file string + +* Description: specifies a cluster configuration file. +* Data type: string +* Default value: "" + +### --gen-warning-fix + +- Description: outputs repair suggestions for abnormal and warning errors. It outputs repair suggestions for only abnormal errors by default. +- Data type: boolean +- Default value: **false** + +### -i, --item string + +- Description: specifies the check item number. To specify multiple items, separate their item numbers with commas. +- Data type: string +- Default value: **A** + +### --only-abnormal-detail + +- Description: displays only abnormal errors. +- Data type: boolean +- Default value: **false** + +### -o, --output string + +- Description: specifies the name of the output file. +- Data type: string +- Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for `checkos`. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -v, --version + +* Description: prints the PTK version. +* Data type: boolean +* Default value: **false** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-add-kerberos-auth.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-add-kerberos-auth.md new file mode 100644 index 00000000..b24b70f5 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-add-kerberos-auth.md @@ -0,0 +1,119 @@ +--- +title: ptk cluster add-kerberos-auth +summary: ptk cluster add-kerberos-auth +author: ptk +date: 2023-07-20T10:59:15+08:00 +--- + +# ptk cluster add-kerberos-auth + +`ptk cluster add-kerberos-auth` adds the kerberos authentication. + +## Syntax + +```bash +ptk cluster add-kerberos-auth [flags] +``` + +## Example + +```bash +ptk cluster -n add-kerberos-auth --keytab 192.168.1.100:/path/to/keytab -H [-H ] +``` + +## Option + +### -H, --host stringArray + +* Description: specifies the IP address of a database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: specifies the ID of a database instance. +* Data type: ints +* Default value: [] + +### --keytab string + +* Description: specifies the Keytab path, which supports the remote file path, such as --keytab 10.0.0.1:/home/omm/keytab. +* Data type: string +* Default value: "" + +### --skip-rollback + +* Description: skips rollback when an error occurs, or a process is interrupted. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the name of a cluster. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v1.0.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-build.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-build.md new file mode 100644 index 00000000..c41d2bc3 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-build.md @@ -0,0 +1,121 @@ +--- +title: ptk cluster build +summary: ptk cluster build +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk cluster build + +`ptk cluster build` rebuilds data from database instance. + +## Syntax + +```bash +ptk cluster build [flags] +``` + +## Example + +```bash +# Rebuilds the specified instance over IP. +ptk cluster -n build -H + +# Rebuilds the specified instance over ID. +ptk cluster -n build -i + +# Specify from which instance within the cluster to rebuild the data of the target instance +# The data source instance can be any instance in the cluster +ptk cluster -n build -H --build-from +``` + +## Option + +### --build-from string + +* Description: specifies the IP address of the upstream database instance. +* Data type: string +* Default value: "" + +### -H, --host stringArray + +* Description: specifies the IP addresses of a database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: specifies the ID of a database instance. +* Data type: ints +* Default value: [] + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.6 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-del-kerberos-auth.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-del-kerberos-auth.md new file mode 100644 index 00000000..29c272ca --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-del-kerberos-auth.md @@ -0,0 +1,107 @@ +--- +title: ptk cluster del-kerberos-auth +summary: ptk cluster del-kerberos-auth +author: ptk +date: 2023-07-20T10:59:15+08:00 +--- + +# ptk cluster del-kerberos-auth + +`ptk cluster del-kerberos-auth` deletes the kerberos authentication. + +## Syntax + +```bash +ptk cluster del-kerberos-auth [flags] +``` + +## Example + +```bash +ptk cluster -n del-kerberos-auth -H [-H ] +``` + +## Option + +### -H, --host stringArray + +* Description: specifies the IP address of a database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: specifies the ID of a database instance. +* Data type: ints +* Default value: [] + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the name of a cluster. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v1.0.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-demote.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-demote.md new file mode 100644 index 00000000..a40dce93 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-demote.md @@ -0,0 +1,118 @@ +--- +title: ptk cluster demote +summary: ptk cluster demote +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster demote + +`ptk cluster demote` demotes a database role from primary to standby, or from standby to cascade standby. + +## Syntax + +```bash +ptk cluster demote [flags] +``` + +## Example + +```bash +ptk cluster -n demote -H +ptk cluster -n demote -i + +# If the specified instance was originally a standby node, it will become a cascaded standby node when it is demoted. +# You must also specify the IP of the upstream standby node with the '--upstream' parameter. +ptk cluster -n demote --upstream +``` + +## Option + +### -H, --host string + +* Description: specifies the IP address of a database instance to be demoted. +* Data type: string +* Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance to be demoted. +* Data type: int +* Default value: 0 + +### --upstream string + +* Description: specifies the IP address of the upstream database. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.7 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-failover.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-failover.md new file mode 100644 index 00000000..2c33e358 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-failover.md @@ -0,0 +1,108 @@ +--- +title: ptk cluster failover +summary: ptk cluster failover +author: ptk +date: 2022-08-01 +--- + +# ptk cluster failover + +`ptk cluster failover` makes a standby database become a primary database. + +## Syntax + +```bash +ptk cluster failover [flags] +``` + +## Example + +```bash +ptk cluster -n failover -H +ptk cluster -n failover -i +``` + +## Option + +### -H, --host string + +- Description: specifies the IP address of the database instance on which the failover is to be performed. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of the database instance on which the failover is to be performed. +* Data type: int +* Default value: **0** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-gen-cert-files.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-gen-cert-files.md new file mode 100644 index 00000000..943f5337 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-gen-cert-files.md @@ -0,0 +1,92 @@ +--- +title: ptk cluster gen-cert-files +summary: ptk cluster gen-cert-files +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster gen-cert-files + +`ptk cluster gen-cert-files` generates SSL certificate file. + +## Syntax + +```bash +ptk cluster gen-cert-files [flags] +``` + +## Example + +```bash +ptk cluster -n gen-cert-files +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.3.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-inspect.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-inspect.md new file mode 100644 index 00000000..0d3ad57c --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-inspect.md @@ -0,0 +1,93 @@ +--- +title: ptk cluster inspect +summary: ptk cluster inspect +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster inspect + +`ptk cluster inspect` shows the cluster information. + +## Syntax + +```bash +ptk cluster inspect [flags] +``` + +## Example + +```bash +ptk cluster -n insepect +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.8 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-cm.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-cm.md new file mode 100644 index 00000000..a630ad75 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-cm.md @@ -0,0 +1,160 @@ +--- +title: ptk cluster install-cm +summary: ptk cluster install-cm +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster install-cm + +`ptk cluster install-cm` installs CM. + +## Syntax + +```bash +ptk cluster install-cm [flags] +``` + +## Example + +```bash +ptk cluster -n install-cm [-p ] [--cmdir ] [--db-service-vip ] [-P ] [-s KEY=VALUE ...] [-a KEY=VALUE ...] +``` + +## Option + +### -a, --agent-conf strings + +* Description: customize cm_agent configuration. + + Format: '-a KEY=VALUE' + +* Data type: strings +* Default value: [] + +### --cmdir string + +* Description: specifies the installation directory for CM. +* Data type: string +* Default value: "" + +### --db-service-vip string + +* Description: specifies virtual IP. +* Data type: string +* Default value: "" + +### --not-limit-cm-nodes + +* Description: No restriction that the number of CM nodes be odd. +* Data type: bool +* Default value: false + +### -p, --pkg string + +* Description: specifies the path to the CM package file. +* Data type: string +* Default value: "" + +### -P, --port int + +* Description: specifies the listening port for the CM server process. +* Data type: int +* Default value: 15300 + +### -s, --server-conf strings + +* Description: customize cm_server configuration. + + Format: '-s KEY=VALUE' + +* Data type: strings +* Default value: [] + +### --skip-rollback + +* Description: skips rollback when installation fails. +* Data type: bool +* Default value: false + +### --skip-start + +* Description: skips starting the CM server service. +* Data type: bool +* Default value: false + +### -y, --yes + +* Description: automatic confirm all questions. +* Data type: bool +* Default value: false + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.4.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-kerberos-server.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-kerberos-server.md new file mode 100644 index 00000000..b5b5d4e9 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-kerberos-server.md @@ -0,0 +1,120 @@ +--- +title: ptk cluster install-kerberos-server +summary: ptk cluster install-kerberos-server +author: ptk +date: 2023-07-20T10:59:15+08:00 +--- + +# ptk cluster install-kerberos-server + +`ptk cluster install-kerberos-server` installs a kerberos server. + +## Syntax + +```bash +ptk cluster install-kerberos-server [flags] +``` + +## Example + +```bash +ptk cluster -n install-kerberos-server -H [--kdc-port 8088] +ptk cluster -n install-kerberos-server -i [--kdc-port 8088] +``` + +## Option + +### -H, --host string + +* Description: specifies the IP address of a database instance. +* Data type: string +* Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +### -P, --kdc-port int + +* Description: specifies the kdc port of a Kerberos server. +* Data type: int +* Default value: **8088** + +### --skip-rollback + +* Description: skips rollback when an error occurs, or a process is interrupted. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the name of a cluster. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v1.0.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-mogha.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-mogha.md new file mode 100644 index 00000000..76a979e3 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-mogha.md @@ -0,0 +1,155 @@ +--- +title: ptk cluster install-mogha +summary: ptk cluster install-mogha +author: ptk +date: 2022-08-01 +--- + +# ptk cluster install-mogha + +`ptk cluster install-mogha` installs MogHA for MogDB. + +## Syntax + +```bash +ptk cluster install-mogha [flags] +``` + +## Example + +```bash +ptk cluster -n install-mogha -c node.conf [-y] [-p ] [-d ] [--service-name mogha] [--mogha-version 2.4.17] +``` + +## Option + +### -y, --assumeyes + +* Description: automatically replies yes to all questions. +* Data type: boolean +* Default value: **false** + +### -d, --install-dir string + +- Description: specifies the MogHA installation directory. +- Data type: string +- Default value: "" + +### -p, --mogha-pkg string + +- Description: specifies the MogHA installation package. +- Data type: string +- Default value: "" + +### --mogha-version string + +* Description: specifies the MogHA version. +* Data type: string +* Default value: **2.4.20** + +### -c, --node-conf string + +- Description: specifies the path of the MogHA configuration file. +- Data type: string +- Default value: "" + +### --service-name string + +* Description: specifies the service name of MogHA. +* Data type: string +* Default value: "mogha" + +### --skip-check + +* Description: skips checking node.conf and target machine. +* Data type: bool +* Default value: false + +### --skip-rollback + +* Description: skips rollback for an installation failure. +* Data type: boolean +* Default value: **false** + +### --skip-start + +- Description: skips the MogHA start-up operation. +- Data type: boolean +- Default value: **false** + +### --sync-standby string + +* Description: specifies the synchronous standby database in a cluster. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for MogHA installation. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-plugin.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-plugin.md new file mode 100644 index 00000000..89559825 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-install-plugin.md @@ -0,0 +1,132 @@ +--- +title: ptk cluster install-plugin +summary: ptk cluster install-plugin +author: ptk +date: 2022-08-01 +--- + +# ptk cluster install-plugin + +`ptk cluster install-plugin` installs the MogDB plugins. + +## Syntax + +```bash +ptk cluster install-plugin [flags] +``` + +## Example + +```bash +# By default, PTK will download all plugins from the web that are identical to the cluster version +ptk cluster -n install-plugin [--override] + +# If you want to install a specific plugin, you can specify the plugin name with '-P'. +ptk cluster -p install-plugin -P postgis -P wal2json + +# If your host doesn't have access to the internet, you can install the plugin from a local plugin package +ptk cluster -p install-plugin -p +``` + +## Option + +### -H, --host strings + +- Description: specifies the IP address of the server where the plugin is to be installed. The plugin is installed on all servers in a cluster by default. +- Data type: strings +- Default value: [] + +### --override + +- Description: specifies whether to overwrite the current plugin file. +- Data type: boolean +- Default value: **false** + +### -p, --pkg string + +- Description: specifies the local path of the plugin package. +- Data type: string +- Default value: "" + +### -P, --plugin strings + +- Description: specifies the name of the plugin to be installed. All plugins will be installed by default. +- Data type: string +- Default value: [] + +### --skip-check-version + +* Description: skips the check whether the database version is matched with the plugin version. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for MogHA installation. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.3 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-is-in-upgrade.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-is-in-upgrade.md new file mode 100644 index 00000000..1361304c --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-is-in-upgrade.md @@ -0,0 +1,83 @@ +--- +title: ptk cluster is-in-upgrade +summary: ptk cluster is-in-upgrade +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster is-in-upgrade + +`ptk cluster is-in-upgrade` checks whether a cluster is in upgrade. + +## Syntax + +```bash +ptk cluster is-in-upgrade [flags] +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-list-plugins.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-list-plugins.md new file mode 100644 index 00000000..662377a7 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-list-plugins.md @@ -0,0 +1,100 @@ +--- +title: ptk cluster list-plugins +summary: ptk cluster list-plugins +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster list-plugins + +`ptk cluster list-plugins` lists plugins in the cluster. + +## Syntax + +```bash +ptk cluster list-plugins [flags] +``` + +## Example + +```bash +ptk cluster -n list-plugins [-d ] +``` + +## Option + +### -d, --database stringArray + +* Description: Show database plugins. +* Data type: stringArray +* Default value: [] + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.0.1 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-load-cm-vip.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-load-cm-vip.md new file mode 100644 index 00000000..bce12db1 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-load-cm-vip.md @@ -0,0 +1,106 @@ +--- +title: ptk cluster load-cm-vip +summary: ptk cluster load-cm-vip +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster load-cm-vip + +`ptk cluster load-cm-vip` manages virtual IP of CM (only supported by Mogdb v5.0.4+). + +## Syntax + +```bash +ptk cluster load-cm-vip [flags] +``` + +## Example + +```bash +ptk cluster -n load-cm-vip --action [--vip ] +``` + +## Option + +### --action string + +* Description: specifies the operation of the script. Value range: [install, uninstall, refresh]. +* Data type: string +* Default value: "" + +### --vip string + +* Description: virtual IP. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.2.1 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-modify-comment.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-modify-comment.md new file mode 100644 index 00000000..e5df3e9d --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-modify-comment.md @@ -0,0 +1,101 @@ +--- +title: ptk cluster modify-comment +summary: ptk cluster modify-comment +author: ptk +date: 2022-08-01 +--- + +# ptk cluster modify-comment + +`ptk cluster modify-comment` modifies the comment of a specified cluster. + +## Syntax + +```bash +ptk cluster -n CLUSTER_NAME modify-comment [flags] +``` + +## Example + +```bash +ptk cluster -n modify-comment --comment "some comment" +``` + +## Option + +### --comment string + +- Description: specifies the new comment. +- Data type: string +- Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-promote.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-promote.md new file mode 100644 index 00000000..9e5dc61a --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-promote.md @@ -0,0 +1,109 @@ +--- +title: ptk cluster promote +summary: ptk cluster promote +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster promote + +`ptk cluster promote` promotes a database instance from standby to primary, or from cascade standby to standby. + +## Syntax + +```bash +ptk cluster promote [flags] +``` + +## Example + +```bash +ptk cluster -n promote -H +ptk cluster -n promote -i +``` + +## Option + +### -H, --host string + +* Description: specifies the IP address of the instance to be promoted. +* Data type: string +* Default value: "" + +### -i, --id int + +* Description: specifies the ID of the instance to be upgraded. + (If there are ID and IP address provided, use the ID preferably.) +* Data type: int +* Default value: **0** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.7 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-refresh.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-refresh.md new file mode 100644 index 00000000..f857419f --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-refresh.md @@ -0,0 +1,109 @@ +--- +title: ptk cluster refresh +summary: ptk cluster refresh +author: ptk +date: 2022-08-01 +--- + +# ptk cluster refresh + +`ptk cluster refresh` refreshes cluster configuration. + +> Refreshing cluster configurations is to refresh `cluster_static_config`, `postgresql.conf`, `pg_hba.conf`, and PTK metadata. +> +> This command is usually used when the IP address of an instance is changed. + +## Syntax + +```bash +ptk cluster refresh [flags] +``` + +## Example + +```bash +# Refresh only the cluster_static_config file. +ptk cluster -n refresh + +# Replace IP +ptk cluster -n refresh --replace-ip oldIP=newIP +``` + +## Option + +### --replace-ip stringArray + +- Description: replaces a specified IP address. The value format is old_ip=new_ip. +- Data type: stringArray +- Default value: [] + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for refreshing configurations. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-rename.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-rename.md new file mode 100644 index 00000000..ef196daf --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-rename.md @@ -0,0 +1,103 @@ +--- +title: ptk cluster rename +summary: ptk cluster rename +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster rename + +`ptk cluster rename` renames cluster. + +## Syntax + +```bash +ptk cluster rename [flags] +``` + +## Example + +```bash +ptk cluster -n rename [-N|--new ] + +# You can rename cluster +ptk cluster -n rename -N +``` + +## Option + +### -N, --cluster-name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.5.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-restart.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-restart.md new file mode 100644 index 00000000..3a051626 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-restart.md @@ -0,0 +1,140 @@ +--- +title: ptk cluster restart +summary: ptk cluster restart +author: ptk +date: 2022-06-28 +--- + +# ptk cluster restart + +`ptk cluster restart` restarts a database cluster or instance. + +## Syntax + +```bash +ptk cluster restart [flags] +``` + +## Example + +```bash +# Restart all instances of a specified cluster +ptk cluster -n restart + +# Restart specific instance within the cluster +ptk cluster -n restart -H +ptk cluster -n restart -i + +# [! Danger] Restart all clusters managed by PTK +ptk cluster restart --all +``` + +## Option + +### -a, --all + +* Description: restarts all clusters. +* Data type: boolean +* Default value: **false** + +### -H, --host string + +- Description: specifies the IP address of a database instance. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +### -r, --role string + +* Description: specifies the database role. This parameter is valid only when specific instance is specified. +The value can be primary, standby, and cascade_standby. +* Data type: string +* Default value: "" + +### --security-mode + +- Description: specifies whether to start the database in safe mode. +- Data type: boolean +- Default value: **false** + +### --time-out duration + +- Description: specifies the execution timeout duration. +- Data type: duration +- Default value: **10m** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for restarting. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-in.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-in.md new file mode 100644 index 00000000..71e01134 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-in.md @@ -0,0 +1,140 @@ +--- +title: ptk cluster scale-in +summary: ptk cluster scale-in +author: ptk +date: 2022-08-01 +--- + +# ptk cluster scale-in + +`ptk cluster scale-in` performs the scale-in operation on a MogDB cluster. + +## Syntax + +```bash +ptk cluster scale-in [flags] +``` + +## Example + +```bash +ptk cluster -n scale-in -H -H [-y] + +# Scales down the specified database instance without removing the operating system user +ptk cluster -n scale-in -H --skip-clear-user + +# Scales down the specified database instance without removing the data +ptk cluster -n scale-in -H --skip-clear-db + +# If the target database instance is inaccessible, you can force kick out the cluster +ptk cluster -n scale-in -H --force +``` + +## Option + +### -y, --assumeyes + +* Description: automatically applies yes to all questions. +* Data type: boolean +* Default value: **false** + +### --force + +- Description: If the target host cannot be connected using SSH, this option can be used for forcibly deleting the target instance from the configuration of the upgraded node in a cluster. +- Data type: boolean +- Default value: **false** + +### -H, --host stringArray + +- Description: specifies the IP address of a server to be removed. +- Data type: stringArray +- Default value: [] + +### -i, --id ints + +* Description: specifies the ID of a server to be removed. +* Data type: ints +* Default value: [] + +### --skip-clear-db + +- Description: skips deletion of the target database directory. +- Data type: boolean +- Default value: **false** + +### --skip-clear-user + +- Description: skips system user deletion. +- Data type: boolean +- Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for scale-in. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.3 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-out.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-out.md new file mode 100644 index 00000000..7e9c5557 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-scale-out.md @@ -0,0 +1,164 @@ +--- +title: ptk cluster scale-out +summary: ptk cluster scale-out +author: ptk +date: 2022-08-01 +--- + +# ptk cluster scale-out + +`ptk cluster scale-out` performs the scale-out operation on a MogDB cluster. + +## Syntax + +```bash +ptk cluster scale-out [flags] +``` + +## Example + +```bash +ptk cluster -n scale-out -c scale-out.yaml + +# You can also use '--build-from' to specify the original instance used by the new database instance to rebuild the data. +ptk cluster -n scale-out -c scale-out.yaml --build-from +``` + +## Option + +### -y, --assumeyes + +* Description: automatically applies yes to all questions. +* Data type: boolean +* Default value: **false** + +### --build-from string + +* Description: specifies the IP address of the existing instance used for building a new instance. +* Data type: string +* Default value: "" + +### -c, --config string + +- Description: specifies the scale-out configuration file path. +- Data type: string +- Default value: "" + +### --cpu string + +- Description: specifies the CPU model. `ptk candidate cpu` can be used for querying the supported CPU model list. +- Data type: string +- Default value: "" + +### --default-guc + +- Description: uses the default GUC parameters, which are not optimized automatically. +- Data type: boolean +- Default value: **false** + +### --not-limit-cm-nodes + +* Description: No restriction that the number of CM nodes be odd. +* Data type: bool +* Default value: false + +### --skip-check-distro + +- Description: skips system distro check. +- Data type: boolean +- Default value: **false** + +### --skip-check-os + +- Description: skips system check. +- Data type: boolean +- Default value: **false** + +### --skip-create-user + +- Description: skips user creation. +- Data type: boolean +- Default value: **false** + +### --skip-gen-ptkc + +* Description: skips generation of the ptkc tool. +* Data type: boolean +* Default value: **false** + +### --skip-rollback + +- Description: skip rollback operations for installation failures. +- Data type: boolean +- Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for scale-out. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.3 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-set-guc.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-set-guc.md new file mode 100644 index 00000000..140ac07a --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-set-guc.md @@ -0,0 +1,113 @@ +--- +title: ptk cluster set-guc +summary: ptk cluster set-guc +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster set-guc + +`ptk cluster set-guc` set and reloads database parameters. + +## Syntax + +```bash +ptk cluster set-guc [flags] +``` + +## Example + +```bash +ptk cluster -n set-guc -H -c "password_encryption_type=1" +ptk cluster -n set-guc -i -c "password_encryption_type=1" +``` + +## Option + +### -H, --host stringArray + +* Description: IP of database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: ID of database instance. +* Data type: ints +* Default value: [] + +### -c, --kv stringArray + +* Description: key-value pairs to be set. +* Data type: stringArray +* Default value: [] + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.2.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-set-hba.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-set-hba.md new file mode 100644 index 00000000..ff7d9d4b --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-set-hba.md @@ -0,0 +1,113 @@ +--- +title: ptk cluster set-hba +summary: ptk cluster set-hba +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster set-hba + +`ptk cluster set-hba` set and reloads pg_hba.conf. + +## Syntax + +```bash +ptk cluster set-hba [flags] +``` + +## Example + +```bash +ptk cluster -n set-hba -H -v "host all all 192.168.1.100/32 sha256" +ptk cluster -n set-hba -i -v "host all all 192.168.1.100/32 sha256" +``` + +## Option + +### -H, --host stringArray + +* Description: IP of database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: ID of database instance. +* Data type: ints +* Default value: [] + +### -v, --value string + +* Description: value to be set in pg_hba.conf. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.2.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-shell.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-shell.md new file mode 100644 index 00000000..ba51b4f3 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-shell.md @@ -0,0 +1,119 @@ +--- +title: ptk cluster shell +summary: ptk cluster shell +author: ptk +date: 2022-08-01 +--- + +# ptk cluster shell + +`ptk cluster shell` performs the shell command or script. + +## Syntax + +```bash +ptk cluster shell [flags] +``` + +## Example + +```bash +ptk cluster -n shell +``` + +## Option + +### -c, --command string + +- Description: specifies the shell command to be performed. +- Data type: string +- Default value: "" + +### -H, --host stringArray + +- Description: specifies the IP address of a database instance. +- Data type: stringArray +- Default value: [] + +### -i, --id ints + +* Description: specifies the ID of a database instance. +* Data type: ints +* Default value: [] + +### -s, --script string + +- Description: specifies the path of the shell script to be executed. +- Data type: string +- Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for shell. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-config.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-config.md new file mode 100644 index 00000000..be93d032 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-config.md @@ -0,0 +1,93 @@ +--- +title: ptk cluster show-config +summary: ptk cluster show-config +author: ptk +date: 2022-08-01 +--- + +# ptk cluster show-config + +`ptk cluster show-config` shows the topology configuration file of a specified cluster. + +## Syntax + +```bash +ptk cluster show-config [flags] +``` + +## Example + +```bash +ptk cluster -n show-config +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-guc.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-guc.md new file mode 100644 index 00000000..bf204b87 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-guc.md @@ -0,0 +1,101 @@ +--- +title: ptk cluster show-guc +summary: ptk cluster show-guc +author: ptk +date: 2022-08-01 +--- + +# ptk cluster show-guc + +`ptk cluster show-guc` queries database parameters. + +## Syntax + +```bash +ptk cluster show-guc [flags] +``` + +## Example + +```bash +ptk cluster -n show-guc -k password_encryption_type +``` + +## Option + +### -k, --key strings + +- Description: specifies the database parameter name. +- Data type: strings +- Default value: [] + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-hba.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-hba.md new file mode 100644 index 00000000..1b7c84da --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-show-hba.md @@ -0,0 +1,112 @@ +--- +title: ptk cluster show-hba +summary: ptk cluster show-hba +author: ptk +date: 2022-08-01 +--- + +# ptk cluster show-hba + +`ptk cluster show-hba` queries the database pg_hba information. + +## Syntax + +```bash +ptk cluster show-hba [flags] +``` + +## Example + +```bash +# In the absence of a specified instance, the hba information for the master node will be shown by default. +ptk cluster -n show-hba + +# You can also specify an instance to show its hba information. +ptk cluster -n show-hba -H +ptk cluster -n show-hba -i +``` + +## Option + +### -H, --host string + +- Description: specifies the IP address of a database instance. The `pg_hba.conf` information of a primary database is read by default. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-start.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-start.md new file mode 100644 index 00000000..f9f9c1c6 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-start.md @@ -0,0 +1,140 @@ +--- +title: ptk cluster start +summary: ptk cluster start +author: ptk +date: 2022-06-28 +--- + +# ptk cluster start + +`ptk cluster start` starts a databse cluster or instance. + +## Syntax + +```bash +ptk cluster start -n string [flags] +``` + +## Example + +```bash +# Start all instances of the specified cluster. +ptk cluster -n start + +# Start a specific instance of a specified cluster. +ptk cluster -n start -H +ptk cluster -n start -i + +# [! Danger] Start all clusters managed by PTK. +ptk cluster start --all +``` + +## Option + +### -a, --all + +* Description: starts all clusters. +* Data type: boolean +* Default value: **false** + +### -H, --host string + +- Description: specifies the IP address of a database instance. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +### -r, --role string + +* Description: specifies the database role. This parameter is valid only when host is specified. + The value can be **primary**, **standby**, and **cascade_standby**. +* Data type: string +* Default value: "" + +### --security-mode string + +- Description: specifies whether to start the database in safe mode. +- Data type: boolean +- Default value: **false** + +### --time-out duration + +- Description: specifies the execution timeout duration. +- Data type: duration +- Default value: **10m0s** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-status.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-status.md new file mode 100644 index 00000000..9fa9cff0 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-status.md @@ -0,0 +1,133 @@ +--- +title: ptk cluster status +summary: ptk cluster status +author: ptk +date: 2022-06-28 +--- + +# ptk cluster status + +`ptk cluster status` queries the status of a database cluster or instance. + +## Syntax + +```bash +ptk cluster status [flags] +``` + +## Example + +```bash +# Show the status of the specified cluster. +ptk cluster -n status + +# Show the status of an instance in a specified cluster. +ptk cluster -n status -H +ptk cluster -n status -i + +# Show the status of all instances. +ptk cluster status --all +``` + +## Option + +### -a, --all + +* Description: queries the status of all clusters. +* Data type: boolean +* Default value: **false** + +### --detail + +- Description: specifies details of a cluster or instance status. +- Data type: boolean +- Default value: **false** + +### -H, --host string + +- Description: specifies the IP address of a database instance. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +### -G, --vertical + +* Description: Show status information vertically. +* Data type: bool +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-stop.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-stop.md new file mode 100644 index 00000000..77b81805 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-stop.md @@ -0,0 +1,133 @@ +--- +title: ptk cluster stop +summary: ptk cluster stop +author: ptk +date: 2022-06-28 +--- + +# ptk cluster stop + +`ptk cluster stop` stops a database cluster or instance. + +## Syntax + +```bash +ptk cluster stop [flags] +``` + +## Example + +```bash +# Stop all instances of the specified cluster. +ptk cluster -n stop + +# Stop a specific instance of a specified cluster. +ptk cluster -n stop -H +ptk cluster -n stop -i + +# [! Danger] Stop all clusters managed by PTK. +ptk cluster stop --all +``` + +## Option + +### -a, --all + +* Description: stops all clusters. +* Data type: boolean +* Default value: **false** + +### -H, --host string + +- Description: specifies the IP address of a database instance. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +### -m, --mode string + +* Description: specifies the stopping mode. The value can be **fast** or **immediate**. +* Data type: string +* Default value: **fast** + +### --time-out duration + +- Description: specifies the execution timeout duration. +- Data type: duration +- Default value: **10m** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-switchover.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-switchover.md new file mode 100644 index 00000000..938b1204 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-switchover.md @@ -0,0 +1,114 @@ +--- +title: ptk cluster switchover +summary: ptk cluster switchover +author: ptk +date: 2022-08-01 +--- + +# ptk cluster switchover + +`ptk cluster switchover` specifies a standby database as a primary database and a primary database as a standby database. + +## Syntax + +```bash +ptk cluster switchover [flags] +``` + +## Example + +```bash +ptk cluster -n switchover -H [-m fast] +ptk cluster -n switchover -i [-m fast] +``` + +## Option + +### -H, --host string + +- Description: specifies the IP address of the database instance to be switched. +- Data type: string +- Default value: "" + +### -i, --id int + +* Description: specifies the ID of the database instance to be switched. +* Data type: int +* Default value: **0** + +### -m, --mode string + +* Description: specifies the switch mode. The value can be **fast** or **f**. +* ata type: string +* Default value: **fast** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for switchover. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-takeover.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-takeover.md new file mode 100644 index 00000000..92805304 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-takeover.md @@ -0,0 +1,158 @@ +--- +title: ptk cluster takeover +summary: ptk cluster takeover +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster takeover + +`ptk cluster takeover` takeover a new server to ptk metadata. + +## Syntax + +```bash +ptk cluster takeover [flags] +``` + +## Example + +```bash +ptk cluster -n takeover [-H|--host ][-U|--user ] +[-i|--identity ] [--appdir ] [--datadir ] [--logdir ] [--tmpdir ] [--tooldir ] + +# For example: +ptk cluster -n takeover -H -U +``` + +## Option + +### --appdir string + +* Description: App dir of db server +* Data type: string +* Default value: "" + +### -y, --assumeyes + +* Description: automatically respond to all questions Yes. +* Data type: bool +* Default value: false + +### --datadir string + +* Description: Data dir of db server +* Data type: string +* Default value: "" + +### --db-port int + +* Description: DB port of db server +* Data type: int +* Default value: 0 + +### -H, --host string + +* Description: Specify the host of the takeover node +* Data type: string +* Default value: "" + +### -i, --identity string + +* Description: SSH private key path +* Data type: string +* Default value: "" + +### --logdir string + +* Description: Log dir of db server +* Data type: string +* Default value: "" + +### --tmpdir string + +* Description: Tmp dir of db server +* Data type: string +* Default value: "" + +### --tooldir string + +* Description: Tool dir of db server +* Data type: string +* Default value: "" + +### -U, --username string + +* Description: Specify the user to takeover the node +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.5.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-throwout.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-throwout.md new file mode 100644 index 00000000..abfad2bd --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-throwout.md @@ -0,0 +1,118 @@ +--- +title: ptk cluster throwout +summary: ptk cluster throwout +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster throwout + +`ptk cluster throwout` removes a server from ptk metadata. + +## Syntax + +```bash +ptk cluster throwout [flags] +``` + +## Example + +```bash + +# By host ip +ptk cluster -n throwout -H + +# By instance id +ptk cluster -n throwout -i + +``` + +## Option + +### -H, --host stringArray + +* Description: IP of database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: ID of database instance. +* Data type: ints +* Default value: [] + +### -y, --yes + +* Description: automatically respond to all questions Yes. +* Data type: bool +* Default value: false + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.5.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-cm.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-cm.md new file mode 100644 index 00000000..00ff97a1 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-cm.md @@ -0,0 +1,92 @@ +--- +title: ptk cluster uninstall-cm +summary: ptk cluster uninstall-cm +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk cluster uninstall-cm + +`ptk cluster uninstall-cm` uninstalls CM. + +## Syntax + +```bash +ptk cluster uninstall-cm [flags] +``` + +## Example + +```bash +ptk cluster -n uninstall-cm +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.4.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-kerberos-server.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-kerberos-server.md new file mode 100644 index 00000000..cdc0ae1b --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-kerberos-server.md @@ -0,0 +1,102 @@ +--- +title: ptk cluster uninstall-kerberos-server +summary: ptk cluster uninstall-kerberos-server +author: ptk +date: 2023-07-20T10:59:15+08:00 +--- + +# ptk cluster uninstall-kerberos-server + +`ptk cluster uninstall-kerberos-server` uninstalls a kerberos server. + +## Syntax + +```bash +ptk cluster uninstall-kerberos-server [flags] +``` + +## Example + +```bash +ptk cluster -n uninstall-kerberos-server -H +ptk cluster -n uninstall-kerberos-server -i +``` + +## Option + +### -H, --host string + +* Description: specifies the IP address of a database instance. +* Data type: string +* Default value: "" + +### -i, --id int + +* Description: specifies the ID of a database instance. +* Data type: int +* Default value: **0** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the name of a cluster. +* Data type: string +* Default value: "" + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v1.0.0 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-mogha.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-mogha.md new file mode 100644 index 00000000..6747cd78 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-uninstall-mogha.md @@ -0,0 +1,93 @@ +--- +title: ptk cluster uninstall-mogha +summary: ptk cluster uninstall-mogha +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk cluster uninstall-mogha + +`ptk cluster uninstall-mogha` uninstalls MogHA. + +## Syntax + +```bash +ptk cluster uninstall-mogha [flags] +``` + +## Example + +```bash +ptk cluster -n uninstall-mogha +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for MogHA uninstallation. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-commit.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-commit.md new file mode 100644 index 00000000..dca00a1f --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-commit.md @@ -0,0 +1,93 @@ +--- +title: ptk cluster upgrade-commit +summary: ptk cluster upgrade-commit +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster upgrade-commit + +`ptk cluster upgrade-commit` confirms the upgrade commit operation. Once an upgrade is committed, it cannot be rolled back. + +## Syntax + +```bash +ptk cluster upgrade-commit [flags] +``` + +## Example + +```bash +ptk cluster -n upgrade-commit +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.7 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-rollback.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-rollback.md new file mode 100644 index 00000000..ec9f5ddb --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade-rollback.md @@ -0,0 +1,113 @@ +--- +title: ptk cluster upgrade-rollback +summary: ptk cluster upgrade-rollback +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster upgrade-rollback + +`ptk cluster upgrade-rollback` rolls back an upgrade. + +## Syntax + +```bash +ptk cluster upgrade-rollback [flags] +``` + +## Example + +```bash +ptk cluster -n upgrade-rollback [-i ID] [-H IP] +``` + +## Option + +### -H, --host stringArray + +* Description: IP of database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: ID of database instance. +* Data type: ints +* Default value: [] + +### --parallel uint + +* Description: maximum number of databases for parallel operations, usually less than the MaxSessions in sshd_config. +* Data type: uint +* Default value: 10 + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.7 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade.md new file mode 100644 index 00000000..f81d9649 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster-upgrade.md @@ -0,0 +1,164 @@ +--- +title: ptk cluster upgrade +summary: ptk cluster upgrade +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk cluster upgrade + +`ptk cluster upgrade` upgrades a cluster. + +## Syntax + +```bash +ptk cluster upgrade [flags] +``` + +## Example + +```bash +# Upgrade using local package +ptk cluster -n upgrade -p + +# Specify the version of the target database to be upgraded (Internet required) +# PTK 1.2.0 or later supports direct upgrade of databases containing plugins. +# PTK will download the corresponding plugin package for the new version from the Internet. +ptk cluster -n upgrade -t 5.0.6 + +# If the current database contains plugins and you don't have access to the Internet, you can download the plugin package to a directory and specify the directory via '--plugin-dir'. +ptk cluster -n upgrade -p --plugin-dir +``` + +## Option + +### -y, --assumeyes + +* Description: automatically applies yes to all questions. +* Data type: boolean +* Default value: **false** + +### -H, --host stringArray + +* Description: IP of database instance. +* Data type: stringArray +* Default value: [] + +### -i, --id ints + +* Description: ID of database instance. +* Data type: ints +* Default value: [] + +### -m, --mode string + +* Description: Upgrade mode. value range: [replace, cover] +* Data type: string +* Default value: "cover" + +### -p, --package string + +* Description: specifies the target installation package path. +* Data type: string +* Default value: "" + +### --parallel uint + +* Description: maximum number of databases for parallel operations, usually less than the MaxSessions in sshd_config. +* Data type: uint +* Default value: 10 + +### --plugin-dir string + +* Description: directory of plugins. +* Data type: string +* Default value: "" + +### --plugin-upgrade-patch string + +* Description: file path for plugin upgrade patches. +* Data type: string +* Default value: "" + +### -R, --remain + +* Description: upgrade remaining nodes. +* Data type: bool +* Default value: false + +### -t, --to-version string + +* Description: specifies the target installation package version (Internet required) +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.7 + +## More Command + +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-cluster.md b/product/en/docs-ptk/v2.0/commands/ptk-cluster.md new file mode 100644 index 00000000..5b19df8c --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-cluster.md @@ -0,0 +1,128 @@ +--- +title: ptk cluster +summary: ptk cluster +author: ptk +date: 2022-06-28 +--- + +# ptk cluster + +`ptk cluster` operates with database cluster management. + +## Syntax + +```bash +ptk cluster [flags] +``` + +## Option + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for cluster. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. +* [ptk cluster add-kerberos-auth](./ptk-cluster-add-kerberos-auth.md) - Adds kerberos authentication. +* [ptk cluster build](./ptk-cluster-build.md) - Rebuilds data from database instance. +* [ptk cluster del-kerberos-auth](./ptk-cluster-del-kerberos-auth.md) - Deletes kerberos authentication. +* [ptk cluster demote](./ptk-cluster-demote.md) - Demotes a database role from primary to standby, or from standby to cascade standby. +* [ptk cluster failover](./ptk-cluster-failover.md) - Makes a standby database become a primary database. +* [ptk cluster gen-cert-files](./ptk-cluster-gen-cert-files.md) - Generates SSL certificate file. +* [ptk cluster inspect](./ptk-cluster-inspect.md) - Returns cluster information. +* [ptk cluster install-cm](./ptk-cluster-install-cm.md) - Installs CM. +* [ptk cluster install-kerberos-server](./ptk-cluster-install-kerberos-server.md) - Installs a kerberos server. +* [ptk cluster install-mogha](./ptk-cluster-install-mogha.md) - Installs MogHA for MogDB. +* [ptk cluster install-plugin](./ptk-cluster-install-plugin.md) - Installs MogDB plugins. +* [ptk cluster is-in-upgrade](./ptk-cluster-is-in-upgrade.md) - Checks whether a cluster is in upgrade. +* [ptk cluster list-plugins](./ptk-cluster-list-plugins.md) - Lists the plugins in the cluster. +* [ptk cluster load-cm-vip](./ptk-cluster-load-cm-vip.md) - Manages virtual IP of CM (only supported by Mogdb v5.0.4+) +* [ptk cluster modify-comment](./ptk-cluster-modify-comment.md) - Modifies the comment of a specified cluster. +* [ptk cluster promote](./ptk-cluster-promote.md) - Promotes a database instance from standby to primary, or from cascade_standby to standby. +* [ptk cluster refresh](./ptk-cluster-refresh.md) - Updates cluster configurations. +* [ptk cluster rename](./ptk-cluster-rename.md) - Renames cluster. +* [ptk cluster restart](./ptk-cluster-restart.md) - Restarts a database instance or cluster. +* [ptk cluster scale-in](./ptk-cluster-scale-in.md) - Performs the scale-in operation on a MogDB cluster. +* [ptk cluster scale-out](./ptk-cluster-scale-out.md) - Performs the scale-out operation on a MogDB cluster. +* [ptk cluster set-guc](./ptk-cluster-set-guc.md) - Set and reload database parameters. +* [ptk cluster set-hba](./ptk-cluster-set-hba.md) - Set and reload pg_hba.conf. +* [ptk cluster shell](./ptk-cluster-shell.md) - Executes a shell command or script. +* [ptk cluster show-config](./ptk-cluster-show-config.md) - Prints a cluster topology configuration file. +* [ptk cluster show-guc](./ptk-cluster-show-guc.md) - Prints database parameters. +* [ptk cluster show-hba](./ptk-cluster-show-hba.md) - Prints the pg_hba.conf content of a database. +* [ptk cluster start](./ptk-cluster-start.md) - Starts a database instance or cluster. +* [ptk cluster status](./ptk-cluster-status.md) - Shows the cluster or instance status. +* [ptk cluster stop](./ptk-cluster-stop.md) - Stops a database instance or cluster. +* [ptk cluster switchover](./ptk-cluster-switchover.md) - Executes the primary/standby switchover operation. +* [ptk cluster takeover](./ptk-cluster-takeover.md) - Takeover a new server to PTK metadata. +* [ptk cluster throwout](./ptk-cluster-throwout.md) - Remove a server from PTK metadata. +* [ptk cluster uninstall-cm](./ptk-cluster-uninstall-cm.md) - Uninstall CM. +* [ptk cluster uninstall-kerberos-server](./ptk-cluster-uninstall-kerberos-server.md) - Uninstalls a kerberos server. +* [ptk cluster uninstall-mogha](./ptk-cluster-uninstall-mogha.md) - Uninstalls MogHA. +* [ptk cluster upgrade](./ptk-cluster-upgrade.md) - Upgrades the database version of a cluster. +* [ptk cluster upgrade-commit](./ptk-cluster-upgrade-commit.md) - Confirms the upgrade submission operation (once an upgrade is submitted, it cannot be rolled back.) +* [ptk cluster upgrade-rollback](./ptk-cluster-upgrade-rollback.md) - Rolls back an upgrade. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-collect.md b/product/en/docs-ptk/v2.0/commands/ptk-collect.md new file mode 100644 index 00000000..8de709c4 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-collect.md @@ -0,0 +1,101 @@ +--- +title: ptk collect +summary: ptk collect +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk collect + +`ptk collect` collect system and cluster information for analysis. + +## Syntax + +```bash +ptk collect [flags] +``` + +## Example + +```bash +ptk collect -f +ptk collect -n +``` + +## Option + +### -f, --file string + +* Description: specifies the cluster configuration file. +* Data type: string +* Default value: "" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.2.0 + +## More Command + +* [ptk](./ptk.md) - Provisioning Toolkit for MogDB diff --git a/product/en/docs-ptk/v2.0/commands/ptk-completion-bash.md b/product/en/docs-ptk/v2.0/commands/ptk-completion-bash.md new file mode 100644 index 00000000..3afc6059 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-completion-bash.md @@ -0,0 +1,111 @@ +--- +title: ptk completion bash +summary: ptk completion bash +author: ptk +date: 2022-06-28 +--- + +# ptk completion bash + +`ptk completion bash` generates the autocompletion script of bash. + +## Note + +- The script depends on the bash-completion package. If it is not installed already, you can install it via your OS's package manager. + +- To load completions in your current shell session, execute the following command. + + ```bash + source <(ptk completion bash) + ``` + +- To load completions for every new session, execute the following command once: + + Linux: + + ```bash + ptk completion bash > /etc/bash_completion.d/ptk + ``` + + macOS: + + ```bash + ptk completion bash > /usr/local/etc/bash_completion.d/ptk + ``` + +You need to start a new shell for this setup to take effect. + +## Syntax + +```bash +ptk completion bash +``` + +## Option + +### --no-descriptions + +* Description: disables completion description. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for bash. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +- [ptk completion](./ptk-completion.md) - Generates the autocompletion script for the specified shell. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-completion-fish.md b/product/en/docs-ptk/v2.0/commands/ptk-completion-fish.md new file mode 100644 index 00000000..2dae0940 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-completion-fish.md @@ -0,0 +1,101 @@ +--- +title: ptk completion fish +summary: ptk completion fish +author: ptk +date: 2022-06-28 +--- + +# ptk completion fish + +`ptk completion fish` generates the automatic completion script of fish. + +## Note + +To load completions in your current shell session, execute the following command. + +```bash +ptk completion fish | source +``` + +To load completions for every new session, execute the following command once: + +```bash +ptk completion fish > ~/.config/fish/completions/ptk.fish +``` + +You need to start new shell to make the setting take effect. + +## Syntax + +```bash +ptk completion fish [flags] +``` + +## Option + +### --no-descriptions + +* Description: disables completion description. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information for fish. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +- [ptk completion](./ptk-completion.md) - Generates the autocompletion script for the specified shell. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-completion-powershell.md b/product/en/docs-ptk/v2.0/commands/ptk-completion-powershell.md new file mode 100644 index 00000000..2eb30a3c --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-completion-powershell.md @@ -0,0 +1,95 @@ +--- +title: ptk completion powershell +summary: ptk completion powershell +author: ptk +date: 2022-06-28 +--- + +# ptk completion powershell + +`ptk completion powershell` generates the automatic completion script for PowerShell. + +## Note + +To load completions in your current shell session, execute the following command: + +```shell +ptk completion powershell | Out-String | Invoke-Expression +``` + +To load completions for every new session, add the output of the above command to your powershell profile. + +## Syntax + +```bash +ptk completion powershell [flags] +``` + +## Option + +### --no-descriptions + +* Description: disables completion descriptions +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +- [ptk completion](./ptk-completion.md) - Generates the autocompletion script for the specified shell. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-completion-zsh.md b/product/en/docs-ptk/v2.0/commands/ptk-completion-zsh.md new file mode 100644 index 00000000..e3b39cdf --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-completion-zsh.md @@ -0,0 +1,115 @@ +--- +title: ptk completion zsh +summary: ptk completion zsh +author: ptk +date: 2022-06-28 +--- + +# ptk completion zsh + +`ptk completion zsh` generates the automatic completion script for zsh shell. + +## Note + +If the shell completion function is not enabled, you can run the following command to enable it: + +```shell +echo "autoload -U compinit; compinit" >> ~/.zshrc +``` + +To load completions in your current shell session, execute the following command: + +```shell +source <(ptk completion zsh); compdef _ptk ptk +``` + +To load completions for every new session, execute the following command once: + +**Linux:** + +```shell +ptk completion zsh > "${fpath[1]}/_ptk" +``` + +**macOS:** + +```shell +ptk completion zsh > /usr/local/share/zsh/site-functions/_ptk +``` + +You need to start new shell to make the setting take effect. + +## Syntax + +```bash +ptk completion zsh [flags] +``` + +## Option + +### --no-descriptions + +* Description: disables completion descriptions +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +- [ptk completion](./ptk-completion.md) - Generates the autocompletion script for the specified shell. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-completion.md b/product/en/docs-ptk/v2.0/commands/ptk-completion.md new file mode 100644 index 00000000..f7f39a37 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-completion.md @@ -0,0 +1,81 @@ +--- +title: ptk completion +summary: ptk completion +author: ptk +date: 2022-06-28 +--- + +# ptk completion + +`ptk completion` generates automatic PTK completion script for the specified Shell. + +## Note + +Generate the autocompletion script for ptk for the specified shell. + +See each sub-command's help for details on how to use the generated script. + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. +- [ptk completion bash](./ptk-completion-bash.md) - Generates the autocompletion script for bash. +- [ptk completion fish](./ptk-completion-fish.md) - Generates the autocompletion script for fish. +- [ptk completion powershell](./ptk-completion-powershell.md) - Generates the autocompletion script for PowerShell. +- [ptk completion zsh](./ptk-completion-zsh.md) - Generates the autocompletion script for zsh. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-demo.md b/product/en/docs-ptk/v2.0/commands/ptk-demo.md new file mode 100644 index 00000000..6b535d7c --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-demo.md @@ -0,0 +1,108 @@ +--- +title: ptk demo +summary: ptk demo +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk demo + +`ptk demo` quickly deploys MogDB locally. + +## Syntax + +```bash +ptk demo [flags] +``` + +## Example + +```bash +ptk demo +ptk demo -p +``` + +## Option + +### --compat-tools-dir string + +* Description: specifies the directory of compat-tools. +* Data type: string +* Default value: "" + +### --mogila-dir string + +* Description: specifies the directory of mogila. +* Data type: string +* Default value: "" + +### -p, --port int + +* Description: specifies the MogDB port. +* Data type: integer +* Default value: **26000** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.6 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-download.md b/product/en/docs-ptk/v2.0/commands/ptk-download.md new file mode 100644 index 00000000..69981add --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-download.md @@ -0,0 +1,129 @@ +--- +title: ptk candidate +summary: ptk candidate +author: ptk +date: 2022-6-28 +--- + +# ptk download + +`ptk download` downloads the MogDB installation package online. + +## Syntax + +```bash +ptk download [flags] +``` + +## Example + +```bash +ptk download +ptk download --db-version 5.0.5 +``` + +## Option + +### --cpu string + +* Description: specifies the CPU model. + You can run `ptk candidate cpu` to query the supported CPU models. +* Data type: string +* Default value: "" + +### -V,--db-version + +- Description: Specify db version. + + Type 'ptk candidate db' to show supported version. + + This flag only support MogDB. + +- Data type: string +- Default value: **5.0.7** + +### --dest-dir string + +* Description: specifies the local directory for storage. +* Data type: string +* Default value: "" + +### --dryrun + +* Description: Preview the download process without executing the download. +* Data type: bool +* Default value: false + +### -O,--os int + +- Description: specifies the system ID (current system by default) + + you can run `ptk candidate os` to query the supported operating systems. + +- Data type: integer +- Default value: **0** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.3 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-encrypt.md b/product/en/docs-ptk/v2.0/commands/ptk-encrypt.md new file mode 100644 index 00000000..05982dd4 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-encrypt.md @@ -0,0 +1,108 @@ +--- +title: ptk encrypt +summary: ptk encrypt +author: ptk +date: 2022-6-28 +--- + +# ptk encrypt + +`ptk encrypt` encrypts text or password in a conveniently way. + +## Syntax + +```bash +ptk encrypt TEXT1 [TEXT2 TEXT3...] [flags] +``` + +## Example + +```bash +# Wrap the string to be encrypted with single quotes to prevent it from being interpreted +ptk encrypt 'Abcd@1234' + +# Enter text by interaction +ptk encrypt --stdin + +# Or pass text by pipe +echo '' | ptk encrypt --stdin [--disable-prompt] +``` + +## Options + +### --disable-prompt + +* Description: Do not show prompt while entering +* Data type: bool +* Default value: false + +### --stdin + +* Description: Enter text by interactive +* Data type: bool +* Default value: false + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-env.md b/product/en/docs-ptk/v2.0/commands/ptk-env.md new file mode 100644 index 00000000..ce5c187b --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-env.md @@ -0,0 +1,91 @@ +--- +title: ptk env +summary: ptk env +author: ptk +date: 2022-06-28 +--- + +# ptk env + +`ptk env` prints PTK environment variables. + +## Syntax + +```bash +ptk env [key1 key2 ... keyN] [flags] +``` + +## Example + +```bash +# Print all supported environment variables +ptk env + +# Print value of specified environment variable +ptk env +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-exec.md b/product/en/docs-ptk/v2.0/commands/ptk-exec.md new file mode 100644 index 00000000..cfca3b0b --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-exec.md @@ -0,0 +1,134 @@ +--- +title: ptk exec +summary: ptk exec +author: ptk +date: 2022-11-09 +--- + +# ptk exec + +`ptk exec` executes a shell command or script. + +## Syntax + +```bash +ptk exec [flags] +``` + +## Example + +```bash +# Run a command through specifying a config file +# (This generally used in the scenario where the cluster has not been installed) +ptk exec -f -c 'pwd' + +# Run a command through specifying the cluster name +ptk exec -n -c 'pwd' + +# If both '-f' and '-n' are specified, only '-n' will be used. + +# Run a local shell script on all hosts in the cluster +ptk exec -n -s + +# You can specify the command and the script at the same time, +# PTK will execute the command first, the script will be executed if the command executed successfully, +# otherwise the script will not be executed. +ptk exec -n -c 'pwd' -s +``` + +## Option + +### -c, --command string + +- Description: specifies the shell command to be executed. +- Data type: string +- Default value: "" + +### -f, --file string + +- Description: specifies a cluster configuration file. +- Data type: string +- Default value: "" + +### -H, --host stringArray + +- Description: specifies the IP address of the instance to be operated. +- Data type: stringArray +- Default value: [] + +### -n, --name string + +- Description: specifies the name of a cluster. +- Data type: string +- Default value: "" + +### -s, --script string + +- Description: specifies the file path of the shell script to be executed. +- Data type: string +- Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.5 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-gen-om-xml.md b/product/en/docs-ptk/v2.0/commands/ptk-gen-om-xml.md new file mode 100644 index 00000000..37d2afc7 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-gen-om-xml.md @@ -0,0 +1,111 @@ +--- +title: ptk gen-om-xml +summary: ptk gen-om-xml +author: ptk +date: 2022-06-28 +--- + +# ptk gen-om-xml + +`ptk gen-om-xml` generates an XML configuration file used by gs_om. + +## Syntax + +```bash +ptk gen-om-xml [flags] +``` + +## Example + +```bash +# Generate XML configuration file from CONFIG.yaml. +ptk gen-om-xml -f [-o output.xml] + +# Generate XML configuration file from an existing cluster. +ptk gen-om-xml -n [-o output.xml] +``` + +## Option + +### -f, --file string + +* Description: specifies the configuration file of a cluster. +* Data type: string +* Default value: "" + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### -o, --output string + +- Description: specifies the name of the output file. +- Data type: string +- Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-gen-ptkc.md b/product/en/docs-ptk/v2.0/commands/ptk-gen-ptkc.md new file mode 100644 index 00000000..d9fe42c6 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-gen-ptkc.md @@ -0,0 +1,107 @@ +--- +title: ptk gen-ptkc +summary: ptk gen-ptkc +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk gen-ptkc + +`ptk gen-ptkc` generates a ptkc binary file. + +## Syntax + +```bash +ptk gen-ptkc [flags] +``` + +## Option + +### --arch string + +* Description: specifies the ptkc command set architecture. The value can be **arm64** or **x86_64**. +* Data type: string +* Default value: "" + +### -H, --host strings + +* Description: specifies the IP addresses of all hosts in a cluster. +* Data type: strings +* Default value: [] + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +### -o, --output string + +* Description: specifies the output directory. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.8 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-gen-static-config.md b/product/en/docs-ptk/v2.0/commands/ptk-gen-static-config.md new file mode 100644 index 00000000..06d2176a --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-gen-static-config.md @@ -0,0 +1,101 @@ +--- +title: ptk gen-static-config +summary: ptk gen-static-config +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk gen-static-config + +`ptk gen-static-config` generates a new cluster static file using the specified YAML configuration file and distribute it to the data nodes. + +## Syntax + +```bash +ptk gen-static-config [flags] +``` + +## Example + +```bash +ptk gen-static-config -f +ptk distribute -f +``` + +## Option + +### -f, --file string + +* Description: specifies the cluster configuration file. +* Data type: string +* Default value: "" + +### -H, --host string + +* Description: distributes to a specified data node. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v0.2 + +## More Command + +* [ptk](./ptk.md) - Provisioning Toolkit for MogDB diff --git a/product/en/docs-ptk/v2.0/commands/ptk-init-cluster.md b/product/en/docs-ptk/v2.0/commands/ptk-init-cluster.md new file mode 100644 index 00000000..653ed29d --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-init-cluster.md @@ -0,0 +1,94 @@ +--- +title: ptk init-cluster +summary: ptk init-cluster +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk init-cluster + +`ptk init-cluster` generates a new empty cluster. + +## Syntax + +```bash +ptk init-cluster [flags] +``` + +## Example + +```bash +ptk init-cluster [--name|-n CLUSTER_NAME] +``` + +## Option + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.5.0 + +## More Command + +* [ptk](./ptk.md) - Provisioning Toolkit for MogDB diff --git a/product/en/docs-ptk/v2.0/commands/ptk-install.md b/product/en/docs-ptk/v2.0/commands/ptk-install.md new file mode 100644 index 00000000..28b9c3dd --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-install.md @@ -0,0 +1,253 @@ +--- +title: ptk install +summary: ptk install +author: ptk +date: 2022-6-28 +--- + +# ptk install + +`ptk install` installs a MogDB or Uqbar database cluster. + +## Syntax + +```bash +ptk install [flags] +``` + +## Example + +```bash +# Simplest command to install the database (require network) +# It will download latest MogDB installation package from internet and deploy to target hosts +ptk install -f + +# If you have previously performed checkos command and fixed them, +# you can skip unnecessary secondary checks by adding the '-skip-check-os' parameter +ptk install -f --skip-check-os + +# If you do not want to interact during the installation process +# you can specify '-y' to accept all questions automatically +ptk install -f -y + +# If your machine is unable to connect to the Internet, +# you can install it by specifying a local database package +ptk install -f -p + +# If you want to install the cm component, you can specify the '--install-cm' parameter +ptk install -f --install-cm + +# Of course, you can freely combine multiple parameters to meet specific usage scenarios +ptk install -f -p -y --skip-check-os --comment 'greate db' + +# There are many other parameters in the ptk install command. We look forward to your exploration and discovery. +``` + +## Option + +### -y, --assumeyes + +- Description: automatically replies yes to all questions. +- Data type: boolean +- Default value: **false** + +### --comment string + +* Description: adds a comment for the current cluster. +* Data type: string +* Default value: "" + +### --cpu string + +- Description: specifies the CPU model. You can run `ptk candidate cpu` to query the supported CPU models. +- Data type: string +- Default value: "" + +### --db-version string + +- Description: Specify the database package version if use online package + + Type 'ptk candidate db' to show available version + + This flag only support MogDB +- Data type: string +- Default value: **5.0.7** + +### --default-guc + +* Description: uses the default GUC parameters which are not automatically optimized. +* Data type: boolean +* Default value: **false** + +### --enable-dss + +* Description: enable DSS component. +* Data type: bool +* Default value: false + +### -e, --env strings + +- Description: adds the environment variables to the configuration file of the system user. +- Data type: strings +- Default value: [] + +### -f, --file string + +* Description: specifies the configuration file of a cluster. +* Data type: string +* Default value: "" + +### --install-cm + +* Description: installs the CM component. +* Data type: boolean +* Default value: **false** + +### --launch-db-timeout duration + +* Description: starts the database timeout duration. +* Data type: duration +* Default value: **10m** + +### --no-cache + +- Description: specifies that the installation package in the local cache is not used. +- Data type: boolean +- Default value: **false** + +### --not-limit-cm-nodes + +* Description: No restriction that the number of CM nodes be odd. +* Data type: bool +* Default value: **false** + +### -p, --pkg string + +* Description: specifies the file path or URL of a database installation package. +* Data type: string +* Default value: "" + +### --post-run string + +- Description: specifies the path for storing the bash script to be executed on each server after successful deployment. +- Data type: string +- Default value: "" + +### --pre-run string + +- Description: specifies the path for storing the bash script to be executed on each server before successful deployment. +- Data type: string +- Default value: "" + +### --skip-check-distro + +- Description: skips the system distro check. +- Data type: boolean +- Default value: **false** + +### --skip-check-os + +- Description: skips the check of system environment. +- Data type: boolean +- Default value: **false** + +### --skip-check-package + +- Description: skips md5 checksums on installers and sha256 checksums on internal packages. +- Data type: boolean +- Default value: **false** + +### --skip-create-user + +- Description: skips the creation of a system user. +- Data type: boolean +- Default value: **false** + +### --skip-gen-ptkc + +* Description: skips the generation of the ptkc tool. +* Data type: boolean +* Default value: **false** + +### --skip-launch-db + +- Description: skips database startup. +- Data type: boolean +- Default value: **false** + +### --skip-load-vip + +- Description: skips load vip after deploying CM +- Data type: boolean +- Default value: **false** + +### --skip-rollback + +- Description: skips rollback for installation failures. +- Data type: boolean +- Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for installation. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-ls.md b/product/en/docs-ptk/v2.0/commands/ptk-ls.md new file mode 100644 index 00000000..01a59686 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-ls.md @@ -0,0 +1,95 @@ +--- +title: ptk ls +summary: ptk ls +author: ptk +date: 2022-06-28 +--- + +# ptk ls + +`ptk ls` lists all MogDB clusters. + +## Syntax + +```bash +ptk ls [flags] +``` + +## Example + +```bash +ptk ls [-n|--only-name] +``` + +## Option + +### -n, --only-name + +- Description: lists only the cluster name. +- Data type: boolean +- Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.1 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-manage.md b/product/en/docs-ptk/v2.0/commands/ptk-manage.md new file mode 100644 index 00000000..4fe10f85 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-manage.md @@ -0,0 +1,107 @@ +--- +title: ptk manage +summary: ptk manage +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk manage + +`ptk manage` manages an existing cluster. + +## Syntax + +```bash +ptk manage [flags] +``` + +## Example + +```bash +ptk manage --clustername -H -U +``` + +## Option + +### --clustername string + +* Description: specifies a new cluster name. +* Data type: string +* Default value: "" + +### -H, --host string + +* Description: specifies the IP of one machine in the target cluster. +* Data type: string +* Default value: "" + +### -U, --username string + +* Description: specifies the operating system user running the database. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.7 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-meta-dump.md b/product/en/docs-ptk/v2.0/commands/ptk-meta-dump.md new file mode 100644 index 00000000..9e250356 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-meta-dump.md @@ -0,0 +1,111 @@ +--- +title: ptk meta dump +summary: ptk meta dump +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk meta dump + +`ptk meta dump` exports cluster metadata. + +## Syntax + +```bash +ptk meta dump [flags] +``` + +## Example + +```bash +# Dump the metadata of a cluster +ptk meta dump -n [-o OUTPUT_DIR] + +# Dump the metadata of all clusters +ptk meta dump --all [-o OUTPUT_DIR] +``` + +## Option + +### --all + +* Description: exports all cluster metadata. +* Data type: boolean +* Default value: **false** + +### -n, --name stringArray + +* Description: specifies the cluster name. +* Data type: stringArray +* Default value: [] + +### -o, --output string + +* Description: specifies the output directory. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.8 + +## More Command + +* [ptk meta](./ptk-meta.md) - Manages PTK metadata. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-meta-home.md b/product/en/docs-ptk/v2.0/commands/ptk-meta-home.md new file mode 100644 index 00000000..7b2663d3 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-meta-home.md @@ -0,0 +1,87 @@ +--- +title: ptk meta home +summary: ptk meta home +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk meta home + +`ptk meta home` prints the root directory of metadata. + +## Syntax + +```bash +ptk meta home [flags] +``` + +## Example + +```bash +ptk meta home +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for metadata. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk meta](./ptk-meta.md) - Manages PTK metadata. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-meta-merge.md b/product/en/docs-ptk/v2.0/commands/ptk-meta-merge.md new file mode 100644 index 00000000..f490e491 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-meta-merge.md @@ -0,0 +1,95 @@ +--- +title: ptk meta merge +summary: ptk meta merge +author: ptk +date: 2023-05-26T15:36:26+08:00 +--- + +# ptk meta merge + +`ptk meta merge` merges cluster metadata. + +## Syntax + +```bash +ptk meta merge [flags] +``` + +## Example + +```bash +ptk meta merge -p +``` + +## Option + +### -p, --package string + +* Description: specifies the metadata package exported by PTK. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.8 + +## More Command + +* [ptk meta](./ptk-meta.md) - Manages PTK metadata. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-meta-prune.md b/product/en/docs-ptk/v2.0/commands/ptk-meta-prune.md new file mode 100644 index 00000000..e5c02510 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-meta-prune.md @@ -0,0 +1,107 @@ +--- +title: ptk meta prune +summary: ptk meta prune +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk meta prune + +`ptk meta prune` clears expired cluster metadata. + +## Syntax + +```bash +ptk meta prune [flags] +``` + +## Example + +```bash +ptk meta prune -n [--force] +``` + +## Option + +### --assumeyes + +* Description: automatically applies yes to all questions. +* Data type: boolean +* Default value: **false** + +### --force + +* Description: clears metadata without checking redundant data. +* Data type: boolean +* Default value: **false** + +### -n, --name string + +* Description: specifies the cluster name. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for metadata. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.6 + +## More Command + +- [ptk meta](./ptk-meta.md) - Manages PTK metadata. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-meta.md b/product/en/docs-ptk/v2.0/commands/ptk-meta.md new file mode 100644 index 00000000..ee4c770d --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-meta.md @@ -0,0 +1,86 @@ +--- +title: ptk meta +summary: ptk meta +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk meta + +`ptk meta` manages PTK metadata. + +## Syntax + +```bash +ptk meta [flags] +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for metadata. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +- [ptk](./ptk.md) - A provisioning toolkit for MogDB. +- [ptk meta dump](./ptk-meta-dump.md) - Exports cluster metadata. + +* [ptk meta home](./ptk-meta-home.md) - Prints the root directory of metadata. +* [ptk meta merge](./ptk-meta-merge.md) - Merge cluster metadata. +* [ptk meta prune](./ptk-meta-prune.md) - Clears expired cluster metadata. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-rec-guc.md b/product/en/docs-ptk/v2.0/commands/ptk-rec-guc.md new file mode 100644 index 00000000..e480b7df --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-rec-guc.md @@ -0,0 +1,99 @@ +--- +title: ptk rec-guc +summary: ptk rec-guc +author: ptk +date: 2024-06-04T17:04:56+08:00 +--- + +# ptk rec-guc + +`ptk rec-guc` shows list of optimized parameters. + +## Syntax + +```bash +ptk rec-guc version1 [version2] [flags] +``` + +## Example + +```bash +# show the list of optimized parameters for the specified database version +# such as 5.0.5 +ptk rec-guc 5.0.5 + +# Compare the differences between the two versions. +ptk rec-guc 3.0.5 5.0.5 +``` + +## Option + +### -t, --type string + +* Description: database type, value range: [mogdb, uqbar] +* Data type: string +* Default value: "mogdb" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information. +* Data type: bool +* Default value: false + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: "text" + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: "info" + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. +* Data type: bool +* Default value: false + +## Added Version + +v1.2.0 + +## More Command + +* [ptk](./ptk.md) - Provisioning Toolkit for MogDB diff --git a/product/en/docs-ptk/v2.0/commands/ptk-register.md b/product/en/docs-ptk/v2.0/commands/ptk-register.md new file mode 100644 index 00000000..a1c2b325 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-register.md @@ -0,0 +1,83 @@ +--- +title: ptk register +summary: ptk register +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk register + +> ! This command is deprecated and will be removed in future release. + +`ptk register` registers internal PTK types to meet special requirements. + +## Syntax + +```bash +ptk register [flags] +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for metadata. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. diff --git a/product/en/docs-ptk/v2.0/commands/ptk-self-upgrade.md b/product/en/docs-ptk/v2.0/commands/ptk-self-upgrade.md new file mode 100644 index 00000000..5dc0b73b --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-self-upgrade.md @@ -0,0 +1,109 @@ +--- +title: ptk self upgrade +summary: ptk self upgrade +author: ptk +date: 2022-06-28 +--- + +# ptk self upgrade + +`ptk self upgrade` downloads and automatically installs PTK. + +## Syntax + +```bash +ptk self upgrade [flags] +``` + +## Example + +```bash +# Online self-upgrade (internet required) +ptk self upgrade + +# Upgrade to the specified version (internet required) +# For example, the target version is 1.2.0 +ptk self upgrade -V 1.2.0 + +# Self-upgrade using local PTK installer +ptk self upgrade -p +``` + +## Option + +### -p, --pkg string + +* Description: specifies the local PTK installation package. +* Data type: string +* Default value: "" + +### -V, --to-version string + +* Description: specifies the version to be upgraded. +* Data type: string +* Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +* [ptk self](./ptk-self.md) - Specifies PTK itself operation. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-self.md b/product/en/docs-ptk/v2.0/commands/ptk-self.md new file mode 100644 index 00000000..c4bc315b --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-self.md @@ -0,0 +1,78 @@ +--- +title: ptk self +summary: ptk self +author: ptk +date: 2022-06-28 +--- + +# ptk self + +`ptk self` specifies PTK itself operations. + +## Syntax + +```bash +ptk self [flags] +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. +* [ptk self upgrade](./ptk-self-upgrade.md) - Downloads and automatically installs PTK. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-template-create.md b/product/en/docs-ptk/v2.0/commands/ptk-template-create.md new file mode 100644 index 00000000..5fea2257 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-template-create.md @@ -0,0 +1,95 @@ +--- +title: ptk template create +summary: ptk template create +author: ptk +date: 2022-6-28 +--- + +# ptk template create + +`ptk template create` creates a configuration template in an interactive way. + +## Syntax + +```bash +ptk template create [flags] +``` + +## Example + +```bash +ptk template create [-o CONFIG.yaml] +``` + +## Option + +### -o, --output string + +- Description: specifies the name of the output file. +- Data type: string +- Default value: "config.2024-06-04T17_04_56.yaml" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +* [ptk template](./ptk-template.md) - Generates a configuration template. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-template-mogha.md b/product/en/docs-ptk/v2.0/commands/ptk-template-mogha.md new file mode 100644 index 00000000..118fd1c9 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-template-mogha.md @@ -0,0 +1,107 @@ +--- +title: ptk template mogha +summary: ptk template mogha +author: ptk +date: 2022-08-01 +--- + +# ptk template mogha + +`ptk template mogha` generates the MogHA configurations. + +## Syntax + +```bash +ptk template mogha [flags] +``` + +## Example + +```bash +ptk template mogha -n [--port 8081] > node.conf +``` + +## Option + +### -n, --cluster-name string + +- Description: specifies the cluster name. +- Data type: string +- Default value: "" + +### -o, --output string + +- Description: specifies the output file. +- Data type: string +- Default value: "" + +### --port int + +- Description: specifies the port to be listened by MogHA. +- Data type: integer +- Default value: **8081** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for MogHA. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +* [ptk template](./ptk-template.md) - Generates a configuration template. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-template-scale-out.md b/product/en/docs-ptk/v2.0/commands/ptk-template-scale-out.md new file mode 100644 index 00000000..07a4939f --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-template-scale-out.md @@ -0,0 +1,96 @@ +--- +title: ptk template scale-out +summary: ptk template scale-out +author: ptk +date: 2022-08-01 +--- + +# ptk template scale-out + +`ptk template scale-out` generates cluster scale-out configuration. + +## Syntax + +```bash +ptk template scale-out [flags] +``` + +## Example + +```bash +ptk template scale-out > scaleout.yml +``` + +## Option + +### -o, --output string + +- Description: specifies the output file. + +- Data type: string +- Default value: "" + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for scale-out. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.4 + +## More Command + +* [ptk template](./ptk-template.md) - Generates a configuration template. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-template.md b/product/en/docs-ptk/v2.0/commands/ptk-template.md new file mode 100644 index 00000000..8101b533 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-template.md @@ -0,0 +1,135 @@ +--- +title: ptk template +summary: ptk template +author: ptk +date: 2022-6-28 +--- + +# ptk template + +`ptk template` generates a configuration template. + +## Syntax + +```bash +ptk template [flags] +``` + +## Example + +```bash +# Generate a local single instance configuration template. +ptk template -l > CONFIG.yaml + +# Generate a configuration template for multi-instance clusters. +ptk template > CONFIG.yaml + +# Customise the values of some of the configuration fields. +ptk template -n -u -g -d -p > CONFIG.yaml +``` + +## Option + +### -d, --base-dir string + +- Description: specifies the root directory of the database to be installed. +- Data type: string +- Default value: **/home/kylin/mogdb** + +### -n, --cluster-name string + +- Description: specifies the cluster name. It is generated randomly by default. +- Data type: string +- Default value: "" + +### -g, --group string + +- Description: specifies the system user group. +- Data type: string +- Default value: **kylin** + +### -l, --local + +- Description: generates the configuration file used for installing a database locally. +- Data type: boolean +- Default value: **false** + +### -p, --port int + +- Description: specifies the database port. +- Data type: integer +- Default value: **26000** + +### -u, --user string + +- Description: specifies the system user name. +- Data type: string +- Default value: **kylin** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: outputs the help information for template. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. +* [ptk template create](./ptk-template-create.md) - Creates a configuration file in an interactive way. +* [ptk template mogha](./ptk-template-mogha.md) - Generates MogHA configuration. +* [ptk template scale-out](./ptk-template-scale-out.md) - Generates scale-out configuration. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-uninstall.md b/product/en/docs-ptk/v2.0/commands/ptk-uninstall.md new file mode 100644 index 00000000..996324e6 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-uninstall.md @@ -0,0 +1,117 @@ +--- +title: ptk uninstall +summary: ptk uninstall +author: ptk +date: 2022-06-28 +--- + +# ptk uninstall + +`ptk uninstall` uninstalls a database cluster. + +## Syntax + +```bash +ptk uninstall [flags] +``` + +## Example + +```bash +# uninstall by cluster name. +ptk uninstall -n + +# If you want to avoid interaction, submit answers to interaction questions in advance at the command line. +ptk uninstall -n --skip-confirm --remove-data y --remove-user y +``` + +## Option + +### -n, --name string + +- Description: specifies the name of the cluster to be uninstalled. +- Data type: string +- Default value: "" + +### --remove-data string + +* Description: deletes database data. The option is y or n. +* Data type: string +* Default value: "" + +### --remove-user string + +* Description: deletes the OS user. The option is y or n. +* Data type: string +* Default value: "" + +### --skip-confirm + +* Description: skips confirmation of the first question. +* Data type: boolean +* Default value: **false** + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## Added Version + +v0.2 + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk-version.md b/product/en/docs-ptk/v2.0/commands/ptk-version.md new file mode 100644 index 00000000..0710d28e --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk-version.md @@ -0,0 +1,77 @@ +--- +title: ptk version +summary: ptk version +author: ptk +date: 2022-06-28 +--- + +# ptk version + +`ptk version` prints the PTK version. + +## Syntax + +```bash +ptk version [flags] +``` + +## Option Inherited from the Parent Command + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +- Description: outputs the help information. +- Data type: boolean +- Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +## More Command + +* [ptk](./ptk.md) - A provisioning toolkit for MogDB. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/commands/ptk.md b/product/en/docs-ptk/v2.0/commands/ptk.md new file mode 100644 index 00000000..0c346515 --- /dev/null +++ b/product/en/docs-ptk/v2.0/commands/ptk.md @@ -0,0 +1,111 @@ +--- +title: ptk +summary: ptk +author: ptk +date: 2023-01-12T15:49:05+08:00 +--- + +# ptk + +PTK is a provisioning toolkit for MogDB. + +## Description + +PTK is a command-line tool for deploying and managing MogDB clusters. + +## Syntax + +```bash +ptk [flags] [args...] +``` + +## Option + +### --disable-color + +* Description: Disable color logs. +* Data type: bool +* Default value: false + +### --disable-debug-log + +* Description: not generate debug log files. +* Data type: bool +* Default value: false + +### --disable-progressbar + +* Description: No progress bar globally. +* Data type: bool +* Default value: false + +### -h, --help + +* Description: prints the help information. +* Data type: boolean +* Default value: **false** + +### --log-file string + +* Description: specifies the file path to which the run log is stored. +* Data type: string +* Default value: "" + +### --log-format string + +* Description: specifies the output format of a run log. The value can be **text** and **json**. +* Data type: string +* Default value: **text** + +### --log-level string + +* Description: specifies the run log level. The value can be **debug**, **info**, **warning**, **error**, and **panic**. +* Data type: string +* Default value: **info** + +### --silence + +* Description: Logs are not printed to standard output. +* Data type: bool +* Default value: false + +### --skip-fix-ssh + +* Description: skips SSH connection fixing through interaction. + +* Data type: boolean +* Default value: **false** + +### -v, --version + +* Description: prints the PTK version. +* Data type: boolean +* Default value: **false** + +## More Command + +* [ptk cache](./ptk-cache.md) - Lists cache files. +* [ptk candidate](./ptk-candidate.md) - Lists the software versions supported by PTK. +* [ptk checkos](./ptk-checkos.md) - Checks whether the cluster server dependencies meet the database installation requirements. +* [ptk cluster](./ptk-cluster.md) - Manages a cluster. +* [ptk collect](./ptk-collect.md) - Collects system and cluster information for analysis. +* [ptk completion](./ptk-completion.md) - Generates an automatic completion script for the specified shell. +* [ptk demo](./ptk-demo.md) - Quickly deploys an example MogDB locally. +* [ptk download](./ptk-download.md) - Downloads a MogDB installation package online. +* [ptk encrypt](./ptk-encrypt.md) - Provides a quick method of encrypting your text or password. +* [ptk env](./ptk-env.md) - Prints PTK environment variables. +* [ptk exec](./ptk-exec.md) - Executes a shell command or script. +* [ptk gen-om-xml](./ptk-gen-om-xml.md) - Generates a XML configuration file of gs_om. +* [ptk gen-ptkc](./ptk-gen-ptkc.md) - Generates a ptkc binary file. +* [ptk gen-static-config](./ptk-gen-static-config.md) - Generates a new cluster static file with the specified YAML configuration file and distribute it to the data nodes. +* [ptk init-cluster](./ptk-init-cluster.md) - Generates a new empty cluster. +* [ptk install](./ptk-install.md) - Installs a MogDB or Uqbar database cluster. +* [ptk ls](./ptk-ls.md) - Lists all MogDB database clusters. +* [ptk manage](./ptk-manage.md) - Manages the existing cluster. +* [ptk meta](./ptk-meta.md) - Manages PTK metadata. +* [ptk rec-guc](./ptk-rec-guc.md) - Shows the list of optimisation parameters. +* [ptk register](./ptk-register.md) - Registers internal PTK types to meet special requirements. +* [ptk self](./ptk-self.md) - Specifies PTK itself operation. +* [ptk template](./ptk-template.md) - Generates a configuration template. +* [ptk uninstall](./ptk-uninstall.md) - Uninstalls a database cluster. +* [ptk version](./ptk-version.md) - Prints the PTK version. diff --git a/product/en/docs-ptk/v2.0/debug.md b/product/en/docs-ptk/v2.0/debug.md new file mode 100644 index 00000000..d112126e --- /dev/null +++ b/product/en/docs-ptk/v2.0/debug.md @@ -0,0 +1,336 @@ +--- +title: Troubleshooting +summary: Troubleshooting +author: Yao Qian +date: 2022-05-30 +--- + +## Troubleshooting + +### Error Code Starting with 4xxx + +#### PTK-4001 + +The user and user group configurations of the corresponding server cannot be set to root. You need to change them to common users. + +#### PTK-4002 + +An unreasonable port number is used in a configuration file. PTK only accepts port numbers within the range [1024, 65534]. + +#### PTK-4003 + +The IP address is invalid. + +#### PTK-4004 + +The directory configured for data directory (data_dir) in the configuration file cannot be a subdirectory of an application directory (app_dir). You need to modify the data directory. + +#### PTK-4005 + +The directory prompted is a relative path. PTK is operated remotely, and the relative path is an unreliable path. Therefore, you need to change the relative path to an absolute path. + +#### PTK-4006 + +The directory contains illegal characters. Check the corresponding fields in the configuration file. + +#### PTK-4007 + +An invalid database role is specified in the configuration file. Ensure that the database role is one of primary, standby, and cascade_standby. + +#### PTK-4008 + +Invalid URL + +#### PTK-4010 + +The target system does not have necessary tools installed and cannot be checked. Please install the required tools on the target system. + +#### PTK-4011 + +Necessary parameters are missing in the command . You can run the `--help` command to view the usage description. + +#### PTK-4012 + +The cluster name is already used. Please use a new name. + +#### PTK-4013 + +The port is unavailable. You can disable the process that occupies the port or use a new port. + +#### PTK-4014 + +The release information of the operating system on different servers in the same cluster is inconsistent. PTK strongly recommends that the operating systems of all servers in the cluster be consistent when you deploy a database cluster. + +#### PTK-4015 + +The CPU architecture cannot be identified. + +#### PTK-4017 + +The name string contains illegal characters. Names are allowed to contain only letters, numbers, hyphens (-), underscores (_), and dots (.) when defined. + +#### PTK-4018 + +The cluster name should not be empty. + +#### PTK-4019 + +The cluster name is PTK's internal reserved keyword, and please change it to another name. + +#### PTK-4020 + +no database server is configured in a configuration file during installation. + +#### PTK-4021 + +Invalid check item number is specified when the checkos command is run. + +#### PTK-4022 + +When installing a database, you specify skip checking the operating system distribution, but you do not specify the path of the installation package, and PTK cannot automatically determine which installation package should be used. In the installation command, `-p` or `--pkg` can be used to specify the installation package path. + +#### PTK-4023 + +No configuration file is specified. You can use `-f` to specify it. + +#### PTK-4024 + +In the configuration file, the upstream instance of the database instance cannot be set as itself, and the IP address of another instance must be specified. + +#### PTK-4025 + +The upstream instance IP address of a database instance is set in the configuration file, but the upstream instance IP address is not found in the current set. This is usually caused by an incorrect configuration of the upstream IP address. + +#### PTK-4026 + +The database instance with the primary role is not found in the configuration file. + +#### PTK-4027 + +The IP address of the primary database is set in the upstream of the cascaded backup in the configuration file. The upstream of the cascaded backup must be the IP address of the standby database. + +#### PTK-4028 + +There are multiple database instance configurations with the primary role in the configuration file. Ensure that only one primary database exists in a cluster configuration. + +#### PTK-4029 + +The IP address of the upstream instance of the standby database in the configuration file is not configured. If the role is cascade_standby, the upstream instance field `upstream_host` becomes mandatory. + +#### PTK-4030 + +The cluster does not exist. + +#### PTK-4031 + +The database password must contain 8 to 16 characters. + +#### PTK-4032 + +The two passwords entered are inconsistent. + +#### PTK-4033 + +The number of database instances in the configuration file exceeds 9. Due to the database limitation, the maximum number of instances in a cluster can be 9. + +#### PTK-4034 + +The xlog directory in the configuration file cannot be a subdirectory of the database directory (data_dir). + +#### PTK-4035 + +The `ssh_option` field must be set in the configuration file for all servers (remote servers) with non-local IP addresses (also not set in global), and the error will list the servers that are not configured. + +#### PTK-4036 + +The password type field in the configuration file is not encrypted with PTK encrypt, and for security reasons, the password type field is not allowed to be submitted in plain text. + +#### PTK-4037 + +Plug-in installation is not supported before MogDB 2.1.0 (no plug-in has been released). + +#### PTK-4038 + +The user chose to cancel the confirmation during the interactive confirmation scenario. + +#### PTK-4039 + +At least two servers need to be configured during CM cluster installation. + +#### PTK-4040 + +The base directory (base_dir) is used for different instances of the same server in the configuration file. + +#### PTK-4041 + +The database parameter `enable_dcf=on` cannot be set when a two-node CM cluster is installed. + +#### PTK-4042 + +The user of the server is already in use by another cluster managed by PTK, and a user of a server is not allowed to install multiple database instances. + +#### PTK-4043 + +The `third_party_gateway_ip` parameter needs to be configured in `global.cm_option.cm_server_conf` in the configuration file to specify the gateway IP address. + +This error occurs when installing a two-node CM cluster and `-y` is specified during installation. This parameter is required for two-node CM clusters. + +Therefore, you can manually configure the parameter in the configuration file, or remove the `-y` parameter and fill in the real-time interactive form with PTK. + +#### PTK-4044 + +The data node is not running. PTK cluster status can be used to confirm the instance status. + +#### PTK-4045 + +The user exits the interaction when the number specified retry times is exceeded. + +#### PTK-4046 + +The `host` field of the server in the configuration file cannot be empty. + +### Error Code Starting with 5xxxx + +#### PTK-50000 + +Runtime error of PTK when calling the system to execute the command. The cause of the error should be determined according to the actual error information. + +#### PTK-50001 + +The bash script failed to execute on the target server. + +#### PTK-50101 + +Serializing the configuration file failed. + +#### PTK-50102 + +The deserialization of the configuration file failed. + +#### PTK-50103 + +The configuration file fails to be saved locally. + +#### PTK-50105 + +The specified data directory is already in use by a running database instance. + +#### PTK-50106 + +The instance with the specified IP address is not found in the current cluster. + +#### PTK-50107 + +The configuration file is empty. + +#### PTK-50108 + +The instance with the user ID is not found in the current cluster. + +#### PTK-50201 + +The directory already exists on the server. + +#### PTK-50202 + +The directory fails to be created. + +#### PTK-50203 + +The file fails to be created. + +#### PTK-50204 + +The local metadata file fails to be read. + +#### PTK-50205 + +The file already exists. + +#### PTK-50206 + +The path contains illegal characters. + +#### PTK-50207 + +The directory is empty. + +#### PTK-50208 + +The temporary directory fails to be created. + +#### PTK-50209 + +The specified cluster is not found. + +#### PTK-50210 + +The directory does not exist. + +#### PTK-50211 + +The file already exists. + +#### PTK-50301 + +The user already exists. + +#### PTK-50302 + +The user does not exist. + +#### PTK-50303 + +The user group is not matched. + +#### PTK-50304 + +The file or directory prompted does not belong to the specified user, that is, the ownership limit of the file is incorrect. + +#### PTK-50305 + +The user does not have sudo permissions. This error code usually occurs in scenarios that depend on the permissions of the superuser. + +#### PTK-50601 + +The request for the specified URL failed. + +#### PTK-50602 + +The HTTP response failed to be read. + +#### PTK-50603 + +The bonding information fails to be obtained. + +#### PTK-50604 + +The detection of NIC information fails. + +#### PTK-50801 + +The target system did not find the prompted CPU instruction set, and the absence of some necessary instruction sets may cause the database process to fail to start. + +#### PTK-50802 + +The command is not found. + +#### PTK-50803 + +Invalid sysctl configuration. + +#### PTK-50804 + +RemoveIPC must be set to no. + +#### PTK-50805 + +Specified dependencies are not found. You need to install them manually. + +### Other Errors + +PTK sets error codes for internally fixed error types, but there are also other errors reported by dependent libraries or system during running. + +These errors need to be rectified by viewing the corresponding system or running parameters according to the error prompt. We will also collect some scenario errors and list them on the [FAQ](./faq.md) page, but we may not collect the all. + +If you can not solve the error in use, you can ask questions through the [Q&A channel](https://www.modb.pro/issue) of Modb, our developers will pay attention and reply promptly. (Note that the tag `ptk` is added to the question). \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/faq.md b/product/en/docs-ptk/v2.0/faq.md new file mode 100644 index 00000000..28171de5 --- /dev/null +++ b/product/en/docs-ptk/v2.0/faq.md @@ -0,0 +1,152 @@ +--- +title: FAQ +summary: FAQ +author: Yao Qian +date: 2022-05-30 +--- + +# FAQ + +## Common problems + +### Is it possible to install PTK as a non-root user? + +Yes, PTK has no restrictions on the users it can run with. + +### Is it possible to install a database cluster through a normal user SSH connection + +Yes. When deploying a cluster, it is generally recommended that the SSH user linked to the database service in the configuration file be set to a super user with sudo privileges, so that PTK can automatically create a normal user to run the database and configure the user's ulimit parameters. If you cannot provide a super user, you can also create a system user on the database server in advance, and then use the system user to configure the ssh link information in the PTK configuration file to install the database cluster, but you cannot perform the installation of MogHA and other components that require sudo privileges. + +### Do I Need to Pre-Install Python3? + +Yes. Python 3.6 or Python 3.7 needs to be pre-installed because the psutil (python system and process utilities) dynamic library in the OM package supports only this two versions. + +> PTK and MogDB themselves do not depend on Python3 but gs_om and gs_guc do. Therefore, Python needs to be pre-installed to make sure that the environment meets the requirement. + +### Can I Install a Database on an Operating System that Is Not Supported by PTK? + +Yes. + +PTK itself provides a completed and general installation process. It automatically judges the database installation package to be downloaded based on the customer system by default. However, PTK cannot determine the installation package that is really needed when the operating system or operating system version is not supported by PTK. In this case, you can use the `-p` parameter in the `ptk install` command to specify an installation package. In view of the fact that the installation is not tested, it may fail. This is normal. + +When you try to choose an installation package to adapt to your system, you can comply with the following rules: + +1. Make judgment based on the CPU command set architecture. + + ```bash + uname -m + ``` + + For `arm64/aarch64`, use the openEuler arm64 installation package. + + For `x86_64`, perform the following operation make judgment. + +2. Make judgment based on the glibc version. + + ```bash + getconf GNU_LIBC_VERSION + ``` + + If the glibc version is 2.17 or earlier than 2.17, use the centos7 x86_64 installation package. Otherwise, use the openEuler x86_64 installation package. + +### Is gs_om Still Supported After a Database Is Installed Using PTK? + +Yes. PTK-installed clusters are compatible with the gs_om tool, but do not support tools such as gs_upgrade, gs_expansino, gs_dropnode, and other tools that involve changes to the cluster structure. + +> **Note**: `gs_om` needs user SSH mutual-trust between nodes. After the database is installed using PTK, user SSH mutual-trust is generally established. If it is not established, you need to manually perform the establishment. + +### How Can I Query the MogDB Versions Supported by PTK? + +You can run the `ptk candidate db` command to query the MogDB versions supported by PTK. + +### How Can I Query the Operating Systems Supported by PTK? + +You can run the `ptk candidate os` command to query the operating systems supported by PTK. + +### Can I use PTK to install CM? + +Yes. CM can be installed automatically by specifying the `--install-cm` parameter when installing a database cluster. + +### Does PTK have to be on the same server as the database? + +No. The PTK tool is a centralized multi-cluster management tool, so we prefer to recommend that PTK be installed independently on a single management server, with the database installed on a node within a database-specific server cluster. + +### If I create a new cluster by replicating a virtual machine, how do I change the IP to make PTK work? + +For this case, we first need to handle it differently depending on how PTK is used: + +**1. PTK and clusters are controlled one-to-one** + +``` +# Let's say there are two clusters, each managed using two PTKs + +PTK(1) ---> Cluster1 + +PTK(2) ---> Cluster2 +``` + +In this case, you can change the IP address by using PTK(2) to execute the following command: + +```bash +ptk cluster -n refresh --replace-ip = +``` + +**2. PTK centralized control of multiple clusters** + +``` + ┌----> Cluster 1 +PTK--┤ + └----> Cluster 2 +``` + +In this case, you can't replace the IP directly, if you execute refresh to replace the IP, it will cause PTK to change from controlling `cluster 1` to controlling `cluster 2`, and `ptk ls` will not see cluster 1. + +In this case, you need to copy the metadata of PTK to create the metadata of cluster 2: + +```bash +cp -r `ptk env PTK_DATA_DIR`/ `ptk env PTK_DATA_DIR`/ +vim `ptk env PTK_DATA_DIR`//topology.yml +# Modify cluster name and IP information +ptk cluster -n refresh +``` + +## Common errors + +### What Can I Do If the Error "cmd init: ssh: setenv failed" Is Reported During Installation? + +This error is reported because the sshd service on the target server does not support setting of the LANG environment variable during connection. + +You need to perform the following command on the target server to update the sshd configuration file and then restart the sshd service. + +``` +sudo echo "AcceptEnv LANG LC_*" >> /etc/ssh/sshd_config && sudo systemctl restart sshd +``` + +### What Can I Do If the Database Initialization Error "undefined symbol: EVP_KDF_ctrl" Is Reported? + +The installation package is not matched with the host OS. This error typically occurs in the scenario where a CentOS 7 installation package is installed on a system with the high glibc version. + +The solution is to replace the installation package with an openEuler package. + +### What Can I Do If the Error "can not combine with 'abrt-hook-ccpp'" Is Reported? + +You can use the abrt(automatic bug report too) service agent to dump the core file. This may lead to core file loss or database downtime. + +*[What is the abrt service](https://abrt.readthedocs.io/en/latest/howitworks.html)* + +You can fix this bug by modifying the `kernel.core_pattern` parameter. + +```bash +# The value can be customized based on the actual requirement. +sysctl -w kernel.core_pattern=/var/log/coredump/%e.%p.%u.%t.core +``` + +### What Should I Do If the Error `FATAL: semctl(578486307, 7, SETVAL, 0) failed: Invalid argument` Is Reported? + +You can check whether the value of `RemoveIPC` in the `/etc/systemd/logind.conf` directory is `no`. If it is, restart the server. + +### What Should I Do If the Error `fail to new sftp client: EOF` Is Reported? + +This error means that PTK failed to create a sftp connection to the target machine. You can manually run `sftp -vvv USER@HOST` on the machine where PTK is installed to see the error message in the debug log. + +This problem is usually caused by a non-existent or inaccessible sftp-server file configured by `Subsystem sftp` in the `/etc/ssh/sshd_config` file on the target machine. diff --git a/product/en/docs-ptk/v2.0/guide/guide-checkos.md b/product/en/docs-ptk/v2.0/guide/guide-checkos.md new file mode 100644 index 00000000..bc19847c --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-checkos.md @@ -0,0 +1,83 @@ +--- +title: Checking the System +author: Yao Qian +date: 2024-06-10 +--- + +# Checking the System + +Before installing the database, you need to check the system parameters and software dependencies of the server where the database is to be installed to ensure smooth installation. + +> During system check, the values provided by PTK are recommended ones in production environment. They may vary in different system versions or hardware configurations. Users need to optimize them according to their environment. + +## Check Item List + +You can run `checkos` to perform system check. During the check, PTK checks the following modules. + +| No. | Category | Check Item | Description | +| ---- | ----------------------- | ----------------------------- | ------------------------------------------------------------ | +| A1 | System version | Check_OS_Version | Checks the system version. | +| A2 | Kernel version | Check_Kernel_Version | Checks the kernel version. | +| A3 | Character set | Check_Unicode | Check the character set. | +| A4 | Time zone | Check_TimeZone | Checks the time zone. | +| A5 | Swap memory | Check_Swap_Memory_Configure | Checks the swap memory configuration. | +| A6 | sysctl parameter | Check_SysCtl_Parameter | Checks the sysctl parameter. | +| A7 | File system | Check_FileSystem_Configure | Checks the file system configuration. | +| A8 | Disk | Check_Disk_Configure | Checks the disk configuration. | +| A9 | Preread block | Check_BlockDev_Configure | Checks the block configuration. | +| | | Check_Logical_Block | Checks the logic block. | +| A10 | IO scheduling | Check_IO_Request | Checks the IO request parameters. | +| | | Check_Asynchronous_IO_Request | Checks the asynchronous IO request parameters. | +| | | Check_IO_Configure | Checks the IO configuration. | +| A11 | Network | Check_Network_Configure | Checks the network configuration. | +| A12 | Clock consistency | Check_Time_Consistency | Checks the clock consistency. | +| A13 | Firewall | Check_Firewall_Service | Checks the firewall configuration. | +| A14 | Transparent huge page | Check_THP_Service | Checks the transparent huge page configuration. | +| A15 | Dependencies | Check_Dependent_Package | Checks the database system installation dependencies. | +| A16 | CPU command set | Check_CPU_Instruction_Set | Checks the CPU command set. | +| A17 | Port status | Check_Port | Checks whether the database port is occupied. | +| A18 | Selinux status | Check_Selinux | Checks whether system selinux is disabled. | +| A19 | user ulimit status | Check_User_Ulimit | Checks whether the ulimit value of the database user meets the database requirement (if the system user exists). | +| A20 | Data directory checking | Check_Directory | If the data directory of the database already exists, check if it is empty. | + +To perform system check using PTK, you need to specify the cluster [configuration file](./guide-prepare-config.md) by `-f` parameter, and PTK will check all the check items in the above table by default. If you want to check a specific check item, you can specify the corresponding check category number through the `-i` option in the command line, and multiple numbers can be separated by English commas. + +## Example + +```shell +# Check all check items. +ptk checkos + +# Display details of error message. +ptk checkos --detail + +# To check multiple check items, enter the item number in the -i A1,A2,A3 format. +ptk checkos -i A1,A2,A3 +``` + +## Check Result Classification + +The PTK check result includes four levels. + +- **OK**: The check result reaches expectations and meets the installation requirement. +- **Warning**: The check result does not reach expectations but meets the installation requirement. +- **Abnormal**: The check result does not meet the installation requirement. The installation may fail. The exception needs to be handled manually based on the suggested script by PTK. +- **ExecuteError**: PTK failed to execute commands during system check. The reason may be that some tools are not installed in the environment or there is an internal bug. This error needs to be handled based on the actual prompt information. + +Before installing the database, make sure that the check result of all check items is `OK` or `Warning`. If the check result displays `Abnormal`, the installation will be interrupted. + +## System Fixing + +After running the `checkos` command, if there is abnormal check items, PTK will generate a shell script file started with `root_fix_os` and followed by timestamp. + +You can open it to view the content. It includes the fixing suggestions on abnormal check items provided by PTK. + +> The fixing suggestions are not generated for warning check items by default. If you need it, specify the `--gen-warning-fix` option in the `checkos` command. + +You can manually perform the fixing command, or automatically execute the script on all servers in a cluster using PTK. + +> Typically, the fixing command requires the super user permission. Therefore, the SSH user in `config.yaml` needs to be root or a user who has the sudo permission when the fixing is performed using the `exec` command. + +```shell +ptk exec -f config.yaml -s +``` diff --git a/product/en/docs-ptk/v2.0/guide/guide-collectos.md b/product/en/docs-ptk/v2.0/guide/guide-collectos.md new file mode 100644 index 00000000..7d09dd91 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-collectos.md @@ -0,0 +1,23 @@ +--- +title: Collect OS Information +author: Yao Qian +date: 2024-06-10 +--- + +# Collect OS Information + +When using PTK or MogDB, it is inevitable to encounter software operation faults due to changes in the operating environment or other factors. Whether it is PTK running errors or MogDB's abnormal exit, we need to retain as much information as possible about the environment of the fault site so that professionals can further analyze and troubleshoot. Therefore, PTK provides a command to quickly collect system environment information, which is convenient for users to send feedback to developers as an attachment. + +The command to collect OS information is: + +```shell +ptk collect +``` + +After executing this command, a zip file named `ptk-collect` will be generated in the current directory, which can be opened by the user to review the contents. + +If you want to collect information for a particular cluster, you can specify it with the `-n` option: + +```shell +ptk collect -n +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/guide-download-package.md b/product/en/docs-ptk/v2.0/guide/guide-download-package.md new file mode 100644 index 00000000..20e9bb0a --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-download-package.md @@ -0,0 +1,40 @@ +--- +title: Download MogDB Installer +author: Yao Qian +date: 2024-06-10 +--- + +# Download MogDB Installer + +## Download Required Version + +In addition to providing MogDB deployment and operation and maintenance capabilities, PTK also supports downloading MogDB installation packages individually. By default, PTK will automatically recognize the environment of the server where it is located and download the corresponding installation packages according to the server operating system and CPU architecture: + +```shell +ptk download +``` + +## Download Specified Version + +Of course, you can also specify the version of MogDB you wish to download with the `-V` or `--db-version` option: + +```shell +ptk download -V 5.0.7 +``` + +## Download According To OS + +If the above command reports `no support current os` error, it means that MogDB does not provide the installation package for the current operating system, you can specify the `ID` of the target operating system by `-O` or `--os`, this `ID` can be viewed by `ptk candidate os`. + +```shell +# Download the installer for centos7 x86_64 +ptk download -O 1007010 +``` + +## Demonstrate The Download Process Only + +Sometimes we may want to know the download address of a package that matches the current operating system, but we don't need to actually download the package. In this case, you can add the `--dryrun` option in the command line, so that it will only output a log of the execution process, and will not actually download the package: + +```shell +ptk download --dryrun +``` diff --git a/product/en/docs-ptk/v2.0/guide/guide-encrypt.md b/product/en/docs-ptk/v2.0/guide/guide-encrypt.md new file mode 100644 index 00000000..e877247d --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-encrypt.md @@ -0,0 +1,38 @@ +--- +title: Encrypt Sensitive Information +author: Yao Qian +date: 2023-06-14 +--- + +# Encrypt Sensitive Information + +## Introduction + +If you want to fill in the password field when preparing the [configuration file](./guide-prepare-config.md), for security reasons, PTK does not allow you to fill in the plaintext information directly in the configuration file, you must use the `encrypt` command provided by PTK to encrypt the information before filling it in. + +The password field in the configuration file contains the following: + +- global.[user_password](../reference/ref-config.md#user_password) +- global.[db_password](../reference/ref-config.md#db_password) +- ssh_option.[password](../reference/ref-config.md#password) +- ssh_option.[passphrase](../reference/ref-config.md#passphrase) + +## Encryption Methods + +- Encrypt the password as a parameter (it is recommended to wrap the password in single quotes to avoid special characters in the password being parsed by shell) + + ```shell + ptk encrypt 'password' + ``` + +- Enter password interactively + + ```shell + ptk encrypt --stdin + ``` + +- Pass the password through the pipe to PTK + + ```shell + echo 'password' | ptk encrypt --stdin [--disable-prompt] + ``` diff --git a/product/en/docs-ptk/v2.0/guide/guide-inject-metadata.md b/product/en/docs-ptk/v2.0/guide/guide-inject-metadata.md new file mode 100644 index 00000000..35c2da69 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-inject-metadata.md @@ -0,0 +1,37 @@ +--- +title: Compatible With Higher Versions of MogDB +author: Yao Qian +date: 2024-07-31 +--- + +# Compatible With Higher Versions of MogDB + +> This feature is supported in PTK v1.6.0 and above. + +PTK integrates the download links and configuration information of different versions of MogDB into the binary file by default, so when PTK releases a version, it can only be compatible with the latest version of MogDB at that time. + +So when MogDB releases a new version, PTK will release a new version to support it, but the old version of PTK will not be able to recognize the new version. + +In order to solve this problem, in PTK 1.6.0 version, the function of loading external configurations has been added, so that backward compatibility can be realized. + +If it is not convenient to upgrade the PTK in your environment, you can support the new version of MogDB by doing the following. + +## Online environment + +If the server where the PTK is hosted has access to the public network, you can run the following command directly on the server. + +```shell +wget -q -O - "https://cdn-mogdb.enmotech.com/ptk/latest/ptk-inject.tar.gz" | tar -xzf - -C $(ptk env PTK_HOME 2>/dev/null) +``` + +## Offline environment + +If your server is not connected to the Internet, you need to download the injection package first: + +- [https://cdn-mogdb.enmotech.com/ptk/latest/ptk-inject.tar.gz](https://cdn-mogdb.enmotech.com/ptk/latest/ptk-inject.tar.gz) + +After downloading and uploading it to the server where PTK is located, execute the following command: + +```shell +tar -xzf ptk-inject.tar.gz -C $(ptk env PTK_HOME 2>/dev/null) +``` diff --git a/product/en/docs-ptk/v2.0/guide/guide-install-cluster.md b/product/en/docs-ptk/v2.0/guide/guide-install-cluster.md new file mode 100644 index 00000000..4995855c --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-install-cluster.md @@ -0,0 +1,171 @@ +--- +title: Deploy Database Cluster +author: Yao Qian +date: 2024-06-10 +--- + +# Deploy Database Cluster + +## Recommended Process + +When deploying a database cluster, it is recommended that you follow the process below: + +1. Prepare the [configuration file](./guide-prepare-config.md) that describes the cluster. +2. Perform operation [system check](./guide-checkos.md) to ensure that the operating system does not have unusual check items before installation. +3. [Download](https://www.mogdb.io/downloads/mogdb/all) the required database installation package from the official website. +4. Deploy the database cluster. + +## Database Cluster Installation + +### Instruction + +Since all PTK behaviors are based on SSH connections for issuing commands, we need to configure the `ssh_option` field for each database server in the configuration file. Of course, if all servers have the same connection user, port, and password, you only need to configure `ssh_option` once in the `global` section. + +For the login user in `ssh_option`, we recommend that you configure the **root** user or a user with **sudo** privileges. Since the database as a basic software may have more stringent requirements than other applications, you need to use the superuser privilege to set a more permissive ulimit configuration for the system user running the database. At the same time, if you provide super user, you don't need to create the operating system user to run the database in advance, you only need to define the user name in the configuration file, and PTK will automatically create the corresponding user for you and set up the ulimit configuration. + +Of course, if you are under the mandatory requirements of enterprise security, you may not be able to meet the conditions of direct login of root user, but you can also use PTK for deployment. In this case, you need to do the following 3 steps in advance: + +1. Create the operating system user on the server that will be used to run the database (assuming the user name is `omm`). +2. Add the following configuration entry for this user at the end of the `/etc/security/limits.conf` file (replace `omm` with the username you created): + + ``` + omm soft as unlimited + omm hard as unlimited + omm soft nproc unlimited + omm hard nproc unlimited + omm soft nofile 1000000 + omm hard nofile 1000000 + omm soft stack unlimited + omm hard stack unlimited + ``` + +3. Fill in the `ssh_option` section of the configuration file with the login information for the user you created + +> Note: If you use a non-superuser for cluster management, some commands that rely on superprivileges will not be available later, such as `install-mogha`. + +### Online Installation + +Installation is accomplished with a single line of command: + +```shell +ptk install -f config.yaml +``` + +This command automatically downloads the latest LTS version of MogDB from the network and installs it. If you wish to specify the version of MogDB yourself, you can do so with the `--db-version` option, for example: + +```shell +ptk install -f config.yaml --db-version 5.0.7 +``` + +You can use `ptk candidate db` to see the list of MogDB versions that PTK supports to download automatically. + +PTK will launch the database cluster by default after installing the database cluster. If you do not want the cluster to be launched automatically after installation, you can specify the `-skip-launch-db` option in the command line. + +### Offline Installation + +If you have downloaded the installer in advance, you can specify a local installer for offline installation with the `-p` option: + +```shell +ptk install -f config.yaml -p +``` + +### Deploy CM Cluster Together + +PTK supports deploying the CM cluster at the same time as the database cluster, you just need to add an `--install-cm` option to the install command: + +> Minimum of 2 nodes for the cluster to take effect. + +```shell +ptk install -f config.yaml --install-cm +``` + +By default, PTK deploys the `CM server` and database instances together to match the number of databases. If the number of clusters is greater than 3, we recommend deploying an odd number of `CM server` nodes by default due to the majority election algorithm for CM High Availability, so when deploying an even number of database instances, PTK will interactively allow you to select a node to not deploy `CM server`. You can remove this restriction by adding the `--not-limit-cm-nodes` option to the install command if you still want the number of `CM server` and database instances to be consistent. + +### Deploy In Resource Pooling Mode(beta) + +Although the kernel resource pooling feature is still under deep development, PTK has gradually supported resource pooling deployment since version 1.2.0. Resource pooling deployment provides the ability for primary and standby nodes to share storage, realizes resource pooling HA deployment form based on magnetic array devices, solves the problem of doubling the storage capacity of a single machine under traditional HA deployment, and at the same time, the standby nodes support real-time consistency of reads. + +The resource pooling architecture diagram is shown below. + +![资源池化架构图](https://cdn-mogdb.enmotech.com/docs-media/mogdb/administrator-guide/shared_storage.jpg) + +PTK supports deployment in resource pooling scenarios. Since the `DSS` module has been added to the resource pooling architecture and relies on CM for high availability management of clusters, we need to add the `dss_option` and `cm_option` sections to the configuration file, as shown in the following example configuration. + +```yaml +global: + cluster_name: c1 + user: omm + db_password: pTk6Y2I1OWFiZjI8RT1FPUE9RFZfVTUzTy0zUlR5TDZUTmh1STE4VkQ0T2RDYXBNMThoSlNhZDY3UHB4WVE= + db_port: 26000 + base_dir: /data/mogdb + ssh_option: + port: 22 + user: root + password: pTk6ZDJmZjZlZjI8RT1FPUE9RUs4WEh1OUJRQURfM29GUjZyb3gzZGU3LVRmLTM3Mm5ySmZ5anJXVkNOTUE= + cm_option: + dir: /data/mogdb/cm + cm_server_port: 15300 + dss_option: + dir: /data/mogdb/dss + dss_port: 26010 + dms_port: 26020 + data_vg_name: data + data_vg_path: /dev/data_shared + inst_vg_map: + 172.23.1.28: /dev/data_private_28 + 172.23.1.45: /dev/data_private_45 + cm_share_vg_path: /dev/cm_shared + cm_voting_vg_path: /dev/cm_vote + enable_ssl: on +db_servers: + - host: 172.23.1.28 + role: primary + - host: 172.23.1.45 + role: standby +``` + +The rest of the configuration is the same as a normal installation, we focus on the `dss_option` section. + +In the `dss_option` section, there are the following fields: + +| field | description | +|---|---| +|dir| Installation directory for the dss module. | +|dss_port| The port on which the dssserver process listens when running, default `26010`. | +|dms_port| The port for communication between database kernels in resource pooling mode, default `26020`. | +|data_vg_name| Customized shared data volume name, default `data`. | +|data_vg_path| Shared data volume disk device path. | +|inst_vg_map | Private disk junction mapping for each database instance, where the key is the database instance IP and the value is the private data disk path for the corresponding instance. | +|cm_share_vg_path| CM shared disk device path. | +|cm_voting_vg_path| CM voting disk device path. | +|enable_ssl| Whether to use SSL to encrypt communications. | + +Once you have prepared the configuration file, simply add the `--enable-dss` option to the install command: + +```shell +ptk install -f config.yaml --enable-dss +``` + +### More Parameters + +The above documentation gives some examples of parameter combinations for different usage scenarios, PTK's `install` command supports many more parameters, you can check [Commands](../commands/ptk-install.md) for more information. + +## Installation Result Status + +|Status|Description| +|:--|:--| +|precheck_success| Pre-check succeeded | +|precheck_failed|Pre-check failed| +|setup_db_success|Database instance installed successfully| +|setup_db_failed|Database instance installation failed| +|setup_cm_success|CM component instance was installed successfully| +|setup_cm_failed|CM component instance installation failed| +|init_dss_failed|Failed to initialize DSS component| +|init_dss_success|Initializing DSS Components Succeeded| +|initdb_failed|Failed to initialize database| +|initdb_success|Initialization of the database succeeded| +|rollback_success|Installation steps rolled back successfully| +|need_rollback_manually|Manual rollback required| +|start_success|Database startup successful| +|start_failed|Database startup failed| +|need_start_manually|Manual startup required| \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/guide-prepare-config.md b/product/en/docs-ptk/v2.0/guide/guide-prepare-config.md new file mode 100644 index 00000000..81fb68f0 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-prepare-config.md @@ -0,0 +1,205 @@ +--- +title: Preparing Configuration File +summary: Preparing Configuration File +author: Yao Qian +date: 2022-07-30 +--- + +# Preparing Configuration File + +## Configuration File Introduction + +Before installing the database, PTK can be used to create a [configuration file](../reference/ref-config.md) for defining the expected database cluster topology. + +To install a local single-instance database, run the following command to generate a template configuration file. + +```shell +ptk template -l > config.yaml +``` + +To install a multi-instance cluster, run the following command to generate a template configuration file. + +```shell +ptk template > config.yaml +``` + +After PTK is run, a `config.yaml` file is generated in the current folder. You need to modify the configuration according to Your own server and directory plan. + +If there is the password field, you need to run [ptk encrypt](../commands/ptk-encrypt.md) to encrypt the password and then add the ciphertext to the configuration file. + +> **Note**: +> If you hope to use a non-root user to connect the target server by SSH, make sure that the user has the sudo permission on the target server. +> +> Configuration method: Add the following content (replacing `USERNAME` with SSH connection user name) to the `sudoers` files in the `/etc` directory: +> `[USERNAME] ALL=(ALL) NOPASSWD:ALL` + +## Interactive Creation + +PTK also supports interactive creation of a configuration file. You can perform the following command to perform interactive creation: + +```shell +ptk template create +``` + +After the command is run, the interactive terminal is displayed. You need to only reply the questions in sequence. + +**Note**: During `db_server` configuration, if the SSH login information is the same, it can be used repeatedly. + +After the interactive terminal exits, a `config.yaml` file will be automatically created in the current folder. + +## Configuration File Field Description + +The following is an example of a completed configuration file: + +In YAML syntax, strings do not need to be quoted by default, if the string contains spaces or special characters, they need to be put in quotes, for more details about YAML syntax, please refer to [Appendix: YAML Syntax](../appendix/yaml-grammar.md) + +```yaml +global: + # cluster name + cluster_name: c1 + # system user for running db + user: omm + # system user group, same as username if not given + group: omm + # system user password, use 'ptk encrypt' to encrypt it if not empty + user_password: "" + # database password, use 'ptk encrypt' to encrypt it if not empty + db_password: "" + # database port + db_port: 26000 + # base directory for install MogDB server + # PTK will create an application directory, a data directory, a tools directory, a log directory, and a temporary directory in this directory. + base_dir: /opt/mogdb + # list of parameters supported by gs_initdb, appended to the command during installation + gs_initdb_opts: + - --encoding=UTF-8 + - --dbcompatibility=A + # Add server IPs that allow off-cluster access to the database + extra_hba_conf: + - type: host + database: all + user: all + address: /32 + method: sha256 + option: + # Configuration of the CM component, the value takes effect when the CM component is enabled + cm_option: + # The installation directory of CM, if you don't fill it in, the cm directory will be created in the base_dir directory by default. + # dir: /opt/mogdb/cm + # CM Server port + cm_server_port: 15300 + # Virtual IP, this value requires a supported version of CM to take effect + db_service_vip: "" + # CM Server configuration, which is updated to cm_server.conf + cm_server_conf: + # instance_heartbeat_timeout: 2 + # ... + # CM Agent configuration, which is updated to cm_agent.conf + cm_agent_conf: + # log_max_size: 10240 + # ... +db_servers: + - host: + # Database port, can be omitted, automatically inherits the db_port configured in global section. + db_port: 26000 + # database role, options: primary, standby, cascade_standby + role: primary + # available zone name, the value takes effect when the CM component is enabled + az_name: AZ1 + # available zone priority, the lower the value the higher the priority, minimum 1, this value takes effect when the CM component is enabled + az_priority: 1 + # Upstream standby node IP for cascaded standby, required for cascaded standby only + upstream_host: + # Supported parameters in postgresql.conf + db_conf: + # replication_type: 1 + # SSH configuration for connecting to the server + ssh_option: + port: 22 + user: root + # SSH login password, does not support plaintext, need to use ptk encrypt to fill in after encryption + password: +# cm server list, if it is not listed here, it will be deployed on each db_server's machine during installation +# Note that this configuration does not mean that CM will be installed, you need to specify the --install-cm option in the command line during installation for it to take effect. +cm_servers: + - host: + # CM Server port, default is global.cm_option.cm_server_port + port: 15300 + # SSH configuration information, if the db_server has been configured on the same machine, you don't need to configure it here + ssh_option: +``` + +The configuration file includes three parts, including `global`, `db_servers` and `cm_servers`. + +- **global**: describes the common information of all instances in a cluster. +- **db_servers**: shows the instance list. Each element represents an instance. +- **cm_servers:** describes the CM server node information, which takes effect only if the `--install-cm` option is specified, or can be omitted, and is deployed with `db_servers` by default. + +### Global Configuration + +Field Name | Description | Value Type | Default Value | Mandatory or Not | Remarks +------|-------|-----|------|------ | ------ +cluster_name | Cluster name | String | `cluster_` is the prefix of a cluster name by default. | Yes | +user | Operating system user | String | omm | No | +group | Operating system user group | String | omm | No | +user_password | Operating system user password | String | Null | No | The value needs to be encrypted by running the `encrypt` command. +db_password | Database password | String | Null | No | The value needs to be encrypted by running the encrypt command. If the field is not set, it can be set during installation. +db_port | Listening port of a database | Integer | 26000 | No | +base_dir | Base directory for database installation | String | /opt/mogdb | No | If this field is set, the app_dir, log_dir, data_dir, tool_dir, cm_dir, and tmp_dir fields can be optional and automatically put in the specified directory of this field. +app_dir | Application directory of a database | String | /opt/mogdb/app | No | +log_dir | Database log directory | String | /opt/mogdb/log | No | +data_dir | Database data directory | String | /opt/mogdb/data | No | +tool_dir | Database tool directory | String | /opt/mogdb/tool | No | +tmp_dir | Directory of the temporary database file | String | /tmp | No | +core_file_dir | Directory of the system core file | String | Null | No | If this field is set, the `kernel.core_pattern` value will be changed. +gs_initdb_opts | gs_initdb parameters for database initialization | String list | no | An element maps a parameter. If the `--locale` parameter is not set, PTK will set the element to `--no-locale` by default. | +ssh_option | SSH connection authentication information | [ssh_option](#ssh_option) | no | If an instance needs to be connected remotely but the instance-level ssh_option is not configured, the field in the global will prevail. | +cm_option | CM configuration parameter | [cm_option](#cm_option) | no | The field takes effect when `--install-cm` is specified during installation. | + +### db_servers Configuration + +Field Name | Description | Value Type | Default Value | Mandatory or Not | Remarks +------|-------|-----|------|------ | ------ +host | IP address of an instance | String | Null | Yes | +db_port | Instance port | Integer | 26000 | No | If this field is not configured, the field in the global will prevail. +ha_ips | HA IP address list for instance log replication | String list | Null | No | +ha_port | HA port for log replication | Integer | 26001 | No | +role | Database instance role | String | Null | No | The value can be `primary`, `standby`, and `cascade_standby`. If this field is not configured, an instance in a cluster will be chosen as the primary instance randomly. Other instances will become standby instances. +upstream_host | IP address of the upstream standby of the cascaded standby | String | Null | Mandatory for a cascaded standby | +az_name | AZ name | String | AZ1 | No | +az_priority | AZ priority | Integer | 1 | The smaller the value, the higher the priority. | +xlog_dir | xlog log directory | String | Null | The xlog will be put in the pg_log of the `log_dir` directory. This field cannot be configured under the data directory. Otherwise, an error will occur during database starting. | +db_conf | Database GUC parameter configuration | Dictionary | Null |The dictionary key is a parameter in postgresql.conf.| +ssh_option | SSH connection authentication for connecting an instance | [ssh_option](#ssh_option) | no | If this field is not configured, the field in the global will prevail. | + +### cm_servers + +| Field Name | Description | Value Type | Default Value | Mandatory or Not | Remarks | +| ---------- | ------------------------------------------------------ | ------------------------- | ------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| host | IP address of an instance | String | Null | Yes | | +| port | CM server port | Integer | 15300 | No | If it is not specified, the value of `global.cm_option.cm_server_port` is used. | +| ssh_option | SSH authentication information for instance connection | [ssh_option](#ssh_option) | No | If it is not specified, the field in the global or the configuration of the same IP address in db_servers can be used. | | + +### cm_option + +| Field Name | Description | Value Type | Default Value | Mandatory or Not | Remarks | +| -------------- | ------------------------------------------------------ | ---------- | ------------- | ----------------- | ------------------------------------------------------------ | +| dir | CM installation directory | String | $base_dir/cm | Yes | | +| cm_server_port | Listening port of the CM server | Integer | 15300 | No | | +| db_service_vip | Virtual IP address (which needs to be supported by CM) | String | Null | No | | +| cm_server_conf | CM sever configuration parameter | Dictionary | Null | No | The dictionary key of the field supports any parameter of cm_server. PTK will set this value in cm_server.conf . | +| cm_agent_conf | CM agent configuration parameter | Dictionary | Null | No | The dictionary key of the field supports any parameter of cm_agent. PTK will set this value in cm_agent.conf . | + +### ssh_option + +Field Name | Description | Value Type | Default Value | Mandatory or Not | Remarks +------|-------|-----|------|------ | ------ +host | IP address of a host | String | IP address of an instance | No | If a host is to be configured as a proxy jump server, this field is mandatory. +port | SSH connection port | Integer | 22 | No | +user | SSH connection user | String | root | No | If the connection user is not root, make sure that the user has the sudo permission without the code. +password | SSH connection password | String | Null | No | The value needs to be encrypted by running the `encrypt` command. +key_file | SSH connection key file | String | Null | No | +passphrase | Password of the SSH connection key file | String | Null | No | +conn_timeout | SSH connection timeout duration | Duration | 1m | No | +exec_timeout | Command execution timeout duration | Duration | 10m | No | +proxy | Jump server configuration | ssh_option | Null | No | The jump server can be connected for only once. diff --git a/product/en/docs-ptk/v2.0/guide/guide-ptkc-tool.md b/product/en/docs-ptk/v2.0/guide/guide-ptkc-tool.md new file mode 100644 index 00000000..8b14f024 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-ptkc-tool.md @@ -0,0 +1,84 @@ +--- +title: PTKC +author: Yao Qian +date: 2023-06-14 +--- + +# PTKC + +## Overview + +PTKC is a database instance level operation and maintenance tool that PTK generates separately after deploying a database cluster. PTK generates a copy of PTKC under the operating system user running the database on each server. + +PTKC does not rely on any metadata , rely entirely on the environment variables of operating environment and database static configuration files and other information to identify the cluster , so you can copy directly to any cluster instance to use , but also through the PTK independent generation : + +``` +ptk gen-ptkc +``` + +> The tool is supported since PTK V0.8. + +## Supported Subcommands + +- **start:** Start the cluster or instance +- **stop:** Stop the cluster or instance +- **restart:** Restart the cluster or instance +- **build:** Rebuild a specified instance +- **status:** Show status of db instance or cluster +- **show-guc:** Print database parameters +- **show-hba:** Print pg_hba.conf content of database +- **failover:** Promote a standby server to primary. +- **switchover:** Promote a standby server to primary and demote primary server to standby + +## Comparison Among ptkc, gs_ctl, and gs_om + +| Function | ptkc | gs_ctl | gs_om | +| :--------------------------------------------: | :---------------------------------------: | :---------------------------------: | :---------------------------------------: | +| Query the database status | Support for cluster and instance | Support for the local instance only | Support for cluster and instance | +| Start a database | Support for cluster and instance | Support for the local instance only | Support for cluster and instance | +| Stop a database | Support for cluster and instance | Support for the local instance only | Support for cluster and instance | +| Restart a database | Support for cluster and instance | Support for the local instance only | Support for cluster and instance | +| Rebuild a database | Supported on the local and remote servers | Support for the local instance only | Supported on the local and remote servers | +| Specify an upstream node to rebuild a database | Supported | Supported | Not supported | +| Failover | Supported on the local and remote servers | Support for the local instance only | Not supported | +| Switchover | Supported on the local and remote servers | Support for the local instance only | Not supported | +| Query database parameters | Supported on the local and remote servers | Not supported | Not supported | +| View HBA information | Supported on the local and remote servers | Not supported | Not supported | + +## ptkc Usage + +PTKC usage is kept consistent with PTK usage. PTK is a multi-cluster management tool and PTKC is a single-cluster O&M tool. Therefore, the PTKC instructions are more simple than those of PTK. + +> **Note**: PTKC itself does not store any metadata and completely depends on the existing status file to parse cluster information. Because the current status information does not include the system user information, PTKC does not support such scenarios as multiple nodes, multiple users, and multiple instances on a single server. + +The following shows some examples. For more commands, run `ptkc -h`. + +- Query the Cluster Status + + ```shell + ptkc status + ``` + +- Restart a Cluster + + ```shell + ptkc restart + ``` + +- Perform Primary/Standby Switchover + + ```shell + ptkc switchover -H + ``` + +- Query Database Parameters + + ```shell + ptkc show-guc -k port + ``` + +- Show pg_hba.conf content + + ```shell + ptkc show-hba + ``` diff --git a/product/en/docs-ptk/v2.0/guide/guide-self-upgrade.md b/product/en/docs-ptk/v2.0/guide/guide-self-upgrade.md new file mode 100644 index 00000000..4b4616e4 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-self-upgrade.md @@ -0,0 +1,37 @@ +--- +title: Upgrade PTK +author: Yao Qian +date: 2023-06-14 +--- + +# Upgrade PTK + +PTK provides the `self upgrade` subcommand for automatic updating of itself. + +## Online Upgrade + +PTK supports upgrading PTK to the latest released version with the following command when there is a network connection. You can check the version with `ptk -v` after upgrading. + +```shell +ptk self upgrade +``` + +If you wish to upgrade to a specific PTK version, you can specify this with the `-V` option: + +``` +ptk self upgrade -V 1.5.1 +``` + +## Offline Upgrade + +If the server where your PTK is located does not have network access, you can upgrade locally by downloading the offline installer. + +The PTK installer can be downloaded here + +- [https://www.mogdb.io/downloads/ptk/all](https://www.mogdb.io/downloads/ptk/all) + +After downloading the installation package, upload the package to the server where PTK is located, and upgrade locally with the `-p` option: + +```shell +ptk self upgrade -p +``` diff --git a/product/en/docs-ptk/v2.0/guide/guide-uninstall-cluster.md b/product/en/docs-ptk/v2.0/guide/guide-uninstall-cluster.md new file mode 100644 index 00000000..b85adb08 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/guide-uninstall-cluster.md @@ -0,0 +1,27 @@ +--- +title: Uninstall Database Cluster +author: Yao Qian +date: 2024-06-10 +--- + +# Uninstall Database Cluster + +> Note: The uninstallation operation must be done carefully, please double-check whether the current cluster can indeed be uninstalled before operating the uninstallation of the database cluster! + +Uninstalling a database cluster can be accomplished with a single line of command: + +```shell +ptk uninstall -n +``` + +- **:** the cluster name + +When uninstalling, PTK will detect whether the cluster is running or not, a running cluster is not allowed to be uninstalled, you need to stop the cluster first before uninstalling. + +You need to specify the name of the cluster to be uninstalled when performing the uninstallation, you can view the cluster name by [`ptk ls`](./manage-cluster/manage-cluster-list-clusters.md) to see the cluster name. + +During uninstallation, PTK will ask you whether to delete the cluster topology information, system user, and database data. + +**Please perform operations with cautions, avoiding data loss due to incorrect operations.** + +If you are sure to delete the data directory, PTK delete only the data directory and will not delete its parent directory. **You need to manually delete the parent directory.** diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-build-db.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-build-db.md new file mode 100644 index 00000000..7776a094 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-build-db.md @@ -0,0 +1,33 @@ +--- +title: Rebuild Database +author: Qian Yao +date: 2024-06-12 +--- + +# Rebuild Database + +If a standby node or cascaded standby node in the cluster has a problem such as data that cannot be automatically repaired, we sometimes need to rebuild the database by synchronizing the data with other instances to repair this instance, at this time you can rebuild the specified instances through PTK. + +## Rebuild Specified Instance + +You must specify the instance by `-H` or `-i` option when rebuilding an instance. + +The `-H` or `--host` option specifies the IP of the instance. + +```bash +ptk cluster -n build -H +``` + +The `-i` or `--id` option specifies the ID of the instance (ID can be viewed via `ptk ls`) + +```bash +ptk cluster -n build -i +``` + +## Synchronize Data From Specified Instance + +By default, the standby node will be rebuilt by database synchronization with the primary node, but this will put IO pressure on the primary node, which may in turn affect the performance of the business. In this case, you can specify another instance IP to rebuild by `--build-from` option: + +``` +ptk cluster -n build -H --build-from +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-failover.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-failover.md new file mode 100644 index 00000000..511e38b9 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-failover.md @@ -0,0 +1,25 @@ +--- +title: Failover +author: Qian Yao +date: 2024-06-12 +--- + +# Failover + +If the primary node in the cluster is down for some reason and cannot be recovered by restarting the instance, you need to promote a normal standby node to the primary node to resume external services by using the `failover` command in order to ensure the availability of the cluster. + +> Note: Do not use this command for switching when the cluster is normal, it will cause the cluster to have dual master nodes. + +## Failover Command + +The `-H` or `--host` option specifies the IP of the instance. + +```bash +ptk cluster -n failover -H +``` + +The `-i` or `--id` option specifies the ID of the instance (ID can be viewed via `ptk ls`) + +```bash +ptk cluster -n failover -i +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-init-empty-cluster.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-init-empty-cluster.md new file mode 100644 index 00000000..d2bc5468 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-init-empty-cluster.md @@ -0,0 +1,51 @@ +--- +title: Create Empty Cluster +author: Bai Kai +date: 2024-06-12 +--- + +# Create Empty Cluster + +## Empty Cluster + +Since PTK version 1.5.0, the concept of empty clusters has been introduced. + +In some cases, you may want to use PTK to take over a specific node that is not installed by PTK, and providing the concept of empty clusters gives you more flexibility in how you use PTK to manage it. + +An empty cluster is a cluster whose metadata only has the cluster name in the cluster managed by PTK. In this empty cluster, there is no instance information, you need to add it by yourself. + +## Create An Empty Cluster + +To create an empty cluster using PTK, execute the following command: + +```bash +ptk init-cluster [--name|-n CLUSTER_NAME] +``` + +- --name|-n: optional parameter, if not added, PTK will automatically create a unique cluster name. +- CLUSTER_NAME: the specified cluster name. + +After this command is executed successfully, there will be a log output of "cluster "xxx" init success". + +## Presentation of Empty Cluster + +When executing `ptk ls`, the empty cluster is presented in the following format: + +```bash +$ ptk ls + cluster_name | id | addr | user | data_dir | db_version | create_time | comment +---------------+----+------+------+----------+------------+---------------------+---------- + test | - | - | - | - | - | 2024-06-12T15:37:39 | +``` + +When executing `ptk cluster status -n `, the empty cluster is presented as: + +```bash +$ ptk cluster status -n test +[ Cluster State ] +cluster_name : test + +[ Datanode State ] + cluster_name | id | ip | port | user | nodename | db_role | state | uptime | upstream +---------------+----+----+------+------+----------+---------+-------+--------+----------- +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-inspect.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-inspect.md new file mode 100644 index 00000000..82d1c013 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-inspect.md @@ -0,0 +1,17 @@ +--- +title: Show Cluster Meta Information +author: Bai Kai +date: 2024-06-17 +--- + +# Show Cluster Meta Information + +PTK provides the ability to show meta information about installed clusters. + +> _Cluster meta information is some basic information that PTK uses internally when managing a cluster._ + +Simply specify the and execute the following command: + +```shell +ptk cluster -n inspect +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-cm.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-cm.md new file mode 100644 index 00000000..56d08088 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-cm.md @@ -0,0 +1,37 @@ +--- +title: Install CM +author: Qian Yao +date: 2024-06-12 +--- + +# Install CM + +[CM(Cluster Manager)](https://docs.mogdb.io/en/mogdb/v5.0/14-cm) is a database high-availability management software developed for MogDB. PTK supports to install CM together with the `--install-cm` option in the command line when installing MogDB database cluster. PTK also provides the function of installing CM to facilitate the standalone installation if CM is not installed when installing database cluster. + +## Search For Installer + +By default, if you do not specify a CM installer, PTK searches for the CM installer in the database cluster's tools directory (`$GPHOME`), because normally the installer that PTK unpacks after installing the database cluster stays in this directory. If the CM installer is found, the installation will be completed automatically. + +By default, the installation directory of CM will be installed to the `cm` directory under the `global.base_dir` directory in the cluster configuration file. If you have not configured the `global.base_dir` directory, or if you want to specify the installation directory, you need to specify it with the `--cmdir` parameter. + +The installation command is as follows: + +```bash +ptk cluster -n install-cm +``` + +## Specify Local Installer + +```bash +ptk cluster -n install-cm -p +``` + +## Configure the Parameters of CM Agent or CM Server + +If you want to change the default configuration in the configuration file of CM agent or CM server when installing CM, you can specify it via `--agent-conf` and `-server-conf` in the command line, and you need to specify it multiple times to configure multiple parameters: + +```bash +ptk cluster -n install-cm --agent-conf = --agent-conf = --server-conf = --server-conf = +``` + +More parameters can be found in the [install-cm command documentation](../../commands/ptk-cluster-install-cm.md). diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-mogha.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-mogha.md new file mode 100644 index 00000000..4f1cdd1b --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-mogha.md @@ -0,0 +1,112 @@ +--- +title: Install MogHA Service +author: Bai Kai +date: 2024-06-14 +--- + +# Install MogHA Service + +## MogHA + +MogHA is a highly available system based on MogDB database replication flow technology. Its core goal is to minimize the RTO time under the premise of strongly guaranteeing RPO, so as to provide continuous and stable operation guarantee for upper-tier applications. (Applicable to openGauss database and MogDB database). + +[=> Detailed Documentation](https://docs.mogdb.io/zh/mogha/v2.4/overview) + +## Install MogHA with PTK + +PTK provides a convenient way for us to efficiently install MogHA services for clusters, the following is the specific operation procedure: + +1. **Generate configuration file**: This is the starting step of the installation to ensure that the subsequent steps have an accurate basis for configuration. 2. +2. **Edit the required fields in the configuration file**: Make necessary additions and improvements to the generated configuration file to make it meet the actual requirements. +3. **Execute the Install MogHA command**: the key part of the installation that actually begins. + +### Prerequisites + +Be sure to prepare the arbitration node IP (or gateway if the cluster is on the same subnet) ahead of time, as this is the basis for the entire installation process to run smoothly. + +### Generate MogHA Configuration File + +A configuration file can be created by executing the following command: + +```bash +ptk template mogha -n [--prot 8081] > node.conf +``` + +In this command, `port` is an optional parameter that defaults to `8081` if left out. + +The `-o` parameter is also provided, which allows us to specify a filename to output for better management and saving of configuration files. + +Example of `node.conf` configuration: + +```yaml +# docs: https://docs.mogdb.io/en/mogha/latest/overview + +[ config ] +db_port=23419 +db_user=mog +db_datadir=/opt/mogdb/data +primary_info=/opt/mogdb/mogha/primary_info +standby_info=/opt/mogdb/mogha/standby_info +lite_mode=true +agent_port=8081 +http_req_timeout=3 +heartbeat_interval=3 +primary_lost_timeout=10 +primary_lonely_timeout=10 +double_primary_timeout=10 +meta_file_type=json +logger_format=%(asctime)s %(levelname)s [%(filename)s:%(lineno)d]: %(message)s +log_dir=/opt/mogdb/mogha +log_max_size=512MB +log_backup_count=10 +allow_ips= +handle_down_primary=true +handle_down_standby=true +primary_down_handle_method=restart +restart_strategy=10/3 +debug_mode=false + + +[ host1 ] +ip= +heartbeat_ips= +[ host2 ] +ip= +heartbeat_ips= +[ host3 ] +ip= +heartbeat_ips= + +[ zone1 ] +vip= +hosts=host1,host2,host3 +ping_list=<仲裁IP> +cascades= +arping= +``` + +You can modify the field information in the configuration file according to your needs. + +### Install MogHA + +The deployment of MogHA can be automated by executing the following command: + +```bash +ptk cluster -n install-mogha -c node.conf [-y] [-p ] [-d ] [--service-name mogha] [--mogha-version 2.4.17] +``` + +In the command `install-mogha`: + +- `-c` needs to be followed by the `node.conf` you created. +- `-y` is used to skip some interactive steps. +- `-p` is to specify the MogHA installer. +- `-d` is to specify the specific directory where MogHA will be installed. +- `--service-name` is the name of the service for the corresponding systemctl operation when MogHA starts, defaulting to `mogha`. +- `--mogha-version` Specifies the specific version of MogHA to be installed. + +In addition, the command provides a number of other options, such as: + +- `--skip-check`: If you add this option, it means that you can skip the checking session of the configuration file and the target machine where it needs to be installed. +- `--skip-rollback`: if you add this option, you can skip the rollback operation when the installation fails. +- `--skip-start`: If you add this option, the MogHA service will not be started automatically after the installation is completed, so you can choose the start time flexibly according to the actual situation. +- `--sync-standby`: This option allows users to customize the standby node to be used for the installation, which increases the flexibility of the installation. diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-plugin.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-plugin.md new file mode 100644 index 00000000..03d6d20b --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-install-plugin.md @@ -0,0 +1,102 @@ +--- +title: Install Plugins +author: gxk +date: 2024-06-12 +--- + +# Install Plugins + +## Overview + +In order to meet the demand for functional diversity, MogDB provides a variety of feature-rich plugins. At the same time, PTK also supports one-click installation of these plugins, so that users can quickly use the plugin functions. + +## List of Plugins + +- [postgis](https://docs.mogdb.io/en/mogdb/latest/postgis-extension) +- [pg_bulkload](https://docs.mogdb.io/en/mogdb/latest/pg_bulkload-user-guide) +- [pg_prewarm](https://docs.mogdb.io/en/mogdb/latest/pg_prewarm-user-guide) +- [pg_repack](https://docs.mogdb.io/en/mogdb/latest/pg_repack-user-guide) +- [pg_trgm](https://docs.mogdb.io/en/mogdb/latest/pg_trgm-user-guide) +- [wal2json](https://docs.mogdb.io/en/mogdb/latest/wal2json-user-guide) +- [whale](https://docs.mogdb.io/en/mogdb/latest/whale) +- [oracle_fdw](https://docs.mogdb.io/en/mogdb/latest/1-oracle_fdw) +- [mysql_fdw](https://docs.mogdb.io/en/mogdb/latest/2-mysql_fdw) +- [postgres_fdw](https://docs.mogdb.io/en/mogdb/latest/3-postgres_fdw) +- [dblink](https://docs.mogdb.io/en/mogdb/latest/dblink) +- [orafce](https://docs.mogdb.io/en/mogdb/v3.1/orafce-user-guide) + +## Installation Demonstration + +Installation command: + +```shell +ptk cluster -n install-plugin [-H|--host HOST] [-p|--pkg PKG_PATH] [-P|--plugin PLUGIN_NAME] [--override] [--skip-check-version] +``` + +options: + +|option name|option type|description| +|:------|:------|:----| +|-H\|--host|String Array|Specify the IPs of the hosts to be installed, which will be installed to all hosts in the cluster by default.| +|-p\|--pkg|String|Specify the path of the plugin package, you can specify the local plugin package or the URL.| +|-P\|--plugin|String Array|Specify the name of the plugin to install, all plugins will be installed by default.| +|--override| Bool | Whether or not to overwrite existing plugin files. | +|--skip-check-version|Bool|Skip checking if the database version matches the plugin version.| + +## QA + +### Which version of the plugin is installed by default? + +PTK does plugin adaptation according to the version number of the current cluster. If `-p` is not specified, the default plugin version is the same as the version of the current cluster database; if `-p` is specified, the plugin version is the version number of the specified package. + +### How can I check that the plugin has been successfully installed? + +1. You can confirm whether the plugin has been installed successfully based on whether the above installation command is executed successfully or not. +2. List plugins according to [Show Plugin Information](./manage-cluster-list-plugins.md). + +### How to enable plugins? + +Execute the following command to link to the target database: + +```sql +gsql -r -d +``` + +Use the following command to create the extension: + +```sql +CREATE Extension +``` + +### What is `--override` used for? When should it be used? + +**Usage**: `--override` means that for plugins that have already been installed, if the plugin installation is executed again, it will directly overwrite the corresponding files of the original plugin, and will no longer interact with the user to confirm one by one. + +**When to use**: There may be cases where the plugin version number is inconsistent with the database version number, which may result in the database not being able to properly enable plugin, so this option can be used when installing. + +### What is `--skip-check-version` used for? When should I use it? + +**Usage**: When PTK installs a plugin, it parses the version number in the plugin package and determines whether it matches the version number of the current database, and reports an error if it does not. The purpose of `-skip-check-version` is to skip this validation. + +**When to use**: + +1. Wish to use a different version of plugin with the current version of the database. +2. If there is no corresponding plugin package released for a particular MogDB version, you can use this option to skip the validation and install another version of the plugin. + +### Can I uninstall a plugin that is already installed? + +Not supported. + +### Can an extension already created in the database be deleted? + +Execute the following command to link to the target database: + +```sql +gsql -r -d +``` + +Use the following command to delete an extension that has already been created: + +```sql +DROP Extension +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-clusters.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-clusters.md new file mode 100644 index 00000000..ea63de21 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-clusters.md @@ -0,0 +1,30 @@ +--- +title: Show Cluster List +author: Yao Qian +date: 2024-05-30 +--- + +# Show Cluster List + +You can view the cluster list with the following command: + +```bash +ptk ls +``` + +This information is displayed in the output table: + +- **cluster_name:** cluster name +- **id:** the ID of the database instance, which is the unique ID assigned to each instance by PTK when the cluster is deployed +- **addr:** Listening address of the database instance, in the form of `IP:PORT`. +- **user:** The user name of the operating system running the database. +- **data_dir:** the data directory of the database instance +- **db_version:** Version information for the database +- **create_time:** Cluster creation time +- **comment:** Cluster comment, which can be specified with the `--comment` option when installing the cluster, or modified after installation with the `ptk cluster modify-comment` command. + +If you only need the name of the cluster, you can add the `-n` option: + +```bash +ptk ls -n +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-plugins.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-plugins.md new file mode 100644 index 00000000..3570359a --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-list-plugins.md @@ -0,0 +1,67 @@ +--- +title: Show Plugin Information +author: gxk +date: 2024-06-12 +--- + +# Show Plugin Information + +## Overview + +This command is designed to query and display the installed plugins and created plugins under the cluster. + +## Query Demo + +Query command: + +```shell +ptk cluster -n list-plugins [-d|--database DATABASE_NAME] +``` + +Options description: + +|option name|option type|description| +|:------|:------|:----| +|-d\|--database| String Array|Query the created plugin for the specified database| + +Sample query results and descriptions: + +```shell +List of Installed Plugins: + Plugin Name | dn_6001 | dn_6002 +---------------+---------+---------- + mysql_fdw | Yes | Yes + oracle_fdw | Yes | Yes + postgres_fdw | Yes | Yes + dblink | Yes | Yes + pg_bulkload | Yes | Yes + pg_prewarm | Yes | No + pg_repack | Yes | No + pg_trgm | Yes | Yes + postgis | Yes | Yes + wal2json | Yes | Yes + whale | Yes | Yes + +Extension Status of Databases: + Database | Extension(s) +-----------+--------------- + test | whale + postgres | pg_trgm +``` + +- `List of Installed Plugins` Shows a list of installed plugins. Where `Plugin Name` indicates the name of the plugin, and `dn_xxxx` indicates whether the plugin is installed on a database node, where `Yes` indicates that the plugin is installed on the node, and `No` indicates that the plugin is not installed on the node. +- `Extension Status of Databases` shows the plugins that have been created in the database. Where `Database` indicates the name of the database and `Extension(s)` indicates the name of the plugin that has been created under the corresponding database. + +## QA + +### How to install the plugin? + +Installation of the plugin can be found in this [link](./manage-cluster-install-plugin.md). + +### What is the reason for `Extension Status of Databases` showing Cluster Stopped? + +Plugins that have been created in the database need to be linked to the database for querying. When the primary node is stopped, this information cannot be queried, so you need to start the primary node first and then query the plugin list. + +### Why are some installed plugins not shown here? + +The list shown here only shows the plugins listed in [official website](https://docs.mogdb.io/zh/mogdb/latest/extension), other plugins such as [mogila](https://gitee.com/enmotech/mogila), [compat_ tools](https://gitee.com/enmotech/mogila), etc. are not shown here. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-manage.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-manage.md new file mode 100644 index 00000000..4dd56c30 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-manage.md @@ -0,0 +1,31 @@ +--- +title: Manage Cluster +author: gxk +date: 2024-06-12 +--- + +# Manage Cluster + +## Overview + +For some pre-existing clusters, PTK provides management feature to enable the cluster to be managed by PTK. + +## Prerequisites + +Ensure that the node on which the PTK tool resides is properly linked to the nodes in the managed cluster. + +## Command + +```shell +ptk manage [--clustername] -H|--host HOST -U|--username USERNAME +``` + +options: + +|option name|option type|description| +|:------|:------|:----| +|--clustername|String|the name of the cluster to be managed| +|-H\|--host|String|IP address of any node in the cluster to be managed| +|-U\|--username|String|Name of the database user to be used in the cluster to be managed| + +After successful management, the cluster can be managed by PTK. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-modify-comment.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-modify-comment.md new file mode 100644 index 00000000..07ce9461 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-modify-comment.md @@ -0,0 +1,17 @@ +--- +title: Update Cluster Comment +author: Bai Kai +date: 2024-06-17 +--- + +# Update Cluster Comment + +When PTK executes the `ls` command, the result is the display of `comment`. When PTK manages multiple clusters, in order for the user to clearly understand the role of each set of clusters, the user can add comments to the managed clusters so that it is easy to differentiate between different clusters. + +## Command + +```shell +ptk cluster -n modify-comment --comment "some comment" +``` + +- `--comment` is the comment information to be modified. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-refresh.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-refresh.md new file mode 100644 index 00000000..b1bbf05f --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-refresh.md @@ -0,0 +1,33 @@ +--- +title: Update Database IP +author: gxk +date: 2024-06-18 +--- + +# Update Database IP + +## Overview + +If the IP of a node in a cluster changes due to a third party, the PTK cannot dynamically sense the change, so the operator needs to use the PTK to manually change the IP of the cluster to ensure normal management of the cluster. + +## Command + +```shell +ptk cluster -n refresh --replace-ip OLD_IP=NEW_IP +``` + +option: + +|option name|option type|description| +|:------|:------|:----| +|--replace-ip|String Array|List of IPs to be updated, mapping of old and new key-value pairs| + +## QA + +### Is it possible for two nodes to exchange IPs? + +Yes. The command is as follows: + +```shell +ptk cluster -n refresh --replace-ip DATANODE_IP1=DATANODE_IP2 --replace-ip DATANODE_IP2=DATANODE_IP1 +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-rename-cluster.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-rename-cluster.md new file mode 100644 index 00000000..2a438ff8 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-rename-cluster.md @@ -0,0 +1,34 @@ +--- +title: Rename Cluster +author: Bai Kai +date: 2024-06-11 +--- + +# Rename Cluster + +## Cluster Name + +Before installing a cluster, PTK needs to create a configuration file in which the `ClusterName` field is used to store cluster name information. + +In the process of using PTK, you need to specify the cluster name to differentiate between clusters for effective management, so the cluster name cannot be duplicated in PTK. + +Since version 1.5.0, PTK provides a command to change the cluster name after installation. + +## Show Cluster Name Information + +The `ptk ls` command can be used to show the cluster name and basic information about the cluster at the time of installation. + +## Rename Cluster + +As a general rule, cluster names are generally not changed after the configuration file is created and the cluster installation is complete. However, in some cases, when we manage several clusters, it is important to differentiate the names. For this reason, we provide the `rename` command for renaming clusters. The command format is as follows: + +```bash +ptk cluster -n rename -N +``` + +- ``: The name of the cluster for the current operation. +- ``: The new cluster name. + +**Note**: When changing the name of the new cluster, you need to pay attention to whether the name of the cluster is duplicated with the name of the cluster managed by the current PTK, otherwise there will be an error message. + +After executing the `rename` command, the log of `rename cluster success` will be printed, which indicates that the cluster name has been successfully changed. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-restart-db.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-restart-db.md new file mode 100644 index 00000000..95c4380c --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-restart-db.md @@ -0,0 +1,41 @@ +--- +title: Restart Database +author: Qian Yao +date: 2024-06-12 +--- + +# Restart Database + +Restarting a database is essentially a combination of [**stop database**](./manage-cluster-stop-db.md) and [**start database**](./manage-cluster-start-db.md). For user convenience, PTK provides the `restart` subcommand, which supports all parameters supported by `start` and `stop`. + +## Restarting The Entire Cluster + +You can restart the entire cluster by specifying the cluster name with this command: + +```bash +ptk cluster -n restart +``` + +## Restart Individual Instances Within The Cluster + +The `-H` or `--host` option specifies the IP of the instance. + +```bash +ptk cluster -n restart -H +``` + +The `-i` or `--id` option specifies the ID of the instance (ID can be viewed via `ptk ls`) + +```bash +ptk cluster -n restart -i +``` + +## Restart All Clusters + +> Please use caution! + +PTK is multi-cluster management software, so PTK also supports restarting all clusters managed by PTK with a single command: + +```bash +ptk cluster restart [-a|--all] +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-role-change.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-role-change.md new file mode 100644 index 00000000..ee84be8c --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-role-change.md @@ -0,0 +1,91 @@ +--- +title: Role Management +author: gxk +date: 2024-06-18 +--- + +# Role Management + +Manages the roles of the database nodes in the cluster. + +## Purpose + +To facilitate more flexible management of the roles of database nodes to meet the expectations of users. + +## Precautions + +The role management of PTK gives more flexible operation to managers, so some of the following situations may occur: + +- Cluster has **no primary node** after role change. +- Cluster has **multiple primary nodes** after a role change. + +Managers need to ensure that they are aware of these scenarios and that they meet expectations. + +## Promote Role + +Promote order: + +```text +cascade_standby -> standby -> primary +``` + +Note: When you promote the roles of a database node, the roles are promoted gradually in the order of promotion. + +### Promote Role Command + +The command is as follows: + +```shell +ptk cluster -n promote [-H|--host HOST] [-i|--id ID] +``` + +Options: +|option name|option type|description| +|:-----|:------|:------| +|-H\|--host|String|The IP of the database node where the role is to be promoted| +|-i\|--id|Integer|Database node ID of the role to be promoted| + +Note: If `-H` and `-i` are specified, only the value of `-i` is used to perform the operation. + +## Demote Role + +Demote order: + +```text +primary -> standby -> cascade_standby +``` + +Note: When you demote the roles of a database node, the roles are demoted progressively in the order of demotion. + +### Demote Role Command + +The command is as follows: + +```shell +ptk cluster -n demote [-H|--host HOST] [-i|--id ID] [--upstream UPSTREAM_HOST] +``` + +Options: +|option name|option type|description| +|:-----|:------|:------| +|-H\|--host|String|IP of the database node where the role to be demoted is located| +|-i\|--id|Integer|ID of the database node of the role to be demoted| +|--upstream|String|IP of the upstream node of the database node of the role to be demoted| + +Note: If `-H`, `-i` both specify values, only the value of `-i` is used to perform the operation. To demote a `standby` node, specify the parameter `--upstream`. + +## QA + +### Why is there no primary node? How to recover it? + +Reason for no primary node: After `demote` operation on the primary node of a cluster, there will be no primary node. +How to recover: Select a `standby` node and perform a `promote` operation to promote it to primary. + +### Why are there multiple primary nodes? How to recover to a single primary node? + +Reason for multiple primary nodes: Multiple `promote` operations on a cluster's non-primary nodes will result in multiple primary nodes. +How to recover: `demote` the undesired primary node until one primary node is left. + +### After a role operation, will there be multiple cascades with one primary and no standby? + +No. PTK has made a judgment for `standby` node promotion or demotion operation to prevent this situation. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-in.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-in.md new file mode 100644 index 00000000..0651334c --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-in.md @@ -0,0 +1,113 @@ +--- +title: Scale-in Cluster +author: gxk +date: 2024-06-17 +--- + +# Scale-in Cluster + +Through a series of operations, reduce database nodes in the original cluster. + +## Purpose + +PTK provides users with the function of cluster scale-in to meet their needs for business, cost, resource allocation, risk and other factors. + +## Scale-in Command + +```shell +ptk cluster -n scale-in [-H|--host HOST] [-i|--id ID] [--skip-clear-user] [--skip-clear-db] [--force] +``` + +## Sample Topology Before And After Scale-in + +- One primary N standby and M cascade + +The original cluster topology is as follows: + +```text + standby1 -- cascade_standby1, cascade_standby2 + / +primary + \ + standby2 -- cascade_standby3 +``` + +After deleting `standy2` with the scale-in command, the structure changes to: + +```text + standby1 -- cascade_standby1, cascade_standby2 + / \ +primary \ + \ + standby2 cascade_standby3 +``` + +At this point, `standby2` is not in the cluster, and the upstream of the downstream node of `standby2` is changed to `standby1`. + +PTK implementation: If the target node role is `standby`, if the node has downstream nodes and there are other `standby` nodes, then all the downstream nodes of the node to be scaled-in will point to the rest of the `standby` nodes in the upstream. + +- One primary one standby and one cascade + +The original cluster topology is as follows: + +```text +primary -- standby -- cascade_standby +``` + +After deleting `standy` with the scale-in command, the structure changes to: + +```text +primary standby cascade_standby +``` + +At this point the 3 nodes are directly unrelated and are all independent. + +## QA + +### Can I scale-out a cluster? + +Yes. Please refer to [Cluster Scale-out](./manage-cluster-scale-out.md). + +### Can a cluster be scaled out to empty by performing a scale-out all the time? + +No, you cannot. After a scale-out, the cluster will have at least one available data node. + +To get an empty cluster, see [Create Empty Cluster](./manage-cluster-init-empty-clsuter.md), or refer to [Throwout Node](./manage-cluster-throwout.md). + +### Can I directly scale-in the primary node? + +No. There will be at least one node surviving after scaling-in, and that node will be the primary node. + +### What should I do if I want to scale-in the node where the primary node is located? + +Consider using the following steps: + +1. Use the `switchover` command to switch primary and standby nodes. +2. Scale-in the node on which the primary node used to reside (the node where the standby node now resides). + +### Can I scale-in a cluster with CM? If yes, is there a restriction? + +Yes. + +**Restrictions**: The database nodes of the scaled-in cluster should be at least 2 nodes, and the CM nodes should be at least 2 nodes, because the arbitration mechanism of CM needs to guarantee at least 2 nodes. +**ADDITIONAL**: When scaling-in a cluster with CM, PTK will scale-in the database node and CM node on the target node. + +### What does `--skip-clear-db` do? When should it be used? + +**Usage**: When scaling-in a target node, PTK by default kills the database processes on that node, clears the database related files, and rewrites the replication stream information in the `postgresql.conf` file for the remaining nodes. The purpose of `--skip-clear-db` is to skip the step of clearing database related files. +**When to use**: When you want to keep information about the data node. + +### What does `--skip-clear-user` do? When should it be used? + +**Usage**: When PTK scales-in a target node, it normally removes the database user under that node. + +**When to use**: When you don't want to delete database user on the target node. + +### What does `--force` do? When should it be used? + +**Usage**: There may be situations where the node to be scaled-in cannot be linked properly due to special reasons, and some of the checks performed during the scaling-in process cannot be passed, resulting in an error being thrown if the node cannot be scaled-in. The role of `--force` is to skip these checks. +**When to use it**: Continue to perform scale-in tasks when some nodes cannot be linked. + +### If CM is currently deployed in the cluster and VIPs are configured, will scale-in affect VIPs? + +No. PTK refreshes CM-VIP after scale-in for clusters that have VIPs configured to ensure that the basic CM-VIP information is correct. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-out.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-out.md new file mode 100644 index 00000000..0cacda7b --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-scale-out.md @@ -0,0 +1,128 @@ +--- +title: Scale-out Cluster +author: gxk +date: 2024-06-17 +--- + +# Scale-out Cluster + +Through a series of operations, add database nodes in the original cluster. + +## Purpose + +PTK provides users with the function of cluster scale-out to meet their needs for business, cost, resource allocation, risk and other factors. + +## Scale-out Logic + +When PTK scales-out, it packages static files such as application directories and tool directories on the primary node, copies them to the target machine and then unpacks them into the corresponding directories. Then the kernel tool is used to initialize a new data directory, and finally the cluster configuration is refreshed according to the topology of the new cluster as a whole. + +Note that the scale-out is done in a node-by-node mode. When the scale-out fails at a node, PTK will stop the scale-out immediately and refresh the configuration according to the completed cluster. + +## Scale-out Process Demonstration + +### Create The Configuration File Needed for Scaling-out + +Use the following command to create a scale-out configuration file + +```shell +ptk template scale-out > scale-out.yaml +``` + +At this point a scale-out configuration file `scale-out.yaml` has been created, modify this configuration file as needed. + +The contents of the scale-out template are described below. + +```yaml +# New list of database servers added, with the same fields supported as in the installation +db_servers: + - host: "replace host ip here" + # Roles only support "standby" (default) or "cascade_standby" + role: standby + upstream_host: "" + ssh_option: + port: 22 + user: root + password: "encrypted ssh password by ptk" + +# List of CM servers +# If the cluster before scale-out has CM installed, you need to specify the list of CM servers for scale-out. +# In general, the list of CM servers is the same as the list of database servers. +# But if you scale-out only the database or only the CM on the new server, the list of machines in the two lists can be different. +cm_servers: + - host: "replace host ip here" +``` + +### Perform Scale-out Operations On Clusters + +Scale-out command: + +```shell +ptk cluster -n scale-out -c CONFIG.yaml [--build-from BUILD_FROM_HOST] [--skip-create-user] [--skip-check-os] [--skip-check-distro] [--default-guc] [--skip-rollback] [--skip-gen-ptkc] [--cpu CPU_MODEL] [--not-limit-cm-nodes] +``` + +Options: +|option name|option type|description| +|-------|------|-------| +|-c|String|Specify the configuration file to use when scaling-out| +|--build-from|String|Specify the data source node from which the cascade_standby node will be built when scaling-out; if not specified, build from the primary node by default.| +|--skip-create-user|Bool|Skip user creation for scale-out nodes| +|--skip-check-os|Bool|Skip OS-related checks for scale-out nodes| +|--skip-check-distro|Bool|Skip distro checks for scale-out nodes| +|--default-guc|Bool|Use the database default parameter configuration for scale-out nodes| +|--skip-rollback|Bool|Skip rollback if errors are reported during scale-out| +|--skip-gen-ptkc|Bool|Skip transmitting [ptkc](../guide-ptkc-tool.md) for scale-out nodes| +|--cpu|String|Specify the CPU Model of the scale-out node.| +|--not-limite-cm-nodes|Bool|No limitation on the number of CM nodes, the default number of CM nodes must be odd if the number of CM nodes is greater than 3| + +## Scale-out Support List + +|original cluster|scale-out condition|Whether to support|solution| +|--------|-------|-------|------| +|db1,db2 |db3 |Yes | | +|db1+cm1,db2+cm2,db3+cm3|db4+cm4|Yes|| +|db1+cm1,db2+cm2,db3+cm3|db4|Yes|| +|db1+cm1,db2+cm2,db3+cm3|cm4|Yes|| +|db1+cm1,db2+cm2,db3|cm3|No|Scale-in db3, scale-out db3+cm3| +|db1+cm1,db2+cm2,cm3|db3|No|Scale-in cm3, scale-out db3+cm3| + +## QA + +### Can a cluster be scaled-in? + +Yes. Refer to [Scale-in Cluster](./manage-cluster-scale-in.md) + +### What is the maximum number of nodes for scale-out? + +Up to 9 nodes. + +### Can I scale-out a primary node? + +No. + +### Can I scale-out a cluster with CM? If yes, is there a restriction? + +Yes. See [scale-out support list](#scale-out-support-list) for more details. + +### What does `--skip-rollback` do? When should it be used? + +**Usage**: PTK performs scale-out on a node-by-node basis. If a node fails when performing a scale-out operation, it rolls back the operations that have already been performed on that node. The role of `--skip-rollback` is to not roll back operations that have already been performed on a node if the scale-out fails. + +**When to use**: Users can use this option if they want to see why the scale-out failed on the target node. + +### What does `--skip-check-distro` do? When should it be used? + +**Usage**: When scaling-out, PTK will check if the operating system of the node to be scaled-out is the same as the primary node by default. If it is not, the check fails. The role of `--skip-check-distro` is to skip this check. +**When to use**: + +1. Misjudgment caused by incomplete judgment of the PTK on an homogeneous system. +2. In a heterogeneous system with consistent MogDB packages, this option can be used to skip the check, but PTK does not guarantee the availability and correctness of the database nodes after a successful scale-out. + +### What does `--not-limite-cm-nodes` do? When should it be used? + +**Usage**: When PTK scales-out, if the number of CM nodes is greater than 3, it will force the number of CM nodes to be an odd number, in order to prevent the primary selection problem caused by the CM cluster brain-split. Use this option to avoid the mandatory check for an odd number of CM nodes. + +**When to use**: It is not recommended to use this option, forcing the use of this option is likely to encounter problem with primary selection caused by brain-split of CM clusters, which can then cause CM to fail. + +### If CM is currently deployed in the cluster and VIPs are configured, will scale-out affect VIPs? + +No. PTK refreshes CM-VIP after scale-out for clusters that have VIPs configured to ensure that the basic CM-VIP information is correct. diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-guc.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-guc.md new file mode 100644 index 00000000..55673384 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-guc.md @@ -0,0 +1,37 @@ +--- +title: Set Database Parameters +author: Bai Kai +date: 2024-06-17 +--- + +# Set Database Parameters + +PTK provides commands to set data parameters, and users can modify the values of the specified parameters themselves. + +```shell +ptk cluster set-guc [flags] +``` + +Where Flags contains the following specific parameters: + +- `-H, --host` :Indicates the IP of the database server. +- `-i, --id` :Indicates the ID of the database server. +- `-c, --kv` :the parameters to be set, whose format should meet the form of "key (parameter name) = value (parameter value)". For example: "password_encryption_type=1". + +## Example of Command + +### Specify IP + +The `-H` or `--host` parameter specifies the IP of the instance. + +```shell +ptk cluster -n set-guc -H -c "key=value" +``` + +### Specify ID + +The `-i` or `--id` parameter specify the ID of the instance (ID can be viewed via `ptk ls`). + +```shell +ptk cluster -n set-guc -i -c "key=value" +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-hba.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-hba.md new file mode 100644 index 00000000..e250ef0d --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-set-hba.md @@ -0,0 +1,47 @@ +--- +title: Set Database HBA +author: Bai Kai +date: 2024-06-17 +--- + +# Set Database HBA + +PTK provides functionality for adding `pg_hba.conf` information to the database. + +## Prerequisites + +You need to prepare the information you want to set up in advance. For example, to add an entry under host, prepare the following information: + +```shell +"host all all /32 sha256" +``` + +## Command + +```shell +ptk cluster set-hba [flags] +``` + +Flags specifically contains the following parameters: + +- `-H, --host`: Used to specify an IP list. +- `-i, --id`: Used to specify an ID list. +- `-v, --value`: Indicates new pg_hba.conf entry information. + +### Example of Specify IP + +```shell +ptk cluster -n set-hba -H -v +``` + +### Example of Specify ID + +```shell +ptk cluster -n set-hba -i -v +``` + +### Example of Specify Multiple IPs + +```shell +ptk cluster -n set-hba -H -H -v +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-config.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-config.md new file mode 100644 index 00000000..4a028103 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-config.md @@ -0,0 +1,15 @@ +--- +title: Show Cluster Topology Configuration +author: Bai Kai +date: 2024-06-17 +--- + +# Show Cluster Topology Configuration + +PTK provides the ability to show the topology configuration of an installed cluster. + +Simply specify `` and execute the following command: + +```shell +ptk cluster -n show-config +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-guc.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-guc.md new file mode 100644 index 00000000..107cfd19 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-guc.md @@ -0,0 +1,23 @@ +--- +title: Show Database Parameters +author: Bai Kai +date: 2024-06-17 +--- + +# Show Database Parameters + +PTK provides the function of showing database parameter information. + +Execute the following command: + +```shell +ptk cluster -n show-guc -k +``` + +For example: + +```shell +ptk cluster -n show-guc -k password_encryption_type +``` + +The user only needs to explicitly specify the name of the parameter to be viewed during operation, and then input it according to the command format, and PTK will display the corresponding parameter information. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-hba.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-hba.md new file mode 100644 index 00000000..de081455 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-show-hba.md @@ -0,0 +1,31 @@ +--- +title: Show Database HBA +author: Bai Kai +date: 2024-06-17 +--- + +# Show Database HBA + +PTK provides a convenient way to show the content of **pg_hba.conf** file for the database nodes in the cluster. + +Execute the following command to show it: + +```shell + ptk cluster -n show-hba +``` + +This command directly outputs information about `pg_hba.conf` under the primary node in the cluster. + +To show the `pg_hba.conf` information for a specified node, use the following command. + +## Specify Node ID + +```shell +ptk cluster -n show-hba -i +``` + +## Specify Node IP + +```shell +ptk cluster -n show-hba -H +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-start-db.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-start-db.md new file mode 100644 index 00000000..ed2218bc --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-start-db.md @@ -0,0 +1,39 @@ +--- +title: Start Database +author: Qian Yao +date: 2024-06-12 +--- + +# Start Database + +## Start the entire cluster + +You can start the entire cluster by specifying the cluster name with this command: + +```bash +ptk cluster -n start +``` + +## Start a single instance within a cluster + +PTK starts all instances in the cluster by default, but you can specify a specific instance or instances to start: + +The `-H` or `--host` option specifies the IP of the instance. + +```bash +ptk cluster -n start -H +``` + +The `-i` or `--id` option specifies the ID of the instance (ID can be viewed via `ptk ls`) + +```bash +ptk cluster -n start -i +``` + +## Start all clusters + +PTK is a multi-cluster management software, so PTK also supports one-click startup of all PTK-managed clusters: + +```bash +ptk cluster start [-a|--all] +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-status.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-status.md new file mode 100644 index 00000000..fd4025ae --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-status.md @@ -0,0 +1,60 @@ +--- +title: Show Cluster Status +author: Qian Yao +date: 2024-06-11 +--- + +# Show Cluster Status + +You can show the status information of the specified cluster with the following command: + +```shell +ptk cluster -n status +``` + +If there are multiple clusters, you can list the status information of all clusters at once by specifying the `-a` parameter without knowing the cluster name: + +```shell +ptk cluster status -a +``` + +PTK also supports specifying the `--detail` parameter to list the stream replication information for each instance in the cluster when viewing status: + +```shell +ptk cluster -n status --detail +``` + +If the cluster status list is too wide to be easily viewed by folding the rows, you can add the `-G` parameter to display it vertically: + +```shell +ptk cluster -n status -G +``` + +## Cluster status definition + +| status | meaning | +| :--- |---| +| Normal | All instances of the cluster are normally available | +| Unavailable | The cluster is not available, or the primary node is not in a normal state | +| Degraded | Cluster is available, but some standby nodes are not | +| Stopped | All nodes of the cluster are stopped | +| MultiPrimary | Cluster has multiple primary instances | + +## Instance State Definition + +> The instance status is consistent with the list defined by the database kernel, with the addition of `SSH Disconnect` + +| status | meaning | +| :--- |---| +| Unknown | Unknown State | +| Normal | Normal state | +| Need repair | Copy disconnected, pending repair | +| Starting | Instance startup in progress | +| Wait promoting | Waiting for role promotion | +| Promoting | Role promotion in progress | +| Demoting | Role demotion in progress | +| Building | Rebuilding in progress | +| Catchup | Catching up on logs | +| Coredump | Instance crashed | +| Stopped | Instance stopped | +| SSH Disconnect | Instance machine SSH connection failed | diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-stop-db.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-stop-db.md new file mode 100644 index 00000000..bc52f4cb --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-stop-db.md @@ -0,0 +1,41 @@ +--- +title: Stop Database +author: Qian Yao +date: 2024-06-12 +--- + +# Stop Database + +## Stop entire cluster + +You can stop an entire cluster by specifying the cluster name with this command: + +```bash +ptk cluster -n stop +``` + +## Stop an instance in a cluster + +PTK stops all instances in the cluster by default, or you can specify a specific instance or instances to stop: + +The `-H` or `--host` option specifies the IP of the instance. + +```bash +ptk cluster -n stop -H +``` + +The `-i` or `--id` option specifies the ID of the instance (ID can be viewed via `ptk ls`) + +```bash +ptk cluster -n stop -i +``` + +## Stop all clusters + +> Please use caution! + +PTK is multi-cluster management software, so PTK also supports stopping all clusters managed by PTK: + +```bash +ptk cluster stop [-a|--all] +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-switchover.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-switchover.md new file mode 100644 index 00000000..7f127cc2 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-switchover.md @@ -0,0 +1,23 @@ +--- +title: Switchover +author: Qian Yao +date: 2024-06-12 +--- + +# Switchover + +For routine operation and maintenance needs, you may want to switch the primary and standby nodes. The gs_ctl that comes with the MogDB database provides the `switchover` function, but the gs_ctl can only be executed under the user of the instance. In order to facilitate unified and centralized operation and maintenance, PTK also encapsulates the `switchover` command, which enables the primary and standby nodes of any instance to be switched over through PTK. + +## Command + +The `-H` or `--host` option specifies the IP of the instance. + +```bash +ptk cluster -n switchover -H +``` + +The `-i` or `--id` option specifies the ID of the instance (ID can be viewed via `ptk ls`) + +```bash +ptk cluster -n switchover -i +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-takeover.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-takeover.md new file mode 100644 index 00000000..c00b5a21 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-takeover.md @@ -0,0 +1,70 @@ +--- +title: Takeover A Node +author: Bai Kai +date: 2024-06-12 +--- +# Takeover A Node + +In some specific scenarios, PTK may not be able to sense the addition of a new node and thus manage it. Since version 1.5.0, PTK provides a command to takeover a node. + +The main purpose of this directive is that when a user manually adds a node to an existing PTK cluster and improves the relationship between the new node and the cluster, and then PTK is unable to sense the addition of the new node, then it is necessary to use the `ptk cluster takeover` directive to takeover the user-installed new node into PTK's metadata, so as to realize effective management of the new node. + +It is also possible to create an empty cluster and takeover a non-PTK installed cluster to allow PTK to manage it. + +## Usage + +When you need to takeover a specified node, you can execute the following command: + +```bash +ptk cluster -n takeover [-H|--host ] [-U|--user ] [-i|--identity ] [--appdir ] [--datadir ] [--logdir ] [--tmpdir ] [--tooldir ] +``` + +- `[-H|--host ]`: Specifies the host on which the node is to be taken over, required. This parameter specifies the IP address of the host where the node to be taken over resides. +- `[-U|--user ]`: Specify the user who will takeover the node, required field. Specify the exact user corresponding to the node for effective connection and management. +- `[-i|--identity ]`: SSH private key path. This helps establish a more secure connection method. +- `[--appdir ]`: Directory of the database. +- `[--datadir ]`: The data directory for the database that specifies exactly where the data is stored. +- `[--logdir ]`: The log directory of the database, which is used to store related log information. +- `[--tmpdir ]`: The temporary directory of the database, which handles the storage area for temporary data. +- `[--tooldir ]`: The tools directory of the database, which deals with where the relevant tools are stored. + +It should be noted that only two parameters in the `takeover` command are required, and the other parameters can be filled in or not according to the actual situation. + +PTK will connect to the machine based on the user and machine information provided, and then obtain the database information under the machine. + +When `-i|--identity` is not filled in, PTK will interactively instruct the user to enter a password or secret key to ensure the security and reliability of the connection. As follows: + +```bash +$ ptk cluster -n test takeover -U mog -H +Use the arrow keys to navigate: ↓ ↑ → ← +? [retry: 1] please choose the auth method for connecting mog@: +▸ password + keyfile +``` + +In this case, you can choose the corresponding way to fill in. + +In addition, in practice, users need to ensure that the information provided is accurate, especially the host IP and user information, which will directly affect the success of the takeover operation. + +At the same time, if you fill in the directory of the database, you need to fill in according to the actual deployment situation to ensure the normal operation and effective management of the database. If you don't fill in the directory, as in the following example, PTK will automatically check the corresponding directory for users to confirm. + +The following is a complete example: + +```bash +$ ptk cluster -n test takeover -U mog -H +✔ [retry: 1] please choose the auth method for connecting mog@: password +✔ please enter the password: ********* +Information about the node (mog@1) to be takeover: + 1 | appdir | /opt/mogdb-mog/app + 2 | datadir | /opt/mogdb-mog/data + 3 | logdir | /opt/mogdb-mog/log + 4 | tmpdir | /opt/mogdb-mog/tmp + 5 | tooldir | /opt/mogdb-mog/tool + 6 | port | 23419 +✔ Do you want to modify them (default=n) [y/n]: n +INFO[2024-06-13T17:08:17.033] update cluster_static_file success +INFO[2024-06-13T17:08:17.111] update metadata success +INFO[2024-06-13T17:08:17.111] takeover success +``` + +During the takeover process, PTK will automatically handle some possible exceptions, but users still need to pay close attention to the operation process in order to find and solve possible problems in time. By properly using the commands of the takeover node, users can manage and expand the database cluster more flexibly to meet the needs of different scenarios. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-throwout.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-throwout.md new file mode 100644 index 00000000..a9d2f4fa --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-throwout.md @@ -0,0 +1,40 @@ +--- +title: Throw Out A Node +author: Bai Kai +date: 2024-06-14 +--- + +# Throw Out A Node + +## Purpose + +In some clusters managed by PTK, it is sometimes desirable to throw out the management of a node in a cluster that cannot be uninstalled due to the large amount of data in the cluster. To address this situation, PTK 1.5.0 introduced the `throwout` command, which can be used to throw out a node in a given cluster. + +It is important to note that the primary node cannot be thrown out if there is a non-primary node in the cluster. + +PTK sets some restrictions on `throwout`, for example, if the current cluster has a primary node, a standby node and a cascade node, it is not allowed to throw out either the standby node or the primary node, you need to throw out the cascade node before you can throw out the standby node. Then the primary node can be throwed out. + +## Usage + +The command to throw out a specified node using PTK is as follows: + +```bash +# Specify IP +ptk cluster -n throwout -H +# Specify ID +ptk cluster -n throwout -i +``` + +The `throwout` command is relatively simple, but there are some restrictions to be aware of when using it: + +1. When performing a `throwout` operation, check to see if there is a downstream database on the specified node. +2. Make sure that the specified node is in the current cluster. During the `throwout` process, there is an interaction that allows the user to confirm whether or not to thrown out the node. As shown in the following example: + +```bash +$ ptk cluster -n throwout -i +Nodes to be throwout: +- +✔ Are you sure you want to throwout them (default=n) [y/n]: █ +``` + +Of course, PTK provides the `-y|--yes` parameter to skip the interaction. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-cm.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-cm.md new file mode 100644 index 00000000..47e14322 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-cm.md @@ -0,0 +1,15 @@ +--- +title: Uninstall CM +author: Qian Yao +date: 2024-06-12 +--- + +# Uninstall CM + +PTK provides a function to uninstall [CM](https://docs.mogdb.io/en/mogdb/v5.0/14-cm) separately for the [Install CM](./manage-cluster-install-cm.md) function. + +Uninstall command: + +```bash +ptk cluster -n uninstall-cm +``` diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-mogha.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-mogha.md new file mode 100644 index 00000000..cd8539ed --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-uninstall-mogha.md @@ -0,0 +1,15 @@ +--- +title: Uninstall MogHA Service +author: Bai Kai +date: 2024-06-17 +--- + +# Uninstall MogHA Service + +Uninstalling MogHA is done in one command: + +```shell +ptk cluster -n uninstall-mogha +``` + +- **:** the cluster name \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-upgrade.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-upgrade.md new file mode 100644 index 00000000..d2a0d1a3 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-upgrade.md @@ -0,0 +1,147 @@ +--- +title: Upgrade Database +summary: Upgrade Database +author: Yao Qian +date: 2023-04-12 +--- + +# Upgrade Database + +Upgrade refers to that the database binary package and metadata are upgraded to a higher version without data export on the basis of the current cluster. + + + + + + + + +
Target Version
2.0.x3.0.0/3.0.13.0.2+5.0.x
Current Version2.0.x
3.0.x-
5.0.x---
+ +## Notes + +> 1. if CM is deployed in the cluster, PTK 1.5.0 or later should be used. +> 2. If compat-tools is currently installed in the cluster, consider uninstalling the current version of compat-tools in order to avoid conflicts with higher versions of the whale plugin. +> 3. 2.0.x version upgrade to 3.0.0/3.0.1 needs to be upgraded to 2.1 first due to the earlier version. 2.0.x version upgrade to 3.0.0/3.0.1 is not supported since PTK does not support upgrade to Preview version. + +## Restrictions + +- A cluster earlier than 2.0 does not support upgrade. +- A cluster of a higher version cannot be upgraded to a lower version. +- PTK does not support upgrade to the preview version (the preview version means that the second number in a version is 1, such as 3.1.0). +- The cluster stream replication parameter `enable_stream_replication` needs to be set to `on`. +- The cluster status must be normal before upgrade. + +## In-place Upgrade + +The in-place upgrade consists of two phases: + +- Upgrade (can be rolled back after the upgrade fails, can be repeated to execute the upgrade command, support for continuous transmission at breakpoints) +- Commit (commit only after the first step of the upgrade is successful, and cannot be rolled back after the commit) + +Before upgrading the database cluster, you need to check if the plug-in has been created for the current database cluster with the following command: + +```bash +ptk cluster -n list-plugins +``` + +After execution, two tables will be output, the first table represents the list of installed plugins, installed does not mean used in the database. + +The second table represents the specific plugins that have been created in each database, if no plugins have been created, the Extension(s) field will be empty. + +We need to make sure that there is a value under the Extension(s) field in the second table, the upgrade command is different in different cases. + +### No Plugin Created + +If no plug-ins have been created in the database prior to the upgrade, you can directly specify the new version of the installation package for the upgrade: + +```bash +ptk cluster -n upgrade [-y] -p +``` + +### Plugin Created + +If a plugin is used in the database, it may cause the plugin to be unavailable after the upgrade or the upgrade to fail because the database metadata will change after the upgrade. + +So for clusters that used plugins, you need to additionally specify the following parameters to upgrade: + +- `--plugin-dir`: The local directory, which holds the pre-downloaded new version of the plugin package (! Please do not change the file name of the downloaded plugin package) +- `--plugin-upgrade-patch`: SQL patch package required for plugin upgrade (this parameter does not need to be specified when the target version is **MogDB 5.0.2 or later**) + +```bash +ptk cluster -n upgrade [-y] -p --plugin-dir +``` + +After executing the above commands, PTK will complete the upgrade operation. After the upgrade, the cluster is already running with the new version, at this point, you can verify the new features on the database, and if you encounter any problems, you can roll back the cluster by `upgrade-rollback` command, and PTK will roll back the cluster to the state of the old version. + +```bash +ptk cluster -n upgrade-rollback +``` + +If there is an interruption in the upgrade process that reports an error, you can resolve it by human intervention, and when the problem is resolved, you can continue to complete the upgrade by re-executing the upgrade command. + +### upgrade-commit + +Commit an upgrade, enable the cluster write/read status, and delete the backup file of the old version. After that, the cluster cannot be rolled back. + +```bash +ptk cluster -n upgrade-commit +``` + +## Rolling Upgrade + +PTK 1.4.0 and above support rolling upgrade, but since the rolling upgrade process always upgrades the standby node and does not directly upgrade the primary node, you cannot submit any SQL during the upgrade process, so there are the following two constrains for rolling upgrade: + +1. The kernel version of the database before and after the upgrade should be consistent, if not, you need to execute the upgrade SQL, so it can not be supported for the time being; + + > The output of `Number` field by running `ptk candidate db` is the kernel version number (requires PTK 1.4.0 or later). + +2. There are no plugins that need to be upgraded; + +### Process of rolling upgrade + +![rolling upgrade](https://cdn-mogdb.enmotech.com/docs-media/ptk/rolling-upgrade-en.png) + +### Procedures of rolling upgrade + +Take one primary and one standby as an example, assume that the primary IP is `IP1` and the standby IP is `IP2` in the initial state. + +1. Check if the machine status is `Normal`. + + ```shell + ptk cluster -n status + ``` + +2. Upgrade standby node in the cluster. + + Perform a single-node upgrade of a standby node in the cluster with the `-H` parameter, and the node should be able to temporarily switchover to the primary node to provide services. + + ```shell + ptk cluster -n upgrade -p -H + ``` + +3. Perform primary/standby nodes switchover. + + Switch the upgraded standby node to the primary node and demote the original primary node to the standby node. + + ```shell + ptk cluster -n switchover -H + ``` + +4. Upgrade the original primary node. + + ```shell + ptk cluster -n upgrade -p -H + ``` + +5. (Optional) Re-switch the primary node to the original primary machine. + + ```shell + ptk cluster -n switchover -H + ``` + +6. Upgrade commit. + + ```shell + ptk cluster -n upgrade-commit + ``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-vip.md b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-vip.md new file mode 100644 index 00000000..b1622118 --- /dev/null +++ b/product/en/docs-ptk/v2.0/guide/manage-cluster/manage-cluster-vip.md @@ -0,0 +1,57 @@ +--- +title: Manage Cluster VIP +author: gxk +date: 2024-06-18 +--- + +# Manage Cluster VIP + +This document only describes how to manage VIPs for clusters with CM. For `MogHA` VIP configuration, please refer to [this document](https://docs.mogdb.io/en/mogha/v2.4/configuration-file). + +## What is a VIP + +VIP stands for virtual IP, which does not correspond to a specific server or NIC, and can be bound to any server in the same network segment. Therefore, using a virtual IP to connect to the database service ensures that when the database is switched and the VIP is bound to a new primary node, there is no need to change the configuration of the service, which ensures the continuity of the service. + +## Prerequisites + +When using `load-cm-vip` to operate on a cluster, the cluster must have CM installed. + +## Operation of VIP + +PTK provides the functions of installing, uninstalling, and refreshing VIPs. + +Operation command: + +```shell +ptk cluster -n load-cm-vip --action ACTION --vip VIP +``` + +Options: + +|option name|option type|description| +|:------|:------|:----| +|--action|String|Action type for cm-vip, currently only support [install, uninstall, refresh]| +|--vip|String|The value of VIP, only required for install.| + +## QA + +### How to check if the installation is successful after installing VIP? + +1. Check to see if the install command reported any errors. +2. Run `ptk cluster -n status` and see if the value of `active_vip` column is as expected. + +### Does `load-cm-vip` have version requirements for MogDB? + +There is a limitation that this command can only be executed on VIPs if the MogDB version >= 5.0.4. + +### How can I manage VIP with CM commands? + +You can refer to [this document](https://docs.mogdb.io/en/mogdb/v5.0/manual-configuration-of-vip) to use CM commands to manage VIP. + +### Does cluster scale-in and scale-out affect VIPs? + +No. If you use PTK to scale in or out a cluster, if VIP has been configured, PTK will refresh the cluster VIP configuration once to ensure that CM is configured correctly and available. + +### What is the maximum number of VIPs that can be configured? + +The number of VIPs that can be configured depends on the number of network segments currently used by the cluster. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/overview.md b/product/en/docs-ptk/v2.0/overview.md new file mode 100644 index 00000000..cbeb9bb9 --- /dev/null +++ b/product/en/docs-ptk/v2.0/overview.md @@ -0,0 +1,85 @@ +--- +title: About PTK +summary: About PTK +author: Yao Qian +date: 2023-04-05 +--- + +# About PTK + +PTK (Provisioning Toolkit) is a command-line operation and maintenance tool developed for MogDB database using Golang, which is designed to help users deploy and manage MogDB database clusters more conveniently. + +## Application Scenarios + +- Developers need to quickly enable multiple local MogDB processes. +- Users need to install MogDB quickly using PTK. +- Daily operation and maintenance by DBAs +- A third-party operation and maintenance platform needs to be integrated. + +## Recommended Deployment Architecture + +PTK is a centralized multi-cluster management software. As a centrally-controlling software, it manages multiple database clusters remotely using SSH. Therefore, it is recommended that PTK is independently deployed a control server and the database is another server, as shown in the following figure. Certainly, PTK can be also deployed on the local server where the database is located. You can choose either of the deployment methods as required. + +*(Note: PTK relies on local metadata for cluster management, and PTKs installed by users on different operating systems are not visible to each other).* + +``` + +-----------+ + | PTK | + +-----------+ + /---ssh-----/ | \---ssh----\ + / ssh \ + / | \ + +-----------+ +-----------+ +-----------+ + | MogDB | | MogDB | | MogDB | + +-----------+ +-----------+ +-----------+ +``` + +## Operating Systems Supported by PTK for Installing MogDB + +> You can run `ptk candidate os` to check the latest OSs supported. + +*(Note: The operating systems listed in the table below are the databases where PTK tests were able to deploy MogDB successfully and regular CRUD operations run normally. Unless the table states that it has been fully tested for compatibility, please perform your own full business validation before production deployment).* + +| ID | OS | Recommend to use | Tested by ptk (OS version) | Fully compatibility tested (MogDB Version) | +|----------|----------------------------------------------|------------------|----------------------|-----------------------------| +| 1007010 | CentOS Linux 7 (Core) (x86_64) | CentOS | 7.6.1810 | all versions| +| 1008010 | CentOS 8 (x86_64) | openEuler | 8.0.1905 || +| 1008020 | CentOS 8 (arm64) | openEuler | 8.0.1905 || +| 1120010 | openEuler 20 (x86_64) | openEuler | 20.03 | < 5.0.0 | +| 1120020 | openEuler 20 (arm64) | openEuler | 20.03 | < 5.0.0 | +| 1122010 | openEuler 22 (x86_64) | openEuler | 22.03 || +| 1122020 | openEuler 22 (arm64) | openEuler | 22.03 || +| 1210010 | Kylin V10 (x86_64) | kylin | V10 (Tercel) | all versions| +| 1210020 | Kylin V10 (arm64) | kylin | V10 (Tercel) | all versions| +| 1320010 | UOS 20 A (x86_64) | openEuler | 1050a || +| 1320020 | UOS 20 A (arm64) | openEuler | 1050a || +| 1420010 | UOS 20 D/E (x86_64) | openEuler | 1040d/1050d/1050e || +| 1420020 | UOS 20 D/E (arm64) | openEuler | 1040d/1050d || +| 1518010 | Ubuntu 18.04.6 LTS (Bionic Beaver) (x86_64) | CentOS | 18.04.6 || +| 1518020 | Ubuntu 18.04.6 LTS (Bionic Beaver) (arm64) | openEuler | 18.04.6 || +| 1520010 | Ubuntu 20 LTS (Focal Fossa) (x86_64) | CentOS | 20.04.3 || +| 1520020 | Ubuntu 20 LTS (Focal Fossa) (arm64) | openEuler | 20.04.5 || +| 1522010 | Ubuntu 22 LTS (Jammy Jellyfish) (x86_64) | CentOS | 22.04 || +| 1522020 | Ubuntu 22 LTS (Jammy Jellyfish) (arm64) | openEuler | 22.04.1 || +| 1607010 | Red Hat Enterprise Linux 7 (x86_64) | CentOS | 7.5 (Maipo) || +| 1608010 | Red Hat Enterprise Linux 8 (Ootpa) (x86_64) | openEuler | 8.5 || +| 1608020 | Red Hat Enterprise Linux 8.2 (Ootpa) (arm64) | openEuler | 8.2 || +| 1609010 | Red Hat Enterprise Linux 9.0 (Plow) (x86_64) | openEuler | 9.0 || +| 1609020 | Red Hat Enterprise Linux 9.0 (Plow) (arm64) | openEuler | 9.0 || +| 1702010 | EulerOS 2 (x86_64) | CentOS | 2.0-SP3 || +| 1702020 | EulerOS 2 (arm64) | openEuler | 2.0-SP3 || +| 1812010 | SLES 12SP5 (x86_64) | CentOS | 12SP5 || +| 1815010 | SUSE Linux Enterprise Server 15 SP4 (x86_64) | CentOS | 15SP4 || +| 1907010 | Oracle Linux 7 (x86_64) | CentOS | 7.9 (Maipo) || +| 1908010 | Oracle Linux 8 (x86_64) | openEuler | 8.6 (Ootpa) || +| 2008010 | Rocky Linux 8 (Green Obsidian) (x86_64) | openEuler | 8.5 || +| 2107010 | NeoKylin V7 (x86_64) | CentOS | V7Update6 || +| 2222010 | FusionOS 22 (x86_64) | openEuler | 22.0.2 || +| 2222020 | FusionOS 22 (arm64) | openEuler | 22.0.2 || +| 2310010 | Debian GNU/Linux 10 (buster) (x86_64) | CentOS | 10 (buster) || +| 2310020 | Debian GNU/Linux 10 (buster) (arm64) | openEuler | 10 (buster) || +| 2311010 | Debian GNU/Linux 11 (bullseye) (x86_64) | CentOS | 11 (bullseye) || +| 2311020 | Debian GNU/Linux 11 (bullseye) (arm64) | openEuler | 11 (bullseye) || +| 2407010 | Anolis OS Linux 7 (x86_64) | CentOS | 7.9 GA (kernel:RHCK) || +| 2408010 | Anolis OS 8 (x86_64) | openEuler | 8.6 GA (kernel:RHCK) || +| 2408020 | Anolis OS 8 (arm64) | openEuler | 8.6 GA (kernel:ANCK) || diff --git a/product/en/docs-ptk/v2.0/quick-start/demo-db.md b/product/en/docs-ptk/v2.0/quick-start/demo-db.md new file mode 100644 index 00000000..d4447d8c --- /dev/null +++ b/product/en/docs-ptk/v2.0/quick-start/demo-db.md @@ -0,0 +1,130 @@ +--- +title: Quick Deployment of MogDB Single Instance Cluster +summary: Quick Deployment of MogDB Single Instance Cluster +author: qian.yao +date: 2023-04-12 +--- + +# Quick Deployment of MogDB Single Instance Cluster + +The `ptk demo` command can be used to quickly deploy a single-instance MogDB database and automatically install the associated plugins without having to provide a configuration file on the machine where the PTK resides. + +> Note: `ptk demo` relies on the internet to download the installation package. + +## Demonstration + +
+ +## Objectives + +- Provide a quick way for users to experience MogDB cluster. +- Provides A compatibility mode database for `Oracle` compatibility testing. +- Provides PG compatibility mode database for `PostgreSQL` compatibility testing. + +## Prerequisites + +ptk demo applies to only the Linux operating system currently. + +Before executing `ptk demo`, make sure that port 26000 is available. If you use other ports, use `--port` to specify a port. + +## MogDB Version + +The default version is LTS. + +## Plugins + +For a database of the `oracle_compatibility` mode, the following plugins will be installed: + +- [whale](https://docs.mogdb.io/zh/mogdb/v3.0/whale) +- [orafce](https://docs.mogdb.io/zh/mogdb/v3.0/orafce-user-guide) +- [compat_tools](https://gitee.com/enmotech/compat-tools) +- [mogila](https://gitee.com/enmotech/mogila) + +## Summary After Installation + +``` +Deploy Status: + + cluste_name | host | user | port | status | message +--------------+-----------------+------+-------+---------------+---------- + demo_SWW | 192.168.122.104 | demo | 26000 | start_success | success +``` + +Deployment status information: + +- cluster_name: cluster name +- host: IP address of an instance +- user: system user +- port: port +- status: deployment status +- message: status description + +``` +Database Detail: + + item | value +--------------+------------------------- +user_password | Demo&Fth + db_password | Demo&Fth + app_dir | /home/demo/demodb/app + data_dir | /home/demo/demodb/data + tool_dir | /home/demo/demodb/tool + tmp_dir | /home/demo/demodb/tmp +``` + +Database information: + +- db_password: initial password of a database +- app_dir: app directory of a database +- data_dir: data directory of a database +- tool_dir: tool directory of a database +- tmp_dir: temporary file directory of a database + +``` +Mode Compatibility: + + mode | database | plugins | other +-------+------------------------+-----------------------+------------------------------------- + PG | postgres_compatibility | none | + A | oracle_compatibility | whale[success] | + | | orafce[success] | + | | compat_tools[success] | + | | mogila[success] | db user: mogdb, password: Demo&SWW + +Plugin Install Details: + mode | plugin | status | reference | error +-------+--------------+---------+-------------------------------------------------------+-------- + A | whale | success | https://docs.mogdb.io/zh/mogdb/v3.0/whale | + | orafce | success | https://docs.mogdb.io/zh/mogdb/v3.0/orafce-user-guide | + | compat_tools | success | https://gitee.com/enmotech/compat-tools | + | mogila | success | https://gitee.com/enmotech/mogila | +``` + +Compatibility database information: + +- mode: compatibility mode +- database: database name +- plugins: plugin list of a database +- other: comment + +## Database Connection + +If the PTK user is installed in root, switch to the database user, and run `gsql` to connect the database. + +If the database is installed as the common user, the database will be installed as the same user as the PTK. Therefore, you need to re-login or perform `source ~/.bashrc` to make the environment variable to take effect, and then run `gsql` to connect the database. + +```shell +$ gsql -r +MogDB=# \l + List of databases + Name | Owner | Encoding | Collate | Ctype | Access privileges | Compatibility +------------------------+-------+----------+---------+-------+-------------------+--------------- + oracle_compatibility | demo | UTF8 | C | C | | A + postgres | demo | UTF8 | C | C | | A + postgres_compatibility | demo | UTF8 | C | C | | PG + template0 | demo | UTF8 | C | C | =c/demo +| A + | | | | | demo=CTc/demo | + template1 | demo | UTF8 | C | C | =c/demo +| A + | | | | | demo=CTc/demo | +(5 rows) +``` diff --git a/product/en/docs-ptk/v2.0/quick-start/install.md b/product/en/docs-ptk/v2.0/quick-start/install.md new file mode 100644 index 00000000..d35a0002 --- /dev/null +++ b/product/en/docs-ptk/v2.0/quick-start/install.md @@ -0,0 +1,51 @@ +--- +title: Install PTK +summary: Install PTK +author: Yao Qian +date: 2022-05-30 +--- + +# Install PTK + +PTK is a standalone binary that has no additional dependencies on the operating system it is running on other than the CPU architecture, so you can place the PTK binary in any location to run it. + +Although PTK can be run with a database cluster, we recommend that you install PTK on a separate control server, separate from the server that runs the database, and deploy and manage the database cluster through that control server to avoid database instance machine failures that could make PTK unavailable. + +The installation of PTK is very simple, you can choose one of the two ways to install **online** or **offline**. + +## Online Install + +> Note: Command line installation is not supported on Windows systems. + +In the terminal, execute the following command to automatically complete the installation: + +```shell +curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh +``` + +This command automatically installs PTK in the user's home directory, `$HOME/.ptk`, which will be used as the working directory for PTK, and where cache files, data files, cluster configuration information, backup information, and so on, will be stored. + +At the same time, the installation command automatically adds the path to `$HOME/.ptk/bin` to the PATH environment variable in the corresponding SHELL Profile file (shown at the end of the installation log). + +This allows you to use the `ptk` command directly after logging in to the server. + +After the installation is complete, you can reopen the terminal to activate the `ptk' command. + +## offline Install + +If your server does not have direct access to the Internet or if you need to use the PTK on a Windows system, you can install it manually. + +Please follow the procedure below to install: + +1. Download the installation package for the corresponding server architecture from the following link page. + + [🔗 https://www.mogdb.io/downloads/ptk/all](https://www.mogdb.io/downloads/ptk/all) + +2. Upload the installation package to the target server and unzip it + + ```shell + mkdir -p $HOME/.ptk/bin + tar -xvf -C $HOME/.ptk/bin + echo "export PATH=$HOME/.ptk/bin:$PATH" >> $HOME/.bashrc + source $HOME/.bashrc + ``` diff --git a/product/en/docs-ptk/v2.0/reference/ref-config.md b/product/en/docs-ptk/v2.0/reference/ref-config.md new file mode 100644 index 00000000..4a972ab1 --- /dev/null +++ b/product/en/docs-ptk/v2.0/reference/ref-config.md @@ -0,0 +1,1020 @@ +--- +title: Configuration +summary: Configuration +author: ptk +date: 2024-04-09T09:59:28+08:00 +--- + +# Configuration + +The PTK topology configuration file is in the [YAML format](../appendix/yaml-grammar.md). + +This file describes all the parameters of the topology configuration file. + +When installing a database cluster, a user-supplied configuration file describing the cluster topology is required to tell PTK what structure the cluster should follow. + +PTK provides the ability to create profiles interactively, and the interactive process can be accessed by running the following command: + +```shell +ptk template create +``` + +You just need to follow the steps prompted by the terminal step by step to complete the configuration, and the config.yaml file will eventually be generated in the current folder. + +Alternatively, if you want to generate a file with the default configuration without using interactive creation, you can run the following command: + +```shell +ptk template > config.yaml +``` + +After running this command, the system will generate a config.yaml file, and you need to modify the values of the fields in the file according to your actual situation. + +For non-interactive modification, sensitive fields such as user_password, db_password, ssh_option.password or ssh_option.passphrase must be encrypted using the encryption command provided by PTK. + +```shell +ptk encrypt PASSWORD +``` + +--- + +## Config + +Database cluster topology configuration information + +**Examples**: + +- Simple configuration + +```yaml +# Cluster configuration information, in which db_port and ssh_option are reusable fields +global: + cluster_name: cluster_simple # Cluster name, a unique identifier of the cluster managed by PTK + db_password: pTk6MTIxOGMxOTk8QT1CPT4+PXlnYW1DdHpXb2hCX3c3UW0wWXVkNlZwMGRCakpxRXd1WWdwQ0xDUWVrb0U= # The initial user password for the database, which is requested interactively during installation if not filled in the configuration file +# Configuration information of database instance servers in a cluster +db_servers: + - host: # IP address of the database instance server (only supporting IPv4) + - host: # IP address of the database instance server (only supporting IPv4) +# CM server list in a cluster +cm_servers: [] +``` + +- Complex configuration + +```yaml +# Cluster configuration information, in which db_port and ssh_option are reusable fields +global: + cluster_name: cluster_complex # Cluster name, a unique identifier of the cluster managed by PTK + user: omm # System username for running a database + group: omm # System user group for running a database + db_password: pTk6MTIxOGMxOTk8QT1CPT4+PXlnYW1DdHpXb2hCX3c3UW0wWXVkNlZwMGRCakpxRXd1WWdwQ0xDUWVrb0U= # Initial database user password. If this password is not specified in the configuration file, it needs to be entered during database installation according to the terminal prompts. + base_dir: /opt/mogdb # Base directory of database installation. It is recommended that this directory that can be accessed by the SSH user in the configuration file and is automatically created by PTK. + # List of additional new HBA entries + extra_hba_conf: + - type: host # Connection type, supports local/host/hostssl/hostnossl + database: all # Specify the name of the database this record matches + user: all # Specify the usernames of the database this record matches + address: # Required, specifies the address of the client machine this record matches + method: sha256 # Specify the authentication method to use when a connection matches this record + # MogDB HA component CM configuration information. If the CM component is not used, leave this field empty. + cm_option: + dir: /opt/mogdb/cm # CM installation directory + cm_server_port: 15300 # Listening port of the CM server + db_service_vip: "" # Virtual IP address for the database to provide service. +# Configuration information of database instance servers in a cluster +db_servers: + - host: # IP address of the database instance server (only supporting IPv4) + db_port: 27000 # Database port + role: primary # Database instance role, if not filled in, PTK will randomly select one instance as the primary database, and the rest will be the backup database automatically. + az_name: BJ # Available Zone (AZ) name + az_priority: 1 # AZ priority. The lower the value, the higher the priority. The minimum value is 1 + # SSH login information. The login user should be root or a user who has the sudo permission. + ssh_option: + port: 22 # SSH server port + user: root # SSH login user + password: pTk6LIBsPVplOpmxQToCPT9+PXlnYW1DdHpXb2hCX3c3UW0wWXVkNlZwMGRCakpxRXd1WWdwQ0xDUWVrb0U= # Password of the SSH login user + conn_timeout: 5m0s # SSH login timeout. The supported unit can be minute(m) and second(s). + exec_timeout: 5m0s # Timeout of performing a single command in SSH. The supported unit can be minute(m) and second(s). + - host: # IP address of the database instance server (only supporting IPv4) + db_port: 27000 # Database port + role: standby # Database instance role, if not filled in, PTK will randomly select one instance as the primary database, and the rest will be the backup database automatically. + az_name: BJ # Available Zone (AZ) name + az_priority: 1 # AZ priority. The lower the value, the higher the priority. The minimum value is 1 + # SSH login information. The login user should be root or a user who has the sudo permission. + ssh_option: + port: 22 # SSH server port + user: root # SSH login user + key_file: ~/.ssh/id_rsa # SSH login key file path + conn_timeout: 5m0s # SSH login timeout. The supported unit can be minute(m) and second(s). + exec_timeout: 5m0s # Timeout of performing a single command in SSH. The supported unit can be minute(m) and second(s). + - host: # IP address of the database instance server (only supporting IPv4) + db_port: 27000 # Database port + role: cascade_standby # Database instance role, if not filled in, PTK will randomly select one instance as the primary database, and the rest will be the backup database automatically. + upstream_host: # When the instance role is cascade_standby, this field indicates the IP address of the upstream standby server. + az_name: SH # Available Zone (AZ) name + az_priority: 2 # AZ priority. The lower the value, the higher the priority. The minimum value is 1 +# CM server list in a cluster +cm_servers: + - host: # IP address of the CM server (only IPv4 is supported.) + port: 15300 # Listening port of the CM server + role: "" + - host: # IP address of the CM server (only IPv4 is supported.) + port: 15300 # Listening port of the CM server + role: "" +``` + +### global + +**Data type**: Global + +**Description**: Cluster configuration information, in which `db_port` and `ssh_option` are **reusable fields**. + +**Reusable Fields** + +- If this field is set in instance-level configuration, the instance-level configuration prevails. +- If this field is not set in instance-level configuration, the global-level configuration prevails. + +**Added in**: v0.1 + +### db_servers + +**Data type**: []DBServer + +**Description**: Configuration information of database instance servers in a cluster + +**Added in**: v0.1 + +### cm_servers + +**Data type**: []CMServer + +**Description**: CM server list in a cluster + +**Added in**: v0.5 + +--- + +## Global + +Global defines global parameters in a configuration file. + +Appears in: + +- Config.global + +### cluster_name + +**Data type**: string + +**Description**: Cluster name that is the unique identifier of a cluster + +**Added in**: v0.1 + +### user + +**Data type**: string + +**Description**: System username for running a database + +If you want to deploy a set of primary and standby databases on the same server, you need to set up different users at the instance level to isolate the environment. + +The default value is **omm**. + +**Added in**: v0.1 + +### group + +**Data type**: string + +**Description**: System user group for running a database + +The value is the same as the system username by default. + +**Added in**: v0.1 + +### user_password + +**Data type**: string + +**Description**: System user password for running a database + +This field is not supported in plaintext, it needs to be encrypted with `ptk encrypt`. + +This field is left blank by default. + +**Added in**: v0.1 + +### db_password + +**Data type**: string + +**Description**: Initial database user password. If this password is not specified in the configuration file, it needs to be entered during database installation according to the terminal prompts. + +This field is not supported in plaintext, it needs to be encrypted with `ptk encrypt`. + +**Added in**: v0.1 + +### db_port + +**Data type**: int + +**Description**: Database port + +If you want to deploy a set of primary and standby databases on a single server, you need to set different port numbers at the instance level. + +The default value is **26000**. + +**Added in**: v0.1 + +### base_dir + +**Data type**: string + +**Description**: Base directory of database installation. It is recommended that base_dir should be created by PTK automatically and it can be accessed by SSH user configured in a configuration file. + +If PTK is run by a non-root user during database installation, the common user does not have permission to create directories in the `/opt` directory. Therefore, the default directory `/opt/mogdb` cannot be created due to the permission issue. The user should specify a path that can be accessed by the execution user. + +After this directory is specified, PTK will automatically create corresponding directories under the installation directory if any of the `app_dir`, `data_dir`, `log_dir`, and `tool_dir` parameters are not configured. + +Without special requirements, you are required to set this parameter only during installation. + +Note: if a cluster is deployed in a single server, set different installation directories at the instance level. + +The default value is **/opt/mogdb**. + +**Added in**: v0.1 + +### app_dir + +**Data type**: string + +**Description**: Directory for storing database deployment file, startup script, and configuration file. + +The default value is `${base_dir}/app`. + +**Added in**: v0.1 + +### data_dir + +**Data type**: string + +**Description**: Data directory of a database + +The default value is `${base_dir}/data`. + +**Added in**: v0.1 + +### log_dir + +**Data type**: string + +**Description**: Directory for storing database run logs and operation logs + +The default value is `${base_dir}/log`. + +**Added in**: v0.1 + +### tool_dir + +**Data type**: string + +**Description**: Database tool directory + +The default value is `${base_dir}/tool`. + +**Added in**: v0.1 + +### tmp_dir + +**Data type**: string + +**Description**: Temporary directory of a database + +**Default value**: If `base_dir` is not empty, this value is `${base_dir}/tmp`. Otherwise, this value is `/tmp`. + +**Added in**: v0.1 + +### core_file_dir + +**Data type**: string + +**Description**: [discarded in v0.7 or later] This parameter has been discarded. Please manually set `kernel.core_pattern` after switching to the super user. + +**Added in**: v0.1 + +### ssh_option + +**Data type**: SSHOption + +**Description**: SSH login information. + +Runs locally when not set. + +**Added in**: v0.1 + +### gs_initdb_opts + +**Data type**: []string + +**Description**: Used for the user to initialize the database. +If the user does not configure the `locale` parameter. PTK will automatically configure no-locale by default. +For details about the supported parameter list, see [gs_initdb](https://docs.mogdb.io/zh/mogdb/v5.0/gs_initdb). + +**Examples**: + +- gs_initdb_opts example + +```yaml +gs_initdb_opts: + - --locale=LOCALE + - -E=UTF-8 +``` + +**Added in**: v0.3 + +### extra_hba_conf + +**Data type**: []HBAConf + +**Description**: List of additional new HBA entries + +**Added in**: v1.5 + +### cm_option + +**Data type**: CMOption + +**Description**: MogDB CM configuration information. If CM is not used, this field can be left blank. + +This field takes effect in MogDB 3.0 or later. + +**Added in**: v0.4 + +### dss_option + +**Data type**: DSSOption + +**Description**: MogDB resource pooling installation configuration information, for non-resource pooling installations, this field is not required. + +**Added in**: v1.1.0 + +### env_map + +**Data type**: map[string]string + +**Description**: Users can add specific environment variables as needed, setting them in `global` will take effect for all instances, the instance level can be set individually, if the same `key` exists, the value at the instance level will override the value in `global`, there is no need to fill in the field + +**Added in**: v1.2.0 + +--- + +## HBAConf + +Configuration of HBAConf HBA entries + +Appears in: + +- Global.extra_hba_conf + +**Examples**: + +- hba config + +```yaml +type: host # Connection type, supports local/host/hostssl/hostnossl +database: all # Specify the name of the database this record matches +user: all # Specify the usernames of the database this record matches +address: # Required, specifies the address of the client machine this record matches. +method: sha256 # Specifies the authentication method to use when a connection matches this record. +``` + +### type + +**Data type**: string + +**Description**: Connection type, supports local/host/hostssl/hostnossl + +For details, see [client-access-authentication](https://docs.mogdb.io/en/mogdb/v5.0/1-client-access-authentication) + +**Default Value**: host + +**Added in**: v1.5.0 + +### database + +**Data type**: string + +**Description**: Specify the name of the database this record matches + +**Default Value**: all + +**Added in**: v1.5.0 + +### user + +**Data type**: string + +**Description**: Specify the usernames of the database this record matches + +**Default Value**: all + +**Added in**: v1.5.0 + +### address + +**Data type**: string + +**Description**: Required, specifies the address of the client machine this record matches. + +If only one IPv4 or IPv6 address is set and no CIDR mask is configured, the CIDR mask used for IPv4 is 32 and for IPv6 is 128 + +**Added in**: v1.5.0 + +### method + +**Data type**: string + +**Description**: Specifies the authentication method to use when a connection matches this record.
**Default Value**: sha256 + +**Added in**: v1.5.0 + +### option + +**Data type**: string + +**Description**: Follows the method field, which can be a field such as `name=value` that specifies options for the authentication method. + +**Added in**: v1.5.0 + +--- + +## DSSOption + +Appears in: + +- Global.dss_option + +### dir + +**Data type**: string + +**Description**: DSS installation directory + +**Default Value**: $base_dir/dss + +**Added in**: v1.1.0 + +### dss_port + +**Data type**: int + +**Description**: Listening port of dssserver process + +**Default Value**: 26010 + +**Added in**: v1.1.0 + +### dms_port + +**Data type**: int + +**Description**: Communication port of DMS module in database + +**Default Value**: 26020 + +**Added in**: v1.1.0 + +### shm_key + +**Data type**: int + +**Description**: Shared Memory KEY, in the range [1, 64], if multiple DSS clusters are deployed on a single machine, make sure that this value is different + +**Default Value**: 1 + +**Added in**: v1.1.0 + +### log_level + +**Data type**: int + +**Description**: DSS log level, in the range [0, 4087] + +**Default Value**: 519 + +**Added in**: v1.1.0 + +### data_vg_name + +**Data type**: string + +**Description**: Data volume group name. + +**Default Value**: data + +**Added in**: v1.1.0 + +### data_vg_path + +**Data type**: string + +**Description**: Data volume group path. + +**Added in**: v1.1.0 + +### cm_voting_vg_path + +**Data type**: string + +**Description**: CM voting volume path. + +**Added in**: v1.1.0 + +### cm_share_vg_path + +**Data type**: string + +**Description**: CM shared volume path. + +**Added in**: v1.1.0 + +### inst_vg_map + +**Data type**: map[string]string + +**Description**: Private volume path dictionary for each database instance, required for complete configuration of all instances. + +Configuration rule: {IP: vg_path, ...} + +**Examples**: + +- inst_vg_map example + +```yaml +inst_vg_map: + 1.0.0.1: /dev/sdb + 1.0.0.2: /dev/sdc +``` + +**Added in**: v1.1.0 + +### enable_ssl + +**Data type**: bool + +**Description**: Enable or disable SSL authentication. + +**Default Value**: off + +**Range**: on/off + +**Added in**: v1.1.0 + +### inter_connect_type + +**Data type**: string + +**Description**: Internal MES communication protocol type + +**Default Value**: TCP + +**Range**: TCP/RDMA + +**Added in**: v1.1.0 + +### ss_guc_config + +**Data type**: map[string]string + +**Description**: Resource pooling GUC parameter configuration. + +**Range**: See [openGauss docs](https://docs.opengauss.org/zh/docs/5.0.0/docs/DatabaseReference/%E8%B5%84%E6%BA%90%E6%B1%A0%E5%8C%96%E5%8F%82%E6%95%B0.html) + +**Added in**: v1.1.0 + +--- + +## CMOption + +Appears in: + +- Global.cm_option + +### dir + +**Data type**: string + +**Description**: CM installation directory + +**Default Value**: $base_dir/cm + +**Added in**: v0.4 + +### cm_server_port + +**Data type**: int + +**Description**: Listening port of the CM server + +**Default Value**: 15300 + +**Added in**: v0.4 + +### db_service_vip + +**Data type**: string + +**Description**: Virtual IP address for the database to provide services + +**Added in**: v0.4 + +### cm_server_conf + +**Data type**: map[string]string + +**Description**: Configuration parameters supported in cm_server.conf. PTK does not verify the accuracy and validity of the parameter. + +**Example**: + +- cm server conf + +```yaml +cm_server_conf: + key: value +``` + +**Added in**: v0.4 + +### cm_agent_conf + +**Data type**: map[string]string + +**Description**: Configuration parameters supported in cm_agent.conf. PTK does not verify the accuracy and validity of the parameter. + +**Example**: + +- cm agent conf + +```yaml +cm_agent_conf: + key: value +``` + +**Added in**: v0.4 + +--- + +## CMServer + +CMServer configuration information + +Appears in: + +- Config.cm_servers + +### host + +**Data type**: string + +**Description**: IP address of the CM server (only IPv4 is supported). + +**Added in**: v0.5 + +### ha_ips + +**Data type**: []string + +**Description**: Database redundant IPs, consistent with the `ha_ips` in the `db_server` corresponding to the current `host` + +**Added in**: v1.1.0 + +### port + +**Data type**: int + +**Description**: Listening port of the CM Server + +`global.cm_option.cm_server_port` is used by default. + +**Added in**: v0.5 + +### ssh_option + +**Data type**: SSHOption + +**Description**: SSH login information. The login user must be **root** or a user who has the sudo permission. +If this parameter is not set, operation is performed locally. + +Runs locally when not set. + +**Added in**: v0.5 + +--- + +## serverFlag + +--- + +## DBServer + +Configuration information of database instance servers in the DBServer cluster + +Appears in: + +- Config.db_servers + +### dn_name + +**Data type**: string + +**Description**: Name of a database instance that is uniquely identified. The value will be configured in application_name. + +The default value is **dn_**. + +**Added in**: v1.0 + +### host + +**Data type**: string + +**Description**: IP address of the database instance server (only supporting IPv4) + +**Added in**: v0.1 + +### user + +**Data type**: string + +**Description**: User name of the OS for running the database + +If a set of primary and standby databases are to be deployed on the same server, the field need to be set up for different users + +The default values are consistent with the `global.user` + +**Added in**: v0.5 + +### group + +**Data type**: string + +**Description**: Operating system user group running the database + +The default values are consistent with the `global.group` + +**Added in**: v0.5 + +### user_password + +**Data type**: string + +**Description**: Password of the operating system user running the database + +This field is not supported in plaintext, it needs to be encrypted with `ptk encrypt`. + +The default values are consistent with the `global.user_password` + +**Added in**: v0.5 + +### db_port + +**Data type**: int + +**Description**: Database port + +The field is left blank by default. The global port 26000 is reused. + +**Added in**: v0.1 + +### ha_ips + +**Data type**: []string + +**Description**: Database redundant IPs, a maximum of one redundant IP is currently configured, and if this field is configured, all instances need to configure it. + +**Added in**: v0.1 + +### ha_port + +**Data type**: int + +**Description**: Log replication port of primary/standby database instances. The value is fixed at a database port plus 1. This field is not required to be filled in. + +**Added in**: v0.1 + +### role + +**Data type**: string + +**Description**: + +**Range**: + +- primary +- standby +- cascade_standby + +**Added in**: v0.1 + +### upstream_host + +**Data type**: string + +**Description**: When the instance role is cascade_standby, this field indicates the IP address of the upstream standby server. + +**Added in**: v0.1 + +### az_name + +**Data type**: string + +**Description**: AZ name + +The default value is **AZ1**. + +**Added in**: v0.1 + +### az_priority + +**Data type**: int + +**Description**: AZ priority. The lower the value, the higher the priority. The minimum value is 1. + +The default value is **1**. + +**Added in**: v0.1 + +### xlog_dir + +**Data type**: string + +**Description**: Directory for storing database xlog. + +This field is left blank by default. If this field is configured, the value cannot be the subdirectory of the data directory. + +**Added in**: v0.1 + +### db_conf + +**Data type**: map[string]string + +**Description**: You can configure the database parameters as you need. This field configuration information will be written into the postgresql.conf file before the database is started. + +**Examples**: + +- db config example + +```yaml +db_conf: + key: value +``` + +**Added in**: v0.1 + +### env_map + +**Data type**: map[string]string + +**Description**: You can add specific environment variables for this instance as you need. + +**Added in**: v1.2.0 + +### ssh_option + +**Data type**: SSHOption + +**Description**: SSH login information. The login user must be **root** or a user who has the sudo permission. + +Runs locally when not set. + +**Added in**: v0.1 + +--- + +## SSHOption + +SSHOption: SSH login supports password and key authentication. You need to choose at least one. + +Appears in: + +- Global.ssh_option +- CMServer.ssh_option +- DBServer.ssh_option +- SSHOption.proxy + +**Examples**: + +```yaml +host: +port: 22 +user: root +key_file: ~/.ssh/id_rsa +``` + +### host + +**Data type**: string + +**Description**: IP address of the target server to be connected + +This field is mandatory when the host works as a jump server. + +When the server has the database installed, this field can be left blank. The IP address of db_server will be used. + +This field is left blank by default. + +**Added in**: v0.1 + +### port + +**Data type**: int + +**Description**: SSH service port + +The default value is **22**. + +**Added in**: v0.1 + +### user + +**Data type**: string + +**Description**: SSH login user + +The default value is **root**. + +**Added in**: v0.1 + +### password + +**Data type**: string + +**Description**: SSH login user password + +This field is not supported in plaintext, it needs to be encrypted with `ptk encrypt`. + +**Examples**: + +- ssh password example + +```yaml +password: pTk6MTIxOGMxOTk8QT1CPT4+PXlnYW1DdHpXb2hCX3c3UW0wWXVkNlZwMGRCakpxRXd1WWdwQ0xDUWVrb0U= +``` + +**Added in**: v0.1 + +### key_file + +**Data type**: string + +**Description**: Directory for storing SSH login key files + +This field is left blank by default. + +**Examples**: + +- ssh key file example + +```yaml +key_file: ~/.ssh/id_rsa +``` + +**Added in**: v0.1 + +### passphrase + +**Data type**: string + +**Description**: SSH login key file password + +This field is not supported in plaintext, it needs to be encrypted with `ptk encrypt`. + +This field is left blank by default. + +**Added in**: v0.1 + +### conn_timeout + +**Data type**: Duration + +**Description**: SSH login connection timeout duration. The value unit can be minute or second. + +**Default Value**: "1m" + +**Added in**: v0.1 + +### exec_timeout + +**Data type**: Duration + +**Description**: Timeout duration for executing a single command in SSH mode. The supported unit can be minute and second. + +**Default Value**: "10m" + +**Added in**: v0.1 + +### proxy + +**Data type**: SSHOption + +**Description**: Jump server login information. If the target server cannot be connected directly, you can use a jump server for connection. + +**Added in**: v0.1 \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/reference/ref-environment.md b/product/en/docs-ptk/v2.0/reference/ref-environment.md new file mode 100644 index 00000000..e8b79b87 --- /dev/null +++ b/product/en/docs-ptk/v2.0/reference/ref-environment.md @@ -0,0 +1,34 @@ +--- +title: Environment Variables +author: Yao Qian +date: 2024-06-01 +--- + +# Environment Variables + +The PTK reads the values of some specific environment variables that affect the runtime logic. + +You can use the `ptk env` command to view all the environment variables supported by PTK and the corresponding values in effect. + +If you want to see the value of a specific environment variable, you can use the `ptk env ` command, for example: + +* View the catalog of PTK metadata + +```bash +ptk env PTK_HOME +``` + +## List of supported environment variables + +PTK reads the environment variables in the table below during runtime. You can change the behavior of PTK by modifying the environment variables with `export`. + +| Environment Variable Name | Description | Note | +|:----------|:--------|:-----| +| `PTK_HOME` | The root directory where PTK stores metadata, by default `$HOME/.ptk`. || +| `PTK_DATA_DIR` | The directory where PTK stores cluster metadata, by default `$PTK_HOME/data`. || +| `PTK_SSH_CONNECT_TIMEOUT` | The timeout for the executor to establish an SSH link with the target server, default is 1 minute. | In h(hour)/m(minute)/s(second), e.g. “2m20s”. | +| `PTK_CMD_EXECUTE_TIMEOUT` | Timeout for the executor to wait for a return from executing shell commands, default 10 minutes. | In h(hour)/m(minute)/s(second), e.g. “2m20s”. | +| `PTK_LOG_PATH` | The path to the file used to output the execution log. It can also be specified with the command line parameter `--log-file`. If this environment variable is set, it will be written to the log file in addition to the terminal output during the execution of PTK. By default, PTK itself will also record a log file in the `$PTK_HOME/log` directory during the runtime, which is not controlled by this environment variable. | | +| `PTK_NO_CHECK_VERSION` | By default, PTK will check if there is a new version of PTK released when running a command. Set this environment variable to `true` to disable PTK version checking. | | +| `PTK_NOT_LIMIT_CM_NODES` | PTK checks the number of CM nodes when deploying a MogDB database and deploying a CM cluster at the same time. when the number of CM nodes is greater than 3, by default, it forces to limit the deployment of only an odd number of CM server nodes to satisfy the majority election requirement, so when deploying a 4-node cluster, it will ask the user to select a node without deploying a CM server. the user can disable the restriction by setting the parameter to `true`. Of course, the same effect can also be achieved at installation time with the command line parameter `--not-limit-cm-nodes`. || +| `PTK_ENABLE_TIMEOUT_WHEN_BUILD_DB` | When PTK rebuilds a standby node with the `build` command, the timeout for executing the command is not set by default (i.e., `PTK_CMD_EXECUTE_TIMEOUT` does not take effect). This is because, in some high-volume data scenarios, executing a `build` can be very costly, and exiting after the timeout can result in the need to rebuild. If this parameter is set, `PTK_CMD_EXECUTE_TIMEOUT` will take effect. | | diff --git a/product/en/docs-ptk/v2.0/reference/ref-metadata.md b/product/en/docs-ptk/v2.0/reference/ref-metadata.md new file mode 100644 index 00000000..7730e65a --- /dev/null +++ b/product/en/docs-ptk/v2.0/reference/ref-metadata.md @@ -0,0 +1,24 @@ +--- +title: Metadata +author: Yao Qian +date: 2024-06-01 +--- + +# Metadata + +PTK is segregated by operating system users, and PTK programs under different users are two separate instances. The main reason for this is that PTK's operation relies on locally stored metadata. + +The metadata of PTK is the foundation of PTK's multi-cluster management. In the metadata, executables, cluster information, cache packets, log files, and other important information are stored, so please manage it properly, if the metadata is lost, PTK will lose the ability to communicate with the clusters. + +## Metadata Directory + +The default metadata root directory is stored in `$HOME/.ptk`, which can be viewed with the `ptk env PTK_HOME` command. + +| Object | Category | Description | Note | +|:-----|:-----|:-----|:-----| +| `bin` | directory | The binary directory where the `ptk` executables are stored. || +| `data` | directory | The cluster data directory, which holds configuration information for all clusters managed by PTK, with each cluster's configuration information stored in a directory named after the cluster under this directory. | | +| `cache` | directory | The cache directory, in which PTK automatically downloads installation packages, the main purpose is to avoid repeated downloads of files with the same name, this directory can be cleaned up as needed, does not affect the operation of PTK. | | +| `log` | directory | Log directory, which stores the debug logs during PTK operation, but this directory only stores the logs of PTK execution failures, which will be automatically deleted after successful execution. | | +| `metadata.yml` | file | Metadata description file. | | +| `history` | file | History execute file, with lines formatted as: `timestamp, command, log path`. | Supported by PTK 1.5.0+. | diff --git a/product/en/docs-ptk/v2.0/reference/ref-recommend-guc.md b/product/en/docs-ptk/v2.0/reference/ref-recommend-guc.md new file mode 100644 index 00000000..4e480992 --- /dev/null +++ b/product/en/docs-ptk/v2.0/reference/ref-recommend-guc.md @@ -0,0 +1,141 @@ +--- +title: Recommended Value of GUC Parameters +author: Yao Qian +date: 2024-06-01 +--- + +# Recommended Value of GUC Parameters + +## Description of Recommended Values + +When PTK installs MogDB, it will automatically optimize and modify the database parameter values according to the server's configuration by default. The specific parameters that will be modified vary from version to version, and you can check them with this command: + +```bash +# Replace MogDB-VERSION with the specific MogDB version number +ptk rec-guc + +# You can also compare the differences by specifying two version numbers at the same time (up to two version numbers are supported at the same time) +ptk rec-guc +``` + +If you do not want PTK to optimize parameter values, you can specify the `--default-guc` option when installing the database cluster. With this option specified, PTK maintains the database defaults for all parameters during installation, except for configuring the [Required Parameters](#required-parameters). + +## Notes + +1. PTK optimizes parameter values for MogDB and Uqbar databases only, other databases of the same type are installed with default parameter values. +2. If a parameter with the same name as the [Optimized Parameters](#optimized-parameters) is configured in the [`db_conf`](./ref-config.md#db_conf) section of the configuration file, the parameter configured in `db_conf` will take effect. +3. When deploying a database with less than **4G** server memory, all [Optimized Parameters](#optimized-parameters) will maintain the database defaults. + +## Required Parameters + +> When there is only one database instance in the deployed cluster, PTK enables maximum available mode by adding `most_available_sync=on` to the required parameters. + +|parameter|value| +|:--|:--| +|[local_bind_address](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#local_bind_address)|The host field in the db_servers section of the PTK configuration file| +|[port](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#port)|The db_port field in the db_servers section of the PTK configuration file| +|[application_name](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#application_name)| The node name assigned to the instance by PTK, e.g. db_6001 | +|[available_zone](https://docs.mogdb.io/zh/mogdb/v3.1/1-sending-server#available_zone)|The az_name field in the db_servers section of the PTK configuration file| +|[unix_socket_directory](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#unix_socket_directory)|The tmp_dir field in the PTK configuration file| +|[unix_socket_permissions](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#unix_socket_permissions)|0700| +|[log_file_mode](https://docs.mogdb.io/zh/mogdb/v3.1/1-logging-destination#log_file_mode)|0600| +|[ssl](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#ssl)|off| +|[ssl_cert_file](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#ssl_cert_file)|server.crt| +|[ssl_key_file](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#ssl_key_file)|server.key| +|[ssl_ca_file](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#ssl_ca_file)|cacert.pem| +|[log_directory](https://docs.mogdb.io/zh/mogdb/v3.1/1-logging-destination#log_directory)|pg_log/$application_name of $log_dir in the PTK configuration file| +|[audit_directory](https://docs.mogdb.io/zh/mogdb/v3.1/1-audit-switch#audit_directory)|pg_audit/$application_name of $log_dir in the PTK configuration file| +|[listen_addresses](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#listen_addresses)|*| +|[max_wal_senders](https://docs.mogdb.io/zh/mogdb/v3.1/1-sending-server#max_wal_senders)|16| + +## Optimized Parameters + +### Parameters related to memory size (assuming memory size N in GB) + +- When 4 < N <= 8 + +|parameter|value| +|:--|:--| +|[max_connections](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#max_connections)|500| +|[max_prepared_transactions](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#max_prepared_transactions)|500| +|[max_process_memory](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#max_process_memory)|(0.6*N)GB| +|[shared_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#shared_buffers)|(0.2*N)GB| +|[work_mem](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#work_mem)|16MB| +|[maintenance_work_mem](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#maintenance_work_mem)|512MB| +|[wal_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-settings#wal_buffers)|128MB| + +- When 8 < N <= 64 + +|parameter|value| +|:--|:--| +|[max_connections](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#max_connections)|1000| +|[max_prepared_transactions](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#max_prepared_transactions)|1000| +|[max_process_memory](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#max_process_memory)|(0.7*N)GB| +|[shared_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#shared_buffers)|(0.2*N)GB| +|[work_mem](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#work_mem)|32MB| +|[maintenance_work_mem](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#maintenance_work_mem)|1GB| +|[wal_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-settings#wal_buffers)|512MB| + +- When N > 64 + +|parameter|value| +|:--|:--| +|[max_connections](https://docs.mogdb.io/zh/mogdb/v3.1/1-connection-settings#max_connections)|3000| +|[max_prepared_transactions](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#max_prepared_transactions)|3000| +|[max_process_memory](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#max_process_memory)|(0.8*N)GB| +|[shared_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#shared_buffers)|(0.3*N)GB| +|[work_mem](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#work_mem)|64MB| +|[maintenance_work_mem](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#maintenance_work_mem)|2GB| +|[wal_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-settings#wal_buffers)|1GB| + +### Parameters that will be optimized by default + +|parameter|value| +|:--|:--| +|[remote_read_mode](https://docs.mogdb.io/zh/mogdb/v3.1/18-fault-tolerance#remote_read_mode)|non_authentication| +|[password_encryption_type](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#password_encryption_type)|1| +|[password_reuse_time](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#password_reuse_time)|0| +|[password_lock_time](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#password_lock_time)|0| +|[password_effect_time](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#password_effect_time)|0| +|[session_timeout](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#session_timeout)|0| +|[modify_initial_password](https://docs.mogdb.io/zh/mogdb/v3.1/2-security-and-authentication#modify_initial_password)|off| +|[wal_level](https://docs.mogdb.io/zh/mogdb/v3.1/1-settings#wal_level)|logical| +|[full_page_writes](https://docs.mogdb.io/zh/mogdb/v3.1/1-settings#full_page_writes)|off| +|[wal_log_hints](https://docs.mogdb.io/zh/mogdb/v3.1/1-settings#wal_log_hints)|off| +|[xloginsert_locks](https://docs.mogdb.io/zh/mogdb/v3.1/16-lock-management#xloginsert_locks)|48| +|[advance_xlog_file_num](https://docs.mogdb.io/zh/mogdb/v3.1/21-developer-options#advance_xlog_file_num)|10| +|[wal_keep_segments](https://docs.mogdb.io/zh/mogdb/v3.1/1-sending-server#wal_keep_segments)|1024| +|[most_available_sync](https://docs.mogdb.io/zh/mogdb/v3.1/2-primary-server#most_available_sync)|on| +|[catchup2normal_wait_time](https://docs.mogdb.io/zh/mogdb/v3.1/2-primary-server#catchup2normal_wait_time)|0| +|[enable_slot_log](https://docs.mogdb.io/zh/mogdb/v3.1/1-sending-server#enable_slot_log)|on| +|[max_replication_slots](https://docs.mogdb.io/zh/mogdb/v3.1/1-sending-server#max_replication_slots)|32| +|[wal_receiver_timeout](https://docs.mogdb.io/zh/mogdb/v3.1/3-standby-server#wal_receiver_timeout)|10s| +|[sync_config_strategy](https://docs.mogdb.io/zh/mogdb/v3.1/2-primary-server#sync_config_strategy)|none_node| +|[log_line_prefix](https://docs.mogdb.io/zh/mogdb/v3.1/3-logging-content#log_line_prefix)|'%m %u %d %r %p %S'| +|[log_checkpoints](https://docs.mogdb.io/zh/mogdb/v3.1/3-logging-content#log_checkpoints)|on| +|[vacuum_cost_limit](https://docs.mogdb.io/zh/mogdb/v3.1/4-cost-based-vacuum-delay#vacuum_cost_limit)|1000| +|[autovacuum_max_workers](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_max_workers)|10| +|[autovacuum_naptime](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_naptime)|20s| +|[autovacuum_vacuum_cost_delay](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_vacuum_cost_delay)|10| +|[autovacuum_vacuum_scale_factor](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_vacuum_scale_factor)|0.05| +|[autovacuum_analyze_scale_factor](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_analyze_scale_factor)|0.02| +|[autovacuum_vacuum_threshold](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_vacuum_threshold)|200| +|[autovacuum_analyze_threshold](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_analyze_threshold)|200| +|[autovacuum_io_limits](https://docs.mogdb.io/zh/mogdb/v3.1/14-automatic-vacuuming#autovacuum_io_limits)|104857600| +|[instr_unique_sql_count](https://docs.mogdb.io/zh/mogdb/v3.1/26-query#instr_unique_sql_count)|200000| +|[enable_wdr_snapshot](https://docs.mogdb.io/zh/mogdb/v3.1/27-system-performance-snapshot#enable_wdr_snapshot)|on| +|[log_min_duration_statement](https://docs.mogdb.io/zh/mogdb/v3.1/2-logging-time#log_min_duration_statement)|200| +|[track_activity_query_size](https://docs.mogdb.io/zh/mogdb/v3.1/1-query-and-index-statistics-collector#track_activity_query_size)|2048| +|[enable_instr_rt_percentile](https://docs.mogdb.io/zh/mogdb/v3.1/26-query#enable_instr_rt_percentile)|off| +|[cstore_buffers](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#cstore_buffers)|16MB| +|[local_syscache_threshold](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#local_syscache_threshold)|32MB| +|[standby_shared_buffers_fraction](https://docs.mogdb.io/zh/mogdb/v3.1/1-memory#standby_shared_buffers_fraction)|1| +|[checkpoint_segments](https://docs.mogdb.io/zh/mogdb/v3.1/2-checkpoints#checkpoint_segments)|1024| +|[checkpoint_completion_target](https://docs.mogdb.io/zh/mogdb/v3.1/2-checkpoints#checkpoint_completion_target)|0.8| +|[max_files_per_process](https://docs.mogdb.io/zh/mogdb/v3.1/3-kernel-resource-usage#max_files_per_process)|100000| +|[behavior_compat_options](https://docs.mogdb.io/zh/mogdb/v3.1/2-platform-and-client-compatibility#behavior_compat_options)|display_leading_zero| +|[lc_messages](https://docs.mogdb.io/zh/mogdb/v3.1/2-zone-and-formatting#lc_messages)|en_US.UTF-8| +|[lc_monetary](https://docs.mogdb.io/zh/mogdb/v3.1/2-zone-and-formatting#lc_monetary)|en_US.UTF-8| +|[lc_numeric](https://docs.mogdb.io/zh/mogdb/v3.1/2-zone-and-formatting#lc_numeric)|en_US.UTF-8| +|[lc_time](https://docs.mogdb.io/zh/mogdb/v3.1/2-zone-and-formatting#lc_time)|en_US.UTF-8| +|[enable_opfusion](https://docs.mogdb.io/zh/mogdb/v3.1/4-other-optimizer-options#enable_opfusion)|off| diff --git a/product/en/docs-ptk/v2.0/reference/ref-support-mogdb.md b/product/en/docs-ptk/v2.0/reference/ref-support-mogdb.md new file mode 100644 index 00000000..d8611f12 --- /dev/null +++ b/product/en/docs-ptk/v2.0/reference/ref-support-mogdb.md @@ -0,0 +1,35 @@ +--- +title: Version Correlation +author: Yao Qian +date: 2024-06-01 +--- + +# Version Correlation + +> Note: The following table gives the recommended MogDB version to be installed by PTK. Newer versions of PTK support the user to specify only the MogDB version to automatically download the installation package and deploy it, but older versions of PTK still allow you to specify the MogDB installation package and deploy it with the `-p` parameter. + +| MogDB version | PTK minimum version | +| ------------- | ------------------- | +| 5.0.7 | 1.4.7+ | +| 5.0.6 | 1.3.3+ | +| 5.0.5 | 1.2.0+ | +| 5.0.4 | 1.1.3+ | +| 5.0.3 | 1.0.10+ | +| 5.0.2 | 1.0.9+ | +| 5.0.1 | 1.0.4+ | +| 5.0.0 | 1.0.0+ | +| 3.1.1 | 1.3.0+ | +| 3.1.0 | 0.5.0+ | +| 3.0.7 | 1.2.0+ | +| 3.0.6 | 1.1.0+ | +| 3.0.5 | 1.0.2+ | +| 3.0.4 | 0.7.0+ | +| 3.0.3 | 0.5.0+ | +| 3.0.2 | 0.5.0+ | +| 3.0.1 | 0.5.0+ | +| 3.0.0 | 0.5.0+ | +| 2.1.1 | 0.4.0+ | +| 2.0.4 | 0.5.0+ | +| 2.0.3 | 0.4.0+ | +| 2.0.1 | 0.4.0+ | +| 2.0.0 | 0.4.0+ | diff --git a/product/en/docs-ptk/v2.0/release-notes/release-0xx.md b/product/en/docs-ptk/v2.0/release-notes/release-0xx.md new file mode 100644 index 00000000..447189c1 --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-0xx.md @@ -0,0 +1,150 @@ +--- +title: v0.x Release Note +summary: v0.x Release Note +author: Yao Qian +date: 2024-01-02 +--- + +## v0.x Release Note + +### 0.8.0 (2023.05.26) + +#### New Function + +- Support PTK metadata export and merge so that two PTK instances can merge conveniently. +- Add the cluster inspect function that supports querying of cluster metadata. +- Add the database instance-level cluster tool `ptkc`. + +#### Function Optimization and Bug Fixing + +- Support rebuilding from a standby database for cluster rebuilding and scale-out. +- Support interactive update of a password or key when SSH connection fails. + +### 0.7.0 (2023.04.14) + +#### New Function + +- Support upgrade of the MogDB database. +- Add the promote/demote command to support role change. +- Add the manage command to support manage the existing clusters. +- Support installation and O&M of a database by a common user. +- Support specifying of a role for starting or restarting a cluster. +- Update the default installation version of software: MogDB 3.0.4 and MogHA 2.4.8. + +#### Function Optimization and Bug Fixing + +- Determine the database operation user of the `demo` and `template -l` commands based on the user status. +- Support the quick switchover parameter. +- Update the terminal interaction mode. +- Optimize the judgment of the UOS system distribution. +- Optimize the start command to add the verification of the primary database role. +- Optimize the global interrupt signal handling process. +- Optimize the system check item to add the ulimit check of a user (A19). + +### 0.6.0 (2023.01.13) + +#### New Function + +- Support installation of MogDB 3.1 and plugins. +- Add the demo command for quick deployment of MogDB locally and attached with most plugins. +- Add the build subcommand to a cluster and support rebuilding of a specified database. +- Add the meta command. +- Add the selinux check item (A18) to the OS check. + +#### Function Optimization and Bug Fixing + +- Optimize the system parameter check to support generation of a recommended script for permanently disabling THP. +- Optimize MogHA installation by adding configuration file verification and supporting installation by mode. +- Optimize scale-in and scale-out operations in different scenarios. +- Add the mutually exclusive lock on cluster write operations. +- Optimize the cluster status query to support the query in the scenario where the server with instances deployed cannot be connected. +- Optimize the CM-related cluster operations. +- Fix some known bugs. + +### 0.5.0 (2022.11.11) + +#### New Function + +- Support installation of MogDB-3.0.3 and Uqbar-1.1.0. +- Support deployment of multiple instances on a single node. +- Support online scale-out and scale-in using the CM component. +- Add the ptk exec command. +- Add the log function of metadata. +- Add a built-in pssh module and make it decoupled from om. + +#### Function Optimization and Bug Fixing + +- Optimize the scale-in and scale-out process. +- Optimize the installation process. +- Optimize the symbol interruption processing. +- Fix some known bugs. + +### 0.4.0 (2022.09.16) + +#### New Function + +- Add the failover/switchover function. +- Add the show-hba/show-guc/show-config function so that users can query the cluster configuration information conveniently. +- Add the MogHA installation function. +- Add the shell command that can make the shell command or the script run quickly. +- Add the refresh command so that users can update cluster configurations conveniently. Currently, the IP address modification function is available. +- Add the register command that allows users to register the system type. +- Add the CPU command to allow users to check the CPU architectures supported by PTK. +- Add the copy mode in cluster scale-out. +- Support the operation (start, stop, and query) on all the clusters. +- Support installation of CM two-node in MogDB 3.0.1 or later. +- Support Phytium CPU check. +- Be compatible with openGauss installation. + +#### Function Optimization and Bug Fixing + +- Optimize that check and processing of the interrupt signal in execution. +- Offer suggestions once an error occurs due to insufficient semaphore. +- Fix the issue that CM fails to start because the AZ priority configuration is incorrect. +- Fix other known issues. + +### 0.3.0(2022.07.31) + +#### New Function + +- Support scale-in. +- Support extension installation. +- Automatically fix the dynamic library dependency based on the environment. +- Add the version to the cluster list result. +- Add the MD5 verification of an installation package. +- Support the download command. +- Add the cluster comment function. + +#### Function Optimization and Bug Fixing + +- Fix the network check error when there is an IB NIC. +- Fix the SUSE script error. +- Fix other known issues. + +### 0.2.0 (2022.06.30) + +#### New Function + +- Add the candidate command. +- Support CM installation. +- Generate a fix script of the system check automatically. +- Add the default configuration of recommended database parameters. + +#### Bug Fixing + +- Optimize the installation process. +- Fix the multi-check item problem in OS check. +- Automatically detect the package format. +- Fix other known issues. + +### 0.1.0 (2023.05.30) + +#### New Function + +- Support system check. +- Support database installation and uninstallation. +- Support cluster management, including start, stop, query, and restart. +- Support password encryption. +- Support template generation. +- Adapt to different OS for installation. +- Support PTK self-upgrade. diff --git a/product/en/docs-ptk/v2.0/release-notes/release-10x.md b/product/en/docs-ptk/v2.0/release-notes/release-10x.md new file mode 100644 index 00000000..a00b5d46 --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-10x.md @@ -0,0 +1,72 @@ +--- +title: v1.0 Release Note +summary: v1.0 Release Note +author: Yao Qian +date: 2024-01-02 +--- + +## v1.0 Release Note + +### 1.0.12 (2023.09.04) + +- [Fix] Fixed overwriting the lib library when installing CM + +### 1.0.11 (2023.11.10) + +- [Fix] Fix ExecuteError reported by checkos when DBUser executor has sudo privilege. + +### 1.0.10 (2023.10.27) + +- [Add] Add support for MogDB version 5.0.3. +- [Project] The default version of MogDB is upgraded to 5.0.3, and the default version of MogHA is upgraded to 2.4.13 at the time of installation. + +### 1.0.9 (2023.09.28) + +- [Add] Add support for MogDB 5.0.2. +- [Project] Upgrade the default version of MogDB to 5.0.2 on installation. + +### 1.0.8 (2023.09.15) + +- [Fix] Shield plugin upgrade related logic during upgrade rollback, fix nil panic bugs. +- [Fix] Update mogila to the latest version. +- [Fix] Fix ptkc ssh error in clusters with CM. +- [Optimize] When dealing with psutil.so, use the python3 command to check the version in preference to the python3.6/3.7 command if the version is not correct. +- [Optimize] `ptk download` add `--dryrun` parameter to add download link information to logs. +- [Optimize] Optimize the repair script generated by the system check by prompting the error statement when the repair command is executed incorrectly, and then continue to execute the subsequent repair statements. +- [Optimize] Remove the execution timeout setting for the gs_ctl build operation and wait until it completes. +- [Add] Add support for MogDB 3.0.6. + +### 1.0.7 (2023.09.01) + +- [Fix] Fix the bug that only DB node om_monitor cannot find cm_agent configuration when the number of DB nodes is larger than the number of CM nodes when installing with CM (#2006). +- [Fix] Fix “upload success” translation error. + +### 1.0.6 (2023.08.30) + +- [Fix] Set whether the CM configuration field enable_ssl enables logical error. +- [Optimize] Keep the command used by PTK to start om_monitor consistent with the command in crontab. + +### 1.0.5 (2023.08.27) + +- [Fix] Filter out pseudo instances when checking ports. + +### 1.0.0 (2023.07.14) + +#### New Features + +- Added the installation and uninstallation of kerberos service. +- Added cache command to view the list of PTK cache files. +- The cluster subcommand adds the `--id` parameter, allowing manage instance by ID. +- Added the candidate plugin command. +- Added compatible system Anolis OS. + +#### Function Optimization and Bug Fixing + +- The ssl certificate is automatically generated by default when the CM cluster is installed. +- Auto detect the plugin name when installing. +- Added the check of segmented page compressed table for the 3.0.x version upgrade. +- Update the list of supported database versions, updating the default version to MogDB 5.0.0. +- Updated the interaction framework. +- Internationalize the log information. +- Unified the value of pgxc_node_name in a cluster. +- Fixed some known bugs. diff --git a/product/en/docs-ptk/v2.0/release-notes/release-11x.md b/product/en/docs-ptk/v2.0/release-notes/release-11x.md new file mode 100644 index 00000000..37b1dd69 --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-11x.md @@ -0,0 +1,59 @@ +--- +title: v1.1 Release Note +summary: v1.1 Release Note +author: Yao Qian +date: 2024-01-02 +--- + +## v1.1 Release Note + +### 1.1.5 (2023.12.11) + +- [Fix] (Since v1.1.4) Fix the blocking problem when users install the database for themselves. + +### 1.1.4 (2023.12.8) + +- [Fix] Fix the problem that special characters such as $ in database passwords are parsed. +- [Fix] Fix the problem that local installation fails when the database package file name contains special characters. +- [Optimize] Remove gateway parameter restrictions on CM in resource pooling deployment scenarios. +- [Optimize] Database products need to be installed are not parameter optimized if they are not developed by Yunhe Enmo. +- [Update] Update the built-in software license agreement. + +### 1.1.3 (2023.11.30) + +- [Add] Add release time detection before cluster upgrade. +- [Add] Add support for MogDB 5.0.4. + +### 1.1.2 (2023.11.24) + +- [Fix] Fix permissions issues with installation process files. +- [Fix] Fix login failure after replacing IP with `cluster refresh`. +- [Optimize] Add a compensation mechanism to the execution of generic commands. +- [Optimize] When upgrading a plugin, if the local plugin directory is not specified, the installation package will be automatically downloaded from the network. + +### 1.1.1 (2023.11.20) + +- [Fix] Fix an issue where metadata merging with a database cluster managed by another PTK causes the original PTK ssh authentication to be invalidated. +- [Fix] Fix ssh command escaping in non-root superuser scenarios. +- [Fix] Fix the problem that normal users installing the database may get the error that there is no sudo privilege. +- [Fix] Fix ptkc error when single CM node exists in cluster. +- [Fix] Fix the problem of not creating the reported authentication information after manage cluster. + +### 1.1.0 (2023.11.17) + +- [Add] Support for resource pooling deployment and uninstallation. +- [Add] Support for upgrading clusters with plug-ins installed (supported by MogDB 5.0.2 and above). +- [Add] Add hostname verification during installation. +- [Add] Added installation parameter `--skip-check-package` to skip md5 and sha256 checks on packages. +- [Add] Support for vip deployed with CM cluster (supported by MogDB 5.0.4 and above). +- [Add] ptkc supports swichover for CM clusters. +- [Add] When the number of nodes in the CM cluster is greater than 3, limit the number of CM nodes to an odd number. +- [Optimize] Support for the ability to operate the remaining nodes in a cluster when some of the nodes are not reachable by ssh. +- [Optimize] Remove dependency on sshd AcceptEnv configuration. +- [Optimize] Optimize python3 version check logic. +- [Optimize] Optimize the detection rules for PHYTIUM CPU. +- [Optimize] If the AZ information is not specified when scaling, the current cluster information is used by default. +- [Safety] Shrink permissions on database-related files after installation. +- [Fix] Fix the file not found error when executing gs_checkperf. +- [Fix] Fix issues related to manage CM clusters. +- [Fix] Fix occasional nil panic problem during system checks. diff --git a/product/en/docs-ptk/v2.0/release-notes/release-12x.md b/product/en/docs-ptk/v2.0/release-notes/release-12x.md new file mode 100644 index 00000000..08877d2b --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-12x.md @@ -0,0 +1,28 @@ +--- +title: v1.2 Release Note +summary: v1.2 Release Note +author: Yao Qian +date: 2024-01-02 +--- + +## v1.2 Release Note + +### 1.2.0 (2023.12.30) + +**New Features and Optimizations** + +- Add `collect` command to collect basic environmental information when giving feedback on issues. +- Add `rec-guc` command to support querying the list of PTK optimized parameters for different MogDB versions. +- Add `cluster set-guc` command to support configuration of `postgresql.conf`. +- Add `cluster set-hba` command to support configuration of `pg_hba.conf`. +- Add `cluster load-cm-vip` command to support online VIP updates (MogDB CM scenario). +- The `status` command supports the display of the `vip`. +- Support for dual network segment configuration. +- Support for MogDB resource pooling installation process. +- Optimize the plug-in handling process during cluster upgrades. +- Upgrade MogDB to 5.0.5 and MogHA to 2.4.16 by default. + +**Fix** + +- Fix permissions usage issues in various ssh and db user combination scenarios. +- Fix other known issues. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/release-notes/release-13x.md b/product/en/docs-ptk/v2.0/release-notes/release-13x.md new file mode 100644 index 00000000..40e7d9cd --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-13x.md @@ -0,0 +1,71 @@ +--- +title: v1.3 Release Note +summary: v1.3 Release Note +author: Yao Qian +date: 2024-02-18 +--- + +## v1.3 Release Note + +### 1.3.5 (2024.4.7) + +**Fix** + +- Remove debugging logs that contain sensitive information such as database passwords. + +### 1.3.4 (2024.4.3) + +**Features** + +- The `encrypt` command supports the `--stdin` parameter to support passing parameters through a pipeline. + +### 1.3.3 (2024.3.28) + +**Features & Optimizations** + +- Support for MogDB 5.0.6. +- Add CM reload retry mechanism after scaling up/down. +- Optimize upgrade parameter `--parallel`, set default value to 10. + +### 1.3.2 (2024.3.13) + +**Optimizations** + +- Debugging logs are desensitized. +- Add global parameter `--disable-debug-log` to support not generating debug logs. + +**Fix** + +- Fix an issue that forces plugin patch parameters to be specified when upgrading to versions prior to MogDB 3.0.2 + +### 1.3.1 (2024.2.21) + +**Optimizations** + +- Cluster status check timeout for upgrades uses the `PTK_CMD_EXECUTE_TIMEOUT` environment variable. +- Port description added to port occupancy error message. + +**Fix** + +- Fix bug with `refresh` command in swap IP scenario. + +### 1.3.0 (2024.2.6) + +**Features & Optimizations** + +- Add the command `gen-cert-files` to support generating ssl authentication files. +- A new `uptime` field is added to the cluster status output table to show when the instance was launched. +- Cluster status support in portrait format. +- Add `--mode` parameter to the cluster upgrade command, which can take values such as `replace` (the default) and `cover`. +- When upgrading the cluster, upgrade the OM component as well. +- Optimize the upgrade process for plug-ins during cluster upgrades. +- Refinement of time consistency checks for system check hits. +- The `ls` and `status` commands support the display of dual IP scenarios. +- Optimize `refresh` command to remove some restrictions and support for CM clusters. +- Add supported versions and usage examples to the help descriptions of all subcommands. +- Change MogHA default installation version to 2.4.18. + +**Fix** + +- Fix `build` command causing panic issue in dual-IP scenarios. +- Fix other known issues. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/release-notes/release-14x.md b/product/en/docs-ptk/v2.0/release-notes/release-14x.md new file mode 100644 index 00000000..cff565e8 --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-14x.md @@ -0,0 +1,134 @@ +--- +title: v1.4 Release Note +summary: v1.4 Release Note +author: Yao Qian +date: 2024-04-09 +--- + +# v1.4 Release Note + +## 1.4.7 (2024-05-30) + +**Features** + +- Support for MogDB 5.0.7. + +## 1.4.6 (2024-05-28) + +**Bug Fixes** + +- **ca**: Modify the default key length of the ssl certificate to 3072bits and the validity period to 20 years. + +## 1.4.5 (2024-05-14) + +**Bug Fixes** + +- **install**: Installation CM method fallback to unzip and overwrite. +- **scale-out**: Fix the issue of creating authdb when scaling with database users. + +## 1.4.4 (2024-05-10) + +**Bug Fixes** + +- **cmvip**: Fix error in judging conditions when mounting cm-vip. +- **demo**: Fix the issue of not deleting users when uninstalling demo clusters. +- **upgrade**: Fix the issue where py_pstree.py was overwritten after upgrade. + +## 1.4.3 (2024-04-30) + +**Bug Fixes** + +- **demo:** Fix the error when installing with the `demo` command without specifying the `blocksize`. +- **install:** Fix installation failure without rolling back instance data. +- **load-cm-vip:** Fix the issue of duplicate vip mounts. +- **status:** If the cm_resource.json file does not exist when querying cm vip status, it is skipped. +- **upgrade:** Fix data kernel version error when running rollback SQL. +- **upgrade:** Add plugin matching rules for 3.0.x upgrade to 5.1.x/5.2.x. + +**Features** + +- **install:** Support for installation using the server installation packages. + +## 1.4.2 (2024-04-24) + +**Bug Fixes** + +- **scaleout:** Fix database startup failure due to incorrect replconninfo in postgresql.conf after scaling in dual-IP scenarios. +- **install:** Fix the issue that parsing a non-standard format database version causes installation deadlocks. + +**BREAKING CHANGE** + +- **status:** `ls` and `cluster status` have been converted from space concatenation to dash concatenation when displaying version information, consistent with the database version.cfg file. + +For example: + +``` +# Old version style +... | db_version | ... +... +------------------------------+ ... +... | MogDB 5.0.6 (build 8b0a6ca8) | ... + +# Style after change +... | db_version | ... +... +------------------------------+ ... +... | MogDB-5.0.6 (build 8b0a6ca8) | ... +``` + +As a result of fixing the installation of non-standard version formats, the presentation of version information in non-standard formats will also be consistent with the style in version.cfg. + +For example: + +``` +# Style for non-standard format versions, take openGauss Financial Edition as example +... | db_version | ... +... +------------------------------------------+ ... +... | openGauss-Finance-5.0.1 (build 8b0a6ca8) | ... +``` + +## 1.4.1 (2024-04-11) + +**Bug Fixes** + +- **antidep:** Fix the issue that determining the related function is not initialized when upgrading, which leads to panic. +- **install:** Support for skipping installation package binary checking. +- **rolling:** Fixed the issue that scrolling upgrades caused incorrect packages to be uploaded. +- **tui:** Upgraded promptui version to fix some scene panic issues. +- **upgrade:** Fix the issue of the judgment condition of parsing packages when upgrading. +- **upgrade:** Enable the support_extended_features parameter on upgrade. + +**Style Change** + +- **errx:** Add filename hint for 50102 error. + +## 1.4.0 (2024.4.9) + +**New Features** + +- Support for additional separate installation of CM or separate uninstallation of CM on existing clusters. +- Support for rolling upgrades of MogDB to a higher version of the same kernel version (the second line in the version.cfg file). +- Support protect_standby role detection. +- Add patch table checking in the upgrade process. +- Add checking of disks in resource pooling scenarios. +- Add kernel version and release date to `candidate db` output. +- Add `--parallel` parameter to `cluster upgrade-rollback`. +- `encrypt` command supports `--stdin` and `--disable-prompt` parameters, and supports passing encrypted text through a pipeline. + +**Optimizations** + +- Adjust the scope of the `load-cm-vip` command to not support MogDB versions prior to 5.0.4. +- Update the default version of MogHA to 2.4.20. +- Security: Desensitize logs containing plaintext passwords. +- Check the binary file of the installation package before installation to recognize whether the architecture matches in advance. +- Adjust the timeout for downloading files to be determined by the PTK_CMD_EXECUTE_TIMEOUT environment variable. +- The `ls` and `cluster status` commands support status display during upgrades. +- Removed deprecated fields `localservice` and `remoteservice` from `replconninfo` parameter in `postgresql.conf`. +- Add check for dual network segments during installation and scaling. +- Support comma-separated input of multiple IPs when entering IP type data interactively. + +**Bug Fixes** + +- Fix SSH login failure in some scenarios. +- Fix over-matching of deleted HBA entries when scaling down. +- Fix the issue that outputs stop success when stopping a cluster fails. +- Fix an error when there is no OM package in the installation package. +- Fix other known bugs. \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/release-notes/release-15x.md b/product/en/docs-ptk/v2.0/release-notes/release-15x.md new file mode 100644 index 00000000..525590cf --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-15x.md @@ -0,0 +1,68 @@ +--- +title: v1.5 Release Note +summary: v1.5 Release Note +author: Yao Qian +date: 2024-06-04 +--- + +# v1.5 Release Note + +## 1.5.3 (2024-06-24) + +**Security** + +- **install:** The password file is preferred to initialize the database, avoiding the explicit password in the command line + +**Features** + +- **install:** Update the default version of MogHA to 2.4.21 + +## 1.5.2 (2024-06-18) + +**Bug Fixes** + +- **upgrade:** Fixed an issue with wal2json plugin not being upgraded +- **metadata:** Fixed an issue where protect_standby role is persisted to metadata +- **instance:** Fixed the regular expression of the probe protect_standby + +## 1.5.1 (2024-06-13) + +**Features** + +- **demo:** Add `--base-dir` parameter to support user-specified installation directory. +- **demo:** Optimize the Summary format at the end of the log. + +**Bug Fixes** + +- **checkos**: Fix the issue where an error be reported if no roles were configured in the configuration file. +- **demo**: Install mogila in postgresql database, update the built-in compat-tools to the latest version. + +## 1.5.0 (2024-06-06) + +**Features** + +- **takeover:** Support for an existing cluster to take over a running node that actually belongs to the same cluster (only metadata of the PTK is added). +- **throwout:** Support for an existing clusters to stop manage a node (deleting PTK metadata only). +- **rename:** Supports renaming the cluster name of an existing cluster. +- **init-cluster:** Support to create an empty cluster. +- **manage:** Support for managing clusters that do not have a cluster_static_config file. +- **install:** Support installing the database directly from the kernel installer. +- **upgrade:** Support upgrade of database clusters with CM deployed (CM not upgrade). +- **upgrade:** Change the default upgrade mode from `replace` to `cover`. +- **config:** Add extra_hba_conf field in the global field of the configuration file to support configuration of extra hba entries. +- **status:** Support to display the version number of CM. +- **install:** Forces checking the number of existing user-openable files if CM is installed. +- **metadata:** Add history file to record the execution history of commands. + +**Bug Fixes** + +- **status:** When querying vip status, if cm_resource.json doesn't exist, it won't be shown. +- **upgrade:** Fix the issue that when upgrading with extensions, the extension is not recognized when installed in a non-postgres database. +- **checkos:** Fix disk check command in resource pooling scenario. +- **checkos:** Fix the issue where `ulimit` parameter was not checked for existing users. +- **checkos:** Fix the issue where the repair command for memory checking causes script execution errors. +- **checkos:** Fix the NIC fetch error in multi-NIC scenario with duplicate IP strings. +- **demote:** Fix the issue that upstream is not modified correctly when downgrading to a standby node. +- **prune**: Fix the issue of not being able to interrupt via `Ctrl+C`. +- **status,switchover:** Fix the issue where cascade standby nodes did not refresh the upstream with metadata. +- Fixed and optimized several other internal issues. diff --git a/product/en/docs-ptk/v2.0/release-notes/release-16x.md b/product/en/docs-ptk/v2.0/release-notes/release-16x.md new file mode 100644 index 00000000..4fcb70d8 --- /dev/null +++ b/product/en/docs-ptk/v2.0/release-notes/release-16x.md @@ -0,0 +1,40 @@ +--- +title: v1.6 Release Note +summary: v1.6 Release Note +author: Yao Qian +date: 2024-07-16 +--- + +# 1.6 Release Note + +## 1.6.2 (2024-07-31) + +**Features** + +- Added MogDB 5.0.8 configuration + +## 1.6.1 (2024-07-19) + +**Bug Fixes** + +- **upgrade:** Fixed an error in determining the compatibility mode of the B compatibility database when it is lowercase +- **ptkc:** Fixed wrong display of cluster name in ptkc introduced in 1.6.0 + +## 1.6.0 (2024-07-16) + +**Features** + +- Support for managing clusters with dual-segment SSH links +- Support for loading local configurations for backward compatibility +- Built-in control SSH key type for regular users switched from RSA to ed25519 +- Optimizing the capture of error logs after shell command execution failure +- Set the register subcommand to be deprecated + +**Bug Fixes** + +- Fixed an issue where DB-only nodes in a cluster with CM components deployed were not configured with sudo permissions +- Fixed CM dependency database version error after upgrading a MogDB 5.0.6 cluster with CM components deployed +- Fixed an issue where some compatibility parameters caused upgrade SQL execution to fail +- Fixed Preview versioning rule +- Fixed upgrade rules for MogDB 5.2 +- Fixed an issue where the status in the output status table was incorrect after a failed pre-check during installation diff --git a/product/en/docs-ptk/v2.0/samples/samples-db-cluster.md b/product/en/docs-ptk/v2.0/samples/samples-db-cluster.md new file mode 100644 index 00000000..dcf21c97 --- /dev/null +++ b/product/en/docs-ptk/v2.0/samples/samples-db-cluster.md @@ -0,0 +1,83 @@ +--- +title: Primary and Standby Cluster +author: Yao Qian +date: 2024-06-14 +--- + +# Primary and Standby Cluster + +## One Primary and One Standby + +```yaml +global: + # Cluster name + cluster_name: c1 + # OS user name + user: omm + # System user password + user_password: "" # ptk encrypt password + # Database password + db_password: "" # ptk encrypt password + # Database port + db_port: 26000 + # Database installation base directory + base_dir: /data/mogdb + +db_servers: + - host: + # Database roles, supported: primary, standby, cascade_standby + role: primary + # SSH connection configuration + ssh_option: + port: 22 + user: root + password: "" # ptk encrypt password + key_file: "" + passphrase: "" + - host: + role: standby + ssh_option: + port: 22 + user: root + password: "" # ptk encrypt password + key_file: "" + passphrase: "" +``` + +## One Primary Two Standby and One Cascade + +```yaml +global: + # Cluster name + cluster_name: shockley + # OS user name + user: vimiix + # System user password + user_password: "" # ptk encrypt password + # Database password + db_password: "" # ptk encrypt password + # Database port + db_port: 26000 + # Database installation base directory + base_dir: /data/mogdb + # SSH login information, here we demonstrate that all database servers have the same login information. + # So you only need to configure this information in global section. + ssh_option: + port: 22 + user: root + password: "" # ptk encrypt password + key_file: "" + passphrase: "" + +db_servers: + - host: + role: primary + - host: + role: standby + - host: + role: standby + - host: + role: cascade_standby + # Upstream standby node IP of the current cascade standby node + upstream_host: +``` diff --git a/product/en/docs-ptk/v2.0/samples/samples-double-ip.md b/product/en/docs-ptk/v2.0/samples/samples-double-ip.md new file mode 100644 index 00000000..118b905f --- /dev/null +++ b/product/en/docs-ptk/v2.0/samples/samples-double-ip.md @@ -0,0 +1,43 @@ +--- +title: Dual Network Segment +author: Yao Qian +date: 2024-06-14 +--- + +# Dual Network Segment + +## One Primary and One Standby + +```yaml +global: + # Cluster name + cluster_name: c1 + # OS user name + user: omm + # System user password + user_password: "" # ptk encrypt password + # Database password + db_password: "" # ptk encrypt password + # Database port + db_port: 26000 + # Database installation base directory + base_dir: /data/mogdb + # SSH connection configuration + ssh_option: + port: 22 + user: root + password: "" # ptk encrypt password + key_file: "" + passphrase: "" + +db_servers: + - host: + # Redundant IP, currently configured up to 1 + ha_ips: + - + role: primary + - host: + ha_ips: + - + role: standby +``` diff --git a/product/en/docs-ptk/v2.0/samples/samples-dss-cluster.md b/product/en/docs-ptk/v2.0/samples/samples-dss-cluster.md new file mode 100644 index 00000000..43431326 --- /dev/null +++ b/product/en/docs-ptk/v2.0/samples/samples-dss-cluster.md @@ -0,0 +1,40 @@ +--- +title: Resource Pooling +author: Yao Qian +date: 2024-06-14 +--- + +# Resource Pooling + +```yaml +global: + cluster_name: c1 + user: omm + db_password: pTk6Y2I1OWFiZjI8RT1FPUE9RFZfVTUzTy0zUlR5TDZUTmh1STE4VkQ0T2RDYXBNMThoSlNhZDY3UHB4WVE= + db_port: 26000 + base_dir: /data/mogdb + cm_option: + dir: /data/mogdb/cm + cm_server_port: 15300 + dss_option: + dir: /data/mogdb/dss + dss_port: 26010 + dms_port: 26020 + data_vg_name: data + data_vg_path: /dev/data_shared + inst_vg_map: + 172.23.1.28: /dev/data_private_28 + 172.23.1.45: /dev/data_private_45 + cm_share_vg_path: /dev/cm_shared + cm_voting_vg_path: /dev/cm_vote + enable_ssl: on + ssh_option: + port: 22 + user: root + password: pTk6ZDJmZjZlZjI8RT1FPUE9RUs4WEh1OUJRQURfM29GUjZyb3gzZGU3LVRmLTM3Mm5ySmZ5anJXVkNOTUE= +db_servers: + - host: 172.23.1.28 + role: primary + - host: 172.23.1.45 + role: standby +``` diff --git a/product/en/docs-ptk/v2.0/samples/samples-index.md b/product/en/docs-ptk/v2.0/samples/samples-index.md new file mode 100644 index 00000000..33c83198 --- /dev/null +++ b/product/en/docs-ptk/v2.0/samples/samples-index.md @@ -0,0 +1,17 @@ +--- +title: Samples of Configuration Files +author: Yao Qian +date: 2024-06-01 +--- + +# Samples of Configuration Files + +When deploying a cluster, you need to provide PTK with a configuration file that describes the topology of the target cluster. In this chapter, we will give a few examples of commonly used topology configuration files, you can directly copy the contents to a local file, modify the IP and then directly install the cluster and use it. If you need a more personalized configuration, you can refer to the [Configuration File](../reference/ref-config.md) for modification. + +## Samples + +- [Local Single Instance](./samples-local-single.md) +- [Remote Single Instance](./samples-remote-single.md) +- [Primary and Standby Cluster](./samples-db-cluster.md) +- [Dual Network Segment](./samples-double-ip.md) +- [Resource Pooling](./samples-dss-cluster.md) diff --git a/product/en/docs-ptk/v2.0/samples/samples-local-single.md b/product/en/docs-ptk/v2.0/samples/samples-local-single.md new file mode 100644 index 00000000..b91e1dc1 --- /dev/null +++ b/product/en/docs-ptk/v2.0/samples/samples-local-single.md @@ -0,0 +1,21 @@ +--- +title: Local Single Instance +author: Yao Qian +date: 2024-06-01 +--- + +# Local Single Instance + +```yaml +global: + # Cluster name + cluster_name: c1 + # OS user name + user: omm + # Database listening port + db_port: 26000 + # Database installation directory + base_dir: +db_servers: + - host: 127.0.0.1 +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/samples/samples-remote-single.md b/product/en/docs-ptk/v2.0/samples/samples-remote-single.md new file mode 100644 index 00000000..f3313eeb --- /dev/null +++ b/product/en/docs-ptk/v2.0/samples/samples-remote-single.md @@ -0,0 +1,29 @@ +--- +title: Remote Single Instance +author: Yao Qian +date: 2024-06-01 +--- + +# Remote Single Instance + +```yaml +global: + # Cluster name + cluster_name: c1 + # OS user name + user: omm + # Database listening port + db_port: 26000 + # Database installation directory + base_dir: +db_servers: + - host: + # ssh connection login information + ssh_option: + # ssh port + port: 22 + # ssh user + user: root + # ciphertext of ssh password encrypted with `ptk encrypt` + password: +``` \ No newline at end of file diff --git a/product/en/docs-ptk/v2.0/toc.md b/product/en/docs-ptk/v2.0/toc.md index 1a250b29..704bd170 100644 --- a/product/en/docs-ptk/v2.0/toc.md +++ b/product/en/docs-ptk/v2.0/toc.md @@ -1,70 +1,71 @@ -# 文档 -## PTK 文档目录 +# Documentation -+ [关于PTK](./about.md) -+ 快速入门 - + [安装PTK](./quick-start/install.md) - + [部署示例数据库](./quick-start/ptk-demo.md) -+ 使用指南 - + [准备配置文件](./guide/guide-prepare-config.md) - + [检查系统环境](./guide/guide-checkos.md) - + [部署数据库集群](./guide/guide-install-cluster.md) - + 管理数据库集群 - + [查看集群列表](./guide/manage-cluster/manage-cluster-list-clusters.md) - + [查看集群状态](./guide/manage-cluster/manage-cluster-status.md) - + [启动数据库](./guide/manage-cluster/manage-cluster-start-db.md) - + [停止数据库](./guide/manage-cluster/manage-cluster-stop-db.md) - + [重启数据库](./guide/manage-cluster/manage-cluster-restart-db.md) - + [重建数据库](./guide/manage-cluster/manage-cluster-build-db.md) - + [主备倒换](./guide/manage-cluster/manage-cluster-switchover.md) - + [故障切换](./guide/manage-cluster/manage-cluster-failover.md) - + [查看数据库插件](./guide/manage-cluster/manage-cluster-list-plugins.md) - + [安装数据库插件](./guide/manage-cluster/manage-cluster-install-plugin.md) - + [升级数据库](./guide/manage-cluster/manage-cluster-upgrade.md) - + [数据库集群扩容](./guide/manage-cluster/manage-cluster-scale-out.md) - + [数据库集群缩容](./guide/manage-cluster/manage-cluster-scale-in.md) - + [查看数据库hba](./guide/manage-cluster/manage-cluster-show-hba.md) - + [新增数据库hba](./guide/manage-cluster/manage-cluster-set-hba.md) - + [查看数据库参数](./guide/manage-cluster/manage-cluster-show-guc.md) - + [设置数据库参数](./guide/manage-cluster/manage-cluster-set-guc.md) - + [查看集群拓扑配置](./guide/manage-cluster/manage-cluster-show-config.md) - + [查看集群元信息](./guide/manage-cluster/manage-cluster-inspect.md) - + [更新集群备注](./guide/manage-cluster/manage-cluster-modify-comment.md) - + [更换数据库IP](./guide/manage-cluster/manage-cluster-refresh.md) - + [变更数据库角色](./guide/manage-cluster/manage-cluster-role-change.md) - + [安装CM组件](./guide/manage-cluster/manage-cluster-install-cm.md) - + [卸载CM组件](./guide/manage-cluster/manage-cluster-uninstall-cm.md) - + [管理虚拟IP](./guide/manage-cluster/manage-cluster-vip.md) - + [安装MogHA服务](./guide/manage-cluster/manage-cluster-install-mogha.md) - + [卸载MogHA服务](./guide/manage-cluster/manage-cluster-uninstall-mogha.md) - + [集群重命名](./guide/manage-cluster/manage-cluster-rename-cluster.md) - + [创建空集群](./guide/manage-cluster/manage-cluster-init-empty-cluster.md) - + [抛弃节点](./guide/manage-cluster/manage-cluster-throwout.md) - + [接管节点](./guide/manage-cluster/manage-cluster-takeover.md) - + [纳管数据库集群](./guide/manage-cluster/manage-cluster-manage.md) - + [卸载数据库集群](./guide/guide-uninstall-cluster.md) - + [收集运行环境信息](./guide/guide-collectos.md) - + [下载MogDB安装包](./guide/guide-download-package.md) - + [加密敏感信息](./guide/guide-encrypt.md) - + [PTK自升级](./guide/guide-self-upgrade.md) - + [PTKC工具](./guide/guide-ptkc-tool.md) - + [对 MogDB 高版本兼容](./guide/guide-inject-metadata.md) -+ 使用参考 - + [环境变量](./reference/ref-environment.md) - + [元数据](./reference/ref-metadata.md) - + [配置文件](./reference/ref-topoconfig.md) - + [数据库推荐参数](./reference/ref-recommend-guc.md) - + [对MogDB版本的支持](./reference/ref-support-mogdb.md) -+ [配置文件示例](./samples/samples-index.md) - + [本地单实例](./samples/samples-local.md) - + [远程单实例](./samples/samples-remote-single.md) - + [主备集群](./samples/samples-db-cluster.md) - + [双网段](./samples/samples-double-ip.md) - + [资源池化](./samples/samples-dss-cluster.md) -+ 命令介绍 +## PTK Documentation + ++ [About PTK](./overview.md) ++ Quick Start + + [Install PTK](./quick-start/install.md) + + [Quick Deployment](./quick-start/demo-db.md) ++ Guidance + + [Preparing Configuration File](./guide/guide-prepare-config.md) + + [Checking the System](./guide/guide-checkos.md) + + [Deploy Database Cluster](./guide/guide-install-cluster.md) + + Manage Clusters + + [Show Cluster List](./guide/manage-cluster/manage-cluster-list-clusters.md) + + [Show Cluster Status](./guide/manage-cluster/manage-cluster-status.md) + + [Start Database](./guide/manage-cluster/manage-cluster-start-db.md) + + [Stop Database](./guide/manage-cluster/manage-cluster-stop-db.md) + + [Restart Database](./guide/manage-cluster/manage-cluster-restart-db.md) + + [Rebuild Database](./guide/manage-cluster/manage-cluster-build-db.md) + + [Switchover](./guide/manage-cluster/manage-cluster-switchover.md) + + [Failover](./guide/manage-cluster/manage-cluster-failover.md) + + [Show Plugin Information](./guide/manage-cluster/manage-cluster-list-plugins.md) + + [Install Plugins](./guide/manage-cluster/manage-cluster-install-plugin.md) + + [Upgrade Database](./guide/manage-cluster/manage-cluster-upgrade.md) + + [Scale-out Cluster](./guide/manage-cluster/manage-cluster-scale-out.md) + + [Scale-in Cluster](./guide/manage-cluster/manage-cluster-scale-in.md) + + [Show Database HBA](./guide/manage-cluster/manage-cluster-show-hba.md) + + [Set Database HBA](./guide/manage-cluster/manage-cluster-set-hba.md) + + [Show Database Parameters](./guide/manage-cluster/manage-cluster-show-guc.md) + + [Set Database Parameters](./guide/manage-cluster/manage-cluster-set-guc.md) + + [Show Cluster Topology Configuration](./guide/manage-cluster/manage-cluster-show-config.md) + + [Show Cluster Meta Information](./guide/manage-cluster/manage-cluster-inspect.md) + + [Update Cluster Comment](./guide/manage-cluster/manage-cluster-modify-comment.md) + + [Update Database IP](./guide/manage-cluster/manage-cluster-refresh.md) + + [Role Management](./guide/manage-cluster/manage-cluster-role-change.md) + + [Install CM](./guide/manage-cluster/manage-cluster-install-cm.md) + + [Uninstall CM](./guide/manage-cluster/manage-cluster-uninstall-cm.md) + + [Manage Cluster VIP](./guide/manage-cluster/manage-cluster-vip.md) + + [Install MogHA Service](./guide/manage-cluster/manage-cluster-install-mogha.md) + + [Uninstall MogHA Service](./guide/manage-cluster/manage-cluster-uninstall-mogha.md) + + [Rename Cluster](./guide/manage-cluster/manage-cluster-rename-cluster.md) + + [Create Empty Cluster](./guide/manage-cluster/manage-cluster-init-empty-cluster.md) + + [Throw Out A Node](./guide/manage-cluster/manage-cluster-throwout.md) + + [Takeover A Node](./guide/manage-cluster/manage-cluster-takeover.md) + + [Manage Cluster](./guide/manage-cluster/manage-cluster-manage.md) + + [Uninstall Database Cluster](./guide/guide-uninstall-cluster.md) + + [Collect OS Information](./guide/guide-collectos.md) + + [Download MogDB Installer](./guide/guide-download-package.md) + + [Encrypt Sensitive Information](./guide/guide-encrypt.md) + + [Upgrade PTK](./guide/guide-self-upgrade.md) + + [PTKC](./guide/guide-ptkc-tool.md) + + [Compatible With Higher Versions of MogDB](./guide/guide-inject-metadata.md) ++ Reference + + [Environment Variables](./reference/ref-environment.md) + + [Metadata](./reference/ref-metadata.md) + + [Configuration](./reference/ref-config.md) + + [Recommended Value of GUC Parameters](./reference/ref-recommend-guc.md) + + [Version Correlation](./reference/ref-support-mogdb.md) ++ [Samples of Configuration Files](./samples/samples-index.md) + + [Local Single Instance](./samples/samples-local-single.md) + + [Remote Single Instance](./samples/samples-remote-single.md) + + [Primary and Standby Cluster](./samples/samples-db-cluster.md) + + [Dual Network Segment](./samples/samples-double-ip.md) + + [Resource Pooling](./samples/samples-dss-cluster.md) ++ Commands + [ptk](./commands/ptk.md) + [ptk completion](./commands/ptk-completion.md) + [ptk completion powershell](./commands/ptk-completion-powershell.md) @@ -146,9 +147,9 @@ + [ptk candidate cpu](./commands/ptk-candidate-cpu.md) + [ptk candidate os](./commands/ptk-candidate-os.md) + [ptk candidate db](./commands/ptk-candidate-db.md) -+ [故障排查](./debug.md) ++ [Troubleshooting](./debug.md) + [FAQ](./faq.md) -+ 发布记录 ++ Release Notes + [v1.6](./release-notes/release-16x.md) + [v1.5](./release-notes/release-15x.md) + [v1.4](./release-notes/release-14x.md) @@ -157,5 +158,5 @@ + [v1.1](./release-notes/release-11x.md) + [v1.0](./release-notes/release-10x.md) + [v0.x](./release-notes/release-0xx.md) -+ [社区](https://www.modb.pro/search?query=ptk) -+ [附录:YAML语法](./appendix/yaml-grammar.md) \ No newline at end of file ++ [Community](https://www.modb.pro/search?query=ptk) ++ [Appendix: YAML Syntax](./appendix/yaml-grammar.md) \ No newline at end of file -- Gitee