Skip to content

Commit aee04ee

Browse files
author
Brice Fallon-Freeman
authored
Merge pull request #8620 from bfallonf/day2_feedback
Edits to day 2 guide as suggested
2 parents 2bc3b21 + aaf0e94 commit aee04ee

13 files changed

+163
-92
lines changed

day_two_guide/topics/default_storage_class.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ two kinds of persistent storage are available: standard (HDD) and SSD. Notice
2424
the standard storage class is configured as the default. If there is no storage
2525
class defined, or none is set as a default, see the
2626
xref:../install_config/persistent_storage/dynamically_provisioning_pvs.adoc[Dynamic
27-
Provisioning and Creating Storage Classes] section.
27+
Provisioning and Creating Storage Classes] section for instructions on how to set up a storage class as suggested.

day_two_guide/topics/deprecating_master.adoc

+1-15
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,7 @@ a node host] section.
9292

9393
. Remove the master host from the `[masters]` and `[nodes]` groups in the
9494
`/etc/ansible/hosts` Ansible inventory file to avoid issues if running any
95-
Ansible tasks using that inventory file:
96-
+
97-
----
98-
...[OUTPUT OMITTED]...
99-
# host group for masters
100-
[masters]
101-
*master-0.example.com*
102-
master-1.example.com
103-
master-2.example.com
104-
105-
# host group for nodes, includes region info
106-
[nodes]
107-
*master-0.example.com openshift_node_labels="{'role': 'master'}" openshift_hostname=master-0.example.com openshift_schedulable=false*
108-
...[OUTPUT OMITTED]...
109-
----
95+
Ansible tasks using that inventory file.
11096
+
11197
[WARNING]
11298
====

day_two_guide/topics/entropy.adoc

+6-4
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ Red Hat recommends monitoring this value and issuing an alert if the value is
2828
under `800`.
2929
====
3030

31-
The most reliable way to determine the available entropy is with the
32-
`rngtest` command from the `rng-tools`:
31+
Alternatively, you can use the `rngtest` command to check not only the available
32+
entropy, but if your system can _feed_ enough entropy as well:
3333

3434
----
3535
$ cat /dev/random | rngtest -c 100
3636
----
3737

38-
If the above takes too long to complete, then there is not enough entropy
39-
available.
38+
The `rngtest` command is available from the `rng-tools`
39+
40+
If the above takes around 30 seconds to complete, then there is not enough
41+
entropy available.
4042

4143
Depending on your environment, entropy can be increased in multiple ways. For
4244
more information, see the following blog post:

day_two_guide/topics/etcd_backup.adoc

+23-29
Original file line numberDiff line numberDiff line change
@@ -183,30 +183,25 @@ inadvertently being joined onto an existing cluster.
183183
. Perform the backup:
184184
+
185185
----
186-
# mkdir -p */backup/etcd-$(date +%Y%m%d)*
187-
# systemctl stop etcd.service
186+
# mkdir -p /backup/etcd-$(date +%Y%m%d)
188187
# etcdctl2 backup \
189188
--data-dir /var/lib/etcd \
190-
--backup-dir */backup/etcd-$(date +%Y%m%d)*
191-
# cp /var/lib/etcd/member/snap/db */backup/etcd-$(date +%Y%m%d)*
192-
# systemctl start etcd.service
189+
--backup-dir /backup/etcd-$(date +%Y%m%d)
190+
# cp /var/lib/etcd/member/snap/db /backup/etcd-$(date +%Y%m%d)
193191
----
194192
+
195-
While stopping the etcd service is not strictly necessary, doing so ensures that
196-
the etcd data is fully synchronized.
197-
+
198193
The `etcdctl2 backup` command creates etcd v2 data backup where copying the `db`
199194
file while the etcd service is not running is equivalent to running `etcdctl3
200195
snapshot` for etcd v3 data backup:
201196
+
202197
----
203-
# mkdir -p */backup/etcd-$(date +%Y%m%d)*
198+
# mkdir -p /backup/etcd-$(date +%Y%m%d)
204199
# etcdctl3 snapshot save */backup/etcd-$(date +%Y%m%d)*/db
205200
Snapshot saved at /backup/etcd-<date>/db
206201
# systemctl stop etcd.service
207202
# etcdctl2 backup \
208203
--data-dir /var/lib/etcd \
209-
--backup-dir */backup/etcd-$(date +%Y%m%d)*
204+
--backup-dir /backup/etcd-$(date +%Y%m%d)
210205
# systemctl start etcd.service
211206
----
212207
+
@@ -346,7 +341,7 @@ $ ss -l4n | grep 2380
346341
. Update the member information with that IP:
347342
+
348343
----
349-
# etcdctl2 member update *5ee217d17301* https://*192.168.55.8*:2380
344+
# etcdctl2 member update 5ee217d17301 https://192.168.55.8:2380
350345
Updated member with ID 5ee217d17301 in cluster
351346
----
352347

@@ -467,11 +462,11 @@ restore procedure is going to be performed:
467462
match the following command:
468463
+
469464
----
470-
# etcdctl3 snapshot restore */backup/etcd-xxxxxx/backup.db* \
465+
# etcdctl3 snapshot restore /backup/etcd-xxxxxx/backup.db \
471466
--data-dir /var/lib/etcd \
472-
--name *master-0.example.com* \
473-
--initial-cluster *"master-0.example.com=https://192.168.55.8:2380"* \ --initial-cluster-token *"etcd-cluster-1"* \
474-
--initial-advertise-peer-urls *https://192.168.55.8:2380*
467+
--name master-0.example.com \
468+
--initial-cluster "master-0.example.com=https://192.168.55.8:2380" \ --initial-cluster-token "etcd-cluster-1" \
469+
--initial-advertise-peer-urls https://192.168.55.8:2380
475470
476471
2017-10-03 08:55:32.440779 I | mvcc: restore compact to 1041269
477472
2017-10-03 08:55:32.468244 I | etcdserver/membership: added member 40bef1f6c79b3163 [https://192.168.55.8:2380] to cluster 26841ebcf610583c
@@ -586,9 +581,6 @@ https://master-2.example.com:2379, 59229711e4bc65c8, 3.2.5, 28 MB, false, 9, 287
586581
Scaling the etcd cluster can be performed vertically by adding more resources to
587582
the etcd hosts, or horizontally by adding more etcd hosts.
588583

589-
If etcd is collocated on master instances, horizontally scaling etcd prevents
590-
the API and controller services competing with etcd for resources.
591-
592584
[NOTE]
593585
====
594586
Due to the voting system etcd uses, the cluster must always contain an odd
@@ -717,7 +709,7 @@ etcd0.example.com
717709
host:
718710
+
719711
----
720-
FLANNEL_ETCD_ENDPOINTS=https://master-0.example.com:2379,https://master-1.example.com:2379,https://master-2.example.com:2379,*https://etcd0.example.com:2379*
712+
FLANNEL_ETCD_ENDPOINTS=https://master-0.example.com:2379,https://master-1.example.com:2379,https://master-2.example.com:2379,https://etcd0.example.com:2379
721713
----
722714

723715
. Restart the `flanneld` service:
@@ -743,7 +735,7 @@ proper values. To make this process easier, create some environment variables:
743735
+
744736
----
745737
export NEW_ETCD_HOSTNAME="*etcd0.example.com*"
746-
export NEW_ETCD_IP="*192.168.55.21*"
738+
export NEW_ETCD_IP="192.168.55.21"
747739
748740
export CN=$NEW_ETCD_HOSTNAME
749741
export SAN="IP:${NEW_ETCD_IP}"
@@ -907,7 +899,7 @@ for the instance to allow incoming traffic to those ports as well.
907899
. Untar the certificates and configuration files
908900
+
909901
----
910-
# tar xzvf /tmp/*etcd0.example.com*.tgz -C /etc/etcd/
902+
# tar xzvf /tmp/etcd0.example.com.tgz -C /etc/etcd/
911903
----
912904

913905
. Restore etcd configuration and data owner:
@@ -977,7 +969,7 @@ etcdClientInfo:
977969
- https://master-0.example.com:2379
978970
- https://master-1.example.com:2379
979971
- https://master-2.example.com:2379
980-
*- https://etcd0.example.com:2379*
972+
- https://etcd0.example.com:2379
981973
----
982974

983975
. Restart the master API service on every master:
@@ -1002,7 +994,7 @@ The number of etcd nodes must be odd, so at least two hosts must be added.
1002994
include the new etcd host:
1003995
+
1004996
----
1005-
FLANNEL_ETCD_ENDPOINTS=https://master-0.example.com:2379,https://master-1.example.com:2379,https://master-2.example.com:2379,*https://etcd0.example.com:2379*
997+
FLANNEL_ETCD_ENDPOINTS=https://master-0.example.com:2379,https://master-1.example.com:2379,https://master-2.example.com:2379,https://etcd0.example.com:2379
1006998
----
1007999

10081000
. Restart the `flanneld` service:
@@ -1039,7 +1031,7 @@ etcdClientInfo:
10391031
urls:
10401032
- https://master-0.example.com:2379
10411033
- https://master-1.example.com:2379
1042-
*- https://master-2.example.com:2379* <1>
1034+
- https://master-2.example.com:2379 <1>
10431035
----
10441036
<1> The host to be removed.
10451037

@@ -1145,12 +1137,14 @@ FLANNEL_ETCD_ENDPOINTS=https://master-0.example.com:2379,https://master-1.exampl
11451137

11461138
==== Replacing an etcd host
11471139

1148-
To replace an etcd host, first remove the etcd node from the cluster following
1149-
the steps from
1140+
Before you remove the etcd host, scale up the etcd cluster with the new host
1141+
using the scale up Ansible playbook or the manual procedure in
1142+
xref:../day_two_guide/host_level_tasks.adoc#scaling-etcd[Scaling etcd]. This
1143+
ensures that you keep quorum if you lose an etcd host during the replacing
1144+
procedure. Then, you can remove the etcd node from the cluster following the
1145+
steps from
11501146
xref:../day_two_guide/host_level_tasks.adoc#removing-an-etcd-host[Removing an
1151-
etcd host], then scale up the etcd cluster with the new host using the scale up
1152-
Ansible playbook or the manual procedure in
1153-
xref:../day_two_guide/host_level_tasks.adoc#scaling-etcd[Scaling etcd].
1147+
etcd host].
11541148

11551149
[WARNING]
11561150
====

day_two_guide/topics/increasing_docker_storage.adoc

+92-9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Increasing the amount of storage available ensures continued deployment without
1010
any outages. To do so, a free partition must be made available that contains an
1111
appropriate amount of free capacity.
1212

13+
[[evacuating-a-node]]
1314
==== Evacuating the node
1415

1516
[discrete]
@@ -52,23 +53,32 @@ NAME READY STATUS RESTARTS AGE
5253
For more information on evacuating and draining pods or nodes, see
5354
xref:../day_two_guide/host_level_tasks.adoc#day-two-guide-node-maintenance[Node maintenance].
5455

55-
==== Increasing storage with a new disk
56+
==== Increasing storage
57+
58+
You can increase Docker storage in two ways: attaching a new disk, or extending
59+
the existing disk.
60+
61+
*Increasing storage with a new disk*
5662

5763
[discrete]
5864
== Prerequisites
5965

60-
The following procedure assumes that a new disk has been added and is available
61-
to the existing instance that required additional storage.
62-
66+
* The following examples assume the original disk is labeled `/dev/xvdb` and the
67+
new disk is labeled `/dev/xvdd`.
68+
* The following procedure assumes that a new disk has been added and is available
69+
to the existing instance that required additional storage:
70+
+
71+
----
72+
# vi /etc/sysconfig/docker-storage-setup
73+
DEVS="/dev/xvdb /dev/xvdd"
74+
----
75+
+
6376
[NOTE]
6477
====
6578
The process may differ depending on the underlying {product-title}
6679
infrastructure.
6780
====
6881

69-
The examples below assume the original disk is labeled `/dev/xvdb` and the
70-
new disk is labeled `/dev/xvdd`.
71-
7282
[discrete]
7383
== Procedure
7484

@@ -88,7 +98,11 @@ INFO: Device /dev/xvdb is already partitioned and is part of volume group docker
8898
INFO: Device node /dev/xvdd1 exists.
8999
Physical volume "/dev/xvdd1" successfully created.
90100
Volume group "docker_vol" successfully extended
101+
----
91102

103+
. Start the Docker services:
104+
+
105+
----
92106
# systemctl start docker
93107
# vgs
94108
VG #PV #LV #SN Attr VSize VFree
@@ -127,6 +141,75 @@ ose-app-node01.example.com Ready 24m v1.6.1+5115d70
127141
ose-app-node02.example.com Ready 24m v1.6.1+5115d708d7
128142
----
129143

144+
*Increasing storage with a new disk*
145+
146+
. Evacuate the node xref:evacuating-a-node[following the previous steps].
147+
148+
. Stop the `docker` and `atomic-openshift-node` services:
149+
+
150+
----
151+
# systemctl stop docker atomic-openshift-node
152+
----
153+
154+
. Resize the existing disk as desired. This can can depend on your environment:
155+
+
156+
* If you are using LVM (Logical Volume Manager):
157+
+
158+
** link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lv#LV_remove[Remove the logical volume]:
159+
+
160+
----
161+
# lvremove /dev/docker_vg/docker/lv
162+
----
163+
+
164+
** link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/vg_admin#VG_remove[Remove the Docker volume group]:
165+
+
166+
----
167+
# vgremove docker_vg
168+
----
169+
+
170+
** link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/physvol_admin#PV_remove[Remove the physical volume]:
171+
+
172+
----
173+
# pvremove /dev/<my_previous_disk_device>
174+
----
175+
+
176+
* If you are using a cloud provider, you can detach the disk,
177+
destroy the disk, then create a new bigger disk, and attach it to the instance.
178+
+
179+
* For a non-cloud environment, the disk and file system can be resized. See the
180+
following solution for more information:
181+
+
182+
** https://access.redhat.com/solutions/199573
183+
184+
. Verify that the *_/etc/sysconfig/container-storage-setup_* file is correctly
185+
configured for the new disk by checking the device name, size, etc.
186+
187+
. Run `docker-storage-setup` to reconfigure the new disk:
188+
+
189+
----
190+
# docker-storage-setup
191+
INFO: Volume group backing root filesystem could not be determined
192+
INFO: Device /dev/xvdb is already partitioned and is part of volume group docker_vol
193+
INFO: Device node /dev/xvdd1 exists.
194+
Physical volume "/dev/xvdd1" successfully created.
195+
Volume group "docker_vol" successfully extended
196+
----
197+
198+
. Start the Docker services:
199+
+
200+
----
201+
# systemctl start docker
202+
# vgs
203+
VG #PV #LV #SN Attr VSize VFree
204+
docker_vol 2 1 0 wz--n- 64.99g <55.00g
205+
----
206+
207+
. Start the `atomic-openshift-node` service:
208+
+
209+
----
210+
# systemctl start atomic-openshift-node
211+
----
212+
130213
=== Changing the storage backend
131214

132215
With the advancements of services and file systems, changes in a storage backend
@@ -140,7 +223,7 @@ an example of changing a device mapper backend to an `overlay2` storage backend.
140223
any pod from the node and disable scheduling of other pods on that node:
141224
+
142225
----
143-
$ NODE=*ose-app-node01.example.com*
226+
$ NODE=ose-app-node01.example.com
144227
$ oc adm manage-node ${NODE} --schedulable=false
145228
NAME STATUS AGE VERSION
146229
ose-app-node01.example.com Ready,SchedulingDisabled 20m v1.6.1+5115d708d7
@@ -237,7 +320,7 @@ CONTAINER_ROOT_LV_SIZE=100%FREE
237320
# systemctl start docker atomic-openshift-node
238321
----
239322

240-
. With the storage modified to use `overlay2`, the enable the node to be
323+
. With the storage modified to use `overlay2`, enable the node to be
241324
schedulable in order to accept new incoming pods.
242325
+
243326
From a master instance, or as a cluster administrator:

day_two_guide/topics/managing_docker_certs.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Module included in the following assemblies:
99
An {product-title} internal registry is created as a pod. However, containers
1010
may be pulled from external registries if desired. By default, registries listen
1111
on TCP port 5000. Registries provide the option of securing exposed images via
12-
TLS or running a registry with no encrypting traffic.
12+
TLS or running a registry without encrypting traffic.
1313

1414
[WARNING]
1515
====

0 commit comments

Comments
 (0)