{"id":3475,"date":"2020-12-17T16:57:40","date_gmt":"2020-12-17T08:57:40","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=3475"},"modified":"2023-06-21T17:07:18","modified_gmt":"2023-06-21T09:07:18","slug":"tdc%e6%9b%b4%e6%8d%a2%e8%ae%b8%e5%8f%af%e8%af%81%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=3475","title":{"rendered":"TDC\u66f4\u6362\u8bb8\u53ef\u8bc1\u6b65\u9aa4"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>\u672c\u6587\u4e3b\u8981\u8bb2\u8ff0\u5982\u4f55\u66f4\u6362TDC\u8bb8\u53ef\u8bc1<\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<hr \/>\n<p>TDC\u4e0a\u66f4\u6362\u8bb8\u53ef\u8bc1\u5206\u4e3a\u4e24\u4e2a\u90e8\u5206\uff0c\u66f4\u6539TDH\u8bb8\u53ef\u8bc1\u548c\u66f4\u6362TDC\u8bb8\u53ef\u8bc1\u3002<\/p>\n<h4>\u66f4\u6362TDH\u8bb8\u53ef\u8bc1<\/h4>\n<ul>\n<li>\n<p>\u627e\u5230market-web-installer\u76ee\u5f55<br \/>\n\u4e00\u822c\u662f\u5b89\u88c5tdc\u7684\u8282\u70b9<\/p>\n<\/li>\n<li>\n<p>\u5c06\u4e4b\u524d\u7684starttime\u5907\u4efd<\/p>\n<pre><code>$ cd <\u81ea\u5b9a\u4e49\u76ee\u5f55>\/market-web-installer\/ansible-deploy\/util\/\n$ ls startime\n$ mv starttime starttime.bak<\/code><\/pre>\n<\/li>\n<li>\n<p>\u5c06\u65b0\u7684startime\u6587\u4ef6\u4e0a\u4f20\u5230 &lt;\u81ea\u5b9a\u4e49\u76ee\u5f55&gt;\/market-web-installer\/ansible-deploy\/util\/ \u76ee\u5f55\u4e0b\u5e76\u4e14\u91cd\u547d\u540d\u4e3astarttime<\/p>\n<\/li>\n<li>\n<p>\u6267\u884c\u8be5\u76ee\u5f55\u4e0bupdate_tdh_license.sh \u811a\u672c<br \/>\n<code><code>$ .\/update_tdh_license.sh<\/code><\/code><\/p>\n<\/li>\n<\/ul>\n<h4>\u66f4\u6362TDC\u8bb8\u53ef\u8bc1<\/h4>\n<h5>TDC2.x \u66f4\u6362TDC\u8bb8\u53ef\u8bc1<\/h5>\n<ul>\n<li>\u5c06license\u6587\u4ef6\u547d\u540d\u4e3alicence<\/li>\n<li>\u5c06\u65b0\u7684licence\u6587\u4ef6\u653e\u5230\/srv\/kubernetes\/<\/li>\n<li>\u6267\u884c\u811a\u672c\uff0c\u6ce8\u610f\u66f4\u6362hostname<br \/>\ntdc_license.sh\uff08\u82e5\u811a\u672c\u51fa\u73b0\u95ee\u9898\uff0c\u53ef\u6267\u884csed -i &quot;s\/\\r\/\/&quot; tdc_license.sh\u5c06\u5176\u4e2d\u6362\u884c\u7b26\u4ece\\r\\n\u66ff\u6362\u4e3a\\n\uff09<\/li>\n<\/ul>\n<p>tdc-license.sh\u7684\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre><code>#!\/bin\/bash\n# Update MSL license for TOS 1.9\nset -ex\nLICENSE_KEY=${LICENSE_KEY:-licence\/total}\nETCD_CLUSTER=${ETCD_CLUSTER:-https:\/\/tdc-1:4000}  #license-server\u6240\u5728\u8282\u70b9\u7684hostname \u6ce8\u610f \u8fd9\u91cc\u8981\u4ee5hostame\nCACRT_FILE=${CACRT_FILE:-\/srv\/kubernetes\/ca.pem}\nLICENSE_FILE=${LICENSE_FILE:-\/srv\/kubernetes\/licence}\n# Check license file\nif [ ! -f $LICENSE_FILE ]; then\n  echo \"can not find license file\"\n  exit 1\nfi\nuntil [ -f $CACRT_FILE ]; do\n  echo \"can not find ca file, sleep 10s\"\n  sleep 10\ndone\n# Update license\ncat $LICENSE_FILE | ETCDCTL_API=3 etcdctl \\\n    --endpoints=$ETCD_CLUSTER \\\n    --cacert=\/srv\/kubernetes\/ca.pem \\\n    --cert=\/srv\/kubernetes\/transwarp-etcd.pem  \\\n    --key=\/srv\/kubernetes\/transwarp-etcd-key.pem  put $LICENSE_KEY<\/code><\/pre>\n<h5>TDC3.x \u66f4\u6362TDC\u8bb8\u53ef\u8bc1<\/h5>\n<ul>\n<li>\u5c06license\u6587\u4ef6\u547d\u540d\u4e3alicence<\/li>\n<li>\u5c06\u65b0\u7684licence\u6587\u4ef6\u653e\u5230\/srv\/kubernetes\/<\/li>\n<li>\u6267\u884c\u547d\u4ee4\n<pre><code class=\"language-shell\">kubectl licence load -f licence<\/code><\/pre>\n<\/li>\n<\/ul>\n<h4>\u9a8c\u8bc1<\/h4>\n<ul>\n<li>\n<p>\u9a8c\u8bc1TDH license<br \/>\n\u8fdb\u5165kube-system\u4e0b\u9762\u7684\u4efb\u610fzookeeper pod<br \/>\n\u6267\u884c\u547d\u4ee4\uff1a<code>zkCli.sh -server localhost:2191 -c get \/starttime<\/code><br \/>\n\u5224\u65ad\u548c\u5916\u90e8starttime\u7684\u5185\u5bb9\u662f\u5426\u4e00\u81f4<\/p>\n<\/li>\n<li>\n<p>\u9a8c\u8bc1TDC license<br \/>\n\u6d4f\u89c8\u5668\u8bbf\u95ee<code>http:\/\/{eco\u8282\u70b9ip}:8082\/status<\/code><br \/>\n\u67e5\u770bExpireDate\u662f\u5426\u4e3a\u6700\u65b0\u7684<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2020\/07\/image-1594025158655.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u672c\u6587\u4e3b\u8981\u8bb2\u8ff0\u5982\u4f55\u66f4\u6362TDC\u8bb8\u53ef\u8bc1 \u8be6\u7ec6\u8bf4\u660e TDC\u4e0a\u66f4\u6362\u8bb8\u53ef\u8bc1\u5206\u4e3a\u4e24\u4e2a\u90e8\u5206\uff0c\u66f4\u6539TDH\u8bb8\u53ef\u8bc1\u548c\u66f4\u6362T ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=3475\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-3475","post","type-post","status-publish","format-standard","hentry","category-configuration"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/3475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3475"}],"version-history":[{"count":2,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/3475\/revisions"}],"predecessor-version":[{"id":10436,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/3475\/revisions\/10436"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}