Browse Source

Arreglo TZ en firefly

main
Celestino Rey 7 months ago
parent
commit
2e0a4e348a
11 changed files with 69 additions and 9 deletions
  1. +6
    -0
      CreaCluster/10-prepara.sh
  2. +2
    -2
      CreaCluster/20-borraCluster.sh
  3. +2
    -1
      CreaCluster/30-inicializaCluster.sh
  4. +3
    -1
      CreaCluster/50-creaCalico.sh
  5. +2
    -0
      HelmCharts/firefly-chart/templates/firefly-deployment.yaml
  6. +4
    -1
      HelmCharts/firefly-chart/templates/mysql-deployment.yaml
  7. +2
    -0
      HelmCharts/firefly-chart/templates/php-deployment.yaml
  8. +31
    -0
      HelmCharts/firefly-ingress.yaml
  9. +2
    -2
      Imagenes/Mariadb/Dockerfile
  10. +13
    -0
      Imagenes/Mariadb/Makefile
  11. +2
    -2
      Imagenes/Mariadb/creaImagen.sh

+ 6
- 0
CreaCluster/10-prepara.sh View File

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


+ 2
- 2
CreaCluster/20-borraCluster.sh View File

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

+ 2
- 1
CreaCluster/30-inicializaCluster.sh View File

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

+ 3
- 1
CreaCluster/50-creaCalico.sh View File

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

+ 2
- 0
HelmCharts/firefly-chart/templates/firefly-deployment.yaml View File

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


+ 4
- 1
HelmCharts/firefly-chart/templates/mysql-deployment.yaml View File

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


+ 2
- 0
HelmCharts/firefly-chart/templates/php-deployment.yaml View File

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


+ 31
- 0
HelmCharts/firefly-ingress.yaml View File

@ -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: {}

+ 2
- 2
Imagenes/Mariadb/Dockerfile View File

@ -1,6 +1,6 @@
FROM mariadb
FROM mariadb:latest
LABEL maintainer="Celestino Rey <creylopez@yahoo.es>"
# Install any necessary packages
RUN apt-get update
RUN apt install -y mysql-client
RUN apt-get install -y mysql-client

+ 13
- 0
Imagenes/Mariadb/Makefile View File

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

+ 2
- 2
Imagenes/Mariadb/creaImagen.sh View File

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

Loading…
Cancel
Save