From 7b15a1518936eb3e003e3d457f5d55b58bc63d2c Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Thu, 12 Jan 2023 13:18:10 +0100 Subject: [PATCH] Quito appsmith --- Appsmith/appsmith-deployment.yaml | 82 ------------------------- Appsmith/as-namespace.yaml | 4 -- Appsmith/copyMediawikiDB | 24 -------- Appsmith/creaTodo.sh | 4 -- Appsmith/docker-compose.yml | 23 ------- Appsmith/entra.sh | 1 - Appsmith/kustomization.yaml | 12 ---- Appsmith/mysql-deployment-as.yaml | 71 --------------------- Appsmith/paraTodo.sh | 3 - Appsmith/php-myadmin-as-deployment.yaml | 54 ---------------- Appsmith/pv-local-appsmith.yaml | 12 ---- Appsmith/pv-local-mysql-as.yaml | 11 ---- 12 files changed, 301 deletions(-) delete mode 100644 Appsmith/appsmith-deployment.yaml delete mode 100644 Appsmith/as-namespace.yaml delete mode 100755 Appsmith/copyMediawikiDB delete mode 100755 Appsmith/creaTodo.sh delete mode 100644 Appsmith/docker-compose.yml delete mode 100755 Appsmith/entra.sh delete mode 100644 Appsmith/kustomization.yaml delete mode 100644 Appsmith/mysql-deployment-as.yaml delete mode 100755 Appsmith/paraTodo.sh delete mode 100644 Appsmith/php-myadmin-as-deployment.yaml delete mode 100644 Appsmith/pv-local-appsmith.yaml delete mode 100644 Appsmith/pv-local-mysql-as.yaml diff --git a/Appsmith/appsmith-deployment.yaml b/Appsmith/appsmith-deployment.yaml deleted file mode 100644 index fe488048..00000000 --- a/Appsmith/appsmith-deployment.yaml +++ /dev/null @@ -1,82 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: appsmith - namespace: appsmith - labels: - app: appsmith -spec: - type: NodePort - ports: - - port: 80 - nodePort: 30798 - targetPort: appsmith - selector: - app: appsmith - tier: frontend ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: as-pv-claim - namespace: appsmith - labels: - app: appsmith -spec: - accessModes: - - ReadWriteOnce - storageClassName: "" - resources: - requests: - storage: 10Gi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: appsmith - namespace: appsmith - labels: - app: appsmith -spec: - selector: - matchLabels: - app: appsmith - tier: frontend - strategy: - type: Recreate - template: - metadata: - labels: - app: appsmith - tier: frontend - spec: - containers: - - image: index.docker.io/appsmith/appsmith-ce - name: appsmith - env: - - name: DB_TYPE - value: mysql - - name: DB_NAME - value: appsmith - - name: DB_HOST - value: appsmith-mysql - - name: DB_PASS - valueFrom: - secretKeyRef: - name: mysqlas-pass - key: password - - name: DB_USER - valueFrom: - secretKeyRef: - name: mysqlas-pass - key: db_user - ports: - - containerPort: 80 - name: appsmith - volumeMounts: - - name: appsmith-persistent-storage - mountPath: /var/www/html - volumes: - - name: appsmith-persistent-storage - persistentVolumeClaim: - claimName: as-pv-claim diff --git a/Appsmith/as-namespace.yaml b/Appsmith/as-namespace.yaml deleted file mode 100644 index 4794dd23..00000000 --- a/Appsmith/as-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: appsmith diff --git a/Appsmith/copyMediawikiDB b/Appsmith/copyMediawikiDB deleted file mode 100755 index eeac6347..00000000 --- a/Appsmith/copyMediawikiDB +++ /dev/null @@ -1,24 +0,0 @@ -# Backup date - -today=$(date "+%Y_%m_%d-%H_%M_%S") - -echo "Current date: $today" - -# build up filename - -# destination folder (change to your own needs) - -BACKUP_FOLDER=/tmp - -file_name=$BACKUP_FOLDER/bkup_mediawiki -new_name=$file_name-$today.sql -echo "Backup file name: " "$new_name" - -#sudo docker exec `sudo docker container ls | grep mysql_mediawiki | cut -f1 -d' '` /usr/bin/mysqldump -u root --password=Dsa-0213 mediawiki > $new_name -sudo kubectl --kubeconfig /home/creylopez/.kube/config exec `kubectl --kubeconfig /home/creylopez/.kube/config get pod -n mediawiki|grep mysql|cut -f1 -d' '` -n mediawiki -- /usr/bin/mysqldump -u root --password=Dsa-0213 mediawiki > $new_name - -message="Backup stored "$today - -sudo -u creylopez cat $new_name | mail -s "Mediawiki backup finished" "creylopez@yahoo.es" - -sudo rm $new_name diff --git a/Appsmith/creaTodo.sh b/Appsmith/creaTodo.sh deleted file mode 100755 index e9ea65f3..00000000 --- a/Appsmith/creaTodo.sh +++ /dev/null @@ -1,4 +0,0 @@ -kubectl create -f pv-local-mysql-as.yaml -kubectl create -f pv-local-appsmith.yaml -kubectl create -k ./ -watch kubectl get all -n appsmith diff --git a/Appsmith/docker-compose.yml b/Appsmith/docker-compose.yml deleted file mode 100644 index 8dbfe542..00000000 --- a/Appsmith/docker-compose.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: "3" - -services: - appsmith: - image: index.docker.io/appsmith/appsmith-ce - container_name: appsmith - ports: - - "80:80" - - "443:443" - volumes: - - ./stacks:/appsmith-stacks - restart: unless-stopped - # # Uncomment the lines below to enable auto-update - # labels: - # com.centurylinklabs.watchtower.enable: "true" - - # auto_update: - # image: containrrr/watchtower:latest-dev - # volumes: - # - /var/run/docker.sock:/var/run/docker.sock - # # Update check interval in seconds. - # command: --schedule "0 0 * ? * *" --label-enable --cleanup - # restart: unless-stopped diff --git a/Appsmith/entra.sh b/Appsmith/entra.sh deleted file mode 100755 index d521194b..00000000 --- a/Appsmith/entra.sh +++ /dev/null @@ -1 +0,0 @@ -kubectl exec -ti deployment.apps/appsmith -n appsmith -- /bin/bash diff --git a/Appsmith/kustomization.yaml b/Appsmith/kustomization.yaml deleted file mode 100644 index 300afa9b..00000000 --- a/Appsmith/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -secretGenerator: -- name: mysqlas-pass - namespace: appsmith - literals: - - password=Dsa-0213 - - db_user=root - - db_passwd=Dsa-0213 -resources: - - as-namespace.yaml - - mysql-deployment-as.yaml - - appsmith-deployment.yaml - - php-myadmin-as-deployment.yaml diff --git a/Appsmith/mysql-deployment-as.yaml b/Appsmith/mysql-deployment-as.yaml deleted file mode 100644 index 404a83db..00000000 --- a/Appsmith/mysql-deployment-as.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: appsmith-mysql - namespace: appsmith - labels: - app: appsmith -spec: - type: NodePort - ports: - - name: mysql - port: 3306 - nodePort: 30781 - targetPort: mysql - selector: - app: appsmith - tier: mysql ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: mysql-as-pv-claim - namespace: appsmith - labels: - app: appsmith -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 20Gi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: appsmith-mysql - namespace: appsmith - labels: - app: appsmith -spec: - selector: - matchLabels: - app: appsmith - tier: mysql - strategy: - type: Recreate - template: - metadata: - labels: - app: appsmith - tier: mysql - spec: - containers: - - image: mariadb - name: mysql - env: - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: mysqlas-pass - key: password - ports: - - containerPort: 3306 - name: mysql - volumeMounts: - - name: mysql-persistent-storage - mountPath: /var/lib/mysql - volumes: - - name: mysql-persistent-storage - persistentVolumeClaim: - claimName: mysql-as-pv-claim diff --git a/Appsmith/paraTodo.sh b/Appsmith/paraTodo.sh deleted file mode 100755 index afc5ef65..00000000 --- a/Appsmith/paraTodo.sh +++ /dev/null @@ -1,3 +0,0 @@ -kubectl delete -k ./ -kubectl delete -f pv-local-mysql-as.yaml -kubectl delete -f pv-local-appsmith.yaml diff --git a/Appsmith/php-myadmin-as-deployment.yaml b/Appsmith/php-myadmin-as-deployment.yaml deleted file mode 100644 index 55950065..00000000 --- a/Appsmith/php-myadmin-as-deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: phpmyadmin-appsmith - namespace: appsmith - labels: - app: appsmith -spec: - selector: - app: appsmith - tier: phpmyadmin - type: NodePort - ports: - - name: phpadmin - port: 80 - nodePort: 30780 - targetPort: phpmyadm ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: phpmyadmin-appsmith - namespace: appsmith - labels: - app: appsmith -spec: - selector: - matchLabels: - app: appsmith - tier: phpmyadmin - strategy: - type: Recreate - template: - metadata: - labels: - app: appsmith - tier: phpmyadmin - spec: - containers: - - name: phpmyadmin - image: phpmyadmin - ports: - - containerPort: 80 - name: phpmyadm - env: - - name: PMA_HOST - value: appsmith-mysql - - name: PMA_PORT - value: "3306" - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: mysqlas-pass - key: password diff --git a/Appsmith/pv-local-appsmith.yaml b/Appsmith/pv-local-appsmith.yaml deleted file mode 100644 index e1c2b519..00000000 --- a/Appsmith/pv-local-appsmith.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: as-folder -spec: - capacity: - storage: 10Gi - accessModes: - - ReadWriteOnce - hostPath: - path: "/mnt/cluster/appsmith/appsmith" - diff --git a/Appsmith/pv-local-mysql-as.yaml b/Appsmith/pv-local-mysql-as.yaml deleted file mode 100644 index b8851444..00000000 --- a/Appsmith/pv-local-mysql-as.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: as-data -spec: - capacity: - storage: 20Gi - accessModes: - - ReadWriteOnce - hostPath: - path: "/mnt/cluster/appsmith/appsmith-db"