{"id":5175,"date":"2024-09-24T21:41:03","date_gmt":"2024-09-24T13:41:03","guid":{"rendered":"http:\/\/xinblog.ltd\/?p=5175"},"modified":"2024-11-11T08:49:04","modified_gmt":"2024-11-11T00:49:04","slug":"10-%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8helm%e6%9d%a5%e9%83%a8%e7%bd%b2superset","status":"publish","type":"post","link":"http:\/\/xinblog.ltd\/?p=5175","title":{"rendered":"10.\u5982\u4f55\u5229\u7528helm\u6765\u90e8\u7f72Superset"},"content":{"rendered":"<p>\u5982\u4f55\u5229\u7528helm\u6765\u90e8\u7f72Superset<\/p>\n<p>Superset\u652f\u6301\u591a\u79cd\u7684\u90e8\u7f72\u65b9\u5f0f\uff0c\u5176\u90e8\u7f72\u65b9\u5f0f\u8be6\u60c5\u53ef\u4ee5\u5728\u5176\u5b98\u7f51\u4e0a\u8fdb\u884c\u67e5\u770b<\/p>\n<p><a href=\"https:\/\/superset.apache.org\/docs\/installation\/kubernetes\">https:\/\/superset.apache.org\/docs\/installation\/kubernetes<\/a><\/p>\n<p>\u5185\u90e8\u5305\u542b\u8bf8\u5982Kubernetes\u4f5c\u4e3a\u7ba1\u7406\u5e73\u53f0\uff0c\u4e5f\u652f\u6301\u4f7f\u7528Docker Compose\u4f5c\u4e3a\u7ba1\u7406\u5e73\u53f0\u3002<\/p>\n<p>\u4e0d\u8fc7\u5728\u8fd9\u4e00\u7ae0\uff0c\u6211\u4eec\u5c06\u4e3b\u8981\u8bf4\u5982\u4f55\u5c06Superset\u90e8\u7f72\u5728helm\u4e4b\u4e0a<\/p>\n<p>\u4ece\u6700\u7b80\u5355\u7684\u90e8\u7f72\u8fd0\u884c\uff0c\u5230\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff0c\u5230\u591a\u914d\u7f6e\u6587\u4ef6\u5e94\u7528\u591a\u65b9\u9762\u3002<\/p>\n<p>\u90a3\u4e48\u5982\u4f55\u60f3\u8981\u5f00\u59cb\u8fd9\u4e00\u7ae0\uff0c\u6211\u4eec\u9700\u8981\u9996\u5148\u5b89\u88c5helm<\/p>\n<p>\u5bf9\u4e8eWindows\u5e73\u53f0,\u76f4\u63a5\u4ece<a href=\"https:\/\/helm.sh\/\">https:\/\/helm.sh\/<\/a> helm\u5b98\u7f51\u4e0b\u8f7d,\u7136\u540e\u5728\u73af\u5883\u53d8\u91cf\u7684path\u4e2d\u914d\u7f6e\u4e00\u4e0b,helm\u4f1a\u81ea\u52a8\u5c1d\u8bd5\u8bfb\u53d6\u672c\u5730\u7684.kube\u914d\u7f6e\u3002<\/p>\n<p>\u5728\u5b89\u88c5\u5b8c\u6210\u4e86helm\u4e4b\u540e,\u6309\u7167\u5b98\u65b9\u6587\u6863\u7684\u6307\u5f15,\u914d\u7f6e\u5bf9\u5e94\u7684Charts\u4ed3\u5e93\u5e76\u8fdb\u884c\u5b89\u88c5<\/p>\n<p>helm repo add superset https:\/\/apache.github.io\/superset<\/p>\n<p>\u5176\u6b21\u5c31\u662f\u7b2c\u4e00\u6b21\u8fdb\u884c\u90e8\u7f72<\/p>\n<p>helm upgrade &#8211;install &#8211;values my-values.yaml superset superset\/superset<\/p>\n<p>\u8fd9\u4e2avalues.yaml\u53ef\u4ee5\u5728superset\u76ee\u5f55\u4e0b\u7684helm\/superset\u627e\u5230<\/p>\n<p>\u4e4b\u540e\u5c31\u53ef\u4ee5\u770b\u5230\u90e8\u7f72\u7684\u5404\u4e2apods<\/p>\n<p>NAME                                    READY   STATUS      RESTARTS   AGE<\/p>\n<p>superset-celerybeat-7cdcc9575f-k6xmc    1\/1     Running     0          119s<\/p>\n<p>superset-f5c9c667-dw9lp                 1\/1     Running     0          4m7s<\/p>\n<p>superset-f5c9c667-fk8bk                 1\/1     Running     0          4m11s<\/p>\n<p>superset-init-db-zlm9z                  0\/1     Completed   0          111s<\/p>\n<p>superset-postgresql-0                   1\/1     Running     0          6d20h<\/p>\n<p>superset-redis-master-0                 1\/1     Running     0          6d20h<\/p>\n<p>superset-worker-75b48bbcc-jmmjr         1\/1     Running     0          4m8s<\/p>\n<p>superset-worker-75b48bbcc-qrq49         1\/1     Running     0         4m12s<\/p>\n<p>\u5206\u522b\u662f\u5b9a\u65f6\u4efb\u52a1\uff0c\u670d\u52a1\u8282\u70b9\uff0c\u521d\u59cb\u5316\u670d\u52a1\uff0cpostgre\uff0c redis\uff0c\u4ee5\u53ca\u5b9a\u65f6\u4efb\u52a1\u6267\u884c\u8282\u70b9\u3002<\/p>\n<p>\u9664\u6b64\u4e5f\u90e8\u7f72\u4e86\u4e9b\u76f8\u5173\u7684service\u4f9b\u6211\u4eec\u5bf9\u5916\u66b4\u9732,\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6eIngress,\u6216\u8005\u4fee\u6539Service\u4e3aNodePort\u6216\u8005LoadBalancer\u8fdb\u884c\u8bbf\u95ee<\/p>\n<p>\u90a3\u4e48\u5230\u8fd9\u91cc\uff0c\u6211\u4eec\u5c31\u5b8c\u6210\u4e86\u6700\u57fa\u672c\u7684\u90e8\u7f72\u8fd0\u884c\u3002<\/p>\n<p>\u4e4b\u540e\u6211\u4eec\u770b\u4e0b\u5982\u4f55\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<p>\u6700\u7b80\u5355\u7684\u5c31\u662f\u8fdb\u5165helm\u4e0b\u7684superset\u4e2d\u7684values.yaml\u8fdb\u884c\u4fee\u6539\uff0c\u6bd4\u5982\u6211\u4eec\u5e0c\u671b\u4f7f\u7528oicd\uff0c\u5c31\u9700\u8981\u5b89\u88c5Authlib\u76f8\u5173\u4f9d\u8d56\u3002\u53ef\u4ee5\u4fee\u6539<\/p>\n<p>pip install \\<\/p>\n<p>psycopg2-binary==2.9.1 \\<\/p>\n<p>PyAthenaJDBC==3.0.1 \\<\/p>\n<p>PyAthena==2.18.1 \\<\/p>\n<p>redis==3.5.3 &amp;&amp; \\<\/p>\n<p>\u589e\u52a0Authlib<\/p>\n<p>\u5982\u679c\u6211\u4eec\u5e0c\u671b\u4fee\u6539\u4f7f\u7528\u81ea\u5df1\u7684postgres\u4f5c\u4e3a\u4fe1\u606f\u5b58\u50a8\u3002<\/p>\n<p>\u90a3\u4e48\u5c31\u53ef\u4ee5\u5148\u5728values.yaml\u4e4b\u4e2d\uff0c\u5173\u95edhelm\u90e8\u7f72postgres<\/p>\n<p>postgresql:<\/p>\n<p><em>##<br \/>\n## Use the PostgreSQL chart dependency.<br \/>\n## Set to false if bringing your own PostgreSQL.<br \/>\n<\/em>enabled: false<\/p>\n<p>\u7136\u540e\u5728SupersetNode\u4e4b\u4e2d\u914d\u7f6epostgres\u7684host\uff0cpost, user, pass\uff0c\u4e4b\u540e\u5728helm upgrade\u7684\u65f6\u5019\uff0c\u5c31\u4f1a\u5173\u95edpostgres\uff0c\u5e76\u5e94\u7528\u4e0b\u6765\u3002<\/p>\n<p>\u4e4b\u540e\u662f\u8fdb\u884c\u591a\u5e94\u7528\u6587\u4ef6\u90e8\u7f72<\/p>\n<p>\u8b6c\u5982\u6211\u4eec\u4f1a\u9047\u5230\u5728\u6d4b\u8bd5\u73af\u5883\u4e2d\u4f7f\u7528\u8d26\u53f7\u5bc6\u7801\u767b\u5f55\u5373\u53ef\uff0c\u4f46\u662f\u5728\u7ebf\u4e0a\u73af\u5883\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u96c6\u6210SSO\u670d\u52a1\u5668\u8fdb\u884c\u767b\u5f55\u3002\u90a3\u4e48\u5c31\u9700\u8981\u51c6\u5907\u4e0d\u540c\u73af\u5883\u7684values.yaml\uff0c\u4f46\u662f\u6211\u4eec\u53ea\u60f3\u4fee\u6539\u81ea\u5df1\u9700\u8981\u4fee\u6539\u7684\u90e8\u5206\u914d\u7f6e\uff0c\u90a3\u4e48\u5c31\u9700\u8981\u8fdb\u884c\u591a\u6587\u4ef6\u90e8\u7f72\u3002<\/p>\n<p>\u53ef\u4ee5\u4e66\u5199\u591a\u4e2avalues.yaml\uff0c\u6bcf\u4e2avalues.yaml\u4e2d\u53ea\u6709\u90e8\u5206\u4fee\u6539\uff0c\u6bd4\u5982\u53ea\u4fee\u6539\u6570\u636e\u5e93\u8fde\u63a5<\/p>\n<table>\n<tr>\n<td>\n  supersetNode:<\/p>\n<p>connections:<\/p>\n<p>redis_host: &#8220;superset.redis.prod.cn-north-1.aws.com&#8221;<\/p>\n<p>redis_port: &#8220;6379&#8221;<\/p>\n<p>db_host: &#8220;supersetmeta.prod.cn-north-1.aws.com &#8221;<\/p>\n<p>db_port: &#8220;5432&#8221;<\/p>\n<p>db_user: postgres<\/p>\n<p>db_pass: password001<\/p>\n<p>db_name: postgres<\/td>\n<\/tr>\n<\/table>\n<p>\u6700\u540e<\/p>\n<p>helm upgrade &#8211;install superset -f ..\/values.yaml -f values.yaml -n superset .\/superset<\/p>\n<p>\u9700\u8981\u6ce8\u610f\uff0c-f \u53f3\u8fb9\u7684\u4f18\u5148\u7ea7\u9ad8<\/p>\n<p>\u6240\u4ee5\u9700\u8981\u6211\u4eec\u5c06\u73af\u5883\u7684values.yaml\u653e\u5728\u53f3\u8fb9\uff0c\u5de6\u8fb9\u4e00\u5c42\u5c42\u7684\u5d4c\u5957\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5229\u7528helm\u6765\u90e8\u7f72Supe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"_links":{"self":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/5175"}],"collection":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5175"}],"version-history":[{"count":1,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/5175\/revisions"}],"predecessor-version":[{"id":5176,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=\/wp\/v2\/posts\/5175\/revisions\/5176"}],"wp:attachment":[{"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5175"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinblog.ltd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}