Browse Source

Quito appsmith

main
Celestino Rey 2 years ago
parent
commit
7b15a15189
12 changed files with 0 additions and 301 deletions
  1. +0
    -82
      Appsmith/appsmith-deployment.yaml
  2. +0
    -4
      Appsmith/as-namespace.yaml
  3. +0
    -24
      Appsmith/copyMediawikiDB
  4. +0
    -4
      Appsmith/creaTodo.sh
  5. +0
    -23
      Appsmith/docker-compose.yml
  6. +0
    -1
      Appsmith/entra.sh
  7. +0
    -12
      Appsmith/kustomization.yaml
  8. +0
    -71
      Appsmith/mysql-deployment-as.yaml
  9. +0
    -3
      Appsmith/paraTodo.sh
  10. +0
    -54
      Appsmith/php-myadmin-as-deployment.yaml
  11. +0
    -12
      Appsmith/pv-local-appsmith.yaml
  12. +0
    -11
      Appsmith/pv-local-mysql-as.yaml

+ 0
- 82
Appsmith/appsmith-deployment.yaml View File

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

+ 0
- 4
Appsmith/as-namespace.yaml View File

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: appsmith

+ 0
- 24
Appsmith/copyMediawikiDB View File

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

+ 0
- 4
Appsmith/creaTodo.sh View File

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

+ 0
- 23
Appsmith/docker-compose.yml View File

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

+ 0
- 1
Appsmith/entra.sh View File

@ -1 +0,0 @@
kubectl exec -ti deployment.apps/appsmith -n appsmith -- /bin/bash

+ 0
- 12
Appsmith/kustomization.yaml View File

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

+ 0
- 71
Appsmith/mysql-deployment-as.yaml View File

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

+ 0
- 3
Appsmith/paraTodo.sh View File

@ -1,3 +0,0 @@
kubectl delete -k ./
kubectl delete -f pv-local-mysql-as.yaml
kubectl delete -f pv-local-appsmith.yaml

+ 0
- 54
Appsmith/php-myadmin-as-deployment.yaml View File

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

+ 0
- 12
Appsmith/pv-local-appsmith.yaml View File

@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: as-folder
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/cluster/appsmith/appsmith"

+ 0
- 11
Appsmith/pv-local-mysql-as.yaml View File

@ -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"

Loading…
Cancel
Save