{"id":114582,"date":"2026-10-09T15:48:55","date_gmt":"2026-10-09T07:48:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/114582.html"},"modified":"2026-10-09T15:48:55","modified_gmt":"2026-10-09T07:48:55","slug":"%e5%9c%a8-ubuntu-%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e4%bb%8e%e6%ba%90%e7%a0%81%e6%9e%84%e5%bb%ba%e4%b8%8e%e9%83%a8%e7%bd%b2-apache-openwhisk-%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/114582.html","title":{"rendered":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357"},"content":{"rendered":"<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u4e91\u539f\u751f<\/span><\/li>\n<li><span class=\"gcb-tag\">\u540e\u7aef<\/span><\/li>\n<li><span class=\"gcb-tag\">\u5fae\u670d\u52a1<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011openwhisk<\/h3>\n<p class=\"gcb-project-desc\">Apache OpenWhisk is an open source serverless cloud platform<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/op\/openwhisk<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<p>Apache OpenWhisk \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u65e0\u670d\u52a1\u5668&#xff08;serverless&#xff09;\u4e91\u5e73\u53f0&#xff0c;\u652f\u6301\u4ee5\u51fd\u6570\u5373\u670d\u52a1&#xff08;FaaS&#xff09;\u7684\u65b9\u5f0f\u8fd0\u884c\u4ee3\u7801\u3002\u672c\u6587\u4ee5\u4ed3\u5e93\u4e2d\u7684 tools\/ubuntu-setup\/README.md \u4e3a\u9aa8\u67b6&#xff0c;\u7ed3\u5408\u4ed3\u5e93\u5185\u5b9e\u9645\u7684\u5b89\u88c5\u811a\u672c\u3001Ansible \u90e8\u7f72\u914d\u7f6e\u4e0e CLI \u6587\u6863&#xff0c;\u5b8c\u6574\u8bb2\u89e3\u5982\u4f55\u5728\u4e00\u53f0&#xff08;\u6216\u591a\u53f0&#xff09;Ubuntu 18.04 \u670d\u52a1\u5668\u4e0a&#xff0c;\u4ece\u514b\u9686\u6e90\u7801\u5f00\u59cb&#xff0c;\u4f9d\u6b21\u5b8c\u6210\u73af\u5883\u51c6\u5907\u3001\u6570\u636e\u5b58\u50a8\u9009\u578b\u3001\u955c\u50cf\u6784\u5efa\u3001Ansible \u90e8\u7f72\u3001CLI \u914d\u7f6e\u4e0e\u9996\u4e2a action \u8c03\u7528&#xff0c;\u5e76\u6df1\u5165\u89e3\u8bfb\u6bcf\u4e00\u6b65\u80cc\u540e\u7684\u811a\u672c\u5b9e\u73b0&#xff0c;\u5e2e\u52a9\u4f60\u5feb\u901f\u642d\u5efa\u4e00\u5957\u53ef\u672c\u5730\u8fd0\u884c\u3001\u53ef\u6269\u5c55\u4e3a\u591a\u673a\u5206\u5e03\u5f0f\u90e8\u7f72\u7684 OpenWhisk \u73af\u5883\u3002<\/p>\n<p>\u8bfb\u5b8c\u672c\u6587&#xff0c;\u4f60\u5c06\u638c\u63e1&#xff1a;Ubuntu \u4e3b\u673a\u4e0a\u7684\u4f9d\u8d56\u5b89\u88c5\u7ec6\u8282&#xff08;JDK8\u3001Python\u3001Ansible\u3001Docker&#xff09;\u3001CouchDB\/Cloudant\/MongoDB \u6570\u636e\u5b58\u50a8\u7684\u9009\u62e9\u4e0e\u914d\u7f6e\u65b9\u6cd5\u3001.\/gradlew distDocker \u7684\u6784\u5efa\u6d41\u7a0b\u3001\u4ee5 ansible-playbook \u4e3a\u6838\u5fc3\u7684\u5355\u673a\u4e0e\u591a\u673a\u90e8\u7f72\u65b9\u5f0f&#xff0c;\u4ee5\u53ca\u901a\u8fc7 wsk CLI \u5b8c\u6210 API host \u914d\u7f6e\u4e0e action \u8c03\u7528\u7684\u5b8c\u6574\u94fe\u8def\u3002<\/p>\n<h3>\u524d\u7f6e\u6761\u4ef6\u4e0e\u90e8\u7f72\u6a21\u5f0f<\/h3>\n<p>\u5b98\u65b9\u6587\u6863\u660e\u786e\u8bf4\u660e&#xff0c;\u4ee5\u4e0b\u6b65\u9aa4\u5728 Ubuntu 18.04 \u4e0a\u9a8c\u8bc1\u53ef\u7528\u3002\u5b89\u88c5\u6240\u9700\u8f6f\u4ef6\u65f6&#xff0c;\u6839\u636e\u7cfb\u7edf\u6743\u9650\u914d\u7f6e&#xff0c;\u4f60\u53ef\u80fd\u9700\u8981 sudo \u6216 root \u6743\u9650\u3002<\/p>\n<p>\u90e8\u7f72\u5b58\u5728\u4e24\u79cd\u5178\u578b\u6a21\u5f0f&#xff1a;<\/p>\n<ul>\n<li>\u5355\u673a\/\u5355 VM \u6a21\u5f0f&#xff1a;\u6240\u6709\u547d\u4ee4\u76f4\u63a5\u5728\u5bbf\u4e3b\u673a&#xff08;host machine&#xff09;\u4e0a\u6267\u884c&#xff0c;OpenWhisk \u7684\u5404\u7ec4\u4ef6\u4ee5 Docker \u5bb9\u5668\u5f62\u5f0f\u8fd0\u884c\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u3002<\/li>\n<li>\u591a VM \u5206\u5e03\u5f0f\u6a21\u5f0f&#xff1a;\u547d\u4ee4\u9700\u8981\u5728\u4e0e\u6240\u6709 VM \u5747\u53ef\u8fbe\u7f51\u7edc\u8fde\u901a\u7684\u4e00\u53f0\u673a\u5668\u4e0a\u6267\u884c&#xff0c;\u8fd9\u53f0\u673a\u5668\u79f0\u4e3a bootstrapper&#xff08;\u5f15\u5bfc\u673a&#xff09;\u3002\u5b83\u7406\u60f3\u60c5\u51b5\u4e0b\u662f\u90e8\u7f72\u5728 IaaS&#xff08;\u57fa\u7840\u8bbe\u65bd\u5373\u670d\u52a1\u5e73\u53f0&#xff09;\u4e2d\u7684\u4e00\u53f0 Ubuntu 18.04 VM&#xff1b;\u5982\u679c\u4f60\u7684\u672c\u5730\u673a\u5668\u80fd\u591f\u8fde\u901a IaaS \u4e2d\u7684\u5404 VM&#xff0c;\u4e5f\u53ef\u4ee5\u5145\u5f53 bootstrapper\u3002<\/li>\n<\/ul>\n<p>\u6ce8\u610f&#xff1a;\u65e0\u8bba\u54ea\u79cd\u6a21\u5f0f&#xff0c;bootstrapper \u673a\u5668\u9700\u8981\u80fd\u591f\u901a\u8fc7 SSH \u7b49\u65b9\u5f0f\u7ba1\u7406\u6240\u6709\u76ee\u6807\u4e3b\u673a&#xff0c;\u56e0\u4e3a\u540e\u7eed\u7684 Ansible \u90e8\u7f72\u5c06\u4ee5\u5b83\u4e3a\u4e2d\u5fc3\u5411\u5404 VM \u4e0b\u53d1\u4efb\u52a1\u3002<\/p>\n<h3>\u4e00\u3001\u83b7\u53d6\u6e90\u7801\u4e0e\u5b89\u88c5\u57fa\u7840\u4f9d\u8d56<\/h3>\n<h4>1.1 \u514b\u9686 OpenWhisk \u6e90\u7801<\/h4>\n<p>\u5982\u679c\u5c1a\u672a\u5b89\u88c5 git&#xff0c;\u5148\u5b89\u88c5\u5b83&#xff0c;\u7136\u540e\u514b\u9686\u4ed3\u5e93\u5e76\u8fdb\u5165\u6e90\u7801\u6839\u76ee\u5f55&#xff1a;<\/p>\n<p># Install git if it is not installed<br \/>\nsudo apt-get install git -y<\/p>\n<p># Clone openwhisk<br \/>\ngit clone https:\/\/github.com\/apache\/openwhisk.git openwhisk<\/p>\n<p># Change current directory to openwhisk<br \/>\ncd openwhisk<\/p>\n<h4>1.2 \u4e00\u952e\u5b89\u88c5\u4f9d\u8d56\u811a\u672c<\/h4>\n<p>OpenWhisk \u5728 tools\/ubuntu-setup \u76ee\u5f55\u4e0b\u63d0\u4f9b\u4e86\u4e00\u7ec4\u6309\u5e8f\u6267\u884c\u7684\u5b89\u88c5\u811a\u672c&#xff0c;all.sh \u662f\u603b\u5165\u53e3\u3002\u8fd0\u884c&#xff1a;<\/p>\n<p># \u4f7f\u7528 OpenJDK 8 \u4f5c\u4e3a\u9ed8\u8ba4 Java \u73af\u5883<br \/>\n(cd tools\/ubuntu-setup &amp;&amp; .\/all.sh)<\/p>\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u6539\u7528 Oracle JDK 8&#xff0c;\u5219\u4f20\u5165 oracle \u53c2\u6570&#xff1a;<\/p>\n<p># \u5b89\u88c5\u5168\u90e8\u4f9d\u8d56&#xff0c;\u540c\u65f6\u5b89\u88c5 Oracle JDK 8<br \/>\n(cd tools\/ubuntu-setup &amp;&amp; .\/all.sh oracle)<\/p>\n<h4>1.3 \u811a\u672c\u5185\u90e8\u505a\u4e86\u4ec0\u4e48&#xff1a;all.sh \u7684\u5b89\u88c5\u6d41\u7a0b<\/h4>\n<p>\u4ece tools\/ubuntu-setup\/all.sh \u7684\u6e90\u7801\u770b&#xff0c;all.sh \u4f1a\u4f9d\u6b21\u8c03\u7528 5 \u4e2a\u5b50\u811a\u672c&#xff0c;\u5176\u987a\u5e8f\u4e0e\u804c\u8d23\u5982\u4e0b&#xff1a;<\/p>\n<table>\n<tr>\u987a\u5e8f\u811a\u672c\u804c\u8d23<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>misc.sh<\/td>\n<td>\u5b89\u88c5\u57fa\u7840\u8f6f\u4ef6\u5305&#xff08;ntp\u3001git\u3001zip\u3001unzip\u3001tzdata\u3001lsb-release\u3001npm&#xff09;&#xff0c;\u5e76\u914d\u7f6e\u7cfb\u7edf\u65f6\u533a\u4e3a Etc\/UTC\u3001\u91cd\u542f ntp \u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>pip.sh<\/td>\n<td>\u5b89\u88c5 python-pip \u53ca Python \u4f9d\u8d56 argcomplete&#xff08;\u7528\u4e8e wskadmin \u547d\u4ee4\u884c\u8865\u5168&#xff09;\u3001couchdb<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>java8.sh<\/td>\n<td>\u6309\u53c2\u6570\u5b89\u88c5 OpenJDK 8 \u6216 Oracle JDK 8<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>ansible.sh<\/td>\n<td>\u5b89\u88c5\u5e76\u56fa\u5b9a Ansible 2.5.2 \u53ca\u914d\u5957\u7684 jinja2\u3001docker\u3001httplib2\u3001requests \u7248\u672c<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>docker.sh \/ docker-xenial.sh<\/td>\n<td>\u6309 Ubuntu \u7248\u672c\u9009\u62e9\u5bf9\u5e94 Docker \u5b89\u88c5\u811a\u672c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>all.sh \u7684\u6838\u5fc3\u903b\u8f91&#xff08;\u8282\u9009\u81ea all.sh&#xff09;&#xff1a;<\/p>\n<p>set -e<br \/>\nset -x<br \/>\nJAVA_SOURCE&#061;${1:-&#034;open&#034;}<br \/>\nSOURCE&#061;&#034;${BASH_SOURCE[0]}&#034;<br \/>\nSCRIPTDIR&#061;&#034;$( dirname &#034;$SOURCE&#034; )&#034;<\/p>\n<p>echo &#034;*** installing basics&#034;<br \/>\n\/bin\/bash &#034;$SCRIPTDIR\/misc.sh&#034;<\/p>\n<p>echo &#034;*** installing python dependences&#034;<br \/>\n\/bin\/bash &#034;$SCRIPTDIR\/pip.sh&#034;<\/p>\n<p>echo &#034;*** installing java&#034;<br \/>\n\/bin\/bash &#034;$SCRIPTDIR\/java8.sh&#034; $JAVA_SOURCE<\/p>\n<p>echo &#034;*** installing ansible&#034;<br \/>\n\/bin\/bash &#034;$SCRIPTDIR\/ansible.sh&#034;<\/p>\n<p>echo &#034;*** installing docker&#034;<br \/>\nu_release&#061;&#034;$(lsb_release -rs)&#034;<br \/>\nif [ &#034;${u_release%%.*}&#034; -lt &#034;16&#034; ]; then<br \/>\n    \/bin\/bash &#034;$SCRIPTDIR\/docker.sh&#034;<br \/>\nelse<br \/>\n    echo &#034;&#8212; WARNING &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#034;<br \/>\n    echo &#034;Using EXPERIMENTAL Docker CE script on Xenial or later Ubuntu&#034;<br \/>\n    echo &#034;&#8212; WARNING &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#034;<br \/>\n    \/bin\/bash &#034;$SCRIPTDIR\/docker-xenial.sh&#034;<br \/>\nfi<\/p>\n<p>\u5176\u4e2d JAVA_SOURCE&#061;${1:-&#034;open&#034;} \u6b63\u662f .\/all.sh oracle \u53c2\u6570\u4f20\u9012\u7684\u5165\u53e3\u3002\u6ce8\u610f\u811a\u672c\u672b\u5c3e\u7684\u6ce8\u91ca\u8b66\u544a&#xff1a;Docker \u5b89\u88c5\u5fc5\u987b\u662f\u6700\u540e\u4e00\u6b65\u2014\u2014\u56e0\u4e3a\u811a\u672c\u5185\u90e8\u4f1a\u91cd\u542f docker \u670d\u52a1&#xff0c;\u82e5\u5728 Docker \u5bb9\u5668\u5185\u505a\u811a\u672c\u6709\u6548\u6027\u9a8c\u8bc1&#xff0c;\u91cd\u542f\u64cd\u4f5c\u53ef\u80fd\u4e0e\u5bbf\u4e3b\u7684 Docker for Mac \u63a7\u5236\u5b9e\u4f8b\u901a\u4fe1\u5e76\u7ec8\u6b62\u5bb9\u5668&#xff0c;\u56e0\u6b64\u4e4b\u540e\u4e0d\u8981\u518d\u653e\u7f6e\u4efb\u4f55\u6b65\u9aa4\u3002<\/p>\n<h4>1.4 \u5173\u952e\u5b50\u811a\u672c\u7ec6\u8282<\/h4>\n<p>java8.sh&#xff1a;\u9ed8\u8ba4\u5b89\u88c5 OpenJDK 8&#xff08;openjdk-8-jdk&#xff09;&#xff1b;\u5728 Ubuntu trusty \u4e0a\u4f1a\u5148\u6dfb\u52a0 ppa:jonathonf\/openjdk PPA\u3002\u4f20\u5165 oracle \u65f6\u5219\u6dfb\u52a0 ppa:webupd8team\/java&#xff0c;\u5e76\u901a\u8fc7 debconf-set-selections \u81ea\u52a8\u63a5\u53d7 Oracle \u8bb8\u53ef\u540e\u5b89\u88c5 oracle-java8-installer\u3002<\/p>\n<p>misc.sh \u5b89\u88c5 ntp git zip unzip tzdata lsb-release npm&#xff0c;\u5e76\u5c06\u7cfb\u7edf\u65f6\u533a\u56fa\u5b9a\u4e3a Etc\/UTC&#xff0c;\u91cd\u542f NTP \u670d\u52a1\u3002\u65f6\u533a\u7684\u4e00\u81f4\u6027\u5bf9\u540e\u7eed\u67e5\u770b\u5404\u7cfb\u7edf\u5bb9\u5668\u65e5\u5fd7\u5f88\u91cd\u8981\u2014\u2014OpenWhisk \u7cfb\u7edf\u5bb9\u5668\u9ed8\u8ba4\u65f6\u533a\u5373\u4e3a UTC&#xff08;\u53c2\u89c1 ansible\/README.md \u4e2d\u5173\u4e8e docker_timezone \u7684\u8bf4\u660e&#xff09;\u3002<\/p>\n<p>ansible.sh \u4f1a\u56fa\u5b9a\u5b89\u88c5\u4e00\u7ec4\u4e0e OpenWhisk \u90e8\u7f72\u517c\u5bb9\u7684\u7248\u672c&#xff1a;<\/p>\n<p>sudo pip install ansible&#061;&#061;2.5.2<br \/>\nsudo pip install jinja2&#061;&#061;2.9.6<br \/>\nsudo pip install docker&#061;&#061;2.2.1    &#8211;ignore-installed  &#8211;force-reinstall<br \/>\nsudo pip install httplib2&#061;&#061;0.9.2  &#8211;ignore-installed  &#8211;force-reinstall<br \/>\nsudo pip install requests&#061;&#061;2.10.0 &#8211;ignore-installed  &#8211;force-reinstall<\/p>\n<p>\u6ce8\u610f&#xff1a;\u8be5\u811a\u672c\u56fa\u5b9a\u7684\u662f\u8f83\u8001\u7684 Ansible 2.5.2\u3002\u4ed3\u5e93\u6839\u76ee\u5f55\u7684 ansible\/README.md \u5bf9\u5e38\u89c4\u90e8\u7f72\u7ed9\u51fa\u4e86\u66f4\u65b0\u7684\u7248\u672c\u7ec4\u5408&#xff08;ansible&#061;&#061;4.1.0 \u4e0e jinja2&#061;&#061;3.0.1&#xff09;&#xff0c;\u4e24\u8005\u90fd\u53ef\u7528\u4e8e\u90e8\u7f72&#xff0c;\u9009\u62e9\u65f6\u8bf7\u4ee5\u4f60\u7684 OpenWhisk \u6e90\u7801\u7248\u672c\u5bf9\u5e94\u7684\u6587\u6863\u4e3a\u51c6\u3002<\/p>\n<p>pip.sh \u5b89\u88c5\u7684 argcomplete \u7528\u4e8e\u7ed9 wskadmin \u63d0\u4f9b\u547d\u4ee4\u884c Tab \u8865\u5168&#xff0c;bashprofile.sh \u5c55\u793a\u4e86\u5982\u4f55\u628a\u8fd9\u4e9b\u73af\u5883\u914d\u7f6e\u5199\u5165 ~\/.bash_profile&#xff1a;<\/p>\n<p>echo &#039;export PATH&#061;$HOME\/openwhisk\/bin:$PATH&#039; &gt; &#034;$HOME\/.bash_profile&#034;<br \/>\necho &#039;eval &#034;$(register-python-argcomplete wskadmin)&#034;&#039; &gt;&gt; &#034;$HOME\/.bash_profile&#034;<\/p>\n<h3>\u4e8c\u3001\u9009\u62e9\u5e76\u914d\u7f6e\u6570\u636e\u5b58\u50a8&#xff08;Data Store&#xff09;<\/h3>\n<p>\u6784\u5efa\u548c\u90e8\u7f72 OpenWhisk \u4e4b\u524d&#xff0c;\u5fc5\u987b\u5148\u914d\u7f6e\u5e95\u5c42\u6570\u636e\u5b58\u50a8\u3002OpenWhisk \u652f\u6301\u81ea\u7ba1\u7406\u7684 CouchDB \u5b9e\u4f8b&#xff0c;\u6216\u4e91\u7aef\u7684 Cloudant \u670d\u52a1&#xff1b;\u5728\u8f83\u65b0\u7248\u672c\u4e2d&#xff0c;\u4e5f\u652f\u6301 MongoDB \u4f5c\u4e3a\u5b9e\u4f53\u5b58\u50a8\u540e\u7aef\u3002\u8be6\u7ec6\u8bf4\u660e\u89c1\u4ed3\u5e93\u7684 tools\/db\/README.md\u3002<\/p>\n<h4>2.1 \u4f7f\u7528\u81ea\u7ba1\u7406 CouchDB<\/h4>\n<p>\u5982\u679c\u4f7f\u7528\u81ea\u5df1\u5b89\u88c5\u7684 CouchDB&#xff0c;\u8bf7\u8bb0\u5f55\u5176 host\u3001port\u3001username \u4e0e password&#xff0c;\u5e76\u636e\u6b64\u4fee\u6539 openwhisk\/ansible\/db_local.ini\u3002\u5982\u679c\u627e\u4e0d\u5230 db_local.ini&#xff0c;\u8bf7\u5148\u6309 ansible\/README.md \u7684 Setup \u5c0f\u8282 \u751f\u6210\u5b83\u3002\u9700\u8981\u6ee1\u8db3\u4e24\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u7528\u6237\u540d\u5fc5\u987b\u5177\u6709\u7ba1\u7406\u5458\u6743\u9650&#xff1b;<\/li>\n<li>CouchDB \u5b9e\u4f8b\u5fc5\u987b\u53ef\u901a\u8fc7 http \u6216 https \u8bbf\u95ee&#xff08;https \u9700\u8981\u6709\u6548\u8bc1\u4e66&#xff09;\u3002<\/li>\n<\/ul>\n<h4>2.2 \u4f7f\u7528\u4e34\u65f6 CouchDB \u5bb9\u5668&#xff08;\u4ec5\u7528\u4e8e\u4f53\u9a8c&#xff09;<\/h4>\n<p>\u4e0d\u60f3\u81ea\u5efa CouchDB \u65f6&#xff0c;\u53ef\u4ee5\u8ba9\u90e8\u7f72\u6d41\u7a0b\u5728\u5bb9\u5668\u4e2d\u62c9\u8d77\u4e00\u4e2a\u4e34\u65f6 CouchDB\u3002\u5b98\u65b9\u5efa\u8bae\u4ec5\u5c06\u5176\u4f5c\u4e3a\u4e34\u65f6\u65b9\u6848&#xff0c;\u56e0\u4e3a&#xff1a;<\/p>\n<ul>\n<li>\u5bb9\u5668\u5728\u4e24\u6b21\u521b\u5efa\u4e4b\u95f4\u4e0d\u4f1a\u6301\u4e45\u5316\u6570\u636e&#xff1b;<\/li>\n<li>\u6bcf\u6b21 clean \u6216 teardown \u4e4b\u540e\u90fd\u9700\u8981\u91cd\u65b0\u6267\u884c ansible-playbook couchdb.yml&#xff1b;<\/li>\n<li>\u6bcf\u6b21\u90fd\u9700\u8981\u91cd\u65b0\u521d\u59cb\u5316\u6570\u636e\u5b58\u50a8&#xff08;ansible-playbook initdb.yml&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u8be6\u7ec6\u6b65\u9aa4\u89c1 ansible\/README.md\u3002<\/p>\n<h4>2.3 \u4f7f\u7528 Cloudant<\/h4>\n<p>Cloudant \u662f\u57fa\u4e8e\u4e91\u7684\u6570\u636e\u5e93\u670d\u52a1\u3002\u53ef\u4ee5\u901a\u8fc7 IBM Cloud \u6ce8\u518c\u8d26\u6237&#xff0c;\u5e76\u4f7f\u7528 cf \u547d\u4ee4\u884c\u521b\u5efa\u5b9e\u4f8b&#xff1a;<\/p>\n<p># Create a Cloudant service<br \/>\ncf create-service cloudantNoSQLDB Shared cloudant-for-openwhisk<\/p>\n<p># Create Cloudant service keys<br \/>\ncf create-service-key cloudant-for-openwhisk openwhisk<\/p>\n<p># Get Cloudant username and password<br \/>\ncf service-key cloudant-for-openwhisk openwhisk<\/p>\n<p>\u8bb0\u5f55\u6700\u540e\u4e00\u6761\u547d\u4ee4\u8f93\u51fa\u7684 username \u4e0e password&#xff0c;\u7528\u4e8e\u586b\u5199 db_local.ini\u3002Cloudant \u7684\u56fa\u5b9a\u53c2\u6570\u4e3a&#xff1a;<\/p>\n<ul>\n<li>\u534f\u8bae\u59cb\u7ec8\u662f HTTPS&#xff1b;<\/li>\n<li>\u7aef\u53e3\u59cb\u7ec8\u662f 443&#xff1b;<\/li>\n<li>host \u5f62\u5982 &lt;your cloudant user&gt;.cloudant.com\u3002<\/li>\n<\/ul>\n<h4>2.4 \u521d\u59cb\u5316\u6570\u636e\u5e93&#xff08;\u6388\u6743\u5bc6\u94a5&#xff09;<\/h4>\n<p>\u7cfb\u7edf\u9700\u8981\u7279\u5b9a\u7684\u6388\u6743\u5bc6\u94a5\u6765\u5b89\u88c5\u6807\u51c6\u8d44\u6e90&#xff08;\u793a\u4f8b action \u7b49&#xff09;\u5e76\u4e3a\u8fd0\u884c\u6d4b\u8bd5\u63d0\u4f9b guest \u8bbf\u95ee&#xff0c;\u8fd9\u4e9b\u5bc6\u94a5\u79f0\u4e3a immortal keys&#xff1a;<\/p>\n<ul>\n<li>\u4f7f\u7528\u6301\u4e45\u5316\u5b58\u50a8&#xff08;\u5982 Cloudant&#xff09;\u65f6&#xff0c;\u53ea\u9700\u6267\u884c\u4e00\u6b21&#xff1b;<\/li>\n<li>\u4f7f\u7528\u4e34\u65f6 CouchDB \u5bb9\u5668\u65f6&#xff0c;\u6bcf\u6b21 teardown \u540e\u91cd\u65b0\u90e8\u7f72\u90fd\u8981\u6267\u884c\u3002<\/li>\n<\/ul>\n<p># Work out of your openwhisk directory<br \/>\ncd \/your\/path\/to\/openwhisk\/ansible<\/p>\n<p># Initialize data store containing authorization keys<br \/>\nansible-playbook initdb.yml<\/p>\n<p>\u8be5 playbook \u4f1a\u521b\u5efa\u6240\u9700\u7684\u6570\u636e\u7ed3\u6784\u3002\u5373\u4f7f\u4e0d\u786e\u5b9a\u6570\u636e\u5e93\u662f\u5426\u5df2\u521d\u59cb\u5316\u4e5f\u4e0d\u5fc5\u62c5\u5fc3\u2014\u2014\u5bf9\u5df2\u51c6\u5907\u597d\u7684\u6570\u636e\u5e93&#xff0c;playbook \u4e0d\u4f1a\u91cd\u590d\u6267\u884c\u4efb\u4f55\u64cd\u4f5c\u3002\u6267\u884c\u8f93\u51fa\u5927\u81f4\u5982\u4e0b&#xff08;\u4ee5 CouchDB \u4e3a\u4f8b&#xff09;&#xff1a;<\/p>\n<p>PLAY [ansible] *****************************************************************<\/p>\n<p>TASK [setup] *******************************************************************<br \/>\nTuesday 14 June 2016  16:33:51 &#043;0200 (0:00:00.017)       0:00:00.017 **********<br \/>\nok: [ansible]<\/p>\n<p>TASK [include] *****************************************************************<br \/>\nTuesday 14 June 2016  16:33:51 &#043;0200 (0:00:00.262)       0:00:00.280 **********<br \/>\nincluded: \/your\/path\/to\/openwhisk\/ansible\/tasks\/initdb.yml for ansible<\/p>\n<p>TASK [check if the immortal subjects db with CouchDB exists?] ******************<br \/>\nTuesday 14 June 2016  16:33:51 &#043;0200 (0:00:00.060)       0:00:00.340 **********<br \/>\nok: [ansible]<\/p>\n<p>TASK [create immortal subjects db with CouchDB] ********************************<br \/>\nTuesday 14 June 2016  16:33:51 &#043;0200 (0:00:00.329)       0:00:00.670 **********<br \/>\nok: [ansible]<\/p>\n<p>TASK [recreate the &#034;full&#034; index on the &#034;auth&#034; database] ************************<br \/>\nTuesday 14 June 2016  16:33:52 &#043;0200 (0:00:00.166)       0:00:00.837 **********<br \/>\nok: [ansible]<\/p>\n<p>TASK [recreate necessary &#034;auth&#034; keys] ******************************************<br \/>\nTuesday 14 June 2016  16:33:52 &#043;0200 (0:00:00.162)       0:00:01.000 **********<br \/>\nok: [ansible] &#061;&gt; (item&#061;guest)<br \/>\nok: [ansible] &#061;&gt; (item&#061;whisk.system)<\/p>\n<p>PLAY RECAP *********************************************************************<br \/>\nansible                    : ok&#061;6    changed&#061;0    unreachable&#061;0    failed&#061;0<\/p>\n<p>\u53ef\u4ee5\u770b\u5230&#xff0c;initdb \u4f1a\u521b\u5efa subjects \u6570\u636e\u5e93\u5e76\u5199\u5165 guest \u4e0e whisk.system \u4e24\u4e2a\u6388\u6743\u5bc6\u94a5&#xff0c;\u8fd9\u4e0e ansible\/files\/auth.guest \u4e2d guest \u8d26\u6237\u7684\u5bc6\u94a5\u76f8\u5bf9\u5e94\u3002<\/p>\n<h4>2.5 \u6570\u636e\u5e93\u5907\u4efd\u4e0e schema \u8fc1\u79fb&#xff08;\u751f\u4ea7\u73af\u5883\u5efa\u8bae&#xff09;<\/h4>\n<p>tools\/db\/README.md \u8fd8\u63d0\u4f9b\u4e86\u4e24\u4e2a\u8fd0\u7ef4\u5de5\u5177&#xff1a;<\/p>\n<ul>\n<li>replicateDbs.py&#xff1a;\u57fa\u4e8e CouchDB \u590d\u5236\u673a\u5236\u505a\u5feb\u7167\u590d\u5236\u4e0e\u6301\u7eed\u590d\u5236\u3002\u6807\u51c6\u53c2\u6570\u4e3a &#8211;sourceDbUrl \u4e0e &#8211;targetDbUrl&#xff1b;replicate \u547d\u4ee4\u652f\u6301 &#8211;dbPrefix\u3001&#8211;expires&#xff08;\u6309\u79d2\u6e05\u7406\u8fc7\u671f\u5feb\u7167&#xff09;\u4e0e &#8211;continuous&#xff1b;replay \u547d\u4ee4\u5219\u53cd\u5411\u5c06\u5feb\u7167\u56de\u653e\u5230\u751f\u4ea7\u5e93\u3002\u6ce8\u610f\u590d\u5236\u662f\u5f02\u6b65\u7684&#xff0c;\u811a\u672c\u5f88\u5feb\u9000\u51fa&#xff0c;\u4f46\u590d\u5236\u53ef\u80fd\u6301\u7eed\u8f83\u957f\u65f6\u95f4\u3002<\/li>\n<li>moveCodeToAttachment.py&#xff1a;\u4e3a\u964d\u4f4e controller \u5185\u5b58\u5360\u7528&#xff0c;\u5c06\u5185\u8054\u5728 action \u6587\u6863\u4e2d\u7684\u4ee3\u7801\u8fc1\u79fb\u4e3a\u9644\u4ef6&#xff08;attachments&#xff09;&#xff0c;\u4f7f controller \u53ea\u9700\u62c9\u53d6 action \u5143\u6570\u636e\u800c\u975e\u5b8c\u6574\u4ee3\u7801\u3002\u53c2\u6570\u4e3a &#8211;dbUrl \u4e0e &#8211;dbName\u3002<\/li>\n<\/ul>\n<h3>\u4e09\u3001\u6784\u5efa&#xff1a;.\/gradlew distDocker<\/h3>\n<p>\u8fdb\u5165\u6e90\u7801\u6839\u76ee\u5f55\u540e&#xff0c;\u6267\u884c Gradle \u6784\u5efa\u547d\u4ee4&#xff0c;\u751f\u6210 OpenWhisk \u5404\u7ec4\u4ef6\u7684 Docker \u955c\u50cf&#xff1a;<\/p>\n<p>cd &lt;home_openwhisk&gt;<br \/>\n.\/gradlew distDocker<\/p>\n<p>\u5176\u4e2d &lt;home_openwhisk&gt; \u5373\u4f60\u7684 OpenWhisk \u6e90\u7801\u6839\u76ee\u5f55\u3002distDocker \u662f\u4ed3\u5e93 gradle\/docker.gradle \u5b9a\u4e49\u7684\u6838\u5fc3\u6784\u5efa\u4efb\u52a1&#xff0c;\u5b83\u4f1a\u4e3a controller\u3001invoker\u3001scheduler \u7b49\u6838\u5fc3\u7ec4\u4ef6\u6784\u5efa\u5e76\u6253\u4e0a latest \u6807\u7b7e\u7684\u955c\u50cf&#xff08;\u6784\u5efa\u65f6\u53ef\u901a\u8fc7 -PdockerImageTag&#061;xxx \u6307\u5b9a\u81ea\u5b9a\u4e49\u955c\u50cf\u6807\u7b7e&#xff0c;\u540e\u7eed Ansible \u7528 -e docker_image_tag&#061;xxx \u5f15\u7528&#xff09;\u3002<\/p>\n<p>\u5e38\u89c1\u6784\u5efa\u5931\u8d25\u4e0e\u89e3\u51b3\u529e\u6cd5&#xff1a;\u5982\u679c\u6784\u5efa\u62a5\u9519 Exception in thread &#034;main&#034; javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty&#xff0c;\u8bf4\u660e\u7cfb\u7edf CA \u8bc1\u4e66\u4fe1\u4efb\u951a\u70b9\u5f02\u5e38&#xff0c;\u53ef\u6267\u884c&#xff1a;<\/p>\n<p>sudo update-ca-certificates -f<\/p>\n<p>\u518d\u91cd\u65b0\u6784\u5efa\u3002<\/p>\n<h3>\u56db\u3001\u90e8\u7f72&#xff1a;\u57fa\u4e8e Ansible \u7684 openwhisk.yml \u6d41\u7a0b<\/h3>\n<h4>4.1 \u90e8\u7f72\u5165\u53e3<\/h4>\n<p>\u6784\u5efa\u5b8c\u6210\u540e&#xff0c;\u6309 ansible\/README.md \u7684\u8bf4\u660e&#xff0c;\u5728\u5355\u673a\u6216 VM \u4e0a\u5b8c\u6210\u90e8\u7f72\u4e0e\u5378\u8f7d\u3002\u90e8\u7f72\u6210\u529f\u540e&#xff0c;\u4f60\u7684\u673a\u5668\u4e0a\u4f1a\u8fd0\u884c\u591a\u4e2a Docker \u5bb9\u5668&#xff0c;\u53ef\u7528 docker ps \u67e5\u770b\u3002<\/p>\n<h4>4.2 Setup&#xff1a;\u751f\u6210 hosts \u4e0e db_local.ini<\/h4>\n<p>\u6240\u6709 Ansible \u547d\u4ee4\u90fd\u5fc5\u987b\u5728 ansible \u76ee\u5f55\u4e0b\u6267\u884c&#xff0c;\u56e0\u4e3a ansible.cfg \u63d0\u4f9b\u4e86\u901a\u7528\u8bbe\u7f6e\u3002\u5148\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf&#xff1a;<\/p>\n<p>ENVIRONMENT&#061;local  # \u6216 docker-machine \/ jenkins \/ vagrant<\/p>\n<p>local \u662f\u9ed8\u8ba4\u73af\u5883&#xff0c;\u9002\u7528\u4e8e Ubuntu \u4e0e Docker for Mac&#xff0c;\u53ef\u7701\u7565 -i \u53c2\u6570&#xff1b;\u8f83\u8001\u7684 Mac &#043; Docker Machine \u90e8\u7f72\u4f7f\u7528 -i environments\/docker-machine\u3002<\/p>\n<p>Step 1 \u2014 \u751f\u6210 hosts \u6587\u4ef6&#xff08;\u6bcf\u4e2a\u5f00\u53d1\u73af\u5883\u53ea\u9700\u6267\u884c\u4e00\u6b21&#xff09;&#xff1a;<\/p>\n<p>ansible-playbook -i environments\/$ENVIRONMENT setup.yml<\/p>\n<p>\u5b83\u4f1a\u57fa\u4e8e\u73af\u5883\u8bbe\u7f6e\u751f\u6210 hosts \u914d\u7f6e&#xff08;\u4e34\u65f6 CouchDB \u5b9e\u4f8b\u7684 hosts \u6587\u4ef6\u4f1a\u5728 setup.yml \u4e2d\u81ea\u52a8\u751f\u6210&#xff09;\u3002\u9ed8\u8ba4\u914d\u7f6e\u4e0d\u4f1a\u8fd0\u884c\u591a\u4e2a\u6838\u5fc3\u7ec4\u4ef6\u5b9e\u4f8b&#xff1b;\u5982\u9700\u542f\u7528\u9ad8\u53ef\u7528&#xff08;HA&#xff09;\u6a21\u5f0f&#xff0c;\u53ef\u9644\u52a0 -e mode&#061;HA&#xff0c;\u4ece\u800c\u90e8\u7f72\u4e24\u4e2a Kafka \u4e0e\u4e24\u4e2a invoker \u7b49\u3002\u4ece ansible\/environments\/local\/hosts.j2.ini \u6a21\u677f\u53ef\u4ee5\u770b\u5230&#xff0c;HA \u6a21\u5f0f\u4e0b controllers\u3001kafkas\u3001invokers\u3001schedulers \u7ec4\u90fd\u4f1a\u591a\u51fa\u4e00\u53f0\u4e3b\u673a&#xff08;\u5982 controller1\u3001kafka1\u3001invoker1&#xff09;\u3002<\/p>\n<p>Step 2 \u2014 \u914d\u7f6e\u6570\u636e\u5e93&#xff1a;\u4fee\u6539 ansible\/db_local.ini \u63d0\u4f9b\u4ee5\u4e0b\u5c5e\u6027&#xff1a;<\/p>\n<p>[db_creds]<br \/>\ndb_provider&#061;<br \/>\ndb_username&#061;<br \/>\ndb_password&#061;<br \/>\ndb_protocol&#061;<br \/>\ndb_host&#061;<br \/>\ndb_port&#061;<\/p>\n<p>\u66f4\u65b9\u4fbf\u7684\u505a\u6cd5\u662f\u7528\u73af\u5883\u53d8\u91cf\u9a71\u52a8 playbook \u751f\u6210 db_local.ini&#xff1a;<\/p>\n<p>export OW_DB&#061;CouchDB<br \/>\nexport OW_DB_USERNAME&#061;&lt;your couchdb user&gt;<br \/>\nexport OW_DB_PASSWORD&#061;&lt;your couchdb password&gt;<br \/>\nexport OW_DB_PROTOCOL&#061;&lt;your couchdb protocol&gt;<br \/>\nexport OW_DB_HOST&#061;&lt;your couchdb host&gt;<br \/>\nexport OW_DB_PORT&#061;&lt;your couchdb port&gt;<\/p>\n<p>ansible-playbook -i environments\/$ENVIRONMENT setup.yml<\/p>\n<p>\u4f7f\u7528 Cloudant \u65f6\u7684\u5bf9\u5e94\u5199\u6cd5&#xff1a;<\/p>\n<p>export OW_DB&#061;Cloudant<br \/>\nexport OW_DB_USERNAME&#061;&lt;your cloudant user&gt;<br \/>\nexport OW_DB_PASSWORD&#061;&lt;your cloudant password&gt;<br \/>\nexport OW_DB_PROTOCOL&#061;https<br \/>\nexport OW_DB_HOST&#061;&lt;your cloudant user&gt;.cloudant.com<br \/>\nexport OW_DB_PORT&#061;443<\/p>\n<p>ansible-playbook -i environments\/$ENVIRONMENT setup.yml<\/p>\n<p>\u5c0f\u8d34\u58eb&#xff1a;\u672c\u5730\u5f00\u53d1\u65f6&#xff0c;\u914d\u7f6e\u4e0e\u65e5\u5fd7\u76ee\u5f55\u9ed8\u8ba4\u5b58\u653e\u5728 \/tmp&#xff08;\u89c1 ansible\/environments\/local\/group_vars\/all \u4e2d openwhisk_tmp_dir \u7684\u903b\u8f91&#xff09;\u3002Linux \u4e0e Mac \u4f1a\u5728\u91cd\u542f\u65f6\u6e05\u7a7a \/tmp&#xff0c;\u5bfc\u81f4 OpenWhisk \u65e0\u6cd5\u518d\u6b21\u542f\u52a8\u3002\u4e3a\u907f\u514d\u8be5\u95ee\u9898&#xff0c;\u8bf7\u5728\u90e8\u7f72\u524d\u5bfc\u51fa OPENWHISK_TMP_DIR \u6307\u5411\u6301\u4e45\u5316\u76ee\u5f55\u3002<\/p>\n<p>Step 3&#xff08;\u53ef\u9009&#xff09;&#xff1a;\u975e\u672c\u5730\u73af\u5883\u9700\u8981\u5b89\u88c5\u524d\u7f6e\u4f9d\u8d56&#xff1a;<\/p>\n<p>ansible-playbook -i environments\/$ENVIRONMENT prereq.yml<\/p>\n<p>\u672c\u5730\u73af\u5883\u7684\u524d\u7f6e\u4f9d\u8d56\u5df2\u5c31\u7eea&#xff0c;\u53ef\u8df3\u8fc7\u3002\u6267\u884c\u65f6 TASK [prereq : check for pip] \u663e\u793a\u5931\u8d25\u662f\u6b63\u5e38\u73b0\u8c61&#xff08;\u672a\u88c5 pip \u65f6\u4f1a\u5148\u5b89\u88c5&#xff09;\u3002<\/p>\n<h4>4.3 \u57fa\u4e8e CouchDB \u7684\u5b8c\u6574\u90e8\u7f72\u547d\u4ee4\u5e8f\u5217<\/h4>\n<p>cd &lt;openwhisk_home&gt;<br \/>\n.\/gradlew distDocker<br \/>\ncd ansible<br \/>\nansible-playbook -i environments\/$ENVIRONMENT couchdb.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT initdb.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT wipe.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT openwhisk.yml<\/p>\n<p># installs a catalog of public packages and actions<br \/>\nansible-playbook -i environments\/$ENVIRONMENT postdeploy.yml<\/p>\n<p># to use the API gateway<br \/>\nansible-playbook -i environments\/$ENVIRONMENT apigateway.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT routemgmt.yml<\/p>\n<p>\u5404 playbook \u8981\u70b9&#xff1a;<\/p>\n<ul>\n<li>couchdb.yml&#xff1a;\u90e8\u7f72 CouchDB&#xff08;\u4e34\u65f6\u5bb9\u5668\u65b9\u6848\u65f6\u6bcf\u6b21 clean\/teardown \u540e\u90fd\u8981\u91cd\u8dd1&#xff09;&#xff1b;<\/li>\n<li>initdb.yml&#xff1a;\u6bcf\u6b21\u5168\u65b0\u90e8\u7f72 CouchDB \u65f6\u90fd\u8981\u8fd0\u884c&#xff0c;\u7528\u4e8e\u521d\u59cb\u5316 subjects \u6570\u636e\u5e93&#xff08;\u5df2\u521d\u59cb\u5316\u8fc7\u5219\u81ea\u52a8\u8df3\u8fc7&#xff09;&#xff1b;<\/li>\n<li>wipe.yml&#xff1a;\u4ec5\u5e94\u5728\u5168\u65b0\u90e8\u7f72\u65f6\u8fd0\u884c&#xff0c;\u5426\u5219\u4f1a\u4e22\u5931\u5df2\u6709 action \u4e0e activation \u6570\u636e&#xff1b;<\/li>\n<li>postdeploy.yml&#xff1a;\u90e8\u7f72\u540e\u5b89\u88c5\u516c\u5171\u5305&#xff08;catalog&#xff09;\u4e0e\u793a\u4f8b action&#xff1b;<\/li>\n<li>apigateway.yml \/ routemgmt.yml&#xff1a;\u542f\u7528 API \u7f51\u5173\u4e0e\u8def\u7531\u7ba1\u7406&#xff1b;<\/li>\n<li>\u82e5\u53ea\u662f\u91cd\u542f\u64cd\u4f5c\u7cfb\u7edf\u540e\u6062\u590d\u670d\u52a1&#xff0c;\u76f4\u63a5\u8fd0\u884c ansible-playbook -i environments\/$ENVIRONMENT openwhisk.yml \u5373\u53ef&#xff0c;\u4e0d\u4f1a\u6e05\u7a7a\u6570\u636e\u5b58\u50a8\u3002<\/li>\n<\/ul>\n<p>\u9650\u5236\u8bf4\u660e&#xff1a;\u5355\u53f0\u673a\u5668\u4e0a\u65e0\u6cd5\u8fd0\u884c\u591a\u4e2a CouchDB \u8282\u70b9\u2014\u2014CouchDB \u4f9d\u8d56 Erlang EPMD \u53d1\u73b0\u5176\u4ed6\u8282\u70b9&#xff0c;\u591a\u8282\u70b9\u5e94\u5206\u522b\u90e8\u7f72\u5728\u4e0d\u540c\u673a\u5668\u4e0a&#xff0c;\u5426\u5219\u7aef\u53e3\u4f1a\u51b2\u7a81\u3002<\/p>\n<h4>4.4 \u57fa\u4e8e Cloudant \u7684\u90e8\u7f72\u547d\u4ee4\u5e8f\u5217<\/h4>\n<p>cd &lt;openwhisk_home&gt;<br \/>\n.\/gradlew distDocker<br \/>\ncd ansible<br \/>\nansible-playbook -i environments\/$ENVIRONMENT initdb.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT wipe.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT apigateway.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT openwhisk.yml<\/p>\n<p># installs a catalog of public packages and actions<br \/>\nansible-playbook -i environments\/$ENVIRONMENT postdeploy.yml<\/p>\n<p># to use the API gateway<br \/>\nansible-playbook -i environments\/$ENVIRONMENT apigateway.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT routemgmt.yml<\/p>\n<p>\u4e0e CouchDB \u5e8f\u5217\u7684\u5173\u952e\u5dee\u5f02&#xff1a;initdb \u6bcf\u4e2a Cloudant \u6570\u636e\u5e93\u53ea\u9700\u8fd0\u884c\u4e00\u6b21&#xff0c;\u4e14 initdb.yml \u53ea\u521d\u59cb\u5316\u672a\u521d\u59cb\u5316\u7684\u5e93&#xff0c;\u5176\u4f59\u89c4\u5219\u4e0e\u4e0a\u4e00\u8282\u4e00\u81f4\u3002<\/p>\n<h4>4.5 \u57fa\u4e8e MongoDB \u7684\u90e8\u7f72\u547d\u4ee4\u5e8f\u5217<\/h4>\n<p>\u8f83\u65b0\u7248\u672c\u652f\u6301\u4ee5 MongoDB \u66ff\u4ee3 CouchDB \u5b58\u50a8\u5b9e\u4f53\u3002\u5148\u90e8\u7f72 MongoDB \u670d\u52a1&#xff08;\u4ec5\u6d4b\u8bd5\u5f00\u53d1\u7528&#xff0c;\u751f\u4ea7\u5efa\u8bae\u4f7f\u7528\u5916\u90e8 MongoDB \u670d\u52a1\u5668&#xff1b;\u9700\u5148 pip install pymongo&#xff09;&#xff1a;<\/p>\n<p>ansible-playbook -i environments\/&lt;environment&gt; mongodb.yml -e mongodb_data_volume&#061;&#034;\/tmp\/mongo-data&#034;<\/p>\n<p>\u7136\u540e\u6267\u884c&#xff1a;<\/p>\n<p>cd &lt;openwhisk_home&gt;<br \/>\n.\/gradlew distDocker<br \/>\ncd ansible<br \/>\nansible-playbook -i environments\/&lt;environment&gt; initMongodb.yml -e mongodb_connect_string&#061;&#034;mongodb:\/\/172.17.0.1:27017&#034;<br \/>\nansible-playbook -i environments\/&lt;environment&gt; apigateway.yml -e mongodb_connect_string&#061;&#034;mongodb:\/\/172.17.0.1:27017&#034;<br \/>\nansible-playbook -i environments\/&lt;environment&gt; openwhisk.yml -e mongodb_connect_string&#061;&#034;mongodb:\/\/172.17.0.1:27017&#034; -e db_artifact_backend&#061;&#034;MongoDB&#034;<\/p>\n<p># installs a catalog of public packages and actions<br \/>\nansible-playbook -i environments\/&lt;environment&gt; postdeploy.yml<\/p>\n<p># to use the API gateway<br \/>\nansible-playbook -i environments\/&lt;environment&gt; apigateway.yml<br \/>\nansible-playbook -i environments\/&lt;environment&gt; routemgmt.yml<\/p>\n<p>\u53ef\u7528\u7684 MongoDB \u53c2\u6570\u4e3a&#xff1a;<\/p>\n<p>mongodb:<br \/>\n  connect_string: &#034;{{ mongodb_connect_string }}&#034;<br \/>\n  database: &#034;{{ mongodb_database | default(&#039;whisks&#039;) }}&#034;<br \/>\n  data_volume: &#034;{{ mongodb_data_volume | default(&#039;mongo-data&#039;) }}&#034;<\/p>\n<h4>4.6 \u4f7f\u7528 ElasticSearch \u5b58\u50a8 activations<\/h4>\n<p>\u4f60\u53ef\u4ee5\u7528 ElasticSearch&#xff08;ES&#xff09;\u5355\u72ec\u5b58\u50a8 activation \u8bb0\u5f55&#xff0c;\u5176\u4f59\u5b9e\u4f53\u4ecd\u5b58\u4e8e CouchDB\u3002\u4ed3\u5e93\u63d0\u4f9b elasticsearch.yml \u7528\u4e8e\u642d\u5efa\u6d4b\u8bd5\/\u5f00\u53d1\u7528\u7684\u7b80\u5355 ES \u96c6\u7fa4\u3002\u81ea\u5b9a\u4e49 ES \u53c2\u6570\u793a\u4f8b&#xff1a;<\/p>\n<p>elastic_protocol&#061;&#034;http&#034;<br \/>\nelastic_index_pattern&#061;&#034;openwhisk-%s&#034; \/\/ \u4f1a\u4e0e namespace \u540d\u7ec4\u5408&#xff0c;\u4e0d\u540c namespace \u4f7f\u7528\u4e0d\u540c index<br \/>\nelastic_base_volume&#061;&#034;esdata&#034; \/\/ \u5b58\u653e ES \u6570\u636e\u7684 docker volume \u540d\u79f0<br \/>\nelastic_cluster_name&#061;&#034;openwhisk&#034;<br \/>\nelastic_java_opts&#061;&#034;-Xms1g -Xmx1g&#034;<br \/>\nelastic_loglevel&#061;&#034;INFO&#034;<br \/>\nelastic_username&#061;&#034;admin&#034;<br \/>\nelastic_password&#061;&#034;admin&#034;<br \/>\nelasticsearch_connect_string&#061;&#034;x.x.x.x:9200,y.y.y.y:9200&#034; \/\/ \u82e5\u4f7f\u7528\u5916\u90e8 ES \u96c6\u7fa4\u5219\u586b\u5199<\/p>\n<p>\u90e8\u7f72\u5e8f\u5217&#xff1a;<\/p>\n<p>cd &lt;openwhisk_home&gt;<br \/>\n.\/gradlew distDocker<br \/>\ncd ansible<br \/>\n# couchdb \u4ecd\u7136\u7528\u4e8e\u5b58\u50a8 subjects \u4e0e actions<br \/>\nansible-playbook -i environments\/$ENVIRONMENT couchdb.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT initdb.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT wipe.yml<br \/>\n# \u90e8\u7f72\u4e00\u4e2a\u7b80\u5355\u7684 ES \u96c6\u7fa4&#xff0c;\u4f7f\u7528\u5916\u90e8 ES \u96c6\u7fa4\u65f6\u53ef\u8df3\u8fc7<br \/>\nansible-playbook -i environments\/$ENVIRONMENT elasticsearch.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT openwhisk.yml -e db_activation_backend&#061;ElasticSearch<\/p>\n<p># installs a catalog of public packages and actions<br \/>\nansible-playbook -i environments\/$ENVIRONMENT postdeploy.yml<\/p>\n<p># to use the API gateway<br \/>\nansible-playbook -i environments\/$ENVIRONMENT apigateway.yml<br \/>\nansible-playbook -i environments\/$ENVIRONMENT routemgmt.yml<\/p>\n<h4>4.7 \u5355\u7ec4\u4ef6\u70ed\u66ff\u6362\u3001\u6e05\u7406\u4e0e\u5378\u8f7d<\/h4>\n<ul>\n<li>\n<p>\u70ed\u66ff\u6362\u5355\u4e2a\u7ec4\u4ef6&#xff1a;\u4f8b\u5982\u91cd\u65b0\u6784\u5efa invoker \u955c\u50cf\u540e\u53ea\u91cd\u90e8\u7f72 invoker&#xff1a;<\/p>\n<p> cd &lt;openwhisk_home&gt;<br \/>\n.\/gradlew :core:invoker:distDocker -PdockerImageTag&#061;myNewInvoker<\/p>\n<p>cd ansible<br \/>\nansible-playbook -i environments\/$ENVIRONMENT invoker.yml -e docker_image_tag&#061;myNewInvoker<\/p>\n<p>\u7701\u7565\u955c\u50cf\u6807\u7b7e\u53c2\u6570\u65f6\u9ed8\u8ba4\u4f7f\u7528 latest\u3002\u82e5\u53ea\u6e05\u7406 controller&#xff1a;<\/p>\n<p> cd ansible<br \/>\nansible-playbook -i environments\/$ENVIRONMENT controller.yml -e mode&#061;clean<\/p>\n<p>\u6ce8\u610f&#xff1a;\u5728\u5206\u5e03\u5f0f\u73af\u5883\u4e2d&#xff0c;\u67d0\u4e9b\u7ec4\u4ef6&#xff08;\u5982 invoker&#xff09;\u5b58\u5728\u4e8e\u591a\u53f0\u673a\u5668\u4e0a&#xff0c;\u8fd0\u884c\u5176 playbook \u4f1a\u5728\u8be5\u7ec4\u4ef6 playbook \u6307\u5411\u7684\u6240\u6709\u4e3b\u673a\u4e0a\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>\u6e05\u7406\u6574\u4e2a\u90e8\u7f72&#xff1a;<\/p>\n<p> ansible-playbook -i environments\/$ENVIRONMENT openwhisk.yml -e mode&#061;clean\n <\/li>\n<li>\n<p>\u79fb\u9664\u76ee\u6807\u73af\u5883\u7684\u6240\u6709\u524d\u7f6e\u4f9d\u8d56&#xff08;\u901a\u5e38\u4e0d\u5fc5\u8981&#xff09;&#xff1a;<\/p>\n<p> ansible-playbook -i environments\/$ENVIRONMENT prereq.yml -e mode&#061;clean\n <\/li>\n<li>\n<p>\u7cbe\u7b80\u6a21\u5f0f&#xff08;Lean&#xff09;&#xff1a;\u4e0d\u90e8\u7f72 Kafka\u3001Zookeeper \u53ca\u72ec\u7acb invoker \u65f6&#xff0c;\u628a openwhisk.yml \u66ff\u6362\u4e3a&#xff1a;<\/p>\n<p> ansible-playbook -i environments\/$ENVIRONMENT openwhisk.yml -e lean&#061;true\n <\/li>\n<\/ul>\n<h4>4.8 \u90e8\u7f72\u540e\u7684\u7cfb\u7edf\u9650\u5236&#xff08;limits&#xff09;<\/h4>\n<p>\u7cfb\u7edf\u9ed8\u8ba4\u7684\u8282\u6d41&#xff08;throttling&#xff09;\u9650\u5236\u914d\u7f6e\u5728 ansible\/group_vars\/all \u4e2d&#xff0c;\u53ef\u6309\u73af\u5883\u8986\u76d6&#xff1a;<\/p>\n<p>limits:<br \/>\n  invocationsPerMinute: &#034;{{ limit_invocations_per_minute | default(60) }}&#034;<br \/>\n  concurrentInvocations: &#034;{{ limit_invocations_concurrent | default(30) }}&#034;<br \/>\n  firesPerMinute: &#034;{{ limit_fires_per_minute | default(60) }}&#034;<br \/>\n  sequenceMaxLength: &#034;{{ limit_sequence_max_length | default(50) }}&#034;<\/p>\n<p>\u542b\u4e49\u5206\u522b\u4e3a&#xff1a;\u6bcf\u4e2a namespace \u6bcf\u5206\u949f\u5141\u8bb8\u7684 action \u8c03\u7528\u6b21\u6570\u3001\u5141\u8bb8\u7684\u6700\u5927\u5e76\u53d1\u8c03\u7528\u6570\u3001\u6bcf\u5206\u949f\u5141\u8bb8\u7684 trigger \u89e6\u53d1\u6b21\u6570\u3001sequence action \u7684\u6700\u5927\u957f\u5ea6\u3002<\/p>\n<h4>4.9 \u5e38\u89c1\u6545\u969c\u6392\u67e5<\/h4>\n<ul>\n<li>\n<p>setuptools \u7248\u672c\u4e0d\u5339\u914d&#xff1a;\u51fa\u73b0 ERROR! Unexpected Exception: &#8230; Requirement.parse(&#039;setuptools&gt;&#061;11.3&#039;)) \u65f6\u5347\u7ea7 setuptools&#xff1a;<\/p>\n<p> pip install &#8211;upgrade setuptools &#8211;user python\n <\/li>\n<li>\n<p>\u8def\u5f84\u542b\u7a7a\u683c&#xff1a;Ansible 2.1.0.0 \u53ca\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u8def\u5f84\u4e2d\u7684\u7a7a\u683c&#xff0c;\u62a5\u9519 fatal: [ansible]: FAILED! &#061;&gt; {&#034;failed&#034;: true, &#034;msg&#034;: &#034;need more than 1 value to unpack&#034;} \u65f6&#xff0c;\u8bf7\u628a\u6e90\u7801\u6811\u653e\u5230\u4e0d\u542b\u7a7a\u683c\u7684\u8def\u5f84\u4e0b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bb9\u5668\u65f6\u533a&#xff1a;\u6240\u6709\u7cfb\u7edf\u5bb9\u5668\u9ed8\u8ba4\u65f6\u533a\u4e3a UTC&#xff0c;\u53ef\u901a\u8fc7 ansible\/group_vars\/all \u5168\u5c40\u914d\u7f6e&#xff0c;\u6216\u8fd0\u884c playbook \u65f6\u9644\u52a0 -e docker_timezone&#061;xxx \u8986\u76d6\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u914d\u7f6e wsk CLI \u5e76\u9a8c\u8bc1\u90e8\u7f72<\/h3>\n<h4>5.1 \u914d\u7f6e API host \u4e0e\u6388\u6743\u5bc6\u94a5<\/h4>\n<p>\u90e8\u7f72\u5b8c\u6210\u540e&#xff0c;OpenWhisk CLI&#xff08;wsk&#xff09;\u4f4d\u4e8e openwhisk\/bin\/ \u4e0b&#xff08;\u5176\u4ed6\u5e73\u53f0\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5728 bin\/mac\/\u3001bin\/linux\/\u3001bin\/windows\/&#xff09;\u3002\u914d\u7f6e CLI \u9700\u8981\u4e24\u4e2a\u5c5e\u6027&#xff1a;API host \u4e0e\u6388\u6743\u5bc6\u94a5\u3002API host \u53ef\u4ece\u90e8\u7f72\u751f\u6210\u7684 whisk.properties \u7684 edge.host \u5c5e\u6027\u83b7\u53d6&#xff1b;\u672c\u5730\u90e8\u7f72\u65f6&#xff0c;\u5b83\u901a\u5e38\u662f 172.17.0.1&#xff0c;\u5373 ansible\/environments\/local\/hosts.j2.ini \u4e2d [edge] \u7ec4\u7684 IP&#xff08;\u5bf9\u5e94 docker0 \u7f51\u6865\u5730\u5740&#xff0c;docs\/cli.md \u4ea6\u660e\u786e API host \u5e94\u4e3a edge host \u7684 IP&#xff09;\u3002<\/p>\n<p># \u4ece openwhisk \u76ee\u5f55\u8fd0\u884c&#xff0c;\u8bbe\u7f6e API host<br \/>\n.\/bin\/wsk property set &#8211;apihost &lt;openwhisk_baseurl&gt;<\/p>\n<p># \u672c\u5730\u90e8\u7f72\u5e26\u81ea\u7b7e\u540d SSL \u8bc1\u4e66\u65f6&#xff0c;\u53ef\u9644\u52a0 &#8211;insecure \u8df3\u8fc7\u8bc1\u4e66\u6821\u9a8c<\/p>\n<p># \u914d\u7f6e guest \u8d26\u6237\u6388\u6743\u5bc6\u94a5<br \/>\n.\/bin\/wsk property set &#8211;auth &#096;cat ansible\/files\/auth.guest&#096;<\/p>\n<p>CLI \u5c5e\u6027\u9ed8\u8ba4\u4fdd\u5b58\u5728 ~\/.wskprops&#xff0c;\u53ef\u7528\u73af\u5883\u53d8\u91cf WSK_CONFIG_FILE \u6539\u53d8\u5176\u4f4d\u7f6e\u3002.wskprops \u4e2d\u7684\u5173\u952e\u952e\u4e3a APIHOST&#xff08;API host&#xff09;\u4e0e AUTH&#xff08;\u6388\u6743\u5bc6\u94a5&#xff09;\u3002\u53ef\u9009\u952e\u8fd8\u5305\u62ec APIGW_ACCESS_TOKEN&#xff08;\u72ec\u7acb\u6258\u7ba1\u7684 API Gateway \u670d\u52a1\u7684\u6388\u6743\u4ee4\u724c&#xff09;\u4e0e APIGW_TENANT_ID&#xff08;API \u7aef\u70b9\u5f52\u5c5e\u7684\u79df\u6237\u6807\u8bc6&#xff09;\u3002<\/p>\n<p>\u63d0\u793a&#xff1a;\u547d\u4ee4\u884c\u8865\u5168\u9700\u8981 bash 4.1 \u53ca\u4ee5\u4e0a\u7248\u672c&#xff0c;docs\/cli.md \u5bf9 Mac \u7528\u6237\u7ed9\u51fa\u4e86 brew install bash \u7684\u5347\u7ea7\u5efa\u8bae\u3002<\/p>\n<h4>5.2 \u8c03\u7528\u7b2c\u4e00\u4e2a action \u9a8c\u8bc1\u5168\u94fe\u8def<\/h4>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u8c03\u7528\u5185\u7f6e\u7684 echo action \u9a8c\u8bc1\u6574\u6761\u90e8\u7f72\u94fe\u8def&#xff1a;<\/p>\n<p>bin\/wsk action invoke \/whisk.system\/utils\/echo -p message hello &#8211;result<br \/>\n{<br \/>\n    &#034;message&#034;: &#034;hello&#034;<br \/>\n}<\/p>\n<p>\u8be5\u547d\u4ee4\u5411 \/whisk.system\/utils\/echo \u53d1\u9001\u5e26\u53c2\u6570 message&#061;hello \u7684\u8c03\u7528\u8bf7\u6c42&#xff0c;&#8211;result \u8868\u793a\u53ea\u8f93\u51fa action \u7684\u8fd4\u56de\u7ed3\u679c\u3002\u80fd\u6b63\u5e38\u5f97\u5230 {&#034;message&#034;: &#034;hello&#034;}&#xff0c;\u5373\u8bf4\u660e&#xff1a;\u6e90\u7801\u6784\u5efa\u6210\u529f\u3001\u955c\u50cf\u5df2\u90e8\u7f72\u3001controller \u4e0e invoker \u6b63\u5e38\u534f\u4f5c\u3001action \u6267\u884c\u94fe\u8def&#xff08;\u901a\u8fc7 Kafka \u6d88\u606f\u961f\u5217\u5206\u53d1\u5230\u5bb9\u5668\u6c60&#xff09;\u5b8c\u5168\u6253\u901a\u3002\u66f4\u591a CLI \u7528\u6cd5\u53ef\u53c2\u8003 docs\/cli.md \u4e0e docs\/samples.md\u3002<\/p>\n<h3>\u516d\u3001\u4ece\u5355\u673a\u5230\u591a\u673a\u5206\u5e03\u5f0f\u90e8\u7f72\u7684\u8981\u70b9<\/h3>\n<p>\u672c\u6587\u7684\u5b89\u88c5\u547d\u4ee4\u9ed8\u8ba4\u9762\u5411\u5355\u673a\/\u5355 VM \u90e8\u7f72&#xff1b;\u82e5\u8981\u505a\u591a VM \u5206\u5e03\u5f0f\u90e8\u7f72&#xff1a;<\/p>\n<li>\u5728 bootstrapper&#xff08;\u5efa\u8bae\u662f IaaS \u4e2d\u7684 Ubuntu 18.04 VM&#xff09;\u4e0a\u6267\u884c tools\/ubuntu-setup \u7684\u5168\u90e8\u5b89\u88c5\u811a\u672c&#xff1b;<\/li>\n<li>\u901a\u8fc7 setup.yml \u751f\u6210\u9762\u5411\u591a\u673a\u7684 hosts \u6e05\u5355&#xff08;\u5bf9\u5e94 ansible\/environments \u4e0b\u7684\u5404\u73af\u5883\u6a21\u677f&#xff0c;\u5982 docker-machine\u3001jenkins\u3001vagrant&#xff0c;\u7ed3\u6784\u53ef\u53c2\u8003 ansible\/environments\/local\/hosts.j2.ini&#xff09;&#xff1b;<\/li>\n<li>\u5728 group_vars \u4e2d\u6309\u76ee\u6807\u73af\u5883\u8986\u76d6 db \u51ed\u636e\u3001limits\u3001\u65f6\u533a\u7b49\u53c2\u6570&#xff1b;<\/li>\n<li>\u5404\u7ec4\u4ef6 playbook \u4f1a\u6309 hosts \u5206\u7ec4\u628a controller\u3001invoker\u3001kafka\u3001zookeeper \u7b49\u5206\u522b\u90e8\u7f72\u5230\u5bf9\u5e94\u673a\u5668\u3002<\/li>\n<p>\u7ec4\u4ef6\u89d2\u8272\u7684\u5212\u5206\u4e0e\u90e8\u7f72\u7ec6\u8282\u53ef\u7ee7\u7eed\u9605\u8bfb ansible\/README.md\u3001docs\/deploy.md \u4ee5\u53ca docs\/modules.md&#xff0c;\u5176\u4e2d docs\/modules.md \u4ece\u67b6\u6784\u5c42\u9762\u8bf4\u660e\u4e86\u5404\u6a21\u5757&#xff08;controller\u3001invoker\u3001scheduler \u7b49&#xff09;\u7684\u804c\u8d23\u4e0e\u76f8\u4e92\u534f\u4f5c\u5173\u7cfb\u3002<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" class=\"gcb-icon-like\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261009074854-6ac89c66a61d0.svg\" alt=\"\" width=\"16\" height=\"16\" \/> <span class=\"gcb-like-text\">\u8d5e<\/span>  <\/p>\n<p>   <span class=\"gcb-share-text\">\u5206\u4eab<\/span>  <\/p>\n<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u4e91\u539f\u751f<\/span><\/li>\n<li><span class=\"gcb-tag\">\u540e\u7aef<\/span><\/li>\n<li><span class=\"gcb-tag\">\u5fae\u670d\u52a1<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011openwhisk<\/h3>\n<p class=\"gcb-project-desc\">Apache OpenWhisk is an open source serverless cloud platform<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/op\/openwhisk<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<h4 class=\"gcb-related-title\">\u76f8\u5173\u63a8\u8350<\/h4>\n<ul class=\"gcb-related-list\">\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">FaceAI\u5728Ubuntu\u90e8\u7f72\u5b8c\u6574\u6307\u5357&#xff1a;\u4ece\u6e90\u7801\u7f16\u8bd1\u5230\u4eba\u8138\u8bc6\u522b\u670d\u52a1\u642d\u5efa\u768410\u4e2a\u5173\u952e\u6b65\u9aa4<\/h5>\n<p class=\"gcb-related-item-desc\">FaceAI\u5728Ubuntu\u90e8\u7f72\u5b8c\u6574\u6307\u5357&#xff1a;\u4ece\u6e90\u7801\u7f16\u8bd1\u5230\u4eba\u8138\u8bc6\u522b\u670d\u52a1\u642d\u5efa\u768410\u4e2a\u5173\u952e\u6b65\u9aa4 FaceAI\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684 \u4eba\u8138\u8bc6\u522b \u5f00\u6e90\u9879\u76ee&#xff0c;\u4e13\u4e3a\u521d\u5b66\u8005\u548c\u5f00\u53d1\u8005\u8bbe\u8ba1&#xff0c;<\/p>\n<p>     <span class=\"gcb-tag\">\u8ba1\u7b97\u673a\u89c6\u89c9<\/span><br \/>\n     <span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><br \/>\n     <span class=\"gcb-tag\">\u6df1\u5ea6\u5b66\u4e60<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">5\u5206\u949f\u5feb\u901f\u4e0a\u624b&#xff1a;\u8de8\u5e73\u53f0\u8d44\u6e90\u4e0b\u8f7d\u795e\u5668res-downloader\u5b8c\u6574\u6307\u5357<\/h5>\n<p class=\"gcb-related-item-desc\">5\u5206\u949f\u5feb\u901f\u4e0a\u624b&#xff1a;\u8de8\u5e73\u53f0\u8d44\u6e90\u4e0b\u8f7d\u795e\u5668res downloader\u5b8c\u6574\u6307\u5357 \u4f60\u662f\u5426\u7ecf\u5e38\u9047\u5230\u60f3\u4fdd\u5b58\u5fae\u4fe1\u89c6\u9891\u53f7\u7684\u7cbe\u5f69\u5185\u5bb9\u5374\u65e0\u4ece\u4e0b\u624b&#xff1f;\u6296\u97f3\u3001\u5feb\u624b\u4e0a\u7684\u6709\u8da3\u89c6\u9891\u65e0\u6cd5\u65e0\u6c34\u5370\u4e0b\u8f7d<\/p>\n<p>     <span class=\"gcb-tag\">\u684c\u9762\u5e94\u7528<\/span><br \/>\n     <span class=\"gcb-tag\">\u7f51\u7edc<\/span><br \/>\n     <span class=\"gcb-tag\">\u97f3\u89c6\u9891<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\"> Apache OpenWhisk\u7ec8\u6781\u6307\u5357&#xff1a;\u4ece\u96f6\u5f00\u59cb\u6784\u5efa\u65e0\u670d\u52a1\u5668\u5e94\u7528<\/h5>\n<p class=\"gcb-related-item-desc\">Apache OpenWhisk\u7ec8\u6781\u6307\u5357&#xff1a;\u4ece\u96f6\u5f00\u59cb\u6784\u5efa\u65e0\u670d\u52a1\u5668\u5e94\u7528 Apache OpenWhisk\u662f\u5f00\u6e90\u7684 \u65e0\u670d\u52a1\u5668\u4e91\u5e73\u53f0 &#xff0c;\u8ba9\u5f00\u53d1\u8005\u80fd\u591f\u4e13\u6ce8\u4e8e\u7f16\u5199\u4ee3\u7801\u800c\u4e0d\u5fc5<\/p>\n<p>     <span class=\"gcb-tag\">\u540e\u7aef<\/span><br \/>\n     <span class=\"gcb-tag\">\u4e91\u539f\u751f<\/span><br \/>\n     <span class=\"gcb-tag\">\u5fae\u670d\u52a1<\/span>\n      <\/li>\n<\/ul>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0a\u4e00\u7bc7&#xff1a;<\/span><br \/>\n   \u7ec8\u6781\u6307\u5357&#xff1a;\u5982\u4f55\u7528import_3dm\u63d2\u4ef6\u5b9e\u73b0Rhino\u5230Blender\u7684\u65e0\u7f1d\u6570\u636e\u8f6c\u6362 <\/p>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0b\u4e00\u7bc7&#xff1a;<\/span><br \/>\n   \u9e23\u6f6e\u6e38\u620f\u667a\u80fd\u81ea\u52a8\u5316\u5de5\u5177\u5b8c\u6574\u4f7f\u7528\u6307\u5357&#xff1a;\u4ece\u96f6\u5f00\u59cb\u5b9e\u73b0\u540e\u53f0\u81ea\u52a8\u6218\u6597 <\/p>\n<p>\u521b\u4f5c\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u5185\u5bb9\u7531AI\u8f85\u52a9\u751f\u6210\uff08AIGC\uff09\uff0c\u4ec5\u4f9b\u53c2\u8003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e91\u539f\u751f\u540e\u7aef\u5fae\u670d\u52a1 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011openwhisk Apache OpenWhisk is an open source serverless cloud platform \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/op\/openwhisk \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d  Apache OpenWhisk \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u65e0\u670d\u52a1\u5668&#xff08;serverless&#xff09;\u4e91\u5e73\u53f0&#xff0c;\u652f\u6301\u4ee5\u51fd\u6570\u5373\u670d\u52a1&#xff08;FaaS<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-114582","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/114582.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e91\u539f\u751f\u540e\u7aef\u5fae\u670d\u52a1 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011openwhisk Apache OpenWhisk is an open source serverless cloud platform \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/op\/openwhisk \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d Apache OpenWhisk \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u65e0\u670d\u52a1\u5668&#xff08;serverless&#xff09;\u4e91\u5e73\u53f0&#xff0c;\u652f\u6301\u4ee5\u51fd\u6570\u5373\u670d\u52a1&#xff08;FaaS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/114582.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-09T07:48:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261009074854-6ac89c66a61d0.svg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114582.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/114582.html\",\"name\":\"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-09T07:48:55+00:00\",\"dateModified\":\"2026-10-09T07:48:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/114582.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/114582.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114582.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/114582.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e91\u539f\u751f\u540e\u7aef\u5fae\u670d\u52a1 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011openwhisk Apache OpenWhisk is an open source serverless cloud platform \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/op\/openwhisk \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d Apache OpenWhisk \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u65e0\u670d\u52a1\u5668&#xff08;serverless&#xff09;\u4e91\u5e73\u53f0&#xff0c;\u652f\u6301\u4ee5\u51fd\u6570\u5373\u670d\u52a1&#xff08;FaaS","og_url":"https:\/\/www.wsisp.com\/helps\/114582.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-09T07:48:55+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261009074854-6ac89c66a61d0.svg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/114582.html","url":"https:\/\/www.wsisp.com\/helps\/114582.html","name":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-09T07:48:55+00:00","dateModified":"2026-10-09T07:48:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/114582.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/114582.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/114582.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5728 Ubuntu \u670d\u52a1\u5668\u4e0a\u4ece\u6e90\u7801\u6784\u5efa\u4e0e\u90e8\u7f72 Apache OpenWhisk \u5b9e\u6218\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=114582"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114582\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=114582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=114582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=114582"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=114582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}