|
|
|
@ -2,31 +2,32 @@ |
|
|
|
## Versión para kubernetes y Rancher |
|
|
|
### Estructura de carpetas en K8S |
|
|
|
|
|
|
|
. |
|
|
|
├── ConfigMaps |
|
|
|
│ ├── env-prod-configmap-local.yaml |
|
|
|
│ ├── env-prod-configmap.yaml |
|
|
|
│ └── env-prod-db-configmap.yaml |
|
|
|
├── Deployments |
|
|
|
│ ├── db-deployment.yaml |
|
|
|
│ ├── nginx-deployment.yaml |
|
|
|
│ └── reymota-deployment.yaml |
|
|
|
├── Makefile |
|
|
|
├── namespace.yaml |
|
|
|
├── PVC |
|
|
|
│ ├── postgres-data-persistentvolumeclaim.yaml |
|
|
|
│ ├── reymota-prod-persistentvolumeclaim.yaml |
|
|
|
│ └── static-volume-persistentvolumeclaim.yaml |
|
|
|
├── reg-secret.yaml |
|
|
|
├── Services |
|
|
|
│ ├── db-service.yaml |
|
|
|
│ ├── nginx-service.yaml |
|
|
|
│ ├── reymota-ingress.yaml |
|
|
|
│ └── reymota-service.yaml |
|
|
|
└── Shells |
|
|
|
├── borraNS.sh |
|
|
|
├── entraPsql.sh |
|
|
|
└── entra.sh |
|
|
|
. |
|
|
|
├── ConfigMaps |
|
|
|
|
|
|
|
│ ├── env-prod-configmap-local.yaml |
|
|
|
│ ├── env-prod-configmap.yaml |
|
|
|
│ └── env-prod-db-configmap.yaml |
|
|
|
├── Deployments |
|
|
|
│ ├── db-deployment.yaml |
|
|
|
│ ├── nginx-deployment.yaml |
|
|
|
│ └── reymota-deployment.yaml |
|
|
|
├── Makefile |
|
|
|
├── namespace.yaml |
|
|
|
├── PVC |
|
|
|
│ ├── postgres-data-persistentvolumeclaim.yaml |
|
|
|
│ ├── reymota-prod-persistentvolumeclaim.yaml |
|
|
|
│ └── static-volume-persistentvolumeclaim.yaml |
|
|
|
├── reg-secret.yaml |
|
|
|
├── Services |
|
|
|
│ ├── db-service.yaml |
|
|
|
│ ├── nginx-service.yaml |
|
|
|
│ ├── reymota-ingress.yaml |
|
|
|
│ └── reymota-service.yaml |
|
|
|
└── Shells |
|
|
|
├── borraNS.sh |
|
|
|
├── entraPsql.sh |
|
|
|
└── entra.sh |
|
|
|
|
|
|
|
## Creación de Persistent Volume Claims |
|
|
|
|
|
|
|
@ -98,7 +99,13 @@ Es importante hacerlo en este orden ya que hay dependencias entre las tablas |
|
|
|
./manage.py importar_vehiculos mediafiles/vehiculos.json |
|
|
|
./manage.py importar_repostajes mediafiles/repostajes.json |
|
|
|
|
|
|
|
# Crear datos |
|
|
|
## Copiar imágenes desde el host |
|
|
|
|
|
|
|
Ejemplo para copiar las portadas de los álbumes |
|
|
|
|
|
|
|
kubectl -n ranchermota cp /media/creylopez/vmcluster/reymota/media/cover_image/ reymota-b6f9c5bbf-mrvh6:/app/reymota/mediafiles |
|
|
|
|
|
|
|
## Crear datos |
|
|
|
|
|
|
|
Si no tenemos datos y vamos a crear una instancia de cero, lo primero que hay que hacer es crear un superusuario |
|
|
|
|
|
|
|
|