{"id":28508,"date":"2024-02-13T17:53:42","date_gmt":"2022-12-09T01:47:30","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/"},"modified":"2025-08-12T08:34:18","modified_gmt":"2025-08-12T00:34:18","slug":"%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/","title":{"rendered":"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55"},"content":{"rendered":"<p>\u603b\u4e4b\u5148\u52a8\u8d77\u6765\u4e86\u3002\u4ece\u6d4f\u89c8\u5668\u6253\u5f00\u4e86UI\u3002<br \/>\n\u6267\u884cknife bootstrap\uff0c\u53ef\u4ee5\u5728\u8282\u70b9\u4e0a\u8fd0\u884cchef-client\u3002<\/p>\n<h1>\u5de5\u4f5c\u7ad9\u5b89\u88c5<\/p>\n<p>https:\/\/downloads.chef.io\/products\/workstation<br \/>\n\u7531\u4e8e\u5177\u5907\u5b89\u88c5\u7a0b\u5e8f\uff0c\u4f7f\u5f97\u5b89\u88c5\u53d8\u5f97\u7b80\u5355\u6613\u884c\u3002<\/p>\n<h1>\u5b89\u88c5 Docker<\/p>\n<p>\u5fd8\u4e86\uff0c\u6211\u5b89\u88c5\u4e86Docker for Mac\u3002\u56e0\u4e3a\u6709\u4e00\u4e2a\u8bbe\u7f6e\u5de5\u5177\uff0c\u6240\u4ee5\u5b89\u88c5\u5f88\u7b80\u5355\u3002<\/p>\n<h2>\u6307\u4ee4\u5907\u5fd8\u5f55<\/p>\n<pre class=\"post-pre\"><code>docker ps\r\ndocker stop containerID\r\n\r\ndocker images\r\ndocker rmi\r\n<\/code><\/pre>\n<h2>Dockerfile \u6587\u4ef6<\/p>\n<p>\u5148\u521b\u5efa\u4e00\u4e2a\u7528\u4e8eCOPY\u547d\u4ee4\u7684authorized_keys\u6587\u4ef6\uff0c\u5e76\u5c06\u516c\u94a5\u653e\u5165\u5176\u4e2d<br \/>\n\u5bf9authorized_keys\u6587\u4ef6\u6267\u884cchmod 600\u64cd\u4f5c<\/p>\n<pre class=\"post-pre\"><code>FROM centos:centos7\r\n\r\nRUN yum -y update &amp;&amp; yum clean all\r\nRUN yum install -y which\r\nRUN yum install -y wget\r\nRUN yum install -y tar\r\nRUN yum install -y vim\r\nRUN yum install -y git\r\nRUN yum install -y iproute\r\nRUN yum -y install openssh-server openssh-clients\r\n\r\n#COPY chef_setting.conf \/etc\/sysctl.d\/\r\n#RUN sysctl -p \/etc\/sysctl.d\/chef_setting.conf\r\n\r\nRUN mkdir  \/root\/.ssh\r\nCOPY authorized_keys \/root\/.ssh\/\r\n#&amp;&amp;    touch  ~\/.ssh\/authorized_keys \\\r\n#&amp;&amp;    chmod 600  ~\/.ssh\/authorized_keys\r\n\r\n#RUN curl https:\/\/packages.chef.io\/files\/current\/latest\/chef-automate-cli\/chef-automate_linux_amd64.zip | gunzip - &gt; chef-automate &amp;&amp; chmod +x chef-automate\r\n#&amp;&amp; echo y | .\/chef-automate deploy --product automate --product infra-server\r\n\r\n# \u30b3\u30f3\u30c6\u30ca\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\r\nCMD \/bin\/bash\r\n<\/code><\/pre>\n<h2>\u82f9\u679c\u7535\u8111\u3001\/etc\/hosts<\/p>\n<p>\u589e\u52a0<\/p>\n<pre class=\"post-pre\"><code>127.0.0.1       centos7chef\r\n<\/code><\/pre>\n<h2>\u5efa\u8bbe  sh\u00e8)<\/p>\n<pre class=\"post-pre\"><code>$ docker build -t centos7chef .\/\r\n$ docker build -t centos7chef .\/ --no-cache\r\n\r\n\/\/ workstation\r\n$ docker build -f Dockerfile_wk -t centos7chefworkstation .\/ \r\n\r\n\r\n\/\/ chef-client(node)\r\n$ docker build -f Dockerfile_node -t centos7chefnode .\/ \r\n\r\n# \u4e0d\u8981\u306a\u30a4\u30e1\u30fc\u30b8\u306e\u524a\u9664\uff08REPOSITORY\u304c&lt;none&gt;\u306e\u5974\uff09\r\ndocker rmi $(docker images -f dangling=true -q)\r\n\r\n\r\n$ docker images\r\nREPOSITORY          TAG                 IMAGE ID            CREATED             SIZE\r\ncentos7chef         latest              732b9ef19ac6        5 minutes ago       794MB\r\ncentos              7                   7e6257c9f8d8        2 months ago        203MB\r\ncentos              centos7             7e6257c9f8d8        2 months ago        203MB\r\n<\/code><\/pre>\n<h2>\u5728\u4e2d\u56fd\uff0c\u53ea\u9700\u8981\u4e00\u79cd\u9009\u62e9\u6765\u91ca\u4e49\u4ee5\u4e0b\u5185\u5bb9\uff1a <\/p>\n<p>Docker\u6784\u5efa\u5931\u8d25\uff0c\u65e0\u6cd5\u89e3\u51b3\uff0c\u9700\u8981\u624b\u52a8\u5b89\u88c5Chef\u3002<\/p>\n<p>\u5c3d\u7ba1\u5931\u8d25\u4e86\uff0c\u4f46\u5bb9\u5668\u5df2\u7ecf\u4e0d\u5b58\u5728\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code>#16 1.578 Bootstrapping Chef Automate\r\n#16 1.578   Fetching Release Manifest\r\n#16 1.654   Installing Habitat\r\n#16 1.654   Installing Habitat 1.6.139\/20200824142405\r\n#16 6.354   Installing the Chef Automate deployment-service\r\n#16 87.28   Installing supplementary Habitat packages\r\n#16 87.28   Installing Habitat package automate-cli\r\n#16 91.01   Installing Habitat package rsync\r\n#16 91.20   Installing Habitat package hab-sup\r\n#16 95.62   Installing Habitat package hab-launcher\r\n#16 99.02   Installing Habitat systemd unit\r\n#16 99.05   Creating Habitat user and group\r\n#16 99.10   Starting Habitat with systemd\r\n#16 99.12 Error: setup failed: failed to reload systemd daemon: exit status 1\r\n#16 99.12 DeployError: Unable to install, configure and start the service: exit status 1\r\n------\r\nfailed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [\/bin\/sh -c curl https:\/\/packages.chef.io\/files\/current\/latest\/chef-automate-cli\/chef-automate_linux_amd64.zip | gunzip - &gt; chef-automate &amp;&amp; chmod +x chef-automate  &amp;&amp; echo y | .\/chef-automate deploy --product automate --product infra-server --skip-preflight]: runc did not terminate sucessfully\r\n<\/code><\/pre>\n<h2>\u542f\u52a8\u5bb9\u5668<\/p>\n<pre class=\"post-pre\"><code>\/\/ chefserver\r\n\/\/ UI\u304cNG\r\ndocker run --privileged --rm -d -p 2222:22 -p 5000:443 -p 443:443 --hostname=centos7chef --name centos7chefcontainer centos7chef \/sbin\/init\r\n\r\n\/\/ chefserver\r\n\/\/ UI\u304cOK\r\ndocker run --privileged --rm -d -p 2222:22 -p 5000:443 -p 443:443 --hostname=localhost --name centos7chefcontainer centos7chef \/sbin\/init\r\n\r\n\/\/ \u4fdd\u5b58\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u8d77\u52d5(org\u3068user\u4f5c\u6210\u6e08\uff09\r\ndocker run --privileged --rm -d -p 2222:22 -p 5000:443 -p 6000:10161 --hostname=centos7chef --name centos7chefcontainer centos7chef-setuped\r\n\r\n\/\/ chefworkstation\r\ndocker run --privileged --rm -d -p 3333:22 --hostname=centos7chefwk --name centos7chefwkcontainer centos7chefworkstation  \/sbin\/init\r\n\r\n\r\n\/\/ chef-client(node)\r\ndocker run --privileged --rm -d -p 4444:22 --hostname=centos7chefnode --name centos7chefnodecontainer centos7chefnode  \/sbin\/init\r\n<\/code><\/pre>\n<p>\/sbin\/init\u6ca1\u6709&#8211;privileged\u53c2\u6570\u5219\u65e0\u6cd5\u542f\u52a8\u3002\u4f3c\u4e4e\u6709\u4e00\u4e9b\u4e0d\u7406\u89e3\u7684\u5730\u65b9\u3002\u867d\u7136\u4e0d\u5e94\u8be5\u9700\u8981\u7684\u3002<\/p>\n<ul class=\"post-ul\">\n-rm docker run\u306e&#8211;rm\u30aa\u30d7\u30b7\u30e7\u30f3(\u30b3\u30f3\u30c6\u30ca\u7d42\u4e86\u6642\u306b\u30b3\u30f3\u30c6\u30ca\u81ea\u52d5\u7684\u306b\u524a\u9664)<br \/>\n-d \u30b3\u30f3\u30c6\u30ca\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u5b9f\u884c<br \/>\n\u2013p \u30dd\u30fc\u30c8\u6307\u5b9a\uff08\u3053\u3053\u3067\u306fssh\u30a2\u30af\u30bb\u30b9\u30dd\u30fc\u30c8\u306e\u5909\u66f4\uff09<br \/>\n\u2013privileged systemctl\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u306e\u3067\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0<br \/>\n\u2013name \u4f5c\u6210\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u306b\u540d\u524d\u3092\u3064\u3051\u308b<br \/>\n\/sbin\/init CentOS 7.x\u306b\u304a\u3051\u308bsystemctl\u3092\u4f7f\u3063\u3066OS\u8d77\u52d5\u6642\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u81ea\u52d5\u8d77\u52d5\u3092Docker\u30b3\u30f3\u30c6\u30ca\u4e0a\u3067\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u306f\u3001Docker\u30b3\u30f3\u30c6\u30ca\u306e\u8d77\u52d5\u306e\u969b\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\/sbin\/init\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n<\/ul>\n<pre class=\"post-pre\"><code>~\/docker 13:00:38 $ docker ps\r\nCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                        NAMES\r\n75356a7cf03a        centos7chef         \"\/sbin\/init\"        12 seconds ago      Up 11 seconds       0.0.0.0:2222-&gt;22\/tcp, 0.0.0.0:5000-&gt;80\/tcp   centos7chefcontainer\r\n<\/code><\/pre>\n<h2>\u521b\u5efaSSH\u5bc6\u94a5<\/p>\n<pre class=\"post-pre\"><code>ssh-keygen -t rsa -b 4096\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\nid_rsa<br \/>\nid_rsa.pub\n<\/ul>\n<h2>\u8fdb\u5165\u6b63\u5728\u8fd0\u884c\u7684\u5bb9\u5668\u7684\u5bb9\u5668\u8fde\u63a5\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>docker exec -it centos7chefcontainer \/bin\/bash\r\n\r\n\/\/ workstation\r\ndocker exec -it centos7chefwkcontainer \/bin\/bash\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n-it \u30b3\u30f3\u30c6\u30ca\u306e\u30d7\u30ed\u30bb\u30b9\u306btty\u3092\u5272\u308a\u5f53\u3066\u308b\u3002\u610f\u5473\u308f\u304b\u3089\u3093\u304c\u4ed8\u3051\u3066\u304a\u3053\u3046<br \/>\ndocker exec \u8d77\u52d5\u4e2d\u306e\u30b3\u30f3\u30c6\u30ca\u5185\u3067\u3001\u6307\u5b9a\u3057\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9<br \/>\ndocker run \u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3057\u3066\u8d77\u52d5\u3059\u308b\u30b3\u30de\u30f3\u30c9\n<\/ul>\n<p>\u6700\u7ec8\u6211\u901a\u8fc7ssh\u8fde\u63a5\u4e86\uff0c\u6240\u4ee5\u6ca1\u6709\u4f7f\u7528\u8fd9\u4e2a\u547d\u4ee4\u3002<\/p>\n<h2>~\/.ssh\/config\uff08Mac\uff09<\/p>\n<p>\u53ef\u4ee5\u8fde\u63a5\u5230HostName 0.0.0.0\u4ee4\u4eba\u8d39\u89e3\u3002<\/p>\n<pre class=\"post-pre\"><code>Host centos7chef\r\n    HostName 0.0.0.0\r\n    User root\r\n    Port 2222\r\n    IdentityFile ~\/.ssh\/id_rsa\r\n    StrictHostKeyChecking no\r\n    UserKnownHostsFile=\/dev\/null\r\n<\/code><\/pre>\n<h2>\u5c1d\u8bd5SSH\uff08Mac\uff09<\/p>\n<pre class=\"post-pre\"><code>ssh centos7chef\r\n\r\n\/\/ workstation\r\nssh centos7chefwk\r\n\r\n\/\/ chef-client(node)\r\nssh centos7chefnode\r\n<\/code><\/pre>\n<h1>\u53a8\u5e08\u5b89\u88c5\u624b\u518c<\/p>\n<p><h1>\u8fdb\u884c\u914d\u7f6e<\/p>\n<p>\u6211\u8bd5\u56fe\u5c06\u5176\u6dfb\u52a0\u5230Dockerfile\u4e2d\uff0c\u4f46\u65e0\u6cd5\u4f7f\u7528sysctl\uff0c\u5e76\u4e14\u56e0\u5b89\u88c5\u5931\u8d25\u800c\u653e\u5f03\u3002<\/p>\n<p>\u8bf7\u5c06\u4ee5\u4e0b\u5185\u5bb9\u590d\u5236\u5e76\u7c98\u8d34\u4e09\u6b21\u3002<\/p>\n<pre class=\"post-pre\"><code>sysctl -w vm.dirty_expire_centisecs=20000\r\ncurl https:\/\/packages.chef.io\/files\/current\/latest\/chef-automate-cli\/chef-automate_linux_amd64.zip | gunzip - &gt; chef-automate &amp;&amp; chmod +x chef-automate\r\necho y | .\/chef-automate deploy --product automate --product infra-server\r\n\r\n\u3053\u306e\u3042\u3068y\u3092\u5165\u529b\r\n<\/code><\/pre>\n<p>\u56e0\u4e3a\u88ab\u544a\u77e5\u6ca1\u6709\u8be5\u547d\u4ee4\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u6dfb\u52a0&#8221;.\/&#8221;\u3002<br \/>\n\u5c31\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<pre class=\"post-pre\"><code>Deploy Complete\r\nYour credentials have been saved to automate-credentials.toml\r\nAccess the web UI at https:\/\/centos7chef\/\r\n\r\nUsers of this Automate deployment may elect to share anonymized usage data with\r\nChef Software, Inc. Chef uses this shared data to improve Automate.\r\nPlease visit https:\/\/chef.io\/privacy-policy for more information about the\r\ninformation Chef collects, and how that information is used.\r\n<\/code><\/pre>\n<p>\u5bc6\u7801\u5728\u8fd9\u4e2a\u6587\u4ef6\u91cc<\/p>\n<pre class=\"post-pre\"><code>[root@centos7chef ~]# cat automate-credentials.toml\r\nurl = \"https:\/\/centos7chef\"\r\nusername = \"admin\"\r\npassword = \"9bba1587a3c5c3597a7fd933e9f30e00\"\r\n<\/code><\/pre>\n<p><h1>Ngixn\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u770b\u4e00\u4e0b\/hab\/svc\/automate-ui\/config\/nginx.conf\u6587\u4ef6\uff0c\u53ef\u80fd\u4f1a\u6709\u4e00\u4e9b\u7b49\u5f85\u3002\u770b\u4e00\u4e0b\/hab\/svc\/automate-load-balancer\/config\/nginx.conf\u6587\u4ef6\u3002<\/p>\n<p>\u5728\/hab\/svc\/automate-ui\/config\/nginx.conf\u4e2d\u641c\u7d22centos7chef\u3002<br \/>\n\u5728\/hab\/svc\/automate-load-balancer\/config\/nginx.conf\u4e2d\u641c\u7d22centos7chef\u3002<\/p>\n<h1>\u521b\u5efa\u4e00\u4e2a\u673a\u6784<\/p>\n<pre class=\"post-pre\"><code>chef-server-ctl user-create chef chef chef tekitou@gmail.com 'password' --filename chef.pem\r\n\r\nchef-server-ctl org-create cheftest 'cheftest' --association_user chef --filename cheftest-validator.pem\r\n\r\nchef-server-ctl org-user-add cheftest chef --admin \r\n\r\n\/\/ \u9375\u304c\u3067\u304d\u308b\r\n[root@centos7chef ~]# ls\r\nanaconda-ks.cfg  automate-credentials.toml  chef-automate  chef.pem  cheftest-validator.pem\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u5df2\u7ecf\u6267\u884c\uff0c\u6240\u4ee5 Chef \u670d\u52a1\u5668\u672c\u8eab\u6b63\u5728\u8fd0\u884c\u3002\u5982\u679c\u8fdb\u884c\u7f51\u7edc\u8bbe\u7f6e\uff0cUI \u4e5f\u5e94\u8be5\u53ef\u4ee5\u5de5\u4f5c\uff0c\u4f46\u6211\u4e0d\u786e\u5b9a\u3002\u5982\u679c\u8fd9\u4e2a\u65e0\u6cd5\u5de5\u4f5c\uff0cknife \u4e5f\u5c06\u65e0\u6cd5\u4f7f\u7528\u3002<\/p>\n<h1>\u5728\u670d\u52a1\u5668\u4e0a\u80fd\u8fd0\u884cknife\u5417\uff1f<\/p>\n<pre class=\"post-pre\"><code>[root@centos7chef ~]# knife user show chef\r\ndisplay_name: chef chef\r\nemail:        tekitou@gmail.com\r\nfirst_name:   chef\r\nlast_name:    chef\r\nmiddle_name:\r\nusername:     chef\r\n\r\n\r\n[root@centos7chef ~]# chef-server-ctl org-list\r\ncheftest\r\n\r\n[root@centos7chef ~]# chef-server-ctl org-show cheftest\r\nfull_name: cheftest\r\nguid:      900d399584e991235b29d2aa946a8fed\r\nname:      cheftest\r\n<\/code><\/pre>\n<h1>\u4f7f\u7528Mac\u8fdb\u884cknife\u64cd\u4f5c<\/p>\n<p>\u4ed6\u8d62\u4e86<\/p>\n<h2>\u5c1d\u8bd5<\/p>\n<pre class=\"post-pre\"><code>docker run --privileged --rm -d -p 2222:22 -p 80:80 --hostname=centos7chef --name centos7chefcontainer centos7chef \/sbin\/init\r\n<\/code><\/pre>\n<h2>\u8bf7\u6ce8\u610f1\uff1a\u5907\u5fd8\u5f55<\/p>\n<p>\u5982\u6b64\u8a6d\u7570\uff0c\u4ecd\u7136\u7121\u6cd5\u7406\u89e3\u3002<\/p>\n<p>\u7b2c\u4e00\u4e2a\u6570\u5b57\u4ee3\u8868\u5b57\u4f53\u7c7b\u578b\uff0c\u4f8b\u5982\u7c97\u4f53\u7b49\u3002\u63a5\u4e0b\u6765\u7684\u6570\u5b57\u8868\u793a\u989c\u8272\u3002<\/p>\n<pre class=\"post-pre\"><code>PS1='\\[\\e[1;32m\\][\\t \\[\\e[1;31m\\] \\w \\[\\e[1;32m\\]]\\\\$ \\[\\e[m\\]'\r\n<\/code><\/pre>\n<h1>\u4efb\u52a1\u65e5\u5fd7<\/p>\n<pre class=\"post-pre\"><code>[17:32:19  ~\/docker ]$ ssh centos7chef\r\nWarning: Permanently added '[0.0.0.0]:2222' (ECDSA) to the list of known hosts.\r\n[root@centos7chef ~]# sysctl -w vm.dirty_expire_centisecs=20000\r\nvm.dirty_expire_centisecs = 20000\r\n[root@centos7chef ~]# curl https:\/\/packages.chef.io\/files\/current\/latest\/chef-automate-cli\/chef-automate_linux_amd64.zip | gunzip - &gt; chef-automate &amp;&amp; chmod +x chef-automate\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 10.7M  100 10.7M    0     0  12.7M      0 --:--:-- --:--:-- --:--:-- 12.7M\r\n[root@centos7chef ~]# .\/chef-automate deploy --product automate --product infra-server\r\n\r\nTo continue, you'll need to accept our terms of service:\r\n\r\nTerms of Service\r\nhttps:\/\/www.chef.io\/terms-of-service\r\n\r\nMaster License and Services Agreement\r\nhttps:\/\/www.chef.io\/online-master-agreement\r\n\r\nI agree to the Terms of Service and the Master License and Services Agreement\r\n (y\/n)\r\ny\r\n\r\nBeginning pre-flight checks\r\n\r\n OK | running as root\r\n OK | volume: has 53.3GB avail (need 5.0GB for installation)\r\n OK | chef-automate CLI is not in \/bin\r\n OK | automate not already deployed\r\n OK | initial required ports are available\r\n OK | init system is systemd\r\n OK | found required command \"useradd\"\r\n OK | user \"nobody\" exists\r\n OK | MemTotal 6093672 kB (6.1GB) is at least 2000000 kB (2.0GB)\r\n OK | fs.file-max=524288 is at least 64000\r\n OK | vm.max_map_count=262144 is at least 262144\r\n OK | vm.dirty_ratio=20 is between 5 and 30\r\n OK | vm.dirty_background_ratio=10 is between 10 and 60\r\n OK | vm.dirty_expire_centisecs=20000 is between 10000 and 30000\r\n OK | kernel version \"4.19\" is at least \"3.2\"\r\n OK | https:\/\/licensing.chef.io\/status is reachable\r\n OK | https:\/\/bldr.habitat.sh is reachable\r\n OK | https:\/\/raw.githubusercontent.com is reachable\r\n OK | https:\/\/packages.chef.io is reachable\r\n OK | https:\/\/github.com is reachable\r\n OK | https:\/\/downloads.chef.io is reachable\r\n\r\n\r\nBootstrapping Chef Automate\r\n  Fetching Release Manifest\r\n  Installing Habitat\r\n  Installing Habitat 1.6.56\/20200618202635\r\n  Installing the Chef Automate deployment-service\r\n  Installing supplementary Habitat packages\r\n  Installing Habitat package automate-cli\r\n  Installing Habitat package rsync\r\n  Installing Habitat package hab-sup\r\n  Installing Habitat package hab-launcher\r\n  Installing Habitat systemd unit\r\n  Creating Habitat user and group\r\n  Starting Habitat with systemd\r\n\r\nBootstrapping deployment-service on localhost\r\n  Configuring deployment-service\r\n  Starting deployment-service\r\n  Waiting for deployment-service to be ready\r\n  Initializing connection to deployment-service\r\n\r\nApplying Deployment Configuration\r\n\r\nStarting deploy\r\n  Installing deployment-service\r\n  Installing automate-cli\r\n  Installing backup-gateway\r\n  Installing automate-postgresql\r\n  Installing automate-pg-gateway\r\n  Installing automate-elasticsearch\r\n  Installing automate-es-gateway\r\n  Installing automate-ui\r\n  Installing pg-sidecar-service\r\n  Installing cereal-service\r\n  Installing event-service\r\n  Installing authz-service\r\n  Installing es-sidecar-service\r\n  Installing event-feed-service\r\n  Installing automate-dex\r\n  Installing teams-service\r\n  Installing authn-service\r\n  Installing secrets-service\r\n  Installing applications-service\r\n  Installing notifications-service\r\n  Installing nodemanager-service\r\n  Installing compliance-service\r\n  Installing license-control-service\r\n  Installing local-user-service\r\n  Installing session-service\r\n  Installing config-mgmt-service\r\n  Installing ingest-service\r\n  Installing infra-proxy-service\r\n  Installing data-feed-service\r\n  Installing event-gateway\r\n  Installing automate-gateway\r\n  Installing automate-cs-bookshelf\r\n  Installing automate-cs-oc-bifrost\r\n  Installing automate-cs-oc-erchef\r\n  Installing automate-cs-nginx\r\n  Installing automate-load-balancer\r\n  Configuring deployment-service\r\n  Starting backup-gateway\r\n  Starting automate-postgresql\r\n  Starting automate-pg-gateway\r\n  Starting automate-elasticsearch\r\n  Starting automate-es-gateway\r\n  Starting automate-ui\r\n  Starting pg-sidecar-service\r\n  Starting cereal-service\r\n  Starting event-service\r\n  Starting authz-service\r\n  Starting es-sidecar-service\r\n  Starting event-feed-service\r\n  Starting automate-dex\r\n  Starting teams-service\r\n  Starting authn-service\r\n  Starting secrets-service\r\n  Starting applications-service\r\n  Starting notifications-service\r\n  Starting nodemanager-service\r\n  Starting compliance-service\r\n  Starting license-control-service\r\n  Starting local-user-service\r\n  Starting session-service\r\n  Starting config-mgmt-service\r\n  Starting ingest-service\r\n  Starting infra-proxy-service\r\n  Starting data-feed-service\r\n  Starting event-gateway\r\n  Starting automate-gateway\r\n  Starting automate-cs-bookshelf\r\n  Starting automate-cs-oc-bifrost\r\n  Starting automate-cs-oc-erchef\r\n  Starting automate-cs-nginx\r\n  Starting automate-load-balancer\r\n\r\nChecking service health\r\n\r\nCreating admin user\r\n\r\nDeploy Complete\r\nYour credentials have been saved to automate-credentials.toml\r\nAccess the web UI at https:\/\/centos7chef\/\r\n\r\nUsers of this Automate deployment may elect to share anonymized usage data with\r\nChef Software, Inc. Chef uses this shared data to improve Automate.\r\nPlease visit https:\/\/chef.io\/privacy-policy for more information about the\r\ninformation Chef collects, and how that information is used.\r\n\r\n[root@centos7chef ~]#\r\n<\/code><\/pre>\n<h1>\u5bb9\u5668\u5b58\u50a8<\/p>\n<pre class=\"post-pre\"><code>\u30b3\u30f3\u30c6\u30ca\u540d\u3000\u30a4\u30e1\u30fc\u30b8\u540d\r\ndocker commit centos7chefcontainer centos7chef-setuped-test\r\n\r\n\/\/ \u4fdd\u5b58\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u8d77\u52d5\r\ndocker run --privileged --rm -d -p 2222:22 -p 5000:443 -p 6000:10161 --hostname=centos7chef --name centos7chefcontainer centos7chef-setuped\r\n<\/code><\/pre>\n<h1>\u8abf\u67e5<\/p>\n<h2>\u8ba9\u6211\u4eec\u5c1d\u8bd5\u4e00\u4e0b\u4f7f\u7528Bootstrap\u3002<\/p>\n<pre class=\"post-pre\"><code>\/\/ knife bootstrap FQDN_or_IP_ADDRESS \r\nknife bootstrap -U root -N centos7chefnode -i \/root\/.ssh\/id_rsa --node-ssl-verify-mode none 172.17.0.4 -y\r\n<\/code><\/pre>\n<p>\u6210\u529f\u4e86\uff01<\/p>\n<p>\u8bbe\u5b9a\u4e00\u4e2a\u5bc6\u7801\u3002\u56e0\u4e3a\u88ab\u8981\u6c42\u8f93\u5165\u5bc6\u7801\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u8bbe\u5b9a\u4e86\u4e00\u4e2a\u3002<\/p>\n<pre class=\"post-pre\"><code>ssh centos7chefnode\r\npasswd root\r\n\/\/ chef1234\r\n<\/code><\/pre>\n<h2>\u770b\u8d77\u6765\u4f1a\u52a8<\/p>\n<pre class=\"post-pre\"><code>\/\/ insecure\u306fssl\u7121\u52b9\u304b\u306a\r\n[root@centos7chef ~]# curl --insecure https:\/\/centos7chef\/\r\n&lt;!doctype html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"utf-8\"&gt;\r\n  &lt;title&gt;Chef Automate&lt;\/title&gt;\r\n  &lt;base href=\"\/\"&gt;\r\n  &lt;script type=\"text\/javascript\"&gt;\r\n    window.staticAutomateConfig = {};\r\n    function parseStaticAutomateConfig(options) {\r\n      window.staticAutomateConfig = options;\r\n    };\r\n  &lt;\/script&gt;\r\n  &lt;script src=\"\/automate.conf.js\"&gt;&lt;\/script&gt;\r\n  &lt;script type=\"text\/javascript\"&gt;\r\n    !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&amp;&amp;console.error&amp;&amp;console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t&lt;analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement(\"script\");e.type=\"text\/javascript\";e.async=!0;e.src=(\"https:\"===document.location.protocol?\"https:\/\/\":\"http:\/\/\")+\"cdn.segment.com\/analytics.js\/v1\/\"+t+\"\/analytics.min.js\";var n=document.getElementsByTagName(\"script\")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION=\"4.0.0\";\r\n    }}();\r\n  &lt;\/script&gt;\r\n  &lt;script&gt;\r\n    \/\/ This shim is currently necessary for IE11 compatibility for ngx-charts v6.0.2.\r\n    \/\/ See https:\/\/github.com\/swimlane\/ngx-charts\/issues\/386\r\n    if (typeof SVGElement.prototype.contains === 'undefined') {\r\n     SVGElement.prototype.contains = HTMLDivElement.prototype.contains;\r\n    }\r\n  &lt;\/script&gt;\r\n\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\r\n  &lt;link rel=\"icon\" type=\"image\/x-icon\" href=\"favicon.ico\"&gt;\r\n&lt;link rel=\"stylesheet\" href=\"styles.46ae88d1054ededacc13.css\"&gt;&lt;\/head&gt;\r\n&lt;body&gt;\r\n  &lt;app-root&gt;&lt;\/app-root&gt;\r\n&lt;script src=\"runtime-es2019.25b4fd3cb33ce3bf38cb.js\" type=\"module\"&gt;&lt;\/script&gt;&lt;script src=\"runtime-es5.25b4fd3cb33ce3bf38cb.js\" nomodule defer&gt;&lt;\/script&gt;&lt;script src=\"polyfills-es5.e06d095faa1450814d39.js\" nomodule defer&gt;&lt;\/script&gt;&lt;script src=\"polyfills-es2019.26fe9ed96dfc7e34b888.js\" type=\"module\"&gt;&lt;\/script&gt;&lt;script src=\"scripts.cc8a29e31189c7ef0450.js\" defer&gt;&lt;\/script&gt;&lt;script src=\"main-es2019.04273c31070ef62fa00f.js\" type=\"module\"&gt;&lt;\/script&gt;&lt;script src=\"main-es5.04273c31070ef62fa00f.js\" nomodule defer&gt;&lt;\/script&gt;&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n[root@centos7chef ~]#\r\n<\/code><\/pre>\n<p>\u53ea\u8981\u6b63\u786e\u914d\u7f6e\u7aef\u53e3\u8f6c\u53d1\uff0c\u5e94\u8be5\u53ef\u4ee5\u8fd0\u884c\uff0c\u4f46\u4e0d\u786e\u5b9a\u3002<\/p>\n<pre class=\"post-pre\"><code>[root@centos7chef ~]# curl --insecure https:\/\/localhost:443\r\n&lt;!doctype html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"utf-8\"&gt;\r\n  &lt;title&gt;Chef Automate&lt;\/title&gt;\r\n  &lt;base href=\"\/\"&gt;\r\n  &lt;script type=\"text\/javascript\"&gt;\r\n    window.staticAutomateConfig = {};\r\n    function parseStaticAutomateConfig(options) {\r\n      window.staticAutomateConfig = options;\r\n    };\r\n  &lt;\/script&gt;\r\n  &lt;script src=\"\/automate.conf.js\"&gt;&lt;\/script&gt;\r\n  &lt;script type=\"text\/javascript\"&gt;\r\n    !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&amp;&amp;console.error&amp;&amp;console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t&lt;analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement(\"script\");e.type=\"text\/javascript\";e.async=!0;e.src=(\"https:\"===document.location.protocol?\"https:\/\/\":\"http:\/\/\")+\"cdn.segment.com\/analytics.js\/v1\/\"+t+\"\/analytics.min.js\";var n=document.getElementsByTagName(\"script\")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION=\"4.0.0\";\r\n    }}();\r\n  &lt;\/script&gt;\r\n  &lt;script&gt;\r\n    \/\/ This shim is currently necessary for IE11 compatibility for ngx-charts v6.0.2.\r\n    \/\/ See https:\/\/github.com\/swimlane\/ngx-charts\/issues\/386\r\n    if (typeof SVGElement.prototype.contains === 'undefined') {\r\n     SVGElement.prototype.contains = HTMLDivElement.prototype.contains;\r\n    }\r\n  &lt;\/script&gt;\r\n\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\r\n  &lt;link rel=\"icon\" type=\"image\/x-icon\" href=\"favicon.ico\"&gt;\r\n&lt;link rel=\"stylesheet\" href=\"styles.46ae88d1054ededacc13.css\"&gt;&lt;\/head&gt;\r\n&lt;body&gt;\r\n  &lt;app-root&gt;&lt;\/app-root&gt;\r\n&lt;script src=\"runtime-es2019.25b4fd3cb33ce3bf38cb.js\" type=\"module\"&gt;&lt;\/script&gt;&lt;script src=\"runtime-es5.25b4fd3cb33ce3bf38cb.js\" nomodule defer&gt;&lt;\/script&gt;&lt;script src=\"polyfills-es5.e06d095faa1450814d39.js\" nomodule defer&gt;&lt;\/script&gt;&lt;script src=\"polyfills-es2019.26fe9ed96dfc7e34b888.js\" type=\"module\"&gt;&lt;\/script&gt;&lt;script src=\"scripts.cc8a29e31189c7ef0450.js\" defer&gt;&lt;\/script&gt;&lt;script src=\"main-es2019.04273c31070ef62fa00f.js\" type=\"module\"&gt;&lt;\/script&gt;&lt;script src=\"main-es5.04273c31070ef62fa00f.js\" nomodule defer&gt;&lt;\/script&gt;&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n[root@centos7chef ~]# curl --insecure https:\/\/localhost:442\r\ncurl: (7) Failed to connect to ::1: Cannot assign requested address\r\n[root@centos7chef ~]#\r\n<\/code><\/pre>\n<h1>\u603b\u7ed3<\/p>\n<h2>\u542f\u52a8\u5bb9\u5668<\/p>\n<pre class=\"post-pre\"><code>\/\/ \u4fdd\u5b58\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u8d77\u52d5(org\u3068user\u4f5c\u6210\u6e08\uff09\r\n\/\/ \u4e00\u500b\u305a\u3064\u5b9f\u884c\u3057\u306a\u3044\u3068IP\u304c\u305a\u308c\u308b\u304b\u3082\r\ndocker run --privileged --rm -d -p 2222:22 -p 5000:443 -p 443:443 --hostname=centos7chef --name centos7chefcontainer centos7chef-setuped\r\ndocker run --privileged --rm -d -p 3333:22 --hostname=centos7chefwk --name centos7chefwkcontainer centos7chefworkstation  \/sbin\/init\r\ndocker run --privileged --rm -d -p 4444:22 --hostname=centos7chefnode --name centos7chefnodecontainer centos7chefnode  \/sbin\/init\r\n<\/code><\/pre>\n<h2>\u8bf7\u68c0\u67e5chef\u670d\u52a1\u5668\u662f\u5426\u8fd0\u884c\u3002<\/p>\n<p>\u53ea\u8981\u770b\u5230\u201c\u81ea\u52a8\u5316\u201d\u8fd9\u4e2a\u8bcd\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code>curl --insecure https:\/\/localhost:443\r\n<\/code><\/pre>\n<h2>\u5f53\u53a8\u5e08\u670d\u52a1\u5668\u65e0\u6cd5\u8fd0\u884c\u65f6\u3002<\/p>\n<p>\u53ea\u8981\u6240\u6709\u7684running\u90fd\u80fd\u5b9e\u73b0\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code>chef-automate status\r\nchef-automate restart-services\r\n<\/code><\/pre>\n<h2>\u7528\u6d4f\u89c8\u5668\u8fdb\u884c\u8bbf\u95ee\u7684\u65b9\u5f0f<\/p>\n<p>\u5f53\u901a\u8fc7 https:\/\/localhost:5000 \u8bbf\u95ee\u65f6\uff0c\u4f1a\u81ea\u52a8\u91cd\u5b9a\u5411\u5230 https:\/\/centos7chef\/&#8230;\u3002\u5c06\u5176\u6539\u4e3a\u4ee5\u4e0b\u5185\u5bb9\u540e\uff0c\u5c31\u80fd\u6b63\u5e38\u8fd0\u884c\uff1a<br \/>\nhttps:\/\/localhost:5000\/&#8230;<\/p>\n<p>5000\u4e3b\u673a\u5411443 Docker\u53d1\u9001\u7684\u8bf7\u6c42\u4f1a\u88ab\u91cd\u5b9a\u5411\u5230\u4e3b\u673a\u672c\u5730\u7684443\u7aef\u53e3\uff0c\u7136\u540e\u518d\u8f6c\u53d1\u5230443 Docker\u7aef\u53e3\u3002<\/p>\n<h1>ngixn\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u8bf7\u7528\u4e2d\u6587\u7ffb\u8bd1\u4e00\u4e0b\u4ee5\u4e0b\u5185\u5bb9\uff0c\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff1a<br \/>\nless \/hab\/svc\/automate-ui\/config\/nginx.conf<br \/>\n\u8fd9\u53ef\u80fd\u662f\u4ec0\u4e48<\/p>\n<p>\u5728 \/hab\/svc\/automate-ui\/config\/nginx.conf \u4e2d\u641c\u7d22 centos7chef<br \/>\n\u5728 \/hab\/svc\/automate-load-balancer\/config\/nginx.conf \u4e2d\u641c\u7d22 centos7chef<\/p>\n<pre class=\"post-pre\"><code>ssl_certificate \/hab\/svc\/automate-load-balancer\/data\/centos7chef.cert;\r\nssl_certificate_key \/hab\/svc\/automate-load-balancer\/data\/centos7chef.key;\r\n<\/code><\/pre>\n<p>proxy_ssl_trusted_certificate \/hab\/svc\/automate-load-balancer\/config\/root_ca.crt; &#8211;<br \/>\n\u4ee3\u7406_ssl_\u53ef\u4fe1\u8bc1\u4e66 \/hab\/svc\/automate-load-balancer\/config\/root_ca.crt;<\/p>\n<p>proxy_ssl_certificate \/hab\/svc\/automate-load-balancer\/config\/service.crt; &#8211;<br \/>\n\u4ee3\u7406_ssl_\u8bc1\u4e66 \/hab\/svc\/automate-load-balancer\/config\/service.crt;<\/p>\n<h2>SSH\u8fde\u63a5\u65b9\u6cd5<\/p>\n<pre class=\"post-pre\"><code>ssh-add\r\nssh centos7chef\r\nssh centos7chefwk\r\nssh centos7chefnode\r\n\r\n172.17.0.2\r\n172.17.0.3\r\n172.17.0.4\r\n<\/code><\/pre>\n<h1>\u4fee\u6539root\u5bc6\u7801\u7684\u65b9\u6cd5<\/p>\n<pre class=\"post-pre\"><code>ssh centos7chefnode\r\npasswd root\r\n\/\/ chef1234\r\n<\/code><\/pre>\n<h2>\u5f15\u5bfc\u542f\u52a8\u7684\u6b65\u9aa4<\/p>\n<pre class=\"post-pre\"><code>ssh centos7chefwk\r\ncd chef-repo\r\nknife bootstrap -U root -N centos7chefnode -i \/root\/.ssh\/id_rsa --node-ssl-verify-mode none 172.17.0.4 -y\r\n\r\n\r\nknife bootstrap -U root -N centos7chefnode -i \/root\/.ssh\/id_rsa --node-ssl-verify-mode none centos7chefnode -y\r\n\r\n\/\/ ssh-add\u3057\u3066\u3042\u308b\u3053\u3068\u3001ssh_config\u306f\u8aad\u307f\u8fbc\u3093\u3067\u308b\u3088\u3046\u3060\r\nknife bootstrap -U root -N centos7chefnode --node-ssl-verify-mode none centos7chefnode -y -V -p 4444\r\n\r\n\/\/ chef1234\r\n<\/code><\/pre>\n<h2>\u5236\u4f5c\u98df\u8c31\u4e66<\/p>\n<pre class=\"post-pre\"><code>cd ~\/chef-repo\/cookbooks\r\n\r\nchef generate cookbook test-cookbook\r\n\r\nvim test-cookbook\/recipes\/default.rb\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>package \"nginx\" do\r\n  action :install\r\nend\r\n\r\nservice \"nginx\" do\r\n  action [:enable, :start]\r\nend\r\n<\/code><\/pre>\n<h2>\u4e0a\u4f20\u98df\u8c31<\/p>\n<pre class=\"post-pre\"><code>knife cookbook upload test-cookbook\r\nknife cookbook list\r\nknife show test-cookbook recipes\/default.rb\r\n\r\n<\/code><\/pre>\n<h2>\u8dd1\u6b65\u5217\u8868\u8bbe\u5b9a<\/p>\n<pre class=\"post-pre\"><code>knife node edit centos7chefnode\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>{\r\n  \"name\": \"centos7chefnode\",\r\n  \"chef_environment\": \"_default\",\r\n  \"normal\": {\r\n    \"tags\": [\r\n\r\n    ]\r\n  },\r\n  \"policy_name\": null,\r\n  \"policy_group\": null,\r\n  \"run_list\": [\r\n    \"recipe[test-cookbook::default]\"\r\n]\r\n\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>knife node show centos7chefnode\r\n<\/code><\/pre>\n<h2>\u6267\u884cchef-client<\/p>\n<pre class=\"post-pre\"><code>ssh centos7chefnode\r\nchef-client\r\n<\/code><\/pre>\n<p>\u52a8\u4e86\u3002\u867d\u7136UI\u65e0\u6cd5\u4f7f\u7528\uff0c\u4f46\u662fChef\u670d\u52a1\u5668\u5df2\u7ecf\u642d\u5efa\u597d\u4e86\u3002<\/p>\n<h1>\u5c06\u98df\u8c31\u4fdd\u5b58\u5230GitHub\u4e0a\u3002<\/p>\n<h1>option:  \u9009\u9879<\/p>\n<pre class=\"post-pre\"><code>[root@3f2738e3c363 \/]# chef-automate\r\nA helpful utility to deploy and manage Chef Automate.\r\n\r\nUsage:\r\n  chef-automate [command]\r\n\r\nAvailable Commands:\r\n  airgap\r\n  applications           Manage applications observability features\r\n  backup                 Chef Automate backup\r\n  config                 Chef Automate configuration\r\n  deploy                 Deploy Chef Automate\r\n  external-cert          Manage Chef Automate's external certificate\r\n  gather-logs            Gather system diagnostics and logs\r\n  help                   Help about any command\r\n  iam                    Chef Automate iam commands\r\n  infrastructure         Chef Automate infrastructure\r\n  init-config            Initialize default config\r\n  internal-ca            Manage Chef Automate's internal certificate authority\r\n  license                Chef Automate license management\r\n  maintenance            Put Chef Automate into or out of maintenance mode\r\n  migrate-from-v1        Migrate from Chef Automate v1\r\n  migrate-from-v1-status Watch the status of the migration to Chef Automate 2\r\n  preflight-check        Perform preflight check\r\n  restart-services       restart deployment services\r\n  service-versions       Retrieve the versions of the individual Chef Automate services\r\n  start                  Start Chef Automate\r\n  status                 Retrieve Chef Automate status\r\n  stop                   Stop deployment\r\n  system-logs            Tail Chef Automate logs\r\n  uninstall              Uninstall Chef Automate\r\n  upgrade                upgrade automate to the latest version\r\n  version                Show CLI version\r\n\r\nFlags:\r\n  -d, --debug                Enable debug output\r\n  -h, --help                 help for chef-automate\r\n      --no-check-version     Disable version check\r\n      --result-json string   Write command result as JSON to PATH\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>[root@3f2738e3c363 \/]# chef-automate deploy -h\r\nDeploy a new Chef Automate instance using the supplied configuration.\r\n    - &lt;CONFIG_FILE&gt; must be a valid path to a TOML formatted configuration file\r\n\r\nUsage:\r\n  chef-automate deploy [\/path\/to\/config.toml] [flags]\r\n\r\nFlags:\r\n      --accept-terms-and-mlsa     Agree to the Chef Software Terms of Service and the Master License and Services Agreement\r\n      --airgap-bundle string      Path to an airgap install bundle\r\n      --certificate string        The path to a certificate that should be used for external TLS connections (web and API).\r\n      --channel string            Release channel to deploy all services from\r\n      --fqdn string               The fully-qualified domain name that Chef Automate can be accessed at. (default: hostname of this machine)\r\n  -h, --help                      help for deploy\r\n      --private-key string        The path to a private key corresponding to the TLS certificate.\r\n      --product strings           Product to deploy\r\n      --skip-preflight            Deploy regardless of pre-flight conditions\r\n      --upgrade-strategy string   Upgrade strategy to use for this deployment. (default \"at-once\")\r\n\r\nGlobal Flags:\r\n  -d, --debug                Enable debug output\r\n      --no-check-version     Disable version check\r\n      --result-json string   Write command result as JSON to PATH\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u603b\u4e4b\u5148\u52a8\u8d77\u6765\u4e86\u3002\u4ece\u6d4f\u89c8\u5668\u6253\u5f00\u4e86UI\u3002 \u6267\u884cknife bootstrap\uff0c\u53ef\u4ee5\u5728\u8282\u70b9\u4e0a\u8fd0\u884cchef-clien [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-28508","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\u7684\u6280\u672f\u6587\u7ae0\" \/>\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.silicloud.com\/zh\/blog\/\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528macbook\uff0c\u5728docker\u4e0a\u642d\u5efachef-automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528macbook\uff0c\u5728docker\u4e0a\u642d\u5efachef-automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-09T01:47:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T00:34:18+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/\",\"name\":\"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-12-09T01:47:30+00:00\",\"dateModified\":\"2025-08-12T00:34:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"description\":\"\u5173\u4e8e\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55 - Blog - Silicon Cloud","description":"\u5173\u4e8e\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\u7684\u6280\u672f\u6587\u7ae0","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.silicloud.com\/zh\/blog\/\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528macbook\uff0c\u5728docker\u4e0a\u642d\u5efachef-automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668-2\/","og_locale":"zh_CN","og_type":"article","og_title":"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55","og_description":"\u5173\u4e8e\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528macbook\uff0c\u5728docker\u4e0a\u642d\u5efachef-automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-12-09T01:47:30+00:00","article_modified_time":"2025-08-12T00:34:18+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/","name":"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-12-09T01:47:30+00:00","dateModified":"2025-08-12T00:34:18+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"description":"\u5173\u4e8e\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\uff08\u5236\u4f5c\u4e2d\uff09\u4f7f\u7528Macbook\uff0c\u5728Docker\u4e0a\u642d\u5efaChef Automate\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5668\u7684\u8bb0\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%ef%bc%88%e5%88%b6%e4%bd%9c%e4%b8%ad%ef%bc%89%e4%bd%bf%e7%94%a8macbook%ef%bc%8c%e5%9c%a8docker%e4%b8%8a%e6%90%ad%e5%bb%bachef-automate%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e6%9c%8d%e5%8a%a1%e5%99%a8-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=28508"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28508\/revisions"}],"predecessor-version":[{"id":111338,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/28508\/revisions\/111338"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=28508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=28508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=28508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}