148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
Chapter 15 ■ Using an HA Master with OpenShiftAll of the preceding software except the Network Manager is installed automatically when we run theAnsible playbook. We also need to install the docker.pem credentials on each of the CoreOS instances andthe Ubuntu instance for OpenShift Ansible, which we shall install next.Installing the CredentialsFrom the local machine SCP copy the docker.pem into the Ubuntu instance that is the client instance forlaunching the OpenShift cluster using the Public IP address or Public DNS, which may be obtained from theEC2 Console:scp -i docker.pem docker.pem ubuntu@ec2-52-87-178-15.compute-1.amazonaws.com:~Similarly, obtain the Public DNS for each of the CentOS instances, the ones for the masters, worker,Etcd, and LoadBalancer. SCP copy the docker.pem file to each of the CentOS instances. The following scpcommands copy the docker.pem file to the master instances:scp -i docker.pem docker.pem centos@ec2-54-90-107-98.compute-1.amazonaws.com:~scp -i docker.pem docker.pem centos@ec2-54-221-182-68.compute-1.amazonaws.com:~The following scp command copies the docker.pem to the Worker instance.scp -i docker.pem docker.pem centos@ec2-54-159-26-13.compute-1.amazonaws.com:~The following scp command copies the docker.pem to the LoadBalancer instance.scp -i docker.pem docker.pem centos@ec2-54-226-7-241.compute-1.amazonaws.com:~The following scp command copies the docker.pem to the Etcd instance:scp -i docker.pem docker.pem centos@ec2-54-160-210-253.compute-1.amazonaws.com:~The scp commands do not generate any output, as shown in Figure 15-4.Figure 15-4. Copying docker.pem to each of the CoreOS instances338
Installing the Network ManagerChapter 15 ■ Using an HA Master with OpenShiftFor network connectivity the OpenShift cluster makes use of Network Manager, which we need to install oneach of the CentOS instances. SSH log in into each of the CentOS instances:ssh -i docker.pem centos@ec2-54-90-107-98.compute-1.amazonaws.comssh -i docker.pem centos@ec2-54-221-182-68.compute-1.amazonaws.comssh -i docker.pem centos@ec2-54-159-26-13.compute-1.amazonaws.comssh -i docker.pem centos@ec2-54-226-7-241.compute-1.amazonaws.comssh -i docker.pem centos@ec2-54-160-210-253.compute-1.amazonaws.comRun the following commands on each of the CentOS instances to install, start, and enable the NetworkManager and find its status:sudo yum install NetworkManagersudo systemctl start NetworkManagersudo systemctl enable NetworkManagersudo systemctl status NetworkManagerInstalling OpenShift via Ansible on the Client MachineWe shall use the Ansible software automation platform to install the OpenShift software remotely from theUbuntu instance. We do not need to log into each of the OpenShift cluster instances to launch any softwareother than the Network Manager, which we already have installed. SSH log into the Ubuntu instance:ssh -i "docker.pem" ubuntu@ec2-52-87-178-15.compute-1.amazonaws.comUbuntu builds for Ansible are available in the Ubuntu Personal Package Archive (PPA). To configurePPA and install Ansible, first run the following commands:sudo apt-get install software-properties-commonsudo apt-add-repository ppa:ansible/ansibleThe Ansible PPA is added to the repository as shown in Figure 15-5.339
- Page 299 and 300: Chapter 12 ■ Using Resource Quota
- Page 301 and 302: Chapter 12 ■ Using Resource Quota
- Page 303 and 304: Chapter 12 ■ Using Resource Quota
- Page 305 and 306: Chapter 12 ■ Using Resource Quota
- Page 307 and 308: Chapter 12 ■ Using Resource Quota
- Page 309 and 310: Chapter 12 ■ Using Resource Quota
- Page 311 and 312: Chapter 12 ■ Using Resource Quota
- Page 313 and 314: CHAPTER 13Using AutoscalingStarting
- Page 315 and 316: Chapter 13 ■ Using AutoscalingThe
- Page 317 and 318: Chapter 13 ■ Using AutoscalingFig
- Page 319 and 320: Chapter 13 ■ Using Autoscaling./k
- Page 321 and 322: Chapter 13 ■ Using AutoscalingFig
- Page 323 and 324: CHAPTER 14Configuring LoggingLoggin
- Page 325 and 326: Chapter 14 ■ Configuring Logging
- Page 327 and 328: Docker Log FilesChapter 14 ■ Conf
- Page 329 and 330: Chapter 14 ■ Configuring LoggingF
- Page 331 and 332: Chapter 14 ■ Configuring LoggingC
- Page 333 and 334: Chapter 14 ■ Configuring Loggingv
- Page 335 and 336: Chapter 14 ■ Configuring LoggingI
- Page 337 and 338: Chapter 14 ■ Configuring LoggingT
- Page 339 and 340: Chapter 14 ■ Configuring Loggingt
- Page 341 and 342: Chapter 14 ■ Configuring LoggingT
- Page 343 and 344: Chapter 14 ■ Configuring LoggingF
- Page 345 and 346: Chapter 14 ■ Configuring LoggingF
- Page 347 and 348: CHAPTER 15Using an HA Master with O
- Page 349: Chapter 15 ■ Using an HA Master w
- Page 353 and 354: Chapter 15 ■ Using an HA Master w
- Page 355 and 356: Chapter 15 ■ Using an HA Master w
- Page 357 and 358: Chapter 15 ■ Using an HA Master w
- Page 359 and 360: Chapter 15 ■ Using an HA Master w
- Page 361 and 362: Chapter 15 ■ Using an HA Master w
- Page 363 and 364: Chapter 15 ■ Using an HA Master w
- Page 365 and 366: Chapter 15 ■ Using an HA Master w
- Page 367 and 368: Chapter 16 ■ Developing a Highly
- Page 369 and 370: Chapter 16 ■ Developing a Highly
- Page 371 and 372: Chapter 16 ■ Developing a Highly
- Page 373 and 374: Chapter 16 ■ Developing a Highly
- Page 375 and 376: Chapter 16 ■ Developing a Highly
- Page 377 and 378: Chapter 16 ■ Developing a Highly
- Page 379 and 380: Chapter 16 ■ Developing a Highly
- Page 381 and 382: Chapter 16 ■ Developing a Highly
- Page 383 and 384: Chapter 16 ■ Developing a Highly
- Page 385 and 386: Chapter 16 ■ Developing a Highly
- Page 387 and 388: Chapter 16 ■ Developing a Highly
- Page 389 and 390: Chapter 16 ■ Developing a Highly
- Page 391 and 392: Chapter 16 ■ Developing a Highly
- Page 393 and 394: Chapter 16 ■ Developing a Highly
- Page 395 and 396: Chapter 16 ■ Developing a Highly
- Page 397 and 398: Chapter 16 ■ Developing a Highly
- Page 399 and 400: Chapter 16 ■ Developing a Highly
Installing the Network Manager
Chapter 15 ■ Using an HA Master with OpenShift
For network connectivity the OpenShift cluster makes use of Network Manager, which we need to install on
each of the CentOS instances. SSH log in into each of the CentOS instances:
ssh -i docker.pem centos@ec2-54-90-107-98.compute-1.amazonaws.com
ssh -i docker.pem centos@ec2-54-221-182-68.compute-1.amazonaws.com
ssh -i docker.pem centos@ec2-54-159-26-13.compute-1.amazonaws.com
ssh -i docker.pem centos@ec2-54-226-7-241.compute-1.amazonaws.com
ssh -i docker.pem centos@ec2-54-160-210-253.compute-1.amazonaws.com
Run the following commands on each of the CentOS instances to install, start, and enable the Network
Manager and find its status:
sudo yum install NetworkManager
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
sudo systemctl status NetworkManager
Installing OpenShift via Ansible on the Client Machine
We shall use the Ansible software automation platform to install the OpenShift software remotely from the
Ubuntu instance. We do not need to log into each of the OpenShift cluster instances to launch any software
other than the Network Manager, which we already have installed. SSH log into the Ubuntu instance:
ssh -i "docker.pem" ubuntu@ec2-52-87-178-15.compute-1.amazonaws.com
Ubuntu builds for Ansible are available in the Ubuntu Personal Package Archive (PPA). To configure
PPA and install Ansible, first run the following commands:
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
The Ansible PPA is added to the repository as shown in Figure 15-5.
339