Browse Source

Creación de tikiwiki

main
Celestino Rey 3 years ago
parent
commit
881b0f4390
20 changed files with 381 additions and 0 deletions
  1. +1
    -0
      .~lock.puertos.ods#
  2. +2
    -0
      PHPDev/kustomization.yaml
  3. +15
    -0
      PHPDev/nginxphp_service.yaml
  4. +14
    -0
      PHPDev/php_fpm_service.yaml
  5. +60
    -0
      PHPDev/phpweb-deployment.yaml
  6. +11
    -0
      PHPDev/pv-local-nginxphp.yaml
  7. +13
    -0
      PHPDev/pvc-nginxphp.yaml
  8. +4
    -0
      TikiWiki/creaTodo.sh
  9. +12
    -0
      TikiWiki/kustomization.yaml
  10. +68
    -0
      TikiWiki/mysql-deployment-tw.yaml
  11. +3
    -0
      TikiWiki/paraTodo.sh
  12. +54
    -0
      TikiWiki/php-myadmin-tw-deployment.yaml
  13. +11
    -0
      TikiWiki/pv-local-mysql-tw.yaml
  14. +12
    -0
      TikiWiki/pv-local-tikiwiki.yaml
  15. +78
    -0
      TikiWiki/tikiwiki-deployment.yaml
  16. +4
    -0
      TikiWiki/tw-namespace.yaml
  17. +0
    -0
      Wordpress/Papelera/pvc-nginx.yaml
  18. +0
    -0
      Wordpress/Papelera/pvc-wordpress.yaml
  19. +19
    -0
      puertos
  20. BIN
      puertos.ods

+ 1
- 0
.~lock.puertos.ods# View File

@ -0,0 +1 @@
,creylopez,k8s-server,26.08.2022 11:53,file:///home/creylopez/.config/libreoffice/4;

+ 2
- 0
PHPDev/kustomization.yaml View File

@ -0,0 +1,2 @@
resources:
- phpweb-deployment.yaml

+ 15
- 0
PHPDev/nginxphp_service.yaml View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: nginxphp
labels:
tier: backend
spec:
selector:
app: nginxphp
tier: backend
ports:
- protocol: TCP
port: 80
externalIPs:
- 192.168.1.147

+ 14
- 0
PHPDev/php_fpm_service.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: php
labels:
tier: backend
spec:
selector:
app: php
tier: backend
ports:
- protocol: TCP
port: 9000

+ 60
- 0
PHPDev/phpweb-deployment.yaml View File

@ -0,0 +1,60 @@
apiVersion: v1
kind: Service
metadata:
name: nginx-php-dev
spec:
type: NodePort
ports:
- name: http
port: 80
nodePort: 30050
targetPort: nginx-php-http
selector:
app: nginxphpdev
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nginxphp-pv-claim
labels:
app: nginxphpdev
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-php-dev
labels:
app: nginxphpdev
spec:
selector:
matchLabels:
app: nginxphpdev
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: nginxphpdev
tier: frontend
spec:
containers:
- name: nginxphpdev
image: linuxserver/nginx
ports:
- containerPort: 80
name: "nginx-php-http"
volumeMounts:
- name: nginxphp-www-folder
mountPath: /config/www
volumes:
- name: nginxphp-www-folder
persistentVolumeClaim:
claimName: nginxphp-pv-claim

+ 11
- 0
PHPDev/pv-local-nginxphp.yaml View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: nginxphp-www-folder
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/cluster/nginxphp"

+ 13
- 0
PHPDev/pvc-nginxphp.yaml View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nginxphp-pv-claim
labels:
app: nginxphp
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 1Gi

+ 4
- 0
TikiWiki/creaTodo.sh View File

@ -0,0 +1,4 @@
kubectl create -f pv-local-mysql-tw.yaml
kubectl create -f pv-local-tikiwiki.yaml
kubectl create -k ./
watch kubectl get all -n tikiwiki

+ 12
- 0
TikiWiki/kustomization.yaml View File

@ -0,0 +1,12 @@
secretGenerator:
- name: mysqltw-pass
namespace: tikiwiki
literals:
- password=Dsa-0213
- db_user=root
- db_passwd=Dsa-0213
resources:
- tw-namespace.yaml
- mysql-deployment-tw.yaml
- tikiwiki-deployment.yaml
- php-myadmin-tw-deployment.yaml

+ 68
- 0
TikiWiki/mysql-deployment-tw.yaml View File

@ -0,0 +1,68 @@
apiVersion: v1
kind: Service
metadata:
name: tikiwiki-mysql
namespace: tikiwiki
labels:
app: tikiwiki
spec:
ports:
- port: 3306
selector:
app: tikiwiki
tier: mysql
clusterIP: None
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-tw-pv-claim
namespace: tikiwiki
labels:
app: tikiwiki
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tikiwiki-mysql
namespace: tikiwiki
labels:
app: tikiwiki
spec:
selector:
matchLabels:
app: tikiwiki
tier: mysql
strategy:
type: Recreate
template:
metadata:
labels:
app: tikiwiki
tier: mysql
spec:
containers:
- image: mariadb
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysqltw-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-tw-pv-claim

+ 3
- 0
TikiWiki/paraTodo.sh View File

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

+ 54
- 0
TikiWiki/php-myadmin-tw-deployment.yaml View File

@ -0,0 +1,54 @@
apiVersion: v1
kind: Service
metadata:
name: phpmyadmin-tikiwiki
namespace: tikiwiki
labels:
app: tikiwiki
spec:
selector:
app: tikiwiki
tier: phpmyadmin
type: NodePort
ports:
- name: phpadmin
port: 80
nodePort: 30380
targetPort: phpmyadm
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpmyadmin-tikiwiki
namespace: tikiwiki
labels:
app: tikiwiki
spec:
selector:
matchLabels:
app: tikiwiki
tier: phpmyadmin
strategy:
type: Recreate
template:
metadata:
labels:
app: tikiwiki
tier: phpmyadmin
spec:
containers:
- name: phpmyadmin
image: phpmyadmin
ports:
- containerPort: 80
name: phpmyadm
env:
- name: PMA_HOST
value: tikiwiki-mysql
- name: PMA_PORT
value: "3306"
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysqltw-pass
key: password

+ 11
- 0
TikiWiki/pv-local-mysql-tw.yaml View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: tw-data
spec:
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/cluster/tikiwiki/tikiwiki-db"

+ 12
- 0
TikiWiki/pv-local-tikiwiki.yaml View File

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

+ 78
- 0
TikiWiki/tikiwiki-deployment.yaml View File

@ -0,0 +1,78 @@
apiVersion: v1
kind: Service
metadata:
name: tikiwiki
namespace: tikiwiki
labels:
app: tikiwiki
spec:
type: NodePort
ports:
- port: 80
nodePort: 30098
targetPort: tikiwiki
selector:
app: tikiwiki
tier: frontend
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tw-pv-claim
namespace: tikiwiki
labels:
app: tikiwiki
spec:
accessModes:
- ReadWriteOnce
storageClassName: ""
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tikiwiki
namespace: tikiwiki
labels:
app: tikiwiki
spec:
selector:
matchLabels:
app: tikiwiki
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: tikiwiki
tier: frontend
spec:
containers:
- image: tikiwiki:19.x
name: tikiwiki
env:
- name: TIKI_DB_HOST
value: tikiwiki-mysql
- name: TIKI_DB_PASS
valueFrom:
secretKeyRef:
name: mysqltw-pass
key: password
- name: TIKI_DB_USER
valueFrom:
secretKeyRef:
name: mysqltw-pass
key: db_user
ports:
- containerPort: 80
name: tikiwiki
volumeMounts:
- name: tikiwiki-persistent-storage
mountPath: /var/www/html
volumes:
- name: tikiwiki-persistent-storage
persistentVolumeClaim:
claimName: tw-pv-claim

+ 4
- 0
TikiWiki/tw-namespace.yaml View File

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

Wordpress/pvc-nginx.yaml → Wordpress/Papelera/pvc-nginx.yaml View File


Wordpress/pvc-wordpress.yaml → Wordpress/Papelera/pvc-wordpress.yaml View File


+ 19
- 0
puertos View File

@ -0,0 +1,19 @@
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
collabora code-server NodePort 10.101.8.70 <none> 9980:30400/TCP 253d
collabora nextcloud-server NodePort 10.109.196.31 <none> 80:30410/TCP 253d
default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 322d
default nginx-example NodePort 10.99.186.18 <none> 80:30080/TCP 322d
default nginx-php-dev NodePort 10.97.208.224 <none> 80:30050/TCP 108d
firefly firefly-iii NodePort 10.96.219.148 <none> 8080:30880/TCP 197d
firefly firefly-iii-mysql ClusterIP None <none> 3306/TCP 197d
firefly phpmyadmin-firefly NodePort 10.105.73.45 <none> 80:30180/TCP 197d
ingress-nginx ingress-nginx-controller NodePort 10.97.13.243 <none> 80:30424/TCP,443:31660/TCP 308d
ingress-nginx ingress-nginx-controller-admission ClusterIP 10.105.208.49 <none> 443/TCP 308d
kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 322d
nextcloud code-server NodePort 10.97.4.46 <none> 9980:30389/TCP 298d
nextcloud nextcloud-server NodePort 10.107.234.70 <none> 80:30289/TCP 146d
usablenc nextcloud-db ClusterIP 10.108.8.16 <none> 3306/TCP 287d
usablenc nextcloud-server ClusterIP 10.106.233.32 <none> 80/TCP 287d
wordpress phpmyadmin-wordpress NodePort 10.100.246.77 <none> 80:30280/TCP 86d
wordpress wordpress NodePort 10.109.83.48 <none> 80:30088/TCP 86d
wordpress wordpress-mysql ClusterIP None <none> 3306/TCP 86d

BIN
puertos.ods View File


Loading…
Cancel
Save