diff --git a/CreaCluster/10-prepara.sh b/CreaCluster/10-prepara.sh index 03910748..54e59b30 100644 --- a/CreaCluster/10-prepara.sh +++ b/CreaCluster/10-prepara.sh @@ -75,6 +75,12 @@ read -p "AƱade repository de Kubernetes. Pulsa ENTER para seguir:" mainmenuinp curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main" +### Para 24.04 ### +curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/k8s.gpg + +echo 'deb [signed-by=/etc/apt/keyrings/k8s.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | sudo tee /etc/apt/sources.list.d/k8s.list + + # Install Kubernetes components Kubectl, kubeadm & kubelet read -p "Instalar componentes de kubernetes. Pulsa ENTER para seguir:" mainmenuinput diff --git a/CreaCluster/20-borraCluster.sh b/CreaCluster/20-borraCluster.sh index 7a17c896..dad9900a 100755 --- a/CreaCluster/20-borraCluster.sh +++ b/CreaCluster/20-borraCluster.sh @@ -1,4 +1,4 @@ -kubeadm reset -f --cri-socket unix:///run/containerd/containerd.sock +sudo kubeadm reset -f --cri-socket unix:///run/containerd/containerd.sock rm -rf /etc/cni /etc/kubernetes /var/lib/dockershim /var/lib/etcd /var/lib/kubelet /var/run/kubernetes ~/.kube/* @@ -8,4 +8,4 @@ sudo iptables -t nat -F && sudo iptables -t nat -X sudo iptables -t raw -F && sudo iptables -t raw -X sudo iptables -t mangle -F && sudo iptables -t mangle -X -systemctl restart containerd +sudo systemctl restart containerd diff --git a/CreaCluster/30-inicializaCluster.sh b/CreaCluster/30-inicializaCluster.sh index 9855d63b..8a40445e 100755 --- a/CreaCluster/30-inicializaCluster.sh +++ b/CreaCluster/30-inicializaCluster.sh @@ -1,3 +1,4 @@ -sudo kubeadm init --pod-network-cidr=10.34.0.0/16 --upload-certs --control-plane-endpoint=k8s-server --cri-socket unix:///run/containerd/containerd.sock +sudo kubeadm init --control-plane-endpoint=vmcluster +#sudo kubeadm init --pod-network-cidr=10.34.0.0/16 --upload-certs --control-plane-endpoint=k8s-server --cri-socket unix:///run/containerd/containerd.sock #sudo kubeadm init --pod-network-cidr=10.34.0.0/16 --cri-socket unix:///run/containerd/containerd.sock --upload-certs --control-plane-endpoint=k8s-server diff --git a/CreaCluster/50-creaCalico.sh b/CreaCluster/50-creaCalico.sh index 60be27c5..a9550916 100755 --- a/CreaCluster/50-creaCalico.sh +++ b/CreaCluster/50-creaCalico.sh @@ -1,5 +1,7 @@ #kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml -kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.3/manifests/tigera-operator.yaml +#kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.3/manifests/tigera-operator.yaml + +kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.29.1/manifests/calico.yaml kubectl create -f ./custom-resources.yaml diff --git a/HelmCharts/firefly-chart/templates/firefly-deployment.yaml b/HelmCharts/firefly-chart/templates/firefly-deployment.yaml index 8c65f585..9ce321dd 100644 --- a/HelmCharts/firefly-chart/templates/firefly-deployment.yaml +++ b/HelmCharts/firefly-chart/templates/firefly-deployment.yaml @@ -56,6 +56,8 @@ spec: #- image: docker-registry:32000/mifirefly:1.0 name: firefly-iii env: + - name: TZ + value: "Europe/Madrid" - name: APP_ENV value: local - name: APP_KEY diff --git a/HelmCharts/firefly-chart/templates/mysql-deployment.yaml b/HelmCharts/firefly-chart/templates/mysql-deployment.yaml index f0e03ac0..174c5ffb 100644 --- a/HelmCharts/firefly-chart/templates/mysql-deployment.yaml +++ b/HelmCharts/firefly-chart/templates/mysql-deployment.yaml @@ -54,7 +54,8 @@ spec: containers: #- image: docker-registry:32000/mariadb:1.0 #- image: mariadb:latest - - image: creylopez/mariadb:1.0 + #- image: creylopez/mariadb:1.0 + - image: mysql:latest name: mysql env: - name: MYSQL_ROOT_PASSWORD @@ -62,6 +63,8 @@ spec: secretKeyRef: name: firefly-iii-secrets key: db_password + - name: TZ + value: "Europe/Madrid" ports: - containerPort: 3306 name: mysql diff --git a/HelmCharts/firefly-chart/templates/php-deployment.yaml b/HelmCharts/firefly-chart/templates/php-deployment.yaml index 5008b35b..8b475c42 100644 --- a/HelmCharts/firefly-chart/templates/php-deployment.yaml +++ b/HelmCharts/firefly-chart/templates/php-deployment.yaml @@ -47,6 +47,8 @@ spec: value: firefly-iii-mysql - name: PMA_PORT value: "3306" + - name: UPLOAD_LIMIT + value: "9216K" - name: MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: diff --git a/HelmCharts/firefly-ingress.yaml b/HelmCharts/firefly-ingress.yaml new file mode 100644 index 00000000..f2e73a5a --- /dev/null +++ b/HelmCharts/firefly-ingress.yaml @@ -0,0 +1,31 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + generation: 1 + managedFields: + - apiVersion: networking.k8s.io/v1 + fieldsType: FieldsV1 + fieldsV1: + f:spec: + f:defaultBackend: + .: {} + f:service: + .: {} + f:name: {} + f:port: {} + f:rules: {} + manager: rancher + operation: Update + name: firefly + namespace: firefly +spec: + defaultBackend: + service: + name: firefly + port: + number: 8080 + ingressClassName: firefly + rules: + - host: firefly.rancher.reymota.lab +status: + loadBalancer: {} diff --git a/Imagenes/Mariadb/Dockerfile b/Imagenes/Mariadb/Dockerfile index 73323427..d3f7c5c7 100644 --- a/Imagenes/Mariadb/Dockerfile +++ b/Imagenes/Mariadb/Dockerfile @@ -1,6 +1,6 @@ -FROM mariadb +FROM mariadb:latest LABEL maintainer="Celestino Rey " # Install any necessary packages RUN apt-get update -RUN apt install -y mysql-client +RUN apt-get install -y mysql-client diff --git a/Imagenes/Mariadb/Makefile b/Imagenes/Mariadb/Makefile new file mode 100644 index 00000000..a22b4b11 --- /dev/null +++ b/Imagenes/Mariadb/Makefile @@ -0,0 +1,13 @@ +export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') +export REGISTRY=registry.reymota.es + +export IMG_VERSION = 2.0.1 + +install: + + echo "Creando imagen con version '${IMG_VERSION}' para la arquitectura '${ARQUITECTURA}' en el registry '${REGISTRY}'" + + docker build --no-cache -t ${REGISTRY}/mariadb-${ARQUITECTURA}:${IMG_VERSION} . + docker push ${REGISTRY}/mariadb-${ARQUITECTURA}:${IMG_VERSION} + + diff --git a/Imagenes/Mariadb/creaImagen.sh b/Imagenes/Mariadb/creaImagen.sh index dbb1ae99..9e7cec87 100644 --- a/Imagenes/Mariadb/creaImagen.sh +++ b/Imagenes/Mariadb/creaImagen.sh @@ -1,3 +1,3 @@ -docker build --no-cache -t creylopez/mariadb:1.0 . -docker push creylopez/mariadb:1.0 +docker build --no-cache -t creylopez/mariadb:2.0 . +docker push creylopez/mariadb:2.0