From ea68a2aa23008658303ddab50037092abab64d81 Mon Sep 17 00:00:00 2001 From: Daan Asscheman Date: Mon, 24 Jun 2024 11:28:47 +0200 Subject: [PATCH] testing port numbers. --- .../01_mariadb-secret.yaml} | 4 ++-- .../02_mariadb-cm.yaml} | 4 ++-- .../03_mariadb-statefulset.yaml} | 0 .../04_mariadb-svc.yaml} | 0 openshift/config/05_sample-app-cm.yaml | 10 ++++++++++ .../06_sample-app.yaml} | 5 ----- .../07_sample-svc.yaml} | 0 .../{sample/8_nginx.yaml => config/08_nginx.yaml} | 0 .../9_nginx-svc.yaml => config/09_nginx-svc.yaml} | 0 .../10_sample-ingress.yaml} | 0 openshift/sample/5_sample-app-cm.yaml | 14 -------------- openshift/scripts/sample-app.sh | 6 +++--- 12 files changed, 17 insertions(+), 26 deletions(-) rename openshift/{sample/1_mariadb-secret.yaml => config/01_mariadb-secret.yaml} (69%) rename openshift/{sample/2_mariadb-cm.yaml => config/02_mariadb-cm.yaml} (50%) rename openshift/{sample/3_mariadb-statefulset.yaml => config/03_mariadb-statefulset.yaml} (100%) rename openshift/{sample/4_mariadb-svc.yaml => config/04_mariadb-svc.yaml} (100%) create mode 100644 openshift/config/05_sample-app-cm.yaml rename openshift/{sample/6_sample-app.yaml => config/06_sample-app.yaml} (89%) rename openshift/{sample/7_sample-svc.yaml => config/07_sample-svc.yaml} (100%) rename openshift/{sample/8_nginx.yaml => config/08_nginx.yaml} (100%) rename openshift/{sample/9_nginx-svc.yaml => config/09_nginx-svc.yaml} (100%) rename openshift/{sample/ZZ_sample-ingress.yaml => config/10_sample-ingress.yaml} (100%) delete mode 100644 openshift/sample/5_sample-app-cm.yaml diff --git a/openshift/sample/1_mariadb-secret.yaml b/openshift/config/01_mariadb-secret.yaml similarity index 69% rename from openshift/sample/1_mariadb-secret.yaml rename to openshift/config/01_mariadb-secret.yaml index abe9f6d..01f4870 100644 --- a/openshift/sample/1_mariadb-secret.yaml +++ b/openshift/config/01_mariadb-secret.yaml @@ -7,5 +7,5 @@ type: Opaque data: # Use the following command to generate a random password: # echo -n 'ChangeThisSuperSecretPassword' | base64 - mariadb-root-password: c2VjcmV0 - mariadb-password: c2VjcmV0 + mariadb-root-password: + mariadb-password: diff --git a/openshift/sample/2_mariadb-cm.yaml b/openshift/config/02_mariadb-cm.yaml similarity index 50% rename from openshift/sample/2_mariadb-cm.yaml rename to openshift/config/02_mariadb-cm.yaml index 812d7e4..0ec1bed 100644 --- a/openshift/sample/2_mariadb-cm.yaml +++ b/openshift/config/02_mariadb-cm.yaml @@ -4,5 +4,5 @@ kind: ConfigMap metadata: name: mariadb-config data: - mariadb-database: development - mariadb-user: development + mariadb-database: sample-database + mariadb-user: sample-database-user diff --git a/openshift/sample/3_mariadb-statefulset.yaml b/openshift/config/03_mariadb-statefulset.yaml similarity index 100% rename from openshift/sample/3_mariadb-statefulset.yaml rename to openshift/config/03_mariadb-statefulset.yaml diff --git a/openshift/sample/4_mariadb-svc.yaml b/openshift/config/04_mariadb-svc.yaml similarity index 100% rename from openshift/sample/4_mariadb-svc.yaml rename to openshift/config/04_mariadb-svc.yaml diff --git a/openshift/config/05_sample-app-cm.yaml b/openshift/config/05_sample-app-cm.yaml new file mode 100644 index 0000000..7356fb7 --- /dev/null +++ b/openshift/config/05_sample-app-cm.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sample-config +data: + database-type: mysql + database-host: mariadb-sample + database-port-number: '3306' + database-name: sample-database \ No newline at end of file diff --git a/openshift/sample/6_sample-app.yaml b/openshift/config/06_sample-app.yaml similarity index 89% rename from openshift/sample/6_sample-app.yaml rename to openshift/config/06_sample-app.yaml index d753e28..752ede0 100644 --- a/openshift/sample/6_sample-app.yaml +++ b/openshift/config/06_sample-app.yaml @@ -41,11 +41,6 @@ spec: configMapKeyRef: name: sample-config key: database-name -# - name: LARAVEL_STORAGE_PATH -# valueFrom: -# configMapKeyRef: -# name: sample-config -# key: laravel-storage - name: LARAVEL_DATABASE_USER valueFrom: configMapKeyRef: diff --git a/openshift/sample/7_sample-svc.yaml b/openshift/config/07_sample-svc.yaml similarity index 100% rename from openshift/sample/7_sample-svc.yaml rename to openshift/config/07_sample-svc.yaml diff --git a/openshift/sample/8_nginx.yaml b/openshift/config/08_nginx.yaml similarity index 100% rename from openshift/sample/8_nginx.yaml rename to openshift/config/08_nginx.yaml diff --git a/openshift/sample/9_nginx-svc.yaml b/openshift/config/09_nginx-svc.yaml similarity index 100% rename from openshift/sample/9_nginx-svc.yaml rename to openshift/config/09_nginx-svc.yaml diff --git a/openshift/sample/ZZ_sample-ingress.yaml b/openshift/config/10_sample-ingress.yaml similarity index 100% rename from openshift/sample/ZZ_sample-ingress.yaml rename to openshift/config/10_sample-ingress.yaml diff --git a/openshift/sample/5_sample-app-cm.yaml b/openshift/sample/5_sample-app-cm.yaml deleted file mode 100644 index 7ad0928..0000000 --- a/openshift/sample/5_sample-app-cm.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: sample-config -data: - database-type: mysql - database-host: mariadb-sample - database-port-number: '3306' - database-name: development -# laravel-storage: /var/www/laravel/ -# wordpress-enable-https: 'yes' -# wordpress-enable-reverse-proxy: 'yes' - # Change the following to your blog name, email, first name and last name \ No newline at end of file diff --git a/openshift/scripts/sample-app.sh b/openshift/scripts/sample-app.sh index 1ac26d9..81d0fe3 100755 --- a/openshift/scripts/sample-app.sh +++ b/openshift/scripts/sample-app.sh @@ -9,7 +9,7 @@ # Function to create the list of resource yamls create_app() { - search_dir=../sample + search_dir=../config for entry in "$search_dir"/* do echo "$entry" @@ -19,11 +19,11 @@ create_app() { # Function to create the list of resource yamls delete_app() { - search_dir=../sample + search_dir=../config for entry in "$search_dir"/* do echo "$entry" - oc delete -f $entry + oc delete -f "$entry" done }