Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
redhat:openshift-redhat:dailybusiness-openshift [2019/02/21 13:52] – michael | redhat:openshift-redhat:dailybusiness-openshift [2020/12/10 14:07] (current) – michael | ||
---|---|---|---|
Line 46: | Line 46: | ||
</ | </ | ||
- | ===== Ressourcen von einem Projekt wiederherstellen ===== | + | |
+ | ===== Cluster Project Administration ===== | ||
+ | |||
+ | <WRAP center box 100%> | ||
+ | ==== Set Timeout on OpenShift route ==== | ||
+ | |||
+ | Jenkins has some pages, like the system configuration or the plugin overview, that take up to a minute for displaying. With the default settings on the OpenShift reverse proxy the request will be canceled after several seconds. You may set a new timeout on the route for your Jenkins instance to wait for the page to load: | ||
+ | |||
+ | < | ||
+ | |||
+ | If a minute is not enough to load the page feel free to set the value higher. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Cluster Administration ===== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Cluster Debugging ===== | ||
+ | |||
+ | |||
+ | <WRAP center box 100%> | ||
+ | ==== Kube Config wiederherstellen ==== | ||
+ | |||
+ | Funktioniert der '' | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP center box 100%> | ||
+ | ==== Kube Config wiederherstellen ==== | ||
+ | |||
+ | Funktioniert der '' | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Firmenspezifische Doku's ===== | ||
+ | |||
+ | <WRAP center box 100%> | ||
+ | ==== Ressourcen von einem Projekt wiederherstellen ==== | ||
Bei der Post läuft täglich um 24:00 ein cronjob, der alle wichtigen Projekt-Ressourcen täglich exportiert: | Bei der Post läuft täglich um 24:00 ein cronjob, der alle wichtigen Projekt-Ressourcen täglich exportiert: | ||
Line 129: | Line 175: | ||
< | < | ||
+ | </ | ||
- | ===== Problem OpenShift GlusterFS (nicht mehr im HP OVO) ===== | ||
- | Das Überwachungsskript(/ | + | <WRAP center box 100%> |
- | Dieselbe Fehlermeldung wird auch im HP-OVO Monitoring angezeigt. | + | ==== OpenShift Gluster Volume extend - over heketi ==== |
- | + | ||
- | Development Platform > DailyBusiness > 1.png | + | |
- | + | ||
- | + | ||
- | + | ||
- | Auf dem Glusternode vekq7k wurde wegen eines anderen Fehler ein Neustart des Servers gemacht. Anschliessend konnte GlusterFS nicht vollständig gestartet werden. | + | |
- | Somit muss das GlusterFS auf auf dem gluster-pv101 forciert neu gestartet werden: | + | |
- | + | ||
- | [root@vekq7k ~]# gluster volume status gluster-pv101 | + | |
- | Status of volume: gluster-pv101 | + | |
- | Gluster process | + | |
- | ------------------------------------------------------------------------------ | + | |
- | Brick vhmsgj.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vkyg7l.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vsytjw.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vu32g5.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vpva0p.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vekq7k.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vlf5eh.pnet.ch:/ | + | |
- | ick | + | |
- | Brick vw7w5k.pnet.ch:/ | + | |
- | ick | + | |
- | Brick v2o8fv.pnet.ch:/ | + | |
- | ick | + | |
- | Self-heal Daemon on localhost | + | |
- | Self-heal Daemon on v2o8fv.pnet.ch | + | |
- | Self-heal Daemon on vs3tvs.pnet.ch | + | |
- | Self-heal Daemon on vw7w5k.pnet.ch | + | |
- | Self-heal Daemon on vsytjw.pnet.ch | + | |
- | Self-heal Daemon on vhmsgj.pnet.ch | + | |
- | Self-heal Daemon on vlf5eh.pnet.ch | + | |
- | Self-heal Daemon on vkyg7l.pnet.ch | + | |
- | Self-heal Daemon on vpva0p.pnet.ch | + | |
- | Self-heal Daemon on vu32g5.pnet.ch | + | |
- | Self-heal Daemon on vthbcn.pnet.ch | + | |
- | + | ||
- | Task Status of Volume gluster-pv101 | + | |
- | ------------------------------------------------------------------------------ | + | |
- | There are no active volume tasks | + | |
- | + | ||
- | [root@vekq7k ~]# gluster volume start gluster-pv101 | + | |
- | + | ||
- | ===== Kube Config wiederherstellen ===== | + | |
- | + | ||
- | Funktioniert der '' | + | |
- | + | ||
- | <code># cp / | + | |
- | + | ||
- | + | ||
- | ---- | + | |
- | + | ||
- | ===== OpenShift Gluster Volume extend - over heketi | + | |
Eine zusätzliche Terabyte Disk auf dem Gluster Cluster via Heketi einbinden: (siehe auch : [[https:// | Eine zusätzliche Terabyte Disk auf dem Gluster Cluster via Heketi einbinden: (siehe auch : [[https:// | ||
Line 205: | Line 193: | ||
Auf der Heketi-Pod Konsole node und Cluster ID auslesen. | Auf der Heketi-Pod Konsole node und Cluster ID auslesen. | ||
- | < | + | < |
sh-4.2# heketi-cli node list --user admin --secret p/ | sh-4.2# heketi-cli node list --user admin --secret p/ | ||
Id: | Id: | ||
Line 214: | Line 202: | ||
Jetzt kann das neue Device nach dem Schema "'' | Jetzt kann das neue Device nach dem Schema "'' | ||
- | < | + | < |
sh-4.2# heketi-cli device add --name /dev/sdc --node 0680dabe91ee5a7f36da8cb6fe49cdd4 --user admin --secret p/ | sh-4.2# heketi-cli device add --name /dev/sdc --node 0680dabe91ee5a7f36da8cb6fe49cdd4 --user admin --secret p/ | ||
Device added successfully | Device added successfully | ||
Line 227: | Line 215: | ||
Als Resultat der Erweiterung, | Als Resultat der Erweiterung, | ||
- | < | + | < |
[root@vosge1 ~]# pvscan | [root@vosge1 ~]# pvscan | ||
PV / | PV / | ||
Line 234: | Line 222: | ||
Total: 3 [2.03 TiB] / in use: 3 [2.03 TiB] / in no VG: 0 [0 ] | Total: 3 [2.03 TiB] / in use: 3 [2.03 TiB] / in no VG: 0 [0 ] | ||
</ | </ | ||
- | |||
- | |||
- | ===== Neuer Host zu existierenden Cluster hinzufügen ===== | ||
- | |||
- | Red Hat Anleitung: [[https:// | ||
- | |||
- | Bevor der neue Host dem Cluster hinzugefügt werden kann, muss dieser die nötigen OpenShift Pakete erhalten. | ||
- | Jedoch wird dieses im offiziellen Repo nur bis zur Version 3.9 gepflegt. Deshalb müssen zuerst unter / | ||
- | |||
- | <sxh bash> | ||
- | [root@new_host]# | ||
- | [rhel-7-server-ose310-rpms] | ||
- | baseurl = http:// | ||
- | enabled = 1 | ||
- | gpgcheck = 1 | ||
- | gpgkey = file:/// | ||
- | name = Red Hat OpenShift Container Platform 3.10 (RPMs) | ||
- | |||
- | [rhel-7-server-ose39-rpms] | ||
- | baseurl = http:// | ||
- | enabled = 1 | ||
- | gpgcheck = 1 | ||
- | gpgkey = file:/// | ||
- | name = Red Hat OpenShift Container Platform 3.9 (RPMs) | ||
- | </ | ||
- | |||
- | < | ||
- | [root@new_host]# | ||
- | |||
- | |||
- | Der Host ist nun für die Integration bereit. Jetzt muss noch das Hostfile dementsprechend angepasst werden: | ||
- | |||
- | <sxh bash> | ||
- | [rebermi@vosbh1]# | ||
- | --- | ||
- | all: | ||
- | children: | ||
- | OSEv3: | ||
- | children: | ||
- | bastion: {} | ||
- | glusterfs: {} | ||
- | glusterfs_registry: | ||
- | etcd: {} | ||
- | masters: {} | ||
- | nodes: | ||
- | children: | ||
- | masters: {} | ||
- | infra_nodes: | ||
- | user_nodes: {} | ||
- | new_nodes: {} <--- | ||
- | ... | ||
- | user_nodes: | ||
- | hosts: | ||
- | EXISTING_HOSTS.pnet.ch: | ||
- | openshift_hostname: | ||
- | openshift_ip: | ||
- | openshift_node_group_name: | ||
- | openshift_node_local_quota_per_fsgroup: | ||
- | new_nodes: <--- | ||
- | hosts: | ||
- | NEW_HOST.pnet.ch: | ||
- | openshift_hostname: | ||
- | openshift_ip: | ||
- | openshift_node_group_name: | ||
- | openshift_node_local_quota_per_fsgroup: | ||
- | </ | ||
- | |||
- | Zum Schluss wird nun das Scaleup Playbook von Red Hat ausgeführt: | ||
- | |||
- | < | ||
- | |||
- | Damit auch Pods auf dem neuen Cluster-Node erstellt werden, müssen die LABELS auf dem Node angepasst werden: | ||
- | |||
- | < | ||
- | [user@vosbh1 ~]$ oc get nodes --show-labels</ | ||
- | |||
- | # Man kann jetzt die Labels eines bereits integrierten Node kopieren und folgendermassen beim neuen Node setzen: | ||
- | |||
- | < | ||
- | [user@vosbh1 ~]$ oc label node NEWNODE region=primary | ||
- | [user@vosbh1 ~]$ oc label node NEWNODE stage=test | ||
- | [user@vosbh1 ~]$ oc label node NEWNODE zone=defaul</ | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | |||
- | |||
- | <WRAP center round important 60%> | ||
- | '' | ||
</ | </ | ||
- | |||
- | ===== Gluster PV Administration (obsolete, neu mit heketi) ===== | ||
- | |||
- | |||
- | <WRAP center box 100%> | ||
- | ==== Gluster PVs erstellen (obsolete) ==== | ||
- | |||
- | Um ein neues PV zu erstellen, muss als erstes berücksichtig werden, ob genügen Platz zur Verfügung steht. | ||
- | |||
- | Folgender Ansible Befehl kann hierfür verwendet werden: | ||
- | |||
- | < | ||
- | |||
- | |||
- | Wenn genügend Platz zur Verfügung steht, muss das Hostfile der jeweiligen Plattform angepasst werden: | ||
- | |||
- | < | ||
- | # vim hosts_os***.yaml</ | ||
- | |||
- | Anschliessend im Hostfile das neue PV am Ende des Abschnittes " | ||
- | |||
- | <sxh yaml; gutter: | ||
- | ... | ||
- | gluster_pvs: | ||
- | - name: gluster-pv1 | ||
- | options: | ||
- | performance.write-behind-window-size: | ||
- | size: 100 | ||
- | - name: gluster-pv2 | ||
- | options: | ||
- | cluster.consistent-metadata: | ||
- | cluster.post-op-delay-secs: | ||
- | size: 50 | ||
- | ... | ||
- | - name: gluster-pv42 | ||
- | size: 40 | ||
- | - name: gluster-pv43 | ||
- | size: 10 | ||
- | - name: NEW GLUSTER PW | ||
- | size: NEW PV SIZE | ||
- | ... | ||
- | </ | ||
- | |||
- | Nun kann das Playbook main.yml im Verzeichnis / | ||
- | |||
- | < | ||
- | # ansible-playbook --check main.yml</ | ||
- | |||
- | |||
- | Nachdem der Check durchgelaufen ist (mit Fehler, da die Änderungen nicht gemacht wurden und so das PV so nicht gefunden wurde) kann das Playbook ohne das --check ausgeführt werden: | ||
- | |||
- | < | ||
- | # ansible-playbook main.yml</ | ||
- | |||
- | |||
- | Zum Schluss muss noch überprüft werden, ob das PV tatsächlich angelegt wurde: | ||
- | |||
- | < | ||
- | </ | ||
- | |||
- | |||
- | |||
- | <WRAP center box 100%> | ||
- | ==== Gluster PVs vergrössern (obsolete) ==== | ||
- | |||
- | An OpenShift GlusterFS PV can be online resized, increased in size. This needs to be done on the OpenShift master node. | ||
- | |||
- | **These are the steps**: | ||
- | |||
- | Edit the Ansible Inventory file and set the new size of the pv. Push the changes also to gitit.pnet.ch | ||
- | |||
- | < | ||
- | # vim hosts_osit2.yaml</ | ||
- | |||
- | <sxh yaml; gutter: | ||
- | ... | ||
- | - name: gluster-pv118 | ||
- | size: 5 | ||
- | ... | ||
- | </ | ||
- | |||
- | < | ||
- | |||
- | <sxh bash; gutter: | ||
- | # On branch master | ||
- | # Changes not staged for commit: | ||
- | # (use "git add < | ||
- | # (use "git checkout -- < | ||
- | # | ||
- | # | ||
- | # | ||
- | no changes added to commit (use "git add" and/or "git commit -a") | ||
- | </ | ||
- | |||
- | < | ||
- | # git commit -m " | ||
- | # git push</ | ||
- | |||
- | Run / | ||
- | |||
- | < | ||
- | ansible-playbook --check main.yml</ | ||
- | |||
- | After successful check run / | ||
- | |||
- | < | ||
- | # ansible-playbook main.yml</ | ||
- | |||
- | Check the size of the gluster-pv on the local node. Should now show 1/3rd of the size in mounted position, because GlustrFS is replicated on the node instances. | ||
- | |||
- | < | ||
- | |||
- | Run ov edit pv < | ||
- | |||
- | < | ||
- | <sxh yaml; gutter: | ||
- | ... | ||
- | capacity: | ||
- | storage: 5Gi | ||
- | claimRef: | ||
- | ... | ||
- | </ | ||
- | < | ||
- | |||
- | |||
- | <WRAP center round important 60%> | ||
- | '' | ||
- | </ | ||
- | |||
- | </ | ||
- | |||
- | |||
- | <WRAP center box 100%> | ||
- | ==== Gluster PV's löschen (obsolete) ==== | ||
- | |||
- | Auf dem ersten Master das PV unmounten: | ||
- | |||
- | < | ||
- | # df | grep endpoint</ | ||
- | |||
- | |||
- | Das PV im OpenShift entfernen: | ||
- | |||
- | < | ||
- | |||
- | Das gelöschte PV anschliessend auf einem Gluster Node Stopen und löschen: | ||
- | |||
- | < | ||
- | Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y | ||
- | volume stop: gluster-pv11: | ||
- | |||
- | < | ||
- | Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y | ||
- | volume delete: gluster-pv11: | ||
- | |||
- | Zum schluss folgende Ansible Befehle auf dem Master ausführen: | ||
- | |||
- | < | ||
- | |||
- | # ansible gluster -a " | ||
- | |||
- | # ansible gluster -a " | ||
- | |||
- | # ansible gluster -a " | ||
- | </ | ||