Commit 31598aa2 authored by coffee's avatar coffee

Retarget nonprod to test domain

parent 2da3dade
......@@ -24,24 +24,26 @@ deploy_testing:
tags:
- test
variables:
DB_NAME : /var/www/test/$CI_COMMIT_REF_NAME/.db/members.db
DEPLOY_HOST : $CI_COMMIT_REF_NAME.test.ucc.asn.au
AD_DOMAIN : ad.v.ucc.asn.au
AD_BASEDN : DC=AD,DC=v,DC=ucc,DC=asn,DC=AU
DB_NAME : /var/www/test/$CI_COMMIT_REF_SLUG/.db/members.db
DEPLOY_HOST : $CI_COMMIT_REF_SLUG.test.ucc.asn.au
SHORT_ENV_NAME : TEST
script:
- echo "Deploy to test"
- rm -f /var/www/test/$CI_COMMIT_REF_NAME
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
- rm -f /var/www/test/$CI_COMMIT_REF_SLUG
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_SLUG.ini
- mkdir .db
- envsubst < src/gms/settings_local.example.py > src/gms/settings_local.py
- chmod 600 src/gms/settings_local.py
- ln -srT ./ /var/www/test/$CI_COMMIT_REF_NAME
- chmod 600 src/gms/settings_local.p
- ln -srT ./ /var/www/test/$CI_COMMIT_REF_SLUG
- python src/manage.py collectstatic
- python src/manage.py makemigrations
- python src/manage.py migrate --run-syncdb
- ln -s /etc/uwsgi/vassals/test.skel /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
- ln -s /etc/uwsgi/vassals/test.skel /etc/uwsgi/vassals/$CI_COMMIT_REF_SLUG.ini
environment:
name: test/$CI_COMMIT_REF_NAME
url: https://$CI_COMMIT_REF_NAME.test.ucc.asn.au
name: test/$CI_COMMIT_REF_SLUG
url: https://$CI_COMMIT_REF_SLUG.test.ucc.asn.au
on_stop: stop_testing
except:
- master
......@@ -52,6 +54,8 @@ deploy_staging:
tags:
- stage
variables:
AD_DOMAIN : ad.v.ucc.asn.au
AD_BASEDN : DC=AD,DC=v,DC=ucc,DC=asn,DC=AU
DB_NAME : /var/www/stage/.db/members.db
DEPLOY_HOST : stage.test.ucc.asn.au
SHORT_ENV_NAME : STAGE
......@@ -78,10 +82,10 @@ stop_testing:
GIT_STRATEGY: none
when: manual
environment:
name: test/$CI_COMMIT_REF_NAME
name: test/$CI_COMMIT_REF_SLUG
action: stop
except:
- master
script:
- rm -f /var/www/test/$CI_COMMIT_REF_NAME
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_NAME.ini
- rm -f /var/www/test/$CI_COMMIT_REF_SLUG
- rm -f /etc/uwsgi/vassals/$CI_COMMIT_REF_SLUG.ini
......@@ -49,7 +49,7 @@ from django_auth_ldap.config import LDAPSearch, ActiveDirectoryGroupType, LDAPGr
# this could be ad.ucc.gu.uwa.edu.au but that doesn't resolve externally -
# useful for testing, but should be changed in production so failover works
AUTH_LDAP_SERVER_URI = 'ldaps://ad.ucc.gu.uwa.edu.au'
AUTH_LDAP_SERVER_URI = 'ldaps://${AD_DOMAIN}'
# This is also a bad idea, should be changed in production
AUTH_LDAP_GLOBAL_OPTIONS = {
......@@ -57,7 +57,7 @@ AUTH_LDAP_GLOBAL_OPTIONS = {
}
# LDAP admin settings - NOT for django_auth_ldap
LDAP_BASE_DN = "DC=ad,DC=ucc,DC=gu,DC=uwa,DC=edu,DC=au"
LDAP_BASE_DN = '${AD_BASEDN}'
LDAP_USER_SEARCH_DN = 'CN=Users,' + LDAP_BASE_DN
# settings used by memberdb LDAP backend and django_auth_ldap
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment