<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7422248496997250304</id><updated>2024-09-12T02:15:56.153+08:00</updated><category term="windows"/><category term="python"/><title type='text'>wangzheng, tech star</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-857426347708061917</id><published>2019-11-06T22:13:00.001+08:00</published><updated>2019-11-07T22:17:26.500+08:00</updated><title type='text'>openshift 4.2 静态IP离线 baremetal 安装，包含operator hub</title><content type='html'>原文链接：&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md&quot;&gt;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
本文描述ocp4.2在baremental(kvm模拟)上面，静态ip安装的方法。包括operator hub步骤。&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
以下是本次使用的虚拟机配置：&amp;nbsp;&lt;a href=&quot;https://docs.google.com/spreadsheets/d/1dwgh72r4ZfxEIFV82e_qe0T4w3CpENG_HqSejB3IUQs/edit#gid=0&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://docs.google.com/spreadsheets/d/1dwgh72r4ZfxEIFV82e_qe0T4w3CpENG_HqSejB3IUQs/edit#gid=0&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
本次实验的简要说明：&amp;nbsp;&lt;a href=&quot;https://docs.google.com/presentation/d/1_iy_YWnr6YX1tkwhw46ttCMkEoyPcHXvZvGQBDqJMyI/edit&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://docs.google.com/presentation/d/1_iy_YWnr6YX1tkwhw46ttCMkEoyPcHXvZvGQBDqJMyI/edit&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-25-18-28-28.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-25-18-28-28.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E4%BB%A5%E4%B8%8B%E6%98%AF%E5%8F%82%E8%80%83%E6%9D%90%E6%96%99&quot; id=&quot;user-content-以下是参考材料&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;以下是参考材料&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://blog.openshift.com/openshift-4-2-disconnected-install/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://blog.openshift.com/openshift-4-2-disconnected-install/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://blog.openshift.com/openshift-4-bare-metal-install-quickstart/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://blog.openshift.com/openshift-4-bare-metal-install-quickstart/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/christianh814/ocp4-upi-helpernode#ocp4-upi-helper-node-playbook&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/christianh814/ocp4-upi-helpernode#ocp4-upi-helper-node-playbook&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/openshift/cluster-samples-operator/blob/master/manifests/image-references&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/openshift/cluster-samples-operator/blob/master/manifests/image-references&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/e-minguez/ocp4-upi-bm-pxeless-staticips/blob/master/docs/12-post-installation.md&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/e-minguez/ocp4-upi-bm-pxeless-staticips/blob/master/docs/12-post-installation.md&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85%E5%8C%85%E4%B8%8B%E8%BD%BD&quot; id=&quot;user-content-离线安装包下载&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;离线安装包下载&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
ocp4.2的离线安装包下载和3.11不太一样，按照如下方式准备。另外，由于默认的baremental是需要dhcp, pxe环境的，那么需要准备一个工具机，上面有dhcp, tftp, haproxy等工具，另外如果要用static ip方式安装，还需要ignition文件的修改工具，所以离线安装包需要一些其他第三方的工具。&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/wangzheng422/ocp4-upi-helpernode&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/wangzheng422/ocp4-upi-helpernode&lt;/a&gt;&amp;nbsp;这个工具，是创建工具机用的。&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/wangzheng422/filetranspiler&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/wangzheng422/filetranspiler&lt;/a&gt;&amp;nbsp;这个工具，是修改ignition文件用的。&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
打包好的安装包，在这里下载：&amp;nbsp;&lt;a href=&quot;https://drive.google.com/drive/u/2/folders/1uiw5sctkCYM-QdVYcZ7QQbQya84xS_NF&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://drive.google.com/drive/u/2/folders/1uiw5sctkCYM-QdVYcZ7QQbQya84xS_NF&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
工具机需要rhel 7.6的iso和升级源，这个可以参考以下链接来准备：&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/aws/README.md&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/wangzheng422/docker_env/blob/master/redhat/aws/README.md&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
打包好的下载位置：&amp;nbsp;&lt;a href=&quot;https://drive.google.com/drive/u/1/folders/1RxSOtiKOufhkbZeI8ran1BTBHkmyiTzy&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://drive.google.com/drive/u/1/folders/1RxSOtiKOufhkbZeI8ran1BTBHkmyiTzy&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E5%9C%A8%E5%A4%96%E7%BD%91%E4%BA%91%E4%B8%BB%E6%9C%BA%E4%B8%8A%E9%9D%A2%E5%87%86%E5%A4%87%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85%E6%BA%90&quot; id=&quot;user-content-在外网云主机上面准备离线安装源&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;在外网云主机上面准备离线安装源&lt;/h2&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on vultr&lt;/span&gt;
yum -y install podman docker-distribution pigz

cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt;&amp;gt;  /etc/hosts&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;127.0.0.1 vm.redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;127.0.0.1 registry.redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

mkdir /etc/crts/ &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /etc/crts
openssl req \
   -newkey rsa:2048 -nodes -keyout redhat.ren.key \
   -x509 -days 3650 -out redhat.ren.crt -subj \
   &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;/C=CN/ST=GD/L=SZ/O=Global Security/OU=IT Department/CN=*.redhat.ren&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;

cp /etc/crts/redhat.ren.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust extract

mkdir -p /data/registry
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; /etc/docker-distribution/registry/config.yml&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;version: 0.1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;log:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  fields:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    service: registry&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;storage:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    cache:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;        layerinfo: inmemory&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    filesystem:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;        rootdirectory: /data/registry&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;http:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    addr: :443&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    tls:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;       certificate: /etc/crts/redhat.ren.crt&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;       key: /etc/crts/redhat.ren.key&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; systemctl restart docker&lt;/span&gt;
systemctl &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;enable&lt;/span&gt; docker-distribution

systemctl restart docker-distribution

podman login registry.redhat.ren -u a -p a

mkdir -p /data/ocp4
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /data/ocp4

&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; BUILDNUMBER=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;$(&lt;/span&gt;curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.2/release.txt &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; grep &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;Name:&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; awk &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;{print $NF}&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;

wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.2/openshift-client-linux-&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;.tar.gz
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.2/openshift-install-linux-&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;.tar.gz

tar -xzf openshift-client-linux-&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;.tar.gz -C /usr/local/bin/
tar -xzf openshift-install-linux-&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;.tar.gz -C /usr/local/bin/

wget --recursive --no-directories --no-parent https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.2/latest/

wget -O ocp4-upi-helpernode-master.zip https://github.com/wangzheng422/ocp4-upi-helpernode/archive/master.zip

wget -O filetranspiler-master.zip https://github.com/wangzheng422/filetranspiler/archive/master.zip

podman pull registry.fedoraproject.org/fedora:latest
podman save registry.fedoraproject.org/fedora:latest &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; pigz -c &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;gt;&lt;/span&gt; fedora.tgz

&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; OCP_RELEASE=&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; LOCAL_REG=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;registry.redhat.ren&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; LOCAL_REPO=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;ocp4/openshift4&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; UPSTREAM_REPO=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;openshift-release-dev&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; LOCAL_SECRET_JSON=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;pull-secret.json&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REG}&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REPO}&lt;/span&gt;:&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${OCP_RELEASE}&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; RELEASE_NAME=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ocp-release&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; to download the pull-secret.json, open following link&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; https://cloud.redhat.com/openshift/install/metal/user-provisioned&lt;/span&gt;
vi pull-secret.json

oc adm release mirror -a &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_SECRET_JSON}&lt;/span&gt; \
--from=quay.io/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${UPSTREAM_REPO}&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${RELEASE_NAME}&lt;/span&gt;:&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${OCP_RELEASE}&lt;/span&gt; \
--to-release-image=&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REG}&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REPO}&lt;/span&gt;:&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${OCP_RELEASE}&lt;/span&gt; \
--to=&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REG}&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REPO}&lt;/span&gt;


&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /data/ocp4
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; download additinal images&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; scp files/4.2/docker_image/* and files/4.2/operator_images/*&lt;/span&gt;

yum -y install jq python3-pip pigz
pip3 install yq

podman login -u &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;******&lt;/span&gt; -p &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;********&lt;/span&gt; registry.redhat.io
podman login -u &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;******&lt;/span&gt; -p &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;********&lt;/span&gt; registry.access.redhat.com

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 以下命令要运行 2-3个小时，喝杯咖啡，耐心等待。。。&lt;/span&gt;
bash operator.sh

bash operator.build.image.sh

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; yum -y install docker skopeo&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; systemctl restart docker&lt;/span&gt;
yum -y install skopeo

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; docker login -u ****** -p ******** registry.redhat.io&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; # docker login -u ****** -p ******** registry.access.redhat.com&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; docker login -u ****** -p ******** registry.connect.redhat.com&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; docker login -u ****** -p ******** docker.io&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 这一步也会运行很久，视网速而定，2-3个小时是要的。&lt;/span&gt;
bash image.mirror.sh

&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /data
tar cf - ocp4/ &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; pigz -c &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;gt;&lt;/span&gt; ocp4.tgz 
tar cf - registry/ &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; pigz -c &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;gt;&lt;/span&gt; registry.tgz 
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
output of mirror of images&lt;/div&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; overflow-wrap: normal; overflow: auto; padding: 16px;&quot;&gt;&lt;code style=&quot;background: initial; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;&quot;&gt;Success
Update image:  registry.redhat.ren/ocp4/openshift4:4.2.0
Mirror prefix: registry.redhat.ren/ocp4/openshift4

To use the new mirrored repository to install, add the following section to the install-config.yaml:

imageContentSources:
- mirrors:
  - registry.redhat.ren/ocp4/openshift4
  source: quay.io/openshift-release-dev/ocp-release
- mirrors:
  - registry.redhat.ren/ocp4/openshift4
  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev


To use the new mirrored repository for upgrades, use the following to create an ImageContentSourcePolicy:

apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: example
spec:
  repositoryDigestMirrors:
  - mirrors:
    - registry.redhat.ren/ocp4/openshift4
    source: quay.io/openshift-release-dev/ocp-release
  - mirrors:
    - registry.redhat.ren/ocp4/openshift4
    source: quay.io/openshift-release-dev/ocp-v4.0-art-dev

&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E5%AE%BF%E4%B8%BB%E6%9C%BA%E5%87%86%E5%A4%87&quot; id=&quot;user-content-宿主机准备&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;宿主机准备&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
本次实验，是在一个32C， 256G 的主机上面，用很多个虚拟机安装测试。所以先准备这个宿主机。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;hostnamectl set-hostname base.redhat.ren

cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt;&amp;gt;  /etc/hosts&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;172.29.122.232 yum.redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 准备yum更新源&lt;/span&gt;
mkdir /etc/yum.repos.d.bak
mv /etc/yum.repos.d/&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;*&lt;/span&gt; /etc/yum.repos.d.bak
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; /etc/yum.repos.d/remote.repo&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;[remote]&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;name=RHEL FTP&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;baseurl=ftp://yum.redhat.ren/data&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;enabled=1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;gpgcheck=0&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

yum clean all
yum repolist

yum -y install byobu htop 

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 配置dns服务&lt;/span&gt;
yum -y install dnsmasq

cat  &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;gt;&lt;/span&gt; /etc/dnsmasq.d/openshift-cluster.conf &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;local=/redhat.ren/&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;address=/yum.redhat.ren/172.29.122.233&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;address=/vm.redhat.ren/192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;address=/registry.redhat.ren/192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

systemctl restart dnsmasq.service &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; systemctl &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;enable&lt;/span&gt; dnsmasq.service &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; systemctl status dnsmasq.service

firewall-cmd --permanent --add-service=dns
firewall-cmd --reload

systemctl restart dnsmasq

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on kvm host&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt;  /etc/hosts&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 127.0.0.1 vm.redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 配置registry&lt;/span&gt;
mkdir /etc/crts/ &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /etc/crts
openssl req \
   -newkey rsa:2048 -nodes -keyout redhat.ren.key \
   -x509 -days 3650 -out redhat.ren.crt -subj \
   &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;/C=CN/ST=GD/L=SZ/O=Global Security/OU=IT Department/CN=*.redhat.ren&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;

cp /etc/crts/redhat.ren.crt /etc/pki/ca-trust/source/anchors/
update-ca-trust extract

&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /data
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; tar zxf registry.tgz&lt;/span&gt;
yum -y install pigz
pigz -dc registry.tgz &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; tar xf -
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; /etc/docker-distribution/registry/config.yml&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;version: 0.1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;log:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  fields:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    service: registry&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;storage:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    cache:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;        layerinfo: inmemory&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    filesystem:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;        rootdirectory: /data/registry&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    delete:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;        enabled: true&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;http:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    addr: :443&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    tls:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;       certificate: /etc/crts/redhat.ren.crt&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;       key: /etc/crts/redhat.ren.key&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; systemctl restart docker&lt;/span&gt;
systemctl &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;enable&lt;/span&gt; docker-distribution
systemctl restart docker-distribution
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; podman login vm.redhat.ren -u a -p a&lt;/span&gt;

firewall-cmd --permanent --add-service=https
firewall-cmd --reload

cat /etc/crts/redhat.ren.crt

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; https://github.com/christianh814/ocp4-upi-helpernode/blob/master/docs/quickstart.md&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 准备vnc环境&lt;/span&gt;

yum -y install tigervnc-server tigervnc gnome-terminal gnome-session gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts google-noto-sans-cjk-fonts google-noto-sans-fonts fonts-tweak-tool

yum install -y    qgnomeplatform   xdg-desktop-portal-gtk   NetworkManager-libreswan-gnome   PackageKit-command-not-found   PackageKit-gtk3-module   abrt-desktop   at-spi2-atk   at-spi2-core   avahi   baobab   caribou   caribou-gtk2-module   caribou-gtk3-module   cheese   compat-cheese314   control-center   dconf   empathy   eog   evince   evince-nautilus   file-roller   file-roller-nautilus   firewall-config   firstboot   fprintd-pam   gdm   gedit   glib-networking   gnome-bluetooth   gnome-boxes   gnome-calculator   gnome-classic-session   gnome-clocks   gnome-color-manager   gnome-contacts   gnome-dictionary   gnome-disk-utility   gnome-font-viewer   gnome-getting-started-docs   gnome-icon-theme   gnome-icon-theme-extras   gnome-icon-theme-symbolic   gnome-initial-setup   gnome-packagekit   gnome-packagekit-updater   gnome-screenshot   gnome-session   gnome-session-xsession   gnome-settings-daemon   gnome-shell   gnome-software   gnome-system-log   gnome-system-monitor   gnome-terminal   gnome-terminal-nautilus   gnome-themes-standard   gnome-tweak-tool   nm-connection-editor   orca   redhat-access-gui   sane-backends-drivers-scanners   seahorse   setroubleshoot   sushi   totem   totem-nautilus   vinagre   vino   xdg-user-dirs-gtk   yelp

yum install -y    cjkuni-uming-fonts   dejavu-sans-fonts   dejavu-sans-mono-fonts   dejavu-serif-fonts   gnu-free-mono-fonts   gnu-free-sans-fonts   gnu-free-serif-fonts   google-crosextra-caladea-fonts   google-crosextra-carlito-fonts   google-noto-emoji-fonts   jomolhari-fonts   khmeros-base-fonts   liberation-mono-fonts   liberation-sans-fonts   liberation-serif-fonts   lklug-fonts   lohit-assamese-fonts   lohit-bengali-fonts   lohit-devanagari-fonts   lohit-gujarati-fonts   lohit-kannada-fonts   lohit-malayalam-fonts   lohit-marathi-fonts   lohit-nepali-fonts   lohit-oriya-fonts   lohit-punjabi-fonts   lohit-tamil-fonts   lohit-telugu-fonts   madan-fonts   nhn-nanum-gothic-fonts   open-sans-fonts   overpass-fonts   paktype-naskh-basic-fonts   paratype-pt-sans-fonts   sil-abyssinica-fonts   sil-nuosu-fonts   sil-padauk-fonts   smc-meera-fonts   stix-fonts   thai-scalable-waree-fonts   ucs-miscfixed-fonts   vlgothic-fonts   wqy-microhei-fonts   wqy-zenhei-fonts

vncpasswd

cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; ~/.vnc/xstartup&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;unset SESSION_MANAGER&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;unset DBUS_SESSION_BUS_ADDRESS&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;gnome-session &amp;amp;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
chmod +x &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;~&lt;/span&gt;/.vnc/xstartup

vncserver :1 -geometry 1280x800
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 如果你想停掉vnc server，这么做&lt;/span&gt;
vncserver -kill :1

firewall-cmd --permanent --add-port=6001/tcp
firewall-cmd --permanent --add-port=5901/tcp
firewall-cmd --reload

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; connect vnc at port 5901&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; export DISPLAY=:1&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; https://www.cyberciti.biz/faq/how-to-install-kvm-on-centos-7-rhel-7-headless-server/&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 配置kvm环境&lt;/span&gt;
yum -y install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install virt-viewer virt-manager

systemctl &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;enable&lt;/span&gt; libvirtd
systemctl start libvirtd

lsmod &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; grep -i kvm
brctl show
virsh net-list
virsh net-dumpxml default

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 创建实验用虚拟网络&lt;/span&gt;

cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt;&amp;gt;  /data/virt-net.xml&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&amp;lt;network&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;name&amp;gt;openshift4&amp;lt;/name&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;forward mode=&#39;nat&#39;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    &amp;lt;nat&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;      &amp;lt;port start=&#39;1024&#39; end=&#39;65535&#39;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;    &amp;lt;/nat&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;/forward&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;bridge name=&#39;openshift4&#39; stp=&#39;on&#39; delay=&#39;0&#39;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;domain name=&#39;openshift4&#39;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;ip address=&#39;192.168.7.1&#39; netmask=&#39;255.255.255.0&#39;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  &amp;lt;/ip&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&amp;lt;/network&amp;gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

virsh net-define --file virt-net.xml
virsh net-autostart openshift4
virsh net-start openshift4

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 创建工具机&lt;/span&gt;

mkdir -p /data/kvm

virt-install --name=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ocp4-aHelper&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; --vcpus=2 --ram=4096 \
--disk path=/data/kvm/ocp4-aHelper.qcow2,bus=virtio,size=230 \
--os-variant centos7.0 --network network=openshift4,model=virtio \
--boot menu=on --location /data/rhel-server-7.6-x86_64-dvd.iso \
--initrd-inject helper-ks.cfg --extra-args &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;inst.ks=file:/helper-ks.cfg&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; --noautoconsole

virt-viewer --domain-name ocp4-aHelper
virsh start ocp4-aHelper
virsh list --all
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E5%B7%A5%E5%85%B7%E6%9C%BA%E5%87%86%E5%A4%87&quot; id=&quot;user-content-工具机准备&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;工具机准备&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
以下是在工具机里面，进行的安装操作。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; in helper node&lt;/span&gt;
mkdir /etc/yum.repos.d.bak
mv /etc/yum.repos.d/&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;*&lt;/span&gt; /etc/yum.repos.d.bak/
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; /etc/yum.repos.d/remote.repo&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;[remote]&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;name=RHEL FTP&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;baseurl=ftp://yum.redhat.ren/data&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;enabled=1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;gpgcheck=0&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

yum clean all
yum repolist

yum -y install ansible git unzip podman
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; change to my fork https://github.com/wangzheng422/ocp4-upi-helpernode&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; change to my fork https://github.com/wangzheng422/filetranspiler&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; scp ocp4.tgz to /root&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /root
tar zvxf ocp4.tgz
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /root/ocp4
unzip ocp4-upi-helpernode-master.zip
podman load -i fedora.tgz
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 根据现场环境，修改 ocp4-upi-helpernode-master/vars-static.yaml&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; ocp4-upi-helpernode-master
ansible-playbook -e @vars-static.yaml -e staticips=true tasks/main.yml

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; try this:&lt;/span&gt;
/usr/local/bin/helpernodecheck

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 定制ignition&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on helper node&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; BUILDNUMBER=4.2.0
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; OCP_RELEASE=&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${BUILDNUMBER}&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; LOCAL_REG=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;registry.redhat.ren&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; LOCAL_REPO=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;ocp4/openshift4&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; UPSTREAM_REPO=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;openshift-release-dev&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; LOCAL_SECRET_JSON=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;pull-secret.json&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REG}&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${LOCAL_REPO}&lt;/span&gt;:&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${OCP_RELEASE}&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; RELEASE_NAME=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ocp-release&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;

cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; /root/.ssh/config&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;StrictHostKeyChecking no&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;UserKnownHostsFile=/dev/null&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /root/ocp4
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; scp ocp4.tgz to /root&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; scp install-config.yaml to /root/ocp4&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 根据现场环境，修改 install-config.yaml&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 至少要修改ssh key， 还有 additionalTrustBundle，这个是镜像仓库的csr &lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; example file at files/4.2/kvm/&lt;/span&gt;

/bin/rm -rf &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;*&lt;/span&gt;.ign .openshift_install_state.json auth bootstrap master0 master1 master2 worker0 worker1 worker2

openshift-install create ignition-configs --dir=/root/ocp4

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 以下操作本来是想设置网卡地址，但是实践发现是不需要的。&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 保留在这里，是因为他可以在安装的时候注入文件，非常有用。&lt;/span&gt;
mkdir -p bootstrap/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; bootstrap/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.12&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i bootstrap.ign -f bootstrap -o bootstrap-static.ign

/bin/cp -f bootstrap-static.ign /var/www/html/ignition/

mkdir -p master0/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; master0/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.13&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i master.ign -f master0 -o master-0.ign

/bin/cp -f master-0.ign /var/www/html/ignition/

mkdir -p master1/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; master1/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.14&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i master.ign -f master1 -o master-1.ign

/bin/cp -f master-1.ign /var/www/html/ignition/

mkdir -p master2/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; master2/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.15&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i master.ign -f master2 -o master-2.ign

/bin/cp -f master-2.ign /var/www/html/ignition/

mkdir -p worker0/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; worker0/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.16&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i worker.ign -f worker0 -o worker-0.ign

/bin/cp -f worker-0.ign /var/www/html/ignition/

mkdir -p worker1/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; worker1/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.17&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i worker.ign -f worker1 -o worker-1.ign

/bin/cp -f worker-1.ign /var/www/html/ignition/

mkdir -p worker2/etc/sysconfig/network-scripts/
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; cat &amp;lt;&amp;lt;EOF &amp;gt; worker2/etc/sysconfig/network-scripts/ifcfg-ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEVICE=ens3&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTPROTO=none&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ONBOOT=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPADDR=192.168.7.18&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; NETMASK=255.255.255.0&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; GATEWAY=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS1=192.168.7.11&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DNS2=192.168.7.1&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DOMAIN=redhat.ren&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; PREFIX=24&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; DEFROUTE=yes&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; IPV6INIT=no&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; EOF&lt;/span&gt;
filetranspiler -i worker.ign -f worker2 -o worker-2.ign

/bin/cp -f worker-2.ign /var/www/html/ignition/
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E5%9B%9E%E5%88%B0%E5%AE%BF%E4%B8%BB%E6%9C%BA&quot; id=&quot;user-content-回到宿主机&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;回到宿主机&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
本来，到了这一步，就可以开始安装了，但是我们知道coreos装的时候，要手动输入很长的命令行，实际操作的时候，那是不可能输入对的，输入错一个字符，安装就失败，要重启，重新输入。。。&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
为了避免这种繁琐的操作，参考网上的做法，我们就需要为每个主机定制iso了。&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
这里面有一个坑，我们是不知道主机的网卡名称的，只能先用coreos iso安装启动一次，进入单用户模式以后，ip a 来查看以下，才能知道，一般来说，是ens3。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on kvm host&lt;/span&gt;

yum -y install genisoimage libguestfs-tools

&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; NGINX_DIRECTORY=/data/ocp4
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; RHCOSVERSION=4.2.0
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; VOLID=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;$(&lt;/span&gt;isoinfo -d -i &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${NGINX_DIRECTORY}&lt;/span&gt;/rhcos-&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${RHCOSVERSION}&lt;/span&gt;-x86_64-installer.iso &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; awk &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;/Volume id/ { print $3 }&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
TEMPDIR=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;$(&lt;/span&gt;mktemp -d&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$VOLID&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$TEMPDIR&lt;/span&gt;

systemctl start libvirtd

&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${TEMPDIR}&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Extract the ISO content using guestfish (to avoid sudo mount)&lt;/span&gt;
guestfish -a &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${NGINX_DIRECTORY}&lt;/span&gt;/rhcos-&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${RHCOSVERSION}&lt;/span&gt;-x86_64-installer.iso \
  -m /dev/sda tar-out / - &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; tar xvf -

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Helper function to modify the config files&lt;/span&gt;
&lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #6f42c1;&quot;&gt;modify_cfg&lt;/span&gt;(){
  &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;EFI/redhat/grub.cfg&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;isolinux/isolinux.cfg&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Append the proper image and ignition urls&lt;/span&gt;
    sed -e &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;/coreos.inst=yes/s|$| coreos.inst.install_dev=vda coreos.inst.image_url=&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${URL}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;\/install\/&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${BIOSMODE}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;.raw.gz coreos.inst.ignition_url=&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${URL}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;\/ignition\/&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${NODE}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;.ign ip=&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${IP}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;::&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${GATEWAY}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;:&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${NETMASK}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;:&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${FQDN}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;:&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${NET_INTERFACE}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;:none:&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${DNS}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt; nameserver=&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #24292e;&quot;&gt;${DNS}&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;|&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${file}&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;$(&lt;/span&gt;pwd&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${NODE}&lt;/span&gt;_&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${file&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;##*/&lt;/span&gt;}&lt;/span&gt;
    &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Boot directly in the installation&lt;/span&gt;
    sed -i -e &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;s/default vesamenu.c32/default linux/g&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; -e &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;s/timeout 600/timeout 10/g&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;$(&lt;/span&gt;pwd&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${NODE}&lt;/span&gt;_&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${file&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;##*/&lt;/span&gt;}&lt;/span&gt;
  &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;done&lt;/span&gt;
}

URL=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;http://192.168.7.11:8080/&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
GATEWAY=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.1&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NETMASK=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;255.255.255.0&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
DNS=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.11&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; BOOTSTRAP&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; TYPE=&quot;bootstrap&quot;&lt;/span&gt;
NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bootstrap-static&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.12&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bootstrap&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; MASTERS&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; TYPE=&quot;master&quot;&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; MASTER-0&lt;/span&gt;
NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;master-0&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.13&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;master-0&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; MASTER-1&lt;/span&gt;
NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;master-1&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.14&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;master-1&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; MASTER-2&lt;/span&gt;
NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;master-2&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.15&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;master-2&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; WORKERS&lt;/span&gt;
NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;worker-0&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.16&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;worker-0&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;worker-1&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.17&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;worker-1&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

NODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;worker-2&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
IP=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;192.168.7.18&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
FQDN=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;worker-2&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
BIOSMODE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;bios&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
NET_INTERFACE=&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ens3&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
modify_cfg

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Generate the images, one per node as the IP configuration is different...&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; https://github.com/coreos/coreos-assembler/blob/master/src/cmd-buildextend-installer#L97-L103&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;node&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;in&lt;/span&gt; master-0 master-1 master-2 worker-0 worker-1 worker-2 bootstrap-static&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Overwrite the grub.cfg and isolinux.cfg files for each node type&lt;/span&gt;
  &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;EFI/redhat/grub.cfg&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;isolinux/isolinux.cfg&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;do&lt;/span&gt;
    /bin/cp -f &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;$(&lt;/span&gt;pwd&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${node}&lt;/span&gt;_&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${file&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;##*/&lt;/span&gt;}&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${file}&lt;/span&gt;
  &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;done&lt;/span&gt;
  &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; As regular user!&lt;/span&gt;
  genisoimage -verbose -rock -J -joliet-long -volset &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${VOLID}&lt;/span&gt; \
    -eltorito-boot isolinux/isolinux.bin -eltorito-catalog isolinux/boot.cat \
    -no-emul-boot -boot-load-size 4 -boot-info-table \
    -eltorito-alt-boot -efi-boot images/efiboot.img -no-emul-boot \
    -o &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${NGINX_DIRECTORY}&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${node}&lt;/span&gt;.iso &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;done&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; Optionally, clean up&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt;
rm -Rf &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;${TEMPDIR}&lt;/span&gt;

&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /data/ocp4

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; finally, we can start install :)&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 你可以一口气把虚拟机都创建了，然后喝咖啡等着。&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 从这一步开始，到安装完毕，大概30分钟。&lt;/span&gt;
virt-install --name=ocp4-bootstrap --vcpus=4 --ram=8192 \
--disk path=/data/kvm/ocp4-bootstrap.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/bootstrap-static.iso   

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 想登录进coreos一探究竟？那么这么做&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ssh core@192.168.7.12 &lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; journalctl -b -f -u bootkube.service&lt;/span&gt;

virt-install --name=ocp4-master0 --vcpus=4 --ram=32768 \
--disk path=/data/kvm/ocp4-master0.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/master-0.iso 

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; ssh core@192.168.7.13&lt;/span&gt;

virt-install --name=ocp4-master1 --vcpus=4 --ram=32768 \
--disk path=/data/kvm/ocp4-master1.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/master-1.iso 

virt-install --name=ocp4-master2 --vcpus=4 --ram=32768 \
--disk path=/data/kvm/ocp4-master2.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/master-2.iso 

virt-install --name=ocp4-worker0 --vcpus=4 --ram=32768 \
--disk path=/data/kvm/ocp4-worker0.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/worker-0.iso 

virt-install --name=ocp4-worker1 --vcpus=4 --ram=32768 \
--disk path=/data/kvm/ocp4-worker1.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/worker-1.iso 

virt-install --name=ocp4-worker2 --vcpus=4 --ram=32768 \
--disk path=/data/kvm/ocp4-worker2.qcow2,bus=virtio,size=120 \
--os-variant rhel8.0 --network network=openshift4,model=virtio \
--boot menu=on --cdrom /data/ocp4/worker-2.iso 

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on workstation&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; open http://192.168.7.11:9000/&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; to check&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
打开浏览器，能看到一个监控页面，我们就能大致了解安装的进度。&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-22-14-27-03.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-22-14-27-03.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
等了一段时间以后，监控上看大概是这样&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-22-15-16-43.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-22-15-16-43.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E5%9C%A8%E5%B7%A5%E5%85%B7%E6%9C%BA%E4%B8%8A%E9%9D%A2&quot; id=&quot;user-content-在工具机上面&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;在工具机上面&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
在bootstrap和装master阶段，用这个命令看进度。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;openshift-install wait-for bootstrap-complete --log-level debug
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
一切正常的话，会看到这个。&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-23-12-17-30.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-23-12-17-30.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
有时候证书会过期，验证方法是登录 bootstrap, 看看过期时间。如果确定过期，要清除所有的openshift-install生成配置文件的缓存，重新来过。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; openssl s_client -connect localhost:6443 &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; openssl x509 -noout -text &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; grep Not&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
一般来说，如果在openshift-install这一步之前，按照文档，删除了缓存文件，就不会出现过期的现象。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;~&lt;/span&gt;/ocp4
&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;export&lt;/span&gt; KUBECONFIG=/root/ocp4/auth/kubeconfig
oc get nodes&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
这个时候，只能看到master，是因为worker的csr没有批准。如果虚拟机是一口气创建的，那么多半不会遇到下面的问题。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;oc get csr&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
会发现有很多没有被批准的&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-22-15-19-58.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-22-15-19-58.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
批准之&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;yum -y install jq
oc get csr -ojson &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; jq -r &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;.items[] | select(.status == {} ) | .metadata.name&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;|&lt;/span&gt; xargs oc adm certificate approve&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
然后worker 节点cpu飙高，之后就能看到worker了。&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-22-15-23-08.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-22-15-23-08.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
我们的工具机是带nfs的，那么就配置高档一些的nfs存储吧，不要用emptydir&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;bash ocp4-upi-helpernode-master/files/nfs-provisioner-setup.sh

oc edit configs.imageregistry.operator.openshift.io
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 修改 storage 部分&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; storage:&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt;   pvc:&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt;     claim:&lt;/span&gt;
oc patch configs.imageregistry.operator.openshift.io cluster -p &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;{&quot;spec&quot;:{&quot;storage&quot;:{&quot;pvc&quot;:{&quot;claim&quot;:&quot;&quot;}}}}&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; --type=merge


oc get clusteroperator image-registry&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
等一会，会看到这个，就对了。&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-23-13-54-06.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-23-13-54-06.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
上面的操作完成以后，就可以完成最后的安装了&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;openshift-install wait-for install-complete
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; here is the output&lt;/span&gt;
INFO Waiting up to 30m0s &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;for&lt;/span&gt; the cluster at https://api.ocp4.redhat.ren:6443 to initialize...
INFO Waiting up to 10m0s &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;for&lt;/span&gt; the openshift-console route to be created...
INFO Install complete&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;!&lt;/span&gt;
INFO To access the cluster as the system:admin user when using &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;oc&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, run &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;export KUBECONFIG=/root/ocp4/auth/kubeconfig&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.ocp4.redhat.ren
INFO Login to the console with user: kubeadmin, password: 8jFdX-sBENb-4gujS-ojNiY&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
配置一下本地的dns ( 把 *.apps.ocp4.redhat.ren 配置成 192.168.7.11 ) ，指向工具机的haproxy，打开浏览器就能访问管理界面了&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-10-22-16-01-03.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-10-22-16-01-03.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#operator-hub-%E7%A6%BB%E7%BA%BF%E5%AE%89%E8%A3%85&quot; id=&quot;user-content-operator-hub-离线安装&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Operator Hub 离线安装&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://docs.openshift.com/container-platform/4.2/operators/olm-restricted-networks.html&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://docs.openshift.com/container-platform/4.2/operators/olm-restricted-networks.html&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://github.com/operator-framework/operator-registry&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://github.com/operator-framework/operator-registry&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://www.cnblogs.com/ericnie/p/11777384.html?from=timeline&amp;amp;isappinstalled=0&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://www.cnblogs.com/ericnie/p/11777384.html?from=timeline&amp;amp;isappinstalled=0&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;a href=&quot;https://access.redhat.com/documentation/en-us/openshift_container_platform/4.2/html-single/images/index&quot; rel=&quot;nofollow&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot;&gt;https://access.redhat.com/documentation/en-us/openshift_container_platform/4.2/html-single/images/index&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
operator hub 准备分2个层次，一个是本文章描述的，制作operator hub的离线资源，并镜像operator 镜像。做到这一步，能够在离线部署的ocp4.2上，看到operator hub，并且能够部署operator。但是如果要用operator来部署要用的组件，那么operator会再去下载镜像，这个层次的镜像，也需要离线部署，但是由于每个operator需要的镜像都不一样，也没有统一的地方进行描述，所以需要各个项目现场，根据需要另外部署，本项目会尽量多的下载需要的镜像，但是目前无法避免遗漏。&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on helper node， 在工具机上&lt;/span&gt;
&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #005cc5;&quot;&gt;cd&lt;/span&gt; /root/ocp4

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; scp /etc/crts/redhat.ren.crt 192.168.7.11:/root/ocp4/&lt;/span&gt;
oc project openshift-config
oc create configmap ca.for.registry \
    --from-file=registry.redhat.ren=/root/ocp4/redhat.ren.crt
oc delete configmap ca.for.registry
oc patch image.config.openshift.io/cluster -p &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;{&quot;spec&quot;:{&quot;additionalTrustedCA&quot;:{&quot;name&quot;:&quot;ca.for.registry&quot;}}}&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;  --type=merge
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; oc patch image.config.openshift.io/cluster -p &#39;{&quot;spec&quot;:{&quot;registrySources&quot;:{&quot;insecureRegistries&quot;:[&quot;registry.redhat.ren&quot;]}}}&#39;  --type=merge&lt;/span&gt;

oc patch OperatorHub cluster --type json \
    -p &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;[{&quot;op&quot;: &quot;add&quot;, &quot;path&quot;: &quot;/spec/disableAllDefaultSources&quot;, &quot;value&quot;: true}]&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;

yum -y install python36
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 根据项目现场情况，修改以下脚本参数后运行&lt;/span&gt;
bash image.registries.conf.sh

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 由于某些ocp 4.2的更新机制，以下操作会触发集群更新，&lt;/span&gt;
&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 集群节点会逐个重启，集群组件也会逐个重启，请等待集群重启完毕。&lt;/span&gt;
oc apply -f ./99-worker-container-registries.yaml -n openshift-config
oc apply -f ./99-master-container-registries.yaml -n openshift-config

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 以下操作，删除mirror镜像信息，也会触发集群更新操作，请等待集群重启完毕&lt;/span&gt;
oc delete -f ./99-worker-container-registries.yaml -n openshift-config
oc delete -f ./99-master-container-registries.yaml -n openshift-config

watch oc get machineconfigpools

watch oc get node&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
从监控界面，能看到节点在升级，重启。&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-11-04-12-07-09.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-11-04-12-07-09.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;highlight highlight-source-shell&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; on helper node&lt;/span&gt;

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 如果想看到redhat的operator，这样做&lt;/span&gt;
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; redhat-operator-catalog.yaml&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;apiVersion: operators.coreos.com/v1alpha1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;kind: CatalogSource&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;metadata:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  name: redhat-operator-catalog&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  namespace: openshift-marketplace&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;spec:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  displayName: Redhat Operator Catalog&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  sourceType: grpc&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  image: registry.redhat.ren/ocp-operator/custom-registry:redhat&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
oc create -f redhat-operator-catalog.yaml

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 如果想看到certified的operator，这样做&lt;/span&gt;
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; certified-operator-catalog.yaml&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;apiVersion: operators.coreos.com/v1alpha1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;kind: CatalogSource&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;metadata:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  name: certified-operator-catalog&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  namespace: openshift-marketplace&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;spec:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  displayName: Certified Operator Catalog&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  sourceType: grpc&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  image: registry.redhat.ren/ocp-operator/custom-registry:certified&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
oc create -f certified-operator-catalog.yaml


&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 如果想看到community的operator，这样做&lt;/span&gt;
cat &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt; &amp;gt; community-operator-catalog.yaml&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;apiVersion: operators.coreos.com/v1alpha1&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;kind: CatalogSource&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;metadata:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  name: community-operator-catalog&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  namespace: openshift-marketplace&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;spec:&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  displayName: Community Operator Catalog&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  sourceType: grpc&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;  image: registry.redhat.ren/ocp-operator/custom-registry:community&lt;/span&gt;
&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #032f62;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;
oc create -f community-operator-catalog.yaml

&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #6a737d;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box;&quot;&gt;#&lt;/span&gt; 想删除这个离线operator hub，就这样做。&lt;/span&gt;
oc delete -f &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #d73a49;&quot;&gt;*&lt;/span&gt;-operator-catalog.yaml

oc get pods -n openshift-marketplace
oc get catalogsource -n openshift-marketplace
oc get packagemanifest -n openshift-marketplace
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
能看到operator 列表&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-11-01-18-02-58.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-11-01-18-02-58.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px;&quot;&gt;
部署一个operator也能成功&amp;nbsp;&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-11-01-18-03-37.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-11-01-18-03-37.png&quot; style=&quot;border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; border-bottom: 1px solid rgb(234, 236, 239); box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin-bottom: 16px; margin-top: 24px; padding-bottom: 0.3em;&quot;&gt;
&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/4.2.disconnect.operator.md#%E5%85%B6%E4%BB%96%E9%93%BE%E6%8E%A5&quot; id=&quot;user-content-其他链接&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; float: left; line-height: 1; margin-left: -20px; outline-width: 0px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 16px; margin-top: 0px; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;a href=&quot;https://github.com/wangzheng422/docker_env/blob/master/redhat/ocp4/imgs/2019-11-05-18-02-39.png&quot; rel=&quot;noopener noreferrer&quot; style=&quot;background-color: initial; box-sizing: border-box; color: #0366d6; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/wangzheng422/docker_env/raw/master/redhat/ocp4/imgs/2019-11-05-18-02-39.png&quot; style=&quot;background-color: white; border-style: none; box-sizing: initial; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/857426347708061917/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/857426347708061917' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/857426347708061917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/857426347708061917'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2019/11/openshift-42-ip-baremetal-operator-hub.html' title='openshift 4.2 静态IP离线 baremetal 安装，包含operator hub'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-5628622784725304822</id><published>2019-11-06T22:11:00.000+08:00</published><updated>2019-11-06T22:11:31.176+08:00</updated><title type='text'>免费的SSL泛域名证书</title><content type='html'>要弄一个免费的泛域名证书，需要准备2个东西：&lt;br /&gt;
1. 自己的DNS域名&lt;br /&gt;
2. 本地docker运行环境&lt;br /&gt;
&lt;br /&gt;
在本地运行如下的命令：&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
docker run -it --rm --name certbot \&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -v &quot;/Users/wzh/OneDrive/alauda/tools/certbot/etc:/etc/letsencrypt&quot; \&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -v &quot;/Users/wzh/OneDrive/alauda/tools/certbot/lib:/var/lib/letsencrypt&quot; \&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;certbot/certbot certonly&amp;nbsp; -d &quot;*.wander.ren&quot; --manual --preferred-challenges dns-01&amp;nbsp; --server https://acme-v02.api.letsencrypt.org/directory&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/5628622784725304822/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/5628622784725304822' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/5628622784725304822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/5628622784725304822'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2019/11/ssl.html' title='免费的SSL泛域名证书'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-3782395008674492378</id><published>2018-10-07T09:30:00.005+08:00</published><updated>2018-10-07T09:30:56.674+08:00</updated><title type='text'>kong demo</title><content type='html'>following these:&lt;br /&gt;
&lt;div&gt;
https://github.com/Kong/kong-dist-kubernetes&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
first, deploy&amp;nbsp;https://github.com/Kong/kong-dist-kubernetes/blob/master/postgres.yaml&lt;/div&gt;
&lt;div&gt;
kubectl apply -f ***&lt;br /&gt;
&lt;br /&gt;
then, deploy&amp;nbsp;https://github.com/Kong/kong-dist-kubernetes/blob/master/kong_postgres.yaml&lt;br /&gt;
&lt;br /&gt;
3rd, run one time job&amp;nbsp;https://github.com/Kong/kong-dist-kubernetes/blob/master/kong_migration_postgres.yaml&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/3782395008674492378/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/3782395008674492378' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/3782395008674492378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/3782395008674492378'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2018/10/kong-demo.html' title='kong demo'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-7165100275344442071</id><published>2016-09-05T10:40:00.003+08:00</published><updated>2016-09-05T10:40:38.042+08:00</updated><title type='text'>office scan, trend security, osx 停止和启动</title><content type='html'>趋势的杀毒软件，非常消耗机器资源，在osx上面，如何停止和启动他们呢？&lt;br /&gt;
&lt;br /&gt;
首先，sudo bash。&lt;br /&gt;
&lt;br /&gt;
如果要停止服务，运行如下命令：&lt;br /&gt;
launchctl unload /Library/LaunchDaemons/com.trendmicro.tmsm.plugin.plist&lt;br /&gt;
launchctl unload /Library/LaunchDaemons/com.trendmicro.icore.wp.plist&lt;br /&gt;
launchctl unload /Library/LaunchDaemons/com.trendmicro.icore.main.plist&lt;br /&gt;
launchctl unload /Library/LaunchDaemons/com.trendmicro.icore.av.plist&lt;br /&gt;
launchctl unload /Library/LaunchDaemons/com.trendmicro.tmsm.launcher.plist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
launchctl disable system/com.trendmicro.tmsm.plugin&lt;br /&gt;
launchctl disable system/com.trendmicro.icore.wp&lt;br /&gt;
launchctl disable system/com.trendmicro.icore.main&lt;br /&gt;
launchctl disable system/com.trendmicro.icore.av&lt;br /&gt;
launchctl disable system/com.trendmicro.tmsm.launcher&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
killall TmLoginMgr&lt;br /&gt;
killall UIMgmt&lt;br /&gt;
killall MainUI&lt;br /&gt;
killall iCoreService&lt;br /&gt;
killall iCoreService_av&lt;br /&gt;
killall iCoreService_wp&lt;br /&gt;
killall iCoreService_tmsm&lt;br /&gt;
&lt;br /&gt;
如果要启动服务，运行如下命令：&lt;br /&gt;
launchctl enable system/com.trendmicro.tmsm.plugin&lt;br /&gt;
launchctl enable system/com.trendmicro.icore.wp&lt;br /&gt;
launchctl enable system/com.trendmicro.icore.main&lt;br /&gt;
launchctl enable system/com.trendmicro.icore.av&lt;br /&gt;
launchctl enable system/com.trendmicro.tmsm.launcher&lt;br /&gt;
&lt;br /&gt;
launchctl load /Library/LaunchDaemons/com.trendmicro.tmsm.plugin.plist&lt;br /&gt;
launchctl load /Library/LaunchDaemons/com.trendmicro.icore.wp.plist&lt;br /&gt;
launchctl load /Library/LaunchDaemons/com.trendmicro.icore.main.plist&lt;br /&gt;
launchctl load /Library/LaunchDaemons/com.trendmicro.icore.av.plist&lt;br /&gt;
launchctl load /Library/LaunchDaemons/com.trendmicro.tmsm.launcher.plist&lt;br /&gt;
&lt;br /&gt;
cd &quot;/Library/Application Support/TrendMicro/TmccMac&quot;&lt;br /&gt;
open TmLoginMgr.app/&lt;br /&gt;
&lt;br /&gt;
好了，以后可以在需要的时候打开这个杀毒软件，不需要的时候，就关闭吧。</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/7165100275344442071/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/7165100275344442071' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/7165100275344442071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/7165100275344442071'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2016/09/office-scan-trend-security-osx.html' title='office scan, trend security, osx 停止和启动'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-518443195230098224</id><published>2016-02-20T16:31:00.003+08:00</published><updated>2016-02-20T16:31:28.772+08:00</updated><title type='text'>wordpress 插件 Video Embed &amp; Thumbnail Generator 造成媒体库加载缓慢的问题</title><content type='html'>在wordpress上面装了Video Embed &amp;amp; Thumbnail Generator 这个插件，非常好用，但是发现媒体库加载非常缓慢，查找原因总是不得要领，mysql性能不错，php也没问题。最后发现是dns解析的问题。&lt;br /&gt;
&lt;br /&gt;
情况是这样，wordpress主机是在防火墙里面的，本身是一个私有地址，而wordpress对外的域名是解析到公有地址上面的，而这个域名，在主机上是解析到公有地址，造成了一些问题。&lt;br /&gt;
&lt;br /&gt;
于是编辑/etc/hosts，把公有地址对应成为127.0.0.1，这样就没问题啦。</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/518443195230098224/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/518443195230098224' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/518443195230098224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/518443195230098224'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2016/02/wordpress-video-embed-thumbnail.html' title='wordpress 插件 Video Embed &amp; Thumbnail Generator 造成媒体库加载缓慢的问题'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-2585107098675534516</id><published>2016-02-10T14:12:00.000+08:00</published><updated>2016-02-26T16:13:37.675+08:00</updated><title type='text'>ubuntu vnc xfce4 中文</title><content type='html'>&lt;br /&gt;
ubuntu 14.04下面安装vnc, 并且启动xfce4非常方便，而且中文支持的也不错，我运行java程序，界面上吗带中文，之间就能支持。安装过程如下：&lt;br /&gt;
&lt;br /&gt;
先安装vnc, xfce4, 中文，字体等&lt;br /&gt;
&lt;br /&gt;
apt-get install xfce4 xfce4-goodies vnc4server language-pack-zh-hans fonts-droid ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-ukai fonts-arphic-uming&lt;br /&gt;
&lt;br /&gt;
然后安装java环境，当然这一步不是必须的。&lt;br /&gt;
&lt;br /&gt;
apt-get install python-software-properties&lt;br /&gt;
&lt;br /&gt;
add-apt-repository ppa:webupd8team/java&lt;br /&gt;
&lt;br /&gt;
apt-get update&lt;br /&gt;
&lt;br /&gt;
apt-get install oracle-java8-installer&lt;br /&gt;
&lt;br /&gt;
然后编辑/etc/default/locale&lt;br /&gt;
&lt;br /&gt;
加入LC_ALL=&quot;en_US.UTF-8&quot;&lt;br /&gt;
&lt;br /&gt;
然后在某个非root用户下面，执行vncserver :0&lt;br /&gt;
&lt;br /&gt;
然后执行vncserver -kill :0&lt;br /&gt;
&lt;br /&gt;
上面的命令是未来初始化一些脚本。&lt;br /&gt;
&lt;br /&gt;
然后编辑$HOME/.vnc/xstartup&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# Uncomment the following two lines for normal desktop:&lt;br /&gt;
unset SESSION_MANAGER&lt;br /&gt;
# exec /etc/X11/xinit/xinitrc&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
startxfce4 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec /etc/vnc/xstartup&lt;br /&gt;
[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb $HOME/.Xresources&lt;br /&gt;
&lt;br /&gt;
xsetroot -solid grey&lt;br /&gt;
vncconfig -iconic &amp;amp;&lt;br /&gt;
&lt;br /&gt;
#x-terminal-emulator -geometry 80x24+10+10 -ls -title &quot;$VNCDESKTOP Desktop&quot; &amp;amp;&lt;br /&gt;
#x-window-manager &amp;amp;&lt;br /&gt;
&lt;br /&gt;
编辑成上面的样子。&lt;br /&gt;
&lt;br /&gt;
然后就可以运行vnc啦，&lt;br /&gt;
&lt;br /&gt;
vncserver :0 -localhost -nolisten tcp &lt;br /&gt;
&lt;br /&gt;
上面运行的vnc是监听本地的请求，不允许外面了连接，这样是为了安全。那怎么使用呢？ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
我们先 &lt;br /&gt;
&lt;br /&gt;
ssh -L 5900:127.0.0.1:5900 user@hostip &lt;br /&gt;
&lt;br /&gt;
然后用vnc客户端，连接127.0.0.1就可以啦。 &lt;br /&gt;
&lt;br /&gt;
启动的vnc界面里面，会启动xfce4，如果发现图标不对，就点击setting-&amp;gt;apperance下面，选择一下theme主题，和图标下面的图标组就可以了。 &lt;br /&gt;
&lt;br /&gt;
如果向在这个普通用户vnc环境下，运行root的图形界面程序，那么在普通用户下，运行xhost +，然后进入root用户，就可以运行啦。&lt;br /&gt;
&lt;br /&gt;
另外需要修改&amp;nbsp;~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml&lt;br /&gt;
把&lt;br /&gt;
&amp;lt;property name=&quot;&amp;amp;lt;Super&amp;amp;gt;Tab&quot; type=&quot;string&quot; value=&quot;switch_window_key&quot;/&amp;gt;&lt;br /&gt;
变成&lt;br /&gt;
&amp;lt;property name=&quot;&amp;amp;lt;Super&amp;amp;gt;Tab&quot; type=&quot;empty&quot; /&amp;gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span id=&quot;docs-internal-guid-c31e382b-c9ca-fa85-f461-67b2f43db782&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/2585107098675534516/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/2585107098675534516' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/2585107098675534516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/2585107098675534516'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2016/02/ubuntu-vnc-xfce4.html' title='ubuntu vnc xfce4 中文'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-3457885847200130189</id><published>2016-02-02T18:30:00.001+08:00</published><updated>2016-02-23T11:32:01.089+08:00</updated><title type='text'>wordpress solr 中文搜索</title><content type='html'>wordpress的搜索功能不太好用，要说中文搜索，那基本上就等于没有，因为wordpress用的sql语句拼出来的查询条件，碰到中文，那就不行了。&lt;br /&gt;
&lt;br /&gt;
还好，wordpress支持solr搜索，solr本身是可以配置成支持中文搜索的，这里就把大概的配置过程梳理一下。&lt;br /&gt;
&lt;br /&gt;
首先，当然要安装好wordpress，然后要配置好“固定链接”。这一步很重要，因为我们用到的wpsolr插件，依赖这个功能。当初我就没配置好这个，造成了搜索页面没有显示出来。虽然作者的FAQ第一条就是这个，但是还是没注意。要配置固定链接，需要调整apache的配置，AllowOverride All ，类似这种配置，请自行谷歌。&lt;br /&gt;
&lt;br /&gt;
然后就是安装solr，首先要安装java，请自行谷歌安装方法。&lt;br /&gt;
然后按照solr官方的操作步骤，先下载solr的zip压缩包，然后启动solr&lt;br /&gt;
solr start&lt;br /&gt;
再运行&lt;br /&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;b&gt;solr&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; create -c wpcore -d {solr_path}/example/files/conf/ ，这样就生成了solr的一个core.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;s2&quot;&gt;&lt;br /&gt;&lt;/span&gt;
然后就是按照wpsolr里面的solr 安装文档&lt;br /&gt;
http://wpsolr.com/installation-guide/&lt;br /&gt;
把schema.xml ,&amp;nbsp;solrconfig.xml ， 上传到 {solr_path}/server/solr/wpcore/conf 下面去。&lt;br /&gt;
&lt;br /&gt;
接着我们要配置中文分词，我们可以使用https://github.com/hankcs/hanlp-solr-plugin 的中文分词，按照项目帮助，将hanlp-portable.jar和hanlp-solr-plugin.jar共两个jar放入${webapp}/WEB-INF/lib下&lt;br /&gt;
&lt;br /&gt;
之后，要修改schema.xml&lt;br /&gt;
把text, text_ws, text_lws, textTight, textSpell 等filetype 都改成下面这个样子，注意哦， 原来的positionIncrementGap之类的要去掉。&lt;br /&gt;
&amp;lt;fieldType name=&quot;text&quot; class=&quot;solr.TextField&quot;&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;analyzer type=&quot;index&quot; enableIndexMode=&quot;true&quot; class=&quot;com.hankcs.lucene.HanLPAnalyzer&quot;/&amp;gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;analyzer type=&quot;query&quot; enableIndexMode=&quot;true&quot; class=&quot;com.hankcs.lucene.HanLPAnalyzer&quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/fieldType&amp;gt;&lt;br /&gt;
然后重启solr&lt;br /&gt;
&lt;br /&gt;
接下来，在wordpress里面安装配置wpsolr，然后配置连接solr的参数，就能看到效果啦。&lt;br /&gt;
&lt;br /&gt;
不过默认wpsolr的搜索结果高亮不明显，是因为用了默认的&amp;lt;b&amp;gt;，我们给他换成更显眼的高亮方式，要修改wp-content/plugins/wpsolr-search-engine/classes/solr/&lt;b&gt;wpsolr-search-solr-client.php&lt;/b&gt;&lt;br /&gt;
把&lt;br /&gt;
const DEFAULT_HIGHLIGHTING_PREFIX = &#39;&amp;lt;b&amp;gt;&#39;;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;const DEFAULT_HIGHLIGHTING_POSFIX = &#39;&amp;lt;/b&amp;gt;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
改成&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; DEFAULT_HIGHLIGHTING_PREFIX &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &#39;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;&amp;lt;span style=&quot;background-color: #FFFF00&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;







&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; DEFAULT_HIGHLIGHTING_POSFIX &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &#39;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;s2&quot;&gt;&lt;br /&gt;&lt;/span&gt;
最后，由于gfw的问题，需要停止recaptcha的引用，修改&lt;span style=&quot;background-color: #f1f1f1; color: #444444; font-family: &#39;Open Sans&#39;, sans-serif; font-size: 15.6px; font-weight: 600; line-height: 23.4px;&quot;&gt;dashboard_settings.php&lt;/span&gt;&lt;br /&gt;
注释掉如下的语句&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
//wp_enqueue_script( &#39;google-api-recaptcha&#39;, &#39;//www.google.com/recaptcha/api.js&#39;, array() );&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
修改完了重启apache。&lt;/div&gt;
&lt;br /&gt;
然后就能看到效果啦。我这里实现了搜索高亮，搜索词推荐，效果还是挺好的。</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/3457885847200130189/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/3457885847200130189' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/3457885847200130189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/3457885847200130189'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2016/02/wordpress-solr.html' title='wordpress solr 中文搜索'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-6833262702835754540</id><published>2011-06-28T12:34:00.000+08:00</published><updated>2011-06-28T12:34:20.558+08:00</updated><title type='text'>Gephi：一个开源网络和图的可视化工具 « 幻肢</title><content type='html'>&lt;a href=&quot;http://cs.dartmouth.edu/%7Exy/blog/gephi/&quot;&gt;Gephi：一个开源网络和图的可视化工具 « 幻肢&lt;/a&gt;: &quot;Gephi：一个开源网络和图的可视化工具&lt;br /&gt;&lt;br /&gt;Infographics是个看起来很帅很拉风的东西。一堆数据，如果生动直观的展现给观众已经成了门学问。我一直想学学Processing，很多漂亮的图都是用它生成的。这个已经停留在我心中的TODO list上很久了，不过根据我的进度还会继续停留好久。。。&lt;br /&gt;&lt;br /&gt;前一阵帮牧哥的paper打酱油处理数据，需要 visualize 实验参与者的社会关系，事先的 survey 已经知道参与者与其他人是否好友。要做的事情就是如何展现他们的社会关系。我折腾来折腾去终于找到了今天要介绍的玩意儿：Gephi 中文发音可能是“盖飞”。它号称是 Photoshop for Graph，（既然是开源的怎么不是Gimp for Graph…），可以漂亮的 visualize 各种图关系，当然social networks也不在话下。更重要的是不需要写代码，所有过程都是交互的，可拖可拉可调可编辑，傻瓜型，i.e. WYSIWYG。下面是官方的视频：&lt;br /&gt;&lt;br /&gt;http://v.youku.com/v_show/id_XMjU5MDUwMjg4.html&lt;br /&gt;&lt;br /&gt;- 使用 Google 工具栏发送&quot;</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/6833262702835754540/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/6833262702835754540' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/6833262702835754540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/6833262702835754540'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/06/gephi.html' title='Gephi：一个开源网络和图的可视化工具 « 幻肢'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-4707391053282561317</id><published>2011-06-25T22:22:00.000+08:00</published><updated>2011-06-25T22:22:03.245+08:00</updated><title type='text'>CVPR 2011 Best Paper-优秀论文 | 丕子</title><content type='html'>&lt;a href=&quot;http://www.shamoxia.com/html/y2011/3106.html&quot;&gt;CVPR 2011 Best Paper-优秀论文 | 丕子&lt;/a&gt;: &quot;PAPER AWARDS&lt;br /&gt;&lt;br /&gt;Longuet-Higgins Prize –  Rapid Object Detection using a Boosted Cascade of Simple Features. Paul A. Viola, Michael J. Jones&lt;br /&gt;&lt;br /&gt;Best Paper - Real-time Human Pose Recognition in Parts from Single Depth Images, Jamie Shotton, Andrew FItzgibbon, Mat Cook, Toby Sharp, Mark Finocchio, Richard Moore, Alex Kipman, Andrew Blake&lt;br /&gt;&lt;br /&gt;Best Paper Honorable Mention - Discrete-Continuous Optimization for Large-scale Structure from Motion, David Crandall,  Andrew Owens, Noah Snavely, Daniel Huttenlocher&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best Student Paper – Recognition Using Visual Phrases, Ali Farhadi, Mohammad Amin Sadeghi&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best Student Paper Honorable Mention- Separating Reflective and Fluorescent Components of An Image, Cherry Zhang, Imari Sato&lt;br /&gt;&lt;br /&gt;- 使用 Google 工具栏发送&quot;</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/4707391053282561317/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/4707391053282561317' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/4707391053282561317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/4707391053282561317'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/06/cvpr-2011-best-paper.html' title='CVPR 2011 Best Paper-优秀论文 | 丕子'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-8573503040888574045</id><published>2011-06-09T12:04:00.000+08:00</published><updated>2011-06-09T12:04:28.352+08:00</updated><title type='text'>cygwin package source code</title><content type='html'>cygwin里面可以下载package的source code，但是下载下来以后怎么用呢？&lt;br /&gt;
&lt;br /&gt;
是这样的，需要下载一个cygport软件，然后去/usr/src下面，摆弄你下载下来的程序</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/8573503040888574045/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/8573503040888574045' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8573503040888574045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8573503040888574045'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/06/cygwin-package-source-code.html' title='cygwin package source code'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-6152621607280542844</id><published>2011-06-07T18:58:00.002+08:00</published><updated>2011-06-07T18:58:52.706+08:00</updated><title type='text'>eclipse Ubuntu tooltip</title><content type='html'>背景不是黑色的吗，去系统外观，color下面，调节tooltip的背景色</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/6152621607280542844/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/6152621607280542844' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/6152621607280542844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/6152621607280542844'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/06/eclipse-ubuntu-tooltip.html' title='eclipse Ubuntu tooltip'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-8864173517941085631</id><published>2011-05-23T10:51:00.001+08:00</published><updated>2011-05-23T10:52:03.242+08:00</updated><title type='text'>Consolas Font Pack for Microsoft Visual Studio 2005 or 2008</title><content type='html'>微软的visual studio的编程用的font，很适合matlab里面使用，特别在win7下面，执行pretty等函数的时候，就不会字符错位了&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/downloads/en/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&amp;amp;displaylang=en&quot;&gt;http://www.microsoft.com/downloads/en/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&amp;amp;displaylang=en&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/8864173517941085631/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/8864173517941085631' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8864173517941085631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8864173517941085631'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/05/consolas-font-pack-for-microsoft-visual.html' title='Consolas Font Pack for Microsoft Visual Studio 2005 or 2008'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-8874632720902265415</id><published>2011-05-17T18:15:00.000+08:00</published><updated>2011-05-17T18:15:41.195+08:00</updated><title type='text'>pyinstaller</title><content type='html'>------------------------win2000安装操作---------------------------&lt;br /&gt;
下载:http://pyinstaller.hpcf.upr.edu/ &lt;br /&gt;
解压后运行:Configure.py&lt;br /&gt;
使用方法:&lt;br /&gt;
E:\python&amp;gt;python D:\python\pyinstaller-1.3\Makespec.py --onefile --console --icon=./bubble.ico mypy.py&lt;br /&gt;
E:\python&amp;gt;python D:\python\pyinstaller-1.3\Build.py mypy.spec&lt;br /&gt;
生成:mypy.exe,搞定。</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/8874632720902265415/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/8874632720902265415' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8874632720902265415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8874632720902265415'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/05/pyinstaller.html' title='pyinstaller'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-8019514042468849128</id><published>2011-05-09T12:16:00.002+08:00</published><updated>2011-05-09T12:16:30.505+08:00</updated><title type='text'>在批处理中实现等待／延迟／暂停</title><content type='html'>1、比较传统的设计思路，利用for解析变量%time%并存为一个时间点，再利用set计算两个时间点的时间差，最后用if判断时间差是否达到设定的暂停时间。时间精度为0.01秒，适用平台为WinNT/2K/XP/2003。&lt;br /&gt;
&amp;nbsp; @echo off&lt;br /&gt;
&amp;nbsp; setlocal enableextensions&lt;br /&gt;
&amp;nbsp; echo %time%&lt;br /&gt;
&amp;nbsp; call :ProcDelay 200&lt;br /&gt;
&amp;nbsp; echo %time%&lt;br /&gt;
&amp;nbsp; goto :EOF&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; :ProcDelay delayMSec_&lt;br /&gt;
&amp;nbsp; setlocal enableextensions&lt;br /&gt;
&amp;nbsp; for /f &quot;tokens=1-4 delims=:. &quot; %%h in (&quot;%time%&quot;) do set start_=%%h%%i%%j%%k&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; :_procwaitloop&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for /f &quot;tokens=1-4 delims=:. &quot; %%h in (&quot;%time%&quot;) do set now_=%%h%%i%%j%%k&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set /a diff_=%now_%-%start_%&lt;br /&gt;
&amp;nbsp; if %diff_% LSS %1 goto _procwaitloop&lt;br /&gt;
&amp;nbsp; endlocal &amp;amp; goto :EOF&lt;br /&gt;
&lt;br /&gt;
2、使用Windows的VBS脚本中的sleep函数，可以动态创建这个VBS脚本，然后用Windows脚本宿主的命令行版本调用它。时间精度为0.001秒，使用平台为Win9x/WinNT系列。&lt;br /&gt;
&amp;nbsp; @echo off &amp;amp; setlocal enableextensions enabledelayedexpansion&lt;br /&gt;
&amp;nbsp; echo WScript.Sleep 2000 &amp;gt; %temp%\tmp$$$.vbs&lt;br /&gt;
&amp;nbsp; echo %time%&lt;br /&gt;
&amp;nbsp; cscript //nologo %temp%\tmp$$$.vbs&lt;br /&gt;
&amp;nbsp; echo %time%&lt;br /&gt;
&amp;nbsp; for %%f in (%temp%\tmp$$$.vbs) do if exist %%f del %%f&lt;br /&gt;
&amp;nbsp; endlocal &amp;amp; goto :EOF&lt;br /&gt;
&lt;br /&gt;
3、如果你的Windows系统中正常安装了网卡的TCP/IP协议，也可以使用ping定时发送测试包，以此达到暂停一定时间的目的；-n后的数字是发送包的数目，根据植树原则，为暂停秒数加一，此法每秒有0.5%的偏差。时间精度为1秒，使用平台为Win9x/WinNT系列。&lt;br /&gt;
ping -n 3 127.0.0.1&amp;gt;nul&lt;br /&gt;
&lt;br /&gt;
4、使用choice的缺省选择等待功能实现暂停，但它有个缺点，就是不能在等待途中按键，否则暂停的倒计时将自动终止。时间精度为1秒，适用平台为MS-DOS/Win9x/WinNT系列。&lt;br /&gt;
choice /t:y,2 /n &amp;gt;nul&lt;br /&gt;
&lt;br /&gt;
5、德国人Herbert Kleebauer给出了一个通用方案，通过间接产生一个exe程序来实现延迟，这个程序分为DOS和Win两个模块。延迟精度为0.001秒，适用平台为MS-DOS/Win9x/WinNT。代码见附件（http://willsort.blogchina.com/inc/sleep.bat.txt）。</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/8019514042468849128/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/8019514042468849128' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8019514042468849128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8019514042468849128'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/05/blog-post_09.html' title='在批处理中实现等待／延迟／暂停'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-2550287792451621913</id><published>2011-05-09T12:15:00.002+08:00</published><updated>2011-05-09T12:15:42.780+08:00</updated><title type='text'>【转】批处理判断服务是否启动</title><content type='html'>@echo off &lt;br /&gt;
for /f &quot;skip=3 tokens=4&quot; %%i in (&#39;sc query SharedAccess&#39;) do set &quot;zt=%%i&quot; &amp;amp;goto :next &lt;br /&gt;
&lt;br /&gt;
:next &lt;br /&gt;
if /i &quot;%zt%&quot;==&quot;RUNNING&quot; ( &lt;br /&gt;
net stop SharedAccess &lt;br /&gt;
sc config SharedAccess start= DISABLED &lt;br /&gt;
echo 已经发现该服务在运行，现在已经停止运行 &lt;br /&gt;
) else ( &lt;br /&gt;
echo 该服务现在处理停止状态 &lt;br /&gt;
) &lt;br /&gt;
pause &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
里面的SharedAccess服务名自己可以改成别的,恩..&lt;br /&gt;
&lt;br /&gt;
命令解析&lt;br /&gt;
&lt;br /&gt;
@&amp;nbsp; 作用是运行时不显示这一行的命令行&lt;br /&gt;
&lt;br /&gt;
echo&amp;nbsp;&amp;nbsp; 作用是显示该命令后的字符 &lt;br /&gt;
&lt;br /&gt;
echo off&amp;nbsp;&amp;nbsp; 作用是不显示该命令后的字符&lt;br /&gt;
批处理for命令详解&lt;br /&gt;
FOR这条命令基本上都被用来处理文本,但还有其他一些好用的功能!&lt;br /&gt;
看看他的基本格式(这里我引用的是批处理中的格式,直接在命令行只需要一个%号)&lt;br /&gt;
FOR 参数 %%变量名 IN (相关文件或命令) DO 执行的命令&lt;br /&gt;
参数:FOR有4个参数 /d /l /r /f 他们的作用我在下面用例子解释&lt;br /&gt;
%%变量名 :这个变量名可以是小写a-z或者大写A-Z,他们区分大小写,FOR会把每个读取到的值给他;&lt;br /&gt;
IN:命令的格式,照写就是了;&lt;br /&gt;
(相关文件或命令) :FOR要把什么东西读取然后赋值给变量,看下面的例子&lt;br /&gt;
do:命令的格式,照写就是了!&lt;br /&gt;
执行的命令:对每个变量的值要执行什么操作就写在这.&lt;br /&gt;
可以在CMD输入for /?看系统提供的帮助!对照一下&lt;br /&gt;
FOR %%variable IN (set) DO command [command-parameters]&lt;br /&gt;
&amp;nbsp;&amp;nbsp; %%variable&amp;nbsp;&amp;nbsp; 指定一个单一字母可替换的参数。&lt;br /&gt;
&amp;nbsp;&amp;nbsp; (set)&amp;nbsp;&amp;nbsp;&amp;nbsp; 指定一个或一组文件。可以使用通配符。&lt;br /&gt;
&amp;nbsp;&amp;nbsp; command 指定对每个文件执行的命令。&lt;br /&gt;
&amp;nbsp;&amp;nbsp; command-parameters&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 为特定命令指定参数或命令行开关。&lt;br /&gt;
&lt;br /&gt;
现在开始讲每个参数的意思&lt;br /&gt;
/d &lt;br /&gt;
仅为目录 &lt;br /&gt;
如果 Set (也就是我上面写的 &quot;相关文件或命令&quot;) 包含通配符（* 和 ?），将对与 Set 相匹配的每个目&lt;br /&gt;
录（而不是指定目录中的文件组）执行指定的 Command。&lt;br /&gt;
系统帮助的格式:FOR /D %%variable IN (set) DO command&lt;br /&gt;
他主要用于目录搜索,不会搜索文件,看这样的例子&lt;br /&gt;
@echo off&lt;br /&gt;
for /d %%i in (*) do @echo %%i&lt;br /&gt;
pause&lt;br /&gt;
把他保存放在C盘根目录执行,就会把C盘目录下的全部目录名字打印出来,而文件名字一个也不显示!&lt;br /&gt;
在来一个,比如我们要把当前路径下文件夹的名字只有1-3个字母的打出来&lt;br /&gt;
@echo off&lt;br /&gt;
for /d %%i in (???) do @echo %%i&lt;br /&gt;
pause&lt;br /&gt;
这样的话如果你当前目录下有目录名字只有1-3个字母的,就会显示出来,没有就不显示了&lt;br /&gt;
&lt;br /&gt;
思考题目:&lt;br /&gt;
@echo off&lt;br /&gt;
for /d %%i in (window?) do @echo %%i&lt;br /&gt;
pause&lt;br /&gt;
保存到C盘下执行,会显示什么呢?自己看吧!&lt;br /&gt;
/D参数只能显示当前目录下的目录名字,这个大家要注意!&lt;br /&gt;
&lt;br /&gt;
/R&lt;br /&gt;
递归 &lt;br /&gt;
进入根目录树 [Drive:]Path，在树的每个目录中执行 for 语句。如果在 /R 后没有指定目录，则认为是&lt;br /&gt;
当前目录。如果 Set 只是一个句点 (.)，则只枚举目录树。&lt;br /&gt;
系统帮助的格式:FOR /R [[drive:]path] %%variable IN (set) DO command&lt;br /&gt;
上面我们知道,/D只能显示当前路径下的目录名字,那么现在这个/R也是和目录有关,他能干嘛呢?放心他比&lt;br /&gt;
/D强大多了!&lt;br /&gt;
他可以把当前或者你指定路径下的文件名字全部读取,注意是文件名字,有什么用看例子!&lt;br /&gt;
@echo off&lt;br /&gt;
for /r c:\ %%i in (*.exe) do @echo %%i&lt;br /&gt;
pause&lt;br /&gt;
咋们把这个BAT保存到D盘随便哪里然后执行,我会就会看到,他把C盘根目录,和每个目录的子目录下面全部&lt;br /&gt;
的EXE文件都列出来了,这里的c:\就是目录了。&lt;br /&gt;
再来一个&lt;br /&gt;
@echo off&lt;br /&gt;
for /r %%i in (*.exe) do @echo %%i&lt;br /&gt;
pause&lt;br /&gt;
参数不一样了，这个命令前面没加那个C:\也就是搜索路径,这样他就会以当前目录为搜索路径,比如你这&lt;br /&gt;
个BAT你把他防灾d:\test目录下执行,那么他就会把D:\test目录和他下面的子目录的全部EXE文件列出&lt;br /&gt;
来!!!&lt;br /&gt;
&lt;br /&gt;
/L&lt;br /&gt;
迭代数值范围 &lt;br /&gt;
使用迭代变量设置起始值 (Start#)，然后逐步执行一组范围的值，直到该值超过所设置的终止值 (End#)&lt;br /&gt;
。/L 将通过对 Start# 与 End# 进行比较来执行迭代变量。如果 Start# 小于 End#，就会执行该命令。&lt;br /&gt;
如果迭代变量超过 End#，则命令解释程序退出此循环。还可以使用负的 Step# 以递减数值的方式逐步执&lt;br /&gt;
行此范围内的值。例如，(1,1,5) 生成序列 1 2 3 4 5，而 (5,-1,1) 则生成序列 (5 4 3 2 1)。语法是： &lt;br /&gt;
系统帮助的格式:for /L %% Variable in (Start#,Step#,End#) do Command &lt;br /&gt;
例如：&lt;br /&gt;
@echo off&lt;br /&gt;
for /l %%i in (1,1,5) do @echo %%i&lt;br /&gt;
pause&lt;br /&gt;
保存执行看效果,他会打印从1 2 3 4 5&amp;nbsp;&amp;nbsp; 这样5个数字&lt;br /&gt;
(1,1,5)这个参数也就是表示从1开始每次加1直到5终止!&lt;br /&gt;
再看这个例子&lt;br /&gt;
@echo off&lt;br /&gt;
for /l %%i in (1,1,5) do start cmd&lt;br /&gt;
pause&lt;br /&gt;
执行后是不是吓了一跳,怎么多了5个CMD窗口,呵呵!如果把那个 (1,1,5)改成 (1,1,65535)会有什么结果,&lt;br /&gt;
我先告诉大家,会打开65535个CMD窗口....这么多你不死机算你强!&lt;br /&gt;
当然我们也可以把那个start cmd改成md %%i 这样就会建立指定个目录了!!!名字为1-65535&lt;br /&gt;
看完这个被我赋予破坏性质的参数后,我们来看最后一个参数&lt;br /&gt;
/f&lt;br /&gt;
&lt;br /&gt;
含有/F的for详细说明&lt;br /&gt;
含有/F的for有很大的用处，在批处理中使用的最多，用法如下：&lt;br /&gt;
格式：&lt;br /&gt;
FOR /F [&quot;options&quot;] %%i IN (file) DO command&lt;br /&gt;
FOR /F [&quot;options&quot;] %%i IN (&quot;string&quot;) DO command&lt;br /&gt;
FOR /F [&quot;options&quot;] %%i IN (&#39;command&#39;) DO command&lt;br /&gt;
&lt;br /&gt;
这个可能是最常用的，也是最强的命令，主要用来处理文件和一些命令的输出结果。&lt;br /&gt;
file代表一个或多个文件&lt;br /&gt;
string 代表字符串&lt;br /&gt;
command代表命令&lt;br /&gt;
[&quot;options&quot;] 可选&lt;br /&gt;
对于FOR /F %%i IN (file) DO command&lt;br /&gt;
file为文件名，按照官方的说法是，for会依次将file中的文件打开，并且在进行到下一个文件之前将每个文件读取到内存，按照每一行分成一个一个的元素，忽略空白的行，看个例子。&lt;br /&gt;
假如文件a.txt中有如下内容：&lt;br /&gt;
&lt;br /&gt;
第1行第1列 第1行第2列 第1行第3列&lt;br /&gt;
第2行第1列 第2行第2列 第2行第3列&lt;br /&gt;
第3行第1列 第3行第2列 第3行第3列&lt;br /&gt;
&lt;br /&gt;
你想显示a.txt中的内容，会用什么命令呢？当然是type，type a.txt&lt;br /&gt;
for也可以完成同样的命令：&lt;br /&gt;
for /f %%i in (a.txt) do echo %%i&lt;br /&gt;
还是先从括号执行，因为含有参数/f,所以for会先打开a.txt，然后读出a.txt里面的所有内容，把它作为一个集合，并且以每一行作为一个元素，所以会产生这样的集合，&lt;br /&gt;
&lt;br /&gt;
{“第1行第1列 第1行第2列 第1行第3列”， //第一个元素&lt;br /&gt;
“第2行第1列 第2行第2列 第2行第3列”， //第二个元素&lt;br /&gt;
“第3行第1列 第3行第2列 第3行第3列”} //第三个元素&lt;br /&gt;
&lt;br /&gt;
集合中只有3个元素，同样用%%i依次代替每个元素，然后执行do后面的命令。&lt;br /&gt;
具体过程：&lt;br /&gt;
&lt;br /&gt;
用%%i代替“第1行第1列 第1行第2列 第1行第3列”，执行do后面的echo %%i，显示“第1行第1列 第1行第2列 第1行第3列”，&lt;br /&gt;
用%%i代替“第2行第1列 第2行第2列 第2行第3列”，执行echo %%i，显示“第2行第1列 第2行第2列 第2行第3列”，&lt;br /&gt;
依次，直到每个元素都代替完为止。&lt;br /&gt;
&lt;br /&gt;
为了加强理解/f的作用，请执行一下两个命令，对比即可明白：&lt;br /&gt;
&lt;br /&gt;
for /f %%i in (a.txt) do echo %%i //这个会显示a.txt里面的内容，因为/f的作用，会读出a.txt中 &lt;br /&gt;
的内容。&lt;br /&gt;
for %%i in (a.txt) do echo %%i //而这个只会显示a.txt这个名字，并不会读取其中的内容。&lt;br /&gt;
&lt;br /&gt;
通过上面的学习，我们发现for /f会默认以每一行来作为一个元素，但是如果我们还想把每一行再分解更小的内容，该怎么办呢？不用担心，for命令还为我们提供了更详细的参数，使我们将每一行分为更小的元素成为可能。&lt;br /&gt;
它们就是：delims和tokens&lt;br /&gt;
delims 用来告诉for每一行应该拿什么作为分隔符，默认的分隔符是空格和tab键&lt;br /&gt;
比如，还是上面的文件，我们执行下面的命令：&lt;br /&gt;
&lt;br /&gt;
for /f &quot;delims= &quot; %%i in (a.txt) do echo %%i&lt;br /&gt;
&lt;br /&gt;
显示的结果是：&lt;br /&gt;
&lt;br /&gt;
第1行第1列&lt;br /&gt;
第2行第1列&lt;br /&gt;
第3行第1列&lt;br /&gt;
&lt;br /&gt;
为什么是这样的呢。因为这里有了delims这个参数，=后面有一个空格，意思是再将每个元素以空格分割，默认是只取分割之后的第一个元素。&lt;br /&gt;
执行过程是：&lt;br /&gt;
&lt;br /&gt;
将第一个元素“第1行第1列 第1行第2列 第1行第3列”分成三个元素：“第1行第1列” “第1行第2列” “第1行第3列”，它默认只取第一个，即“第1行第1列”，然后执行do后面的命令，依次类推。&lt;br /&gt;
&lt;br /&gt;
但是这样还是有局限的，如果我们想要每一行的第二列元素，那又如何呢？&lt;br /&gt;
这时候，tokens跳出来说，我能做到。&lt;br /&gt;
它的作用就是当你通过delims将每一行分为更小的元素时，由它来控制要取哪一个或哪几个。&lt;br /&gt;
还是上面的例子，执行如下命令：&lt;br /&gt;
&lt;br /&gt;
for /f &quot;tokens=2 delims= &quot; %%i in (a.txt) do echo %%i&lt;br /&gt;
&lt;br /&gt;
执行结果：&lt;br /&gt;
&lt;br /&gt;
第1行第2列&lt;br /&gt;
第2行第2列&lt;br /&gt;
第3行第2列&lt;br /&gt;
如果要显示第三列，那就换成tokens=3。&lt;br /&gt;
同时tokens支持通配符*，以及限定范围。&lt;br /&gt;
如果要显示第二列和第三列，则换成tokens=2,3或tokens=2-3,如果还有更多的则为：tokens=2-10之类的。&lt;br /&gt;
此时的命令为：&lt;br /&gt;
&lt;br /&gt;
for /f &quot;tokens=2,3 delims= &quot; %%i in (a.txt) do echo %%i %%j&lt;br /&gt;
&lt;br /&gt;
怎么多出一个%%j？&lt;br /&gt;
这是因为你的tokens后面要取每一行的两列，用%%i来替换第二列，用%%j来替换第三列。&lt;br /&gt;
并且必须是按照英文字母顺序排列的，%%j不能换成%%k，因为i后面是j&lt;br /&gt;
执行结果为：&lt;br /&gt;
&lt;br /&gt;
第1行第2列 第1行第3列&lt;br /&gt;
第2行第2列 第2行第3列&lt;br /&gt;
第3行第2列 第3行第3列&lt;br /&gt;
对以通配符*，就是把这一行全部或者这一行的剩余部分当作一个元素了。&lt;br /&gt;
比如：&lt;br /&gt;
&lt;br /&gt;
for /f &quot;tokens=* delims= &quot; %%i in (a.txt) do echo %%i&lt;br /&gt;
&lt;br /&gt;
执行结果为：&lt;br /&gt;
&lt;br /&gt;
第1行第1列 第1行第2列 第1行第3列&lt;br /&gt;
第2行第1列 第2行第2列 第2行第3列&lt;br /&gt;
第3行第1列 第3行第2列 第3行第3列&lt;br /&gt;
其实就跟for /f %%i in (a.txt) do echo %%i的执行结果是一样的。&lt;br /&gt;
再如：&lt;br /&gt;
&lt;br /&gt;
for /f &quot;tokens=2,* delims= &quot; %%i in (a.txt) do echo %%i %%j&lt;br /&gt;
执行结果为：&lt;br /&gt;
&lt;br /&gt;
第1行第2列 第1行第3列&lt;br /&gt;
第2行第2列 第2行第3列&lt;br /&gt;
第3行第2列 第3行第3列&lt;br /&gt;
&lt;br /&gt;
用%%i代替第二列，用%%j代替剩余的所有&lt;br /&gt;
最后还有skip合eol，这俩个简单，skip就是要忽略文件的前多少行，而eol用来指定当一行以什么符号开始时，就忽略它。&lt;br /&gt;
比如：&lt;br /&gt;
&lt;br /&gt;
for /f &quot;skip=2 tokens=*&quot; %%i in (a.txt) do echo %%i&lt;br /&gt;
结果为:&lt;br /&gt;
&lt;br /&gt;
第3行第1列 第3行第2列 第3行第3列&lt;br /&gt;
用skip来告诉for跳过前两行。&lt;br /&gt;
如果不加tokens=*的话，执行结果为：&lt;br /&gt;
&lt;br /&gt;
第3行第1列&lt;br /&gt;
不知道怎么回事。&lt;br /&gt;
再如，当a.txt内容变成：&lt;br /&gt;
&lt;br /&gt;
.第1行第1列 第1行第2列 第1行第3列&lt;br /&gt;
.第2行第1列 第2行第2列 第2行第3列&lt;br /&gt;
第3行第1列 第3行第2列 第3行第3列&lt;br /&gt;
执行for /f &quot;eol=. tokens=*&quot; %%i in (a.txt) do echo %%i结果是：&lt;br /&gt;
&lt;br /&gt;
第3行第1列 第3行第2列 第3行第3列&lt;br /&gt;
用eol来告诉for忽略以“.”开头的行。&lt;br /&gt;
同样也必须加tokens=*，否则只会显示“第3行第1列</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/2550287792451621913/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/2550287792451621913' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/2550287792451621913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/2550287792451621913'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2011/05/blog-post.html' title='【转】批处理判断服务是否启动'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-8834152122021016840</id><published>2007-05-06T14:25:00.000+08:00</published><updated>2007-05-07T00:39:35.507+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Python decorator</title><content type='html'>&lt;ol class=&quot;dp-py&quot; start=&quot;1&quot;&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;keyword&quot;&gt;class&lt;/span&gt;&lt;span&gt; C:  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;    @&lt;span class=&quot;builtins&quot;&gt;classmethod&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;keyword&quot;&gt;    def&lt;/span&gt;&lt;span&gt; meth(cls):  &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;        ...&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; 上面的 @classmethod 等于 meth=classmethod(meth)&lt;br /&gt;&lt;br /&gt;decorator 能够用于为函数(普通函数或类的成员函数)添加功能, 不能够用来为类动态添加方法.&lt;br /&gt;decorator 把被修饰的函数作为参数, 其返回值通常是一个函数或者类&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blog.donews.com/limodou/archive/2004/12/19/207521.aspx&quot;&gt;一位老兄的不错总结&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/8834152122021016840/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/8834152122021016840' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8834152122021016840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/8834152122021016840'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2007/05/python-decorator.html' title='Python decorator'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-1616054722657722752</id><published>2007-05-05T19:02:00.000+08:00</published><updated>2007-05-07T00:39:12.966+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>IE同时连接限制的突破</title><content type='html'>HKEY_CURRENT_USER\Software\Microsoft\Windows \CurrentVersion\Internet Settings　　&lt;br /&gt;&lt;br /&gt;　　找到名为“ MaxConnectionsPerServer ”的注册表项，将其值改为5(或其他大于2的数字)。如果不存在该项，则创建之，类型为DWORD (32位)； &lt;br /&gt;&lt;br /&gt;　　找到名为“ MaxConnectionsPer1_0Server ”的注册表项，将其值改为5(或其他大于2的数字)。如果不存在该项，则创建之，类型为DWORD (32位)；</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/1616054722657722752/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/1616054722657722752' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/1616054722657722752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/1616054722657722752'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2007/05/ie.html' title='IE同时连接限制的突破'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7422248496997250304.post-1680546189376515358</id><published>2007-05-02T19:24:00.000+08:00</published><updated>2007-05-07T00:39:12.967+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>解除windows的自带zip功能</title><content type='html'>老是忘记，现在记录下来&lt;br /&gt;&lt;br /&gt;regsvr32 /u zipfldr.dll</content><link rel='replies' type='application/atom+xml' href='http://wangzhengtech.blogspot.com/feeds/1680546189376515358/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7422248496997250304/1680546189376515358' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/1680546189376515358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7422248496997250304/posts/default/1680546189376515358'/><link rel='alternate' type='text/html' href='http://wangzhengtech.blogspot.com/2007/05/windowszip.html' title='解除windows的自带zip功能'/><author><name>wangzheng422</name><uri>http://www.blogger.com/profile/13760265543447933181</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>