OpenShift Runtime: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 160: Line 160:


Note the reverse order for start and stop.
Note the reverse order for start and stop.
Check logs during startup as described in the "" section.


==Non-HA Master Process Management Operations==
==Non-HA Master Process Management Operations==

Revision as of 19:41, 2 November 2017

Internal

Master Node

The master node runs, in order, these services:

The master daemon (or daemons) must be started after etcd is started, they depend on etcd. They are started before the node service.

OpenShiftRuntime HA master node.png

etcd Daemon

Unit: etcd.service

Unit File: /usr/lib/systemd/system/etcd.service

Working Directory: /var/lib/etcd

Configuration File: /etc/etcd/etcd.conf

Process:

/usr/bin/etcd --name=master1.rdu20.internal --data-dir=/var/lib/etcd --listen-client-urls=https://192.199.0.199:2379

etcd Operations

etcd Operations

master Daemons

Non-HA Deployment

In a non-HA deployment, the master api daemon and master controller daemon are coalesced in a single process. In HA environments, they are separated, so the master api daemon processes can be load-balanced among, while the master controller daemon run in an active/passive configuration, there is just one active master controller daemon instance in the cluster.

Depends On: "etcd.service" (etcd)

Unit: atomic-openshift-master.service

Unit File: /usr/lib/systemd/system/atomic-openshift-master.service

Working Directory: /var/lib/origin

Configuration Files:

Process:

TODO

Restart the Master Process

systemctl restart atomic-openshift-master

HA Deployment

master api Daemon

Depends On: "etcd.service" (etcd)

Unit: atomic-openshift-master-api.service

systemctl status atomic-openshift-master-api

Unit File: /usr/lib/systemd/system/atomic-openshift-master-api.service

Working Directory: /var/lib/origin

Configuration Files:

Process:

/usr/bin/openshift start master api --config=/etc/origin/master/master-config.yaml --loglevel=2 --listen=https://0.0.0.0:443 --master=https://master1.rdu20.internal

master controller Daemon

Depends On: "etcd.service" (etcd), "atomic-openshift-master-api.service" (master api daemon)

Unit: atomic-openshift-master-controllers.service

systemctl status atomic-openshift-master-controllers

Unit File: /usr/lib/systemd/system/atomic-openshift-master-controllers.service

Working Directory: /var/lib/origin

Configuration Files:

Process:

/usr/bin/openshift start master controllers --config=/etc/origin/master/master-config.yaml --loglevel=2 --listen=https://0.0.0.0:8444

node Daemon

See below

node Daemon

Regular Node

OpenShiftRuntime node.png

node Daemon

Depends On: "docker.service", "openvswitch.service"

Unit: atomic-openshift-node.service

systemctl status atomic-openshift-node

Unit File: /usr/lib/systemd/system/atomic-openshift-node.service

Working Directory: /var/lib/origin

Configuration Files:

Process:

/usr/bin/openshift start node --config=/etc/origin/node/node-config.yaml --loglevel=2

OpenShift Master and Node Process Operations

HA Master Process Management Operations

To stop all OpenShift processes from a HA master node and completely take it out of the cluster, execute as root, in order:

 systemctl stop atomic-openshift-node.service atomic-openshift-master-api.service atomic-openshift-master-controllers.service etcd.service

To start all OpenShift processes from a HA master node and completely take it out of the cluster, execute as root, in order:

 systemctl start etcd.service atomic-openshift-master-controllers.service atomic-openshift-master-api.service atomic-openshift-node.service

Restart Across a HA Cluster

In order to propagate a change consistently across the cluster, all master processes have to be stopped at the same time, then restarted.

This can be done from the Ansible host, as "ansible":

ansible masters -m shell -a "systemctl stop atomic-openshift-node.service atomic-openshift-master-api.service atomic-openshift-master-controllers.service etcd.service"
ansible masters -m shell -a "systemctl start etcd.service"
ansible masters -m shell -a "systemctl start atomic-openshift-master-controllers.service"
ansible masters -m shell -a "systemctl start atomic-openshift-master-api.service"
ansible masters -m shell -a "systemctl start atomic-openshift-node.service"

Note the reverse order for start and stop.

Check logs during startup as described in the "" section.

Non-HA Master Process Management Operations

TODO

Master and Node Process Logging

Master Process Logging

Adjust the logging level as described here: Change the Log Level for OpenShift Processes.

Then tail the journalctl log.

journalctl -u atomic-openshift-master-controllers -f

Node Process Logging

Adjust the logging level as described here: Change the Log Level for OpenShift Processes.

Then tail the journalctl log.

journalctl -u atomic-openshift-node -f

Node Process Management Operations

To temporarily stop a node, login as root and:

systemctl stop atomic-openshift-node

To restart:

systemctl start atomic-openshift-node