skripting-section:bash:openshift-single-node-cluster

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
skripting-section:bash:openshift-single-node-cluster [2019/03/25 16:39] michaelskripting-section:bash:openshift-single-node-cluster [2019/08/15 15:49] (current) – [Openshift single-node Installation Skript] michael
Line 1: Line 1:
-====== OpenShift Installation Skript ======+====== Openshift single-node Installation Skript ======
  
 +''Installiert ein vollwertiges OpenShift Origin Cluster auf einem single Node (VM)''
 +
 +**Wichtig zu beachten:**
 +  * Das Script wird unter dem persönlichen User ausgeführt.
 +  * ''Sudo'' ist ohne Passworteingabe möglich.
 +  * Das Agend-forewarding ist bei einer Key-Authentisierung aktiviert. (Wichtig für Ansible)
 +  * Vor dem Ausführen die Grösse des Speicher-yaml anpassen. "''storage: 500Gi''"
  
 ===== Skript Sourcecode ===== ===== Skript Sourcecode =====
Line 110: Line 117:
  
 #----------------------------------------------START-INVENTORY--------------------------------------------- #----------------------------------------------START-INVENTORY---------------------------------------------
-cat <<EOF > inventory.ini+cat <<EOF1 > inventory.ini
 [OSEv3:children] [OSEv3:children]
 masters masters
Line 165: Line 172:
  
 #openshift_master_logout_url=https://example.com/logout #openshift_master_logout_url=https://example.com/logout
-EOF+EOF1
  
 #----------------------------------------------END-INVENTORY--------------------------------------------- #----------------------------------------------END-INVENTORY---------------------------------------------
Line 204: Line 211:
 cd openshift-ansible && git fetch && git checkout release-${VERSION} && cd .. cd openshift-ansible && git fetch && git checkout release-${VERSION} && cd ..
  
-sudo bash -c "cat <<EOF > /etc/hosts+sudo bash -c "cat <<EOF2 > /etc/hosts
 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 ${IP}           $(hostname) console console.${DOMAIN} ${IP}           $(hostname) console console.${DOMAIN}
-EOF"+EOF2"
  
 if [ -z $DISK ]; then if [ -z $DISK ]; then
Line 268: Line 275:
         # Configure a Custom Certificate for the Image Registry         # Configure a Custom Certificate for the Image Registry
         ## See here for more explanation: https://docs.okd.io/latest/install_config/certificate_customization.html         ## See here for more explanation: https://docs.okd.io/latest/install_config/certificate_customization.html
-        cat <<EOF >> inventory.ini+        cat <<EOF3 >> inventory.ini
  
         openshift_master_overwrite_named_certificates=true         openshift_master_overwrite_named_certificates=true
Line 282: Line 289:
         openshift_hosted_registry_routecertificates={"certfile": "/etc/letsencrypt/live/${DOMAIN}/fullchain.pem", "keyfile": "/etc/letsencrypt/live/${DOMAIN}/privkey.pem", "cafile": "/etc/letsencrypt/live/${DOMAIN}/chain.pem"}         openshift_hosted_registry_routecertificates={"certfile": "/etc/letsencrypt/live/${DOMAIN}/fullchain.pem", "keyfile": "/etc/letsencrypt/live/${DOMAIN}/privkey.pem", "cafile": "/etc/letsencrypt/live/${DOMAIN}/chain.pem"}
         openshift_hosted_registry_routetermination=reencrypt         openshift_hosted_registry_routetermination=reencrypt
-EOF+EOF3
  
         # Add Cron Task to renew certificate         # Add Cron Task to renew certificate
Line 301: Line 308:
 if [ "$PVS" = "true" ]; then if [ "$PVS" = "true" ]; then
  
-        cat <<EOF2 > vol.yaml+        cat <<EOF4 > vol.yaml
 apiVersion: v1 apiVersion: v1
 kind: PersistentVolume kind: PersistentVolume
Line 315: Line 322:
   hostPath:   hostPath:
     path: /mnt/data/vol     path: /mnt/data/vol
-EOF2+EOF4
  
         for i in `seq 1 200`;         for i in `seq 1 200`;
  • skripting-section/bash/openshift-single-node-cluster.1553528389.txt.gz
  • Last modified: 2019/03/25 16:39
  • by michael