Skip to content

Commit 33ae763

Browse files
authored
Merge pull request #28256 from jboxman/no-kni-hostname
Omit hostname from shell commands
2 parents 8744114 + c250fa7 commit 33ae763

22 files changed

+118
-118
lines changed

modules/ipi-install-configuring-the-install-config-file.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ sshKey: '<ssh_pub_key>'
7878
+
7979
[source,terminal]
8080
----
81-
[kni@provisioner ~]$ mkdir ~/clusterconfigs
82-
[kni@provisioner ~]$ cp install-config.yaml ~/clusterconfigs
81+
$ mkdir ~/clusterconfigs
82+
$ cp install-config.yaml ~/clusterconfigs
8383
----
8484

8585
. Ensure all bare metal nodes are powered off prior to installing the {product-title} cluster.
8686
+
8787
[source,terminal]
8888
----
89-
[kni@provisioner ~]$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power off
89+
$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power off
9090
----
9191

9292
. Remove old bootstrap resources if any are left over from a previous deployment attempt.

modules/ipi-install-configuring-the-metal3-config-file.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You must create and configure a ConfigMap `metal3-config.yaml` file.
1313
. Create a ConfigMap `metal3-config.yaml.sample`.
1414
+
1515
----
16-
[kni@provisioner ~]$ vim metal3-config.yaml.sample
16+
$ vim metal3-config.yaml.sample
1717
----
1818
+
1919
Provide the following contents:
@@ -45,8 +45,8 @@ Replace `<provisioning_ip>` with an available IP on the `provisioning` network.
4545
. Create the final ConfigMap.
4646
+
4747
----
48-
[kni@provisioner ~]$ export COMMIT_ID=$(./openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
49-
[kni@provisioner ~]$ export RHCOS_PATH=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.openstack.path | sed 's/"//g')
50-
[kni@provisioner ~]$ export RHCOS_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .baseURI | sed 's/"//g')
51-
[kni@provisioner ~]$ envsubst < metal3-config.yaml.sample > metal3-config.yaml
48+
$ export COMMIT_ID=$(./openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
49+
$ export RHCOS_PATH=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.openstack.path | sed 's/"//g')
50+
$ export RHCOS_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .baseURI | sed 's/"//g')
51+
$ envsubst < metal3-config.yaml.sample > metal3-config.yaml
5252
----

modules/ipi-install-creating-a-disconnected-registry.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -205,24 +205,24 @@ On the provisioner node, the `install-config.yaml` file should use the newly cre
205205
+
206206
[source,terminal]
207207
----
208-
[kni@provisioner ~]$ echo "additionalTrustBundle: |" >> install-config.yaml
209-
[kni@provisioner ~]$ sed -e 's/^/ /' /opt/registry/certs/domain.crt >> install-config.yaml
208+
$ echo "additionalTrustBundle: |" >> install-config.yaml
209+
$ sed -e 's/^/ /' /opt/registry/certs/domain.crt >> install-config.yaml
210210
----
211211

212212
. Add the mirror information for the registry to the `install-config.yaml` file.
213213
+
214214
[source,terminal]
215215
----
216-
[kni@provisioner ~]$ echo "imageContentSources:" >> install-config.yaml
217-
[kni@provisioner ~]$ echo "- mirrors:" >> install-config.yaml
218-
[kni@provisioner ~]$ echo " - registry.example.com:5000/ocp4/openshift4" >> install-config.yaml
219-
[kni@provisioner ~]$ echo " source: quay.io/openshift-release-dev/ocp-v4.0-art-dev" >> install-config.yaml
220-
[kni@provisioner ~]$ echo "- mirrors:" >> install-config.yaml
221-
[kni@provisioner ~]$ echo " - registry.example.com:5000/ocp4/openshift4" >> install-config.yaml
222-
[kni@provisioner ~]$ echo " source: registry.svc.ci.openshift.org/ocp/release" >> install-config.yaml
223-
[kni@provisioner ~]$ echo "- mirrors:" >> install-config.yaml
224-
[kni@provisioner ~]$ echo " - registry.example.com:5000/ocp4/openshift4" >> install-config.yaml
225-
[kni@provisioner ~]$ echo " source: quay.io/openshift-release-dev/ocp-release" >> install-config.yaml
216+
$ echo "imageContentSources:" >> install-config.yaml
217+
$ echo "- mirrors:" >> install-config.yaml
218+
$ echo " - registry.example.com:5000/ocp4/openshift4" >> install-config.yaml
219+
$ echo " source: quay.io/openshift-release-dev/ocp-v4.0-art-dev" >> install-config.yaml
220+
$ echo "- mirrors:" >> install-config.yaml
221+
$ echo " - registry.example.com:5000/ocp4/openshift4" >> install-config.yaml
222+
$ echo " source: registry.svc.ci.openshift.org/ocp/release" >> install-config.yaml
223+
$ echo "- mirrors:" >> install-config.yaml
224+
$ echo " - registry.example.com:5000/ocp4/openshift4" >> install-config.yaml
225+
$ echo " source: quay.io/openshift-release-dev/ocp-release" >> install-config.yaml
226226
----
227227
+
228228
NOTE: Replace `registry.example.com` with the registry's fully qualified domain name.

modules/ipi-install-creating-an-rhcos-images-cache.adoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,93 +16,93 @@ Use the following steps to install a container that contains the images.
1616
+
1717
[source,terminal]
1818
----
19-
[kni@provisioner ~]$ sudo dnf install -y podman
19+
$ sudo dnf install -y podman
2020
----
2121

2222
. Open firewall port `8080` to be used for {op-system} image caching.
2323
+
2424
[source,terminal]
2525
----
26-
[kni@provisioner ~]$ sudo firewall-cmd --add-port=8080/tcp --zone=public --permanent
26+
$ sudo firewall-cmd --add-port=8080/tcp --zone=public --permanent
2727
----
2828

2929
. Create a directory to store the `bootstraposimage` and `clusterosimage`.
3030
+
3131
[source,terminal]
3232
----
33-
[kni@provisioner ~]$ mkdir /home/kni/rhcos_image_cache
33+
$ mkdir /home/kni/rhcos_image_cache
3434
----
3535

3636
. Set the appropriate SELinux context for the newly created directory.
3737
+
3838
[source,terminal]
3939
----
40-
[kni@provisioner ~]$ sudo semanage fcontext -a -t httpd_sys_content_t "/home/kni/rhcos_image_cache(/.*)?"
41-
[kni@provisioner ~]$ sudo restorecon -Rv rhcos_image_cache/
40+
$ sudo semanage fcontext -a -t httpd_sys_content_t "/home/kni/rhcos_image_cache(/.*)?"
41+
$ sudo restorecon -Rv rhcos_image_cache/
4242
----
4343

4444
. Get the commit ID from the installer. The ID determines which images the installer needs to download.
4545
+
4646
[source,terminal]
4747
----
48-
[kni@provisioner ~]$ export COMMIT_ID=$(/usr/local/bin/openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
48+
$ export COMMIT_ID=$(/usr/local/bin/openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
4949
----
5050

5151
. Get the URI for the {op-system} image that the installer will deploy on the nodes.
5252
+
5353
[source,terminal]
5454
----
55-
[kni@provisioner ~]$ export RHCOS_OPENSTACK_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.openstack.path | sed 's/"//g')
55+
$ export RHCOS_OPENSTACK_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.openstack.path | sed 's/"//g')
5656
----
5757

5858
. Get the URI for the {op-system} image that the installer will deploy on the bootstrap VM.
5959
+
6060
[source,terminal]
6161
----
62-
[kni@provisioner ~]$ export RHCOS_QEMU_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.qemu.path | sed 's/"//g')
62+
$ export RHCOS_QEMU_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.qemu.path | sed 's/"//g')
6363
----
6464

6565
. Get the path where the images are published.
6666
+
6767
[source,terminal]
6868
----
69-
[kni@provisioner ~]$ export RHCOS_PATH=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .baseURI | sed 's/"//g')
69+
$ export RHCOS_PATH=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .baseURI | sed 's/"//g')
7070
----
7171

7272
. Get the SHA hash for the {op-system} image that will be deployed on the bootstrap VM.
7373
+
7474
[source,terminal]
7575
----
76-
[kni@provisioner ~]$ export RHCOS_QEMU_SHA_UNCOMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq -r '.images.qemu["uncompressed-sha256"]')
76+
$ export RHCOS_QEMU_SHA_UNCOMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq -r '.images.qemu["uncompressed-sha256"]')
7777
----
7878

7979
. Get the SHA hash for the {op-system} image that will be deployed on the nodes.
8080
+
8181
[source,terminal]
8282
----
83-
[kni@provisioner ~]$ export RHCOS_OPENSTACK_SHA_COMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq -r '.images.openstack.sha256')
83+
$ export RHCOS_OPENSTACK_SHA_COMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq -r '.images.openstack.sha256')
8484
----
8585

8686
. Download the images and place them in the `/home/kni/rhcos_image_cache` directory.
8787
+
8888
[source,terminal]
8989
----
90-
[kni@provisioner ~]$ curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache
91-
[kni@provisioner ~]$ curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /home/kni/rhcos_image_cache
90+
$ curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache
91+
$ curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /home/kni/rhcos_image_cache
9292
----
9393

9494
. Confirm SELinux type is of `httpd_sys_content_t` for the newly created files.
9595
+
9696
[source,terminal]
9797
----
98-
[kni@provisioner ~]$ ls -Z /home/kni/rhcos_image_cache
98+
$ ls -Z /home/kni/rhcos_image_cache
9999
----
100100

101101
. Create the pod.
102102
+
103103
[source,terminal]
104104
----
105-
[kni@provisioner ~]$ podman run -d --name rhcos_image_cache \
105+
$ podman run -d --name rhcos_image_cache \
106106
-v /home/kni/rhcos_image_cache:/var/www/html \
107107
-p 8080:8080/tcp \
108108
registry.centos.org/centos/httpd-24-centos7:latest

modules/ipi-install-creating-the-openshift-manifests.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
+
1010
[source,terminal]
1111
----
12-
[kni@provisioner ~]$ ./openshift-baremetal-install --dir ~/clusterconfigs create manifests
12+
$ ./openshift-baremetal-install --dir ~/clusterconfigs create manifests
1313
----
1414
+
1515
[source,terminal]
@@ -24,6 +24,6 @@ ifeval::[{release} <= 4.3]
2424
+
2525
[source,terminal]
2626
----
27-
[kni@provisioner ~]$ cp ~/metal3-config.yaml clusterconfigs/openshift/99_metal3-config.yaml
27+
$ cp ~/metal3-config.yaml clusterconfigs/openshift/99_metal3-config.yaml
2828
----
2929
endif::[]

modules/ipi-install-deploying-the-cluster-via-the-openshift-installer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Run the {product-title} installer:
99

1010
[source,terminal]
1111
----
12-
[kni@provisioner ~]$ ./openshift-baremetal-install --dir ~/clusterconfigs --log-level debug create cluster
12+
$ ./openshift-baremetal-install --dir ~/clusterconfigs --log-level debug create cluster
1313
----

modules/ipi-install-extracting-the-openshift-installer.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ After retrieving the installer, the next step is to extract it.
1313
+
1414
[source,terminal]
1515
----
16-
[kni@provisioner ~]$ export cmd=openshift-baremetal-install
17-
[kni@provisioner ~]$ export pullsecret_file=~/pull-secret.txt
18-
[kni@provisioner ~]$ export extract_dir=$(pwd)
16+
$ export cmd=openshift-baremetal-install
17+
$ export pullsecret_file=~/pull-secret.txt
18+
$ export extract_dir=$(pwd)
1919
----
2020

2121
. Get the `oc` binary:
2222
+
2323
[source,terminal]
2424
----
25-
[kni@provisioner ~]$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$VERSION/openshift-client-linux-$VERSION.tar.gz | tar zxvf - oc
25+
$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$VERSION/openshift-client-linux-$VERSION.tar.gz | tar zxvf - oc
2626
----
2727

2828
. Extract the installer:
2929
+
3030
[source,terminal]
3131
----
32-
[kni@provisioner ~]$ sudo cp oc /usr/local/bin
33-
[kni@provisioner ~]$ oc adm release extract --registry-config "${pullsecret_file}" --command=$cmd --to "${extract_dir}" ${RELEASE_IMAGE}
34-
[kni@provisioner ~]$ sudo cp openshift-baremetal-install /usr/local/bin
32+
$ sudo cp oc /usr/local/bin
33+
$ oc adm release extract --registry-config "${pullsecret_file}" --command=$cmd --to "${extract_dir}" ${RELEASE_IMAGE}
34+
$ sudo cp openshift-baremetal-install /usr/local/bin
3535
----

modules/ipi-install-following-the-installation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ During the deployment process, you can check the installation's overall status b
99

1010
[source,terminal]
1111
----
12-
[kni@provisioner ~]$ tail -f /path/to/install-dir/.openshift_install.log
12+
$ tail -f /path/to/install-dir/.openshift_install.log
1313
----

modules/ipi-install-preparing-the-bare-metal-node.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,33 @@ Preparing the bare metal node requires executing the following procedure from th
1414
+
1515
[source,bash]
1616
----
17-
[kni@provisioner ~]$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/$VERSION/openshift-client-linux.tar.gz | tar zxvf - oc
17+
$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/$VERSION/openshift-client-linux.tar.gz | tar zxvf - oc
1818
----
1919
+
2020
[source,bash]
2121
----
22-
[kni@provisioner ~]$ sudo cp oc /usr/local/bin
22+
$ sudo cp oc /usr/local/bin
2323
----
2424

2525
. Install the `ipmitool`.
2626
+
2727
[source,bash]
2828
----
29-
[kni@provisioner ~]$ sudo dnf install -y OpenIPMI ipmitool
29+
$ sudo dnf install -y OpenIPMI ipmitool
3030
----
3131

3232
. Power off the bare metal node and ensure it is off.
3333
+
3434
[source,bash]
3535
----
36-
[kni@provisioner ~]$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power off
36+
$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power off
3737
----
3838
+
3939
Where `<management-server-ip>` is the IP address of the bare metal node's base board management controller.
4040
+
4141
[source,bash]
4242
----
43-
[kni@provisioner ~]$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power status
43+
$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power status
4444
----
4545
+
4646
[source,bash]
@@ -52,19 +52,19 @@ Chassis Power is off
5252
+
5353
[source,bash]
5454
----
55-
[kni@provisioner ~]$ echo -ne "root" | base64
55+
$ echo -ne "root" | base64
5656
----
5757
+
5858
[source,bash]
5959
----
60-
[kni@provisioner ~]$ echo -ne "calvin" | base64
60+
$ echo -ne "calvin" | base64
6161
----
6262

6363
. Create a configuration file for the bare metal node.
6464
+
6565
[source,bash]
6666
----
67-
[kni@provisioner ~]$ vim bmh.yaml
67+
$ vim bmh.yaml
6868
----
6969
+
7070
[source,yaml]
@@ -97,7 +97,7 @@ Replace `<num>` for the worker number of bare metal node in two `name` fields an
9797
+
9898
[source,bash]
9999
----
100-
[kni@provisioner ~]$ oc -n openshift-machine-api create -f bmh.yaml
100+
$ oc -n openshift-machine-api create -f bmh.yaml
101101
----
102102
+
103103
[source,bash]
@@ -112,7 +112,7 @@ Where `<num>` will be the worker number.
112112
+
113113
[source,bash]
114114
----
115-
[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker-<num>
115+
$ oc -n openshift-machine-api get bmh openshift-worker-<num>
116116
----
117117
+
118118
Where `<num>` is the worker node number.

0 commit comments

Comments
 (0)