OpenShift Runtime: Difference between revisions

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


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]].
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]].
[[Image:OpenShiftRuntime_HA_master_node.png]]


<span id="etcd"></span>
<span id="etcd"></span>
Line 30: Line 32:
/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==
===Non-HA Deployment===


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.
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.


Depends On: [[#etcd_Daemon|etcd]]
Depends On: "etcd.service" ([[#etcd_Daemon|etcd]])


Unit: <tt>atomic-openshift-master.service</tt>
Unit: <tt>atomic-openshift-master.service</tt>
Line 49: Line 57:
Process:  
Process:  


<pre>
<font color=red>TODO</font>
</pre>
 
====Restart the Master Process====
 
systemctl restart atomic-openshift-master


===master api Daemon===
===HA Deployment===
====master api Daemon====


Depends On: [[#etcd_Daemon|etcd]]
Depends On: "etcd.service" ([[#etcd_Daemon|etcd]])


Unit: <tt>atomic-openshift-master-api.service</tt>
Unit: <tt>atomic-openshift-master-api.service</tt>
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>
Line 68: Line 82:
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===
====master controller Daemon====


Depends On: [[#etcd_Daemon|etcd]], [[]]
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>
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>
Unit File: <tt>/usr/lib/systemd/system/atomic-openshift-master-controllers.service</tt>


Working Directory: <tt>/var/lib/etcd</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>
 
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 {{Internal|#node_Daemon|node Daemon}}
 
=Regular Node=
 
[[Image:OpenShiftRuntime_node.png]]
 
==node Daemon==
 
Depends On: "docker.service", "openvswitch.service"
 
Unit: <tt>atomic-openshift-node.service</tt>
 
systemctl status atomic-openshift-node
 
Unit File: <tt>/usr/lib/systemd/system/atomic-openshift-node.service</tt>
 
Working Directory: <tt>/var/lib/origin</tt>


Configuration File: <tt>/etc/etcd/etcd.conf</tt>
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:  
Process:  


<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/openshift start node --config=/etc/origin/node/node-config.yaml --loglevel=2
</pre>
</pre>


=Regular Node=
=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==
 
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.


==node Daemon==
[[journalctl]] -u atomic-openshift-node -f

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