Prerequirements:
- Setup postgresql user password.
kubectl -n $NS create secret generic survey-postgres --from-literal=postgresql-password=$PSQL_PSWD --from-literal=postgresql-postgres-password=$PSQL_PSWD- root password is
postgresql-postgres-passwordsecret key - service user password
postgresql-passwordsecret key; usernamesurvey
- root password is
- Generate django secret-key.
python3 -c "import secrets; print(secrets.token_urlsafe())" | base64ORpip install django && python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' | base64- copy output and set as secret
- Generate survey cookie salt: secret
survey-secretskeycookie-saltpython3 -c "import secrets; print(secrets.token_urlsafe()[0:10])" | base64ORpython -c 'import uuid; print(uuid.uuid4().hex[0:10])' | base64- copy output and set as secret
After survey app deployed
- Create superuser
kubectl exec -it prozorro-<env>-survey-api-<...> -c prozorro-<env>-survey-api -- bashDJANGO_SUPERUSER_PASSWORD=<STRONG_PASSWORD> DJANGO_SUPERUSER_USERNAME=superuser_ss_<env> DJANGO_SUPERUSER_EMAIL=superuser@prozorro.sale python manage.py createsuperuser --no-input
- Create default survey and set it in configmap
kubectl exec -it prozorro-<env>-survey-api-<...> -c prozorro-<env>-survey-api -- bashpython manage.py shell --command="from survey.forms.models import Site; out = Site.objects.create(name='prozorro-auction', is_published=False, reshow_enabled=False); print(out.id)"- copy id and set it as
survey-idinprozorro-<env>-auction-survey-id-config
- Rollout restart
prozorro-<env>-auction-frontend