Ei kuvausta

Celestino Rey f0b96147eb Merge branch 'main' of https://forgejo.reymota.es/creylopez/JugarAlPadelOC 10 kuukautta sitten
K8S 481962a840 Pongo TAG en deployment 10 kuukautta sitten
nginx a83418ea25 Listo para producción 1 vuosi sitten
src e6b475ad6f Pongo versión generada por Jenkins 11 kuukautta sitten
Dockerfile 4e6766cdfa Preparando para independizar proyecto 1 vuosi sitten
Dockerfile.k8s ed56c4f5f4 Intentado que funcione en Openshift 1 vuosi sitten
Dockerfile.oc a83418ea25 Listo para producción 1 vuosi sitten
Jenkinsfile 06e63ac12e Pongo Jenkinsfile como el de misfinanzas 10 kuukautta sitten
Makefile e45366f774 Cambios para que funcione en openshift con nginx 1 vuosi sitten
README.md 82519193fb Merge branch 'main' of https://forgejo.reymota.es/creylopez/JugarAlPadelOC 1 vuosi sitten
builder.yaml 01a9b168ce Añado host ip de okd 10 kuukautta sitten
para.sh 5a509444dc Actualizo readme y creo shells de crear y parar 1 vuosi sitten

README.md

Versión para openshift

Instalación

Crear un proyecto

oc new-project jugaralpadel

Permitir que los pods puedan funcionar como root

oc adm policy add-scc-to-user anyuid -z default

Cosas a hacer la primera vez

Desde dentro de la shell del pod

python manage.py createsuperuser

python manage.py makemigrations

python manage.py migrate

Cambiar la secuencia de los id

ALTER SEQUENCE tablename_id_seq RESTART WITH nn;

esto se hace cuando restauro un volcado de la bd sobre una instalación nueva. Si hay índices ya creados, hay que reinciar a partir del último.

Changing the default storage class

Use the following process to change the default storage class. For example you have two defined storage classes, gp2 and standard, and you want to change the default storage class from gp2 to standard.

List the storage class:

oc get storageclass

Example output

NAME                 TYPE
gp2 (default)        kubernetes.io/aws-ebs  1 
standard             kubernetes.io/aws-ebs
  1. (default) denotes the default storage class.

Change the value of the storageclass.kubernetes.io/is-default-class annotation to false for the default storage class:

oc patch storageclass gp2 -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}'

Make another storage class the default by setting the storageclass.kubernetes.io/is-default-class annotation to true:

oc patch storageclass standard -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'

Verify the changes:

oc get storageclass

Example output

NAME                 TYPE
gp2                  kubernetes.io/aws-ebs
standard (default)   kubernetes.io/aws-ebs