OpenShift Runtime: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(68 intermediate revisions by the same user not shown)
Line 5: Line 5:


=Master Node=
=Master Node=


The master node runs, in order, these services:
The master node runs, in order, these services:


* [[#etcd|etcd]]
* [[#etcd|etcd]]
* [[#master_Daemons|master daemon or daemons (controller, api)]]
* [[#master_Daemons|master daemon or daemons (api, then controller)]]
* [[#node_Daemon|node daemon]]


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


* [[#atomic-openshift-master-controller|atomic-openshift-master-controller]]
[[Image:OpenShiftRuntime_HA_master_node.png]]
* [[#atomic-openshift-master-api|atomic-openshift-master-api]]
* [[#atomic-openshift-node|atomic-openshift-node]]


<span id="etcd"></span>
<span id="etcd"></span>
Line 24: Line 23:
Unit File: <tt>/usr/lib/systemd/system/etcd.service</tt>
Unit File: <tt>/usr/lib/systemd/system/etcd.service</tt>


Working Directory: <tt>/var/lib/etcd/</tt>
Working Directory: <tt>/var/lib/etcd</tt>


Configuration File: <tt>/etc/etcd/etcd.conf</tt>
Configuration File: <tt>/etc/etcd/etcd.conf</tt>
Line 31: Line 30:


<pre>
<pre>
/usr/bin/etcd --name=master1.rdu20.internal --data-dir=/var/lib/etcd/ --listen-client-urls=https://192.199.0.199:2379
/usr/bin/etcd --name=master1.rdu20.internal --data-dir=/var/lib/etcd --listen-client-urls=https://192.199.0.199:2379
</pre>
</pre>
===etcd Operations===
{{Internal|Etcd Operations|etcd Operations}}


==master Daemons==
==master Daemons==


In a non-HA deployment, the [[master api daemon]] and [[master controller daemon]] are coalesced in a single process.
===Non-HA Deployment===


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


==master controller Daemon==
Depends On: "etcd.service" ([[#etcd_Daemon|etcd]])


==atomic-openshift-master-api==
Unit: <tt>atomic-openshift-master.service</tt>
 
Unit File: <tt>/usr/lib/systemd/system/atomic-openshift-master.service</tt>
 
Working Directory: <tt>/var/lib/origin</tt>
 
Configuration Files:
* <tt>/etc/sysconfig/atomic-openshift-master</tt>, which contains command line options for the process, such as <tt>--loglevel</tt>, etc.
* <tt>[[Master-config.yml|/etc/origin/master/master-config.yaml]]</tt>
 
Process:
 
<font color=red>TODO</font>
 
====Restart the Master Process====
 
systemctl restart atomic-openshift-master
 
===HA Deployment===
====master api Daemon====
 
Depends On: "etcd.service" ([[#etcd_Daemon|etcd]])


Unit: <tt>atomic-openshift-master-api.service</tt>
Unit: <tt>atomic-openshift-master-api.service</tt>


After:
systemctl status atomic-openshift-master-api


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


Working Directory: <tt>/var/lib/etcd/</tt>
Working Directory: <tt>/var/lib/origin</tt>


Configuration File: <tt>/etc/etcd/etcd.conf</tt>
Configuration Files:  
* <tt>/etc/sysconfig/atomic-openshift-master-api</tt>, which contains command line options for the process, such as <tt>--loglevel</tt>, etc.
* <tt>[[Master-config.yml|/etc/origin/master/master-config.yaml]]</tt>


Process:  
Process:  


<pre>
/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
/usr/bin/etcd --name=master1.rdu20.internal --data-dir=/var/lib/etcd/ --listen-client-urls=https://192.199.0.199:2379
 
</pre>
====master controller Daemon====
 
Depends On: "etcd.service" ([[#etcd_Daemon|etcd]]), "atomic-openshift-master-api.service" ([[#master_api_Daemon|master api daemon]])
 
Unit: <tt>atomic-openshift-master-controllers.service</tt>
 
systemctl status atomic-openshift-master-controllers
 
Unit File: <tt>/usr/lib/systemd/system/atomic-openshift-master-controllers.service</tt>
 
Working Directory: <tt>/var/lib/origin</tt>
 
Configuration Files:
* <tt>/etc/sysconfig/atomic-openshift-master-controllers</tt>, which contains command line options for the process, such as <tt>--loglevel</tt>, etc.
* <tt>[[Master-config.yml|/etc/origin/master/master-config.yaml]]</tt>


==atomic-openshift-master-controller==
Process:


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


Purpose: it manages access to the cluster-wide [[OpenShift Concepts#SDN|SDN]]
==node Daemon==


==Units and Processes==
See below {{Internal|#node_Daemon|node Daemon}}


===Master Controller===
=Regular Node=


Process:
[[Image:OpenShiftRuntime_node.png]]


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


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


<pre>
Unit: <tt>atomic-openshift-node.service</tt>
atomic-openshift-master-api.service
</pre>


File location:
systemctl status atomic-openshift-node


<pre>
Unit File: <tt>/usr/lib/systemd/system/atomic-openshift-node.service</tt>
/usr/lib/systemd/system/atomic-openshift-node.service
/usr/lib/systemd/system/atomic-openshift-master-api.service
/usr/lib/systemd/system/atomic-openshift-master.service
/usr/lib/systemd/system/atomic-openshift-master-controllers.service
/usr/lib/systemd/system/atomic-openshift-node.service.d
</pre>
===Master API Process===


<pre>
Working Directory: <tt>/var/lib/origin</tt>
/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
</pre>


===Node Process===
Configuration Files:
* <tt>/etc/sysconfig/atomic-openshift-node</tt>, which contains command line options for the process, such as <tt>--loglevel</tt>, etc.
* <tt>[[Node-config.yml|/etc/origin/node/node-config.yaml]]</tt>
 
Process:


<pre>
<pre>
Line 103: Line 134:
</pre>
</pre>


===etcd===
=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 "[[OpenShift_Runtime#Master_and_Node_Process_Logging|Master and Node Process Logging]]" section.
 
==Non-HA Master Process Management Operations==
 
===Start===
 
systemctl start etcd.service atomic-openshift-master.service 
sleep 2
atomic-openshift-node.service
 
===Stop===
 
systemctl stop atomic-openshift-node.service atomic-openshift-master.service etcd.service
 
==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
 
Also see: {{Internal|OpenShift_Node_Operations#Starting.2FStopping_a_Node|Starting/Stopping a Node}}
 
=Master and Node Process Logging=
 
==Master Process Logging==
 
Adjust the logging level as described here: [[OpenShift_Logging_Levels#Change_the_Log_Level_for_OpenShift_Processes|Change the Log Level for OpenShift Processes]].
 
Then tail the journalctl log.
 
[[journalctl]] -u atomic-openshift-master-controllers -f
 
  [[journalctl]] -u atomic-openshift-master-api -f
 
==Node Process Logging==


<pre>
Adjust the logging level as described here: [[OpenShift_Logging_Levels#Change_the_Log_Level_for_OpenShift_Processes|Change the Log Level for OpenShift Processes]].
/usr/bin/etcd --name=master1.rdu20.internal --data-dir=/var/lib/etcd/ --listen-client-urls=https://192.199.0.199:2379
</pre>


==Units==
Then tail the journalctl log.


* atomic-openshift-master-api.service
[[journalctl]] -u atomic-openshift-node -f
* atomic-openshift-master-controllers.service
* atomic-openshift-node.service
* openvswitch.service
* etcd.service

Latest revision as of 21:10, 19 February 2018

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 "Master and Node Process Logging" section.

Non-HA Master Process Management Operations

Start

systemctl start etcd.service atomic-openshift-master.service  
sleep 2
atomic-openshift-node.service

Stop

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

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

Also see:

Starting/Stopping a Node

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
 journalctl -u atomic-openshift-master-api -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