MyGit

v1.15.0

allianceauth/allianceauth

版本发布时间: 2017-02-13 12:54:54

allianceauth/allianceauth最新发布版本:v2.0.4(2018-05-29 05:15:16)

Please read the Upgrading section before starting your upgrade.

What's New

Services updates

Javascript and third party libraries

Groups and Permissions

i18n

General fixes and improvements

Development

Changes from 1.15-rc.1

Thanks to everyone who reported issues during the RC.

New Permissions

App Model Code Name Name
discord discorduser access_discord Can access the Discord service
discourse discourseuser access_discourse Can access the Discourse service
ipboard ipboarduser access_ipboard Can access the IPBoard service
ips4 ips4user access_ips4 Can access the IPS4 service
market marketuser access_market Can access the Evernus Market service
mumble mumbleuser access_mumble Can access the Mumble service
openfire openfireuser access_openfire Can access the Openfire service
phpbb3 phpbb3user access_phpbb3 Can access the phpBB3 service
smf smfuser access_smf Can access the SMF service
teamspeak3 teamspeak3user access_teamspeak3 Can access the Teamspeak3 service
xenforo xenforouser access_xenforo Can access the XenForo service
permissions_tool permissionstool audit_permissions Can audit permissions
groupmanagement authgroups request_groups Can request non-public groups

Upgrading

Backup your database first. You should keep regular backups anyway, but due to the large number of data migrations in this update it is especially important to backup before you upgrade. Backup your services databases too, if you have any.

  1. Stop the server (WSGI or Apache) running Alliance Auth.
  2. Stop Celery beat and all workers. Clearing out your Celery queue might be a good idea for this update too python manage.py celery purge. If you don't want to purge the tasks you can use redis-cli -n 0 llen celery to check how many are left in the queue.
  3. Update your distribution: git fetch origin and git checkout v1.15.0.
  4. Update your Python libraries: pip install --upgrade -r requirements.txt. If you use mumble, also run pip install --upgrade -r thirdparty/Mumble/requirements.txt.
  5. Move your old settings file somewhere else and start a new config from fresh. mv alliance_auth/settings.py alliance_auth/settings.old.py and cp alliance_auth/settings.py.example alliance_auth/settings.py. There have been a significant number of config changes. If you want to try and edit your existing file you can follow the git diff here. Under INSTALLED_APPS you do not have to install every service listed. You should remove any service that you do not use by commenting out the specific lines with a #.
  6. Now run the migrations: python manage.py migrate --fake-initial. Watch for any error messages that might indicate that things have not run as expected. If you get a warning that data may be lost when running the migration, you're missing a service for which you have account data. Install the service for the migration and then afterwards you can migrate it zero and remove it from installed apps.
  7. Collect the static files python manage.py collectstatic.
  8. Bring up the Django web server ONLY (WSGI or Apache). Login to the admin panel and check the Member and Blue groups have the appropriate permissions for services you expect to be active for them. If the "Can access the service_name service" permissions don't appear for all your active services, you must add them before you continue or risk having those users purged. You can double check who has permissions to access services via the new Permissions Audit page in the main site.
  9. Once you're 100% satisfied that the permissions are correct you can bring up Celery beat and the Celery workers.
  10. Set the SERVICES_MIGRATED setting to True in settings.py. You don't need to restart everything for this change, it just lets the migrations know they should run in a certain way if you enable a service in the future.

If you use Mumble, be sure to also update your authenticator.py script as it includes table and password hashing changes.

If you use Discord, the callback for Discord's OAuth has changed, from /discord_callback/ to /discord/callback/

If you use Teamspeak3, please keep an eye out for issue #713. It has been almost impossible to replicate reliably.

Celery

We're in a bit of a transition period with Celery and how tasks are decorated and scheduled tasks are configured. If the old python manage.py celerybeat and python manage.py celeryd fail to pickup the new style tasks you can instead run (with your virtualenv active, if you're using one) celery -A alliance_auth beat and celery -A alliance_auth worker. You may also need to delete stale (removed) scheduled tasks from djcelery in the admin console.

If you have any issues you can contact us on Gitter or open an issue here on GitHub.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2017-02-13发行的版本