Skip to content

Commit

Permalink
Merge pull request #142 from rackerlabs/python-import-updates
Browse files Browse the repository at this point in the history
Updated Python requirements.txt files
  • Loading branch information
derpadoo committed Jan 6, 2020
2 parents 16b1098 + c8a708e commit 6b9ad89
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 16 deletions.
4 changes: 2 additions & 2 deletions agent/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ipython, not required, helpful when needing a Python shell.
ipython==6.2.1
ipython

# HTTP requests
requests==2.20.0
requests==2.22.0
1 change: 1 addition & 0 deletions ansible-playbooks/roles/common/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ install_packages:
- ntp
- proxychains
- ufw
- unzip

# Used in configs/sshd_config.j2
# The argument must be 'yes', 'prohibit-password', 'without-password',
Expand Down
10 changes: 10 additions & 0 deletions ansible-playbooks/roles/master/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
synchronize:
src: ../../../../master
dest: "/home/{{ non_root_user }}"
tags: update_code

- name: Create "{{ venv_dir }}" virtualenv directory.
command: "virtualenv -p /usr/bin/python3.6 {{ venv_dir }}"
Expand All @@ -96,13 +97,15 @@
requirements: "{{ scantron_dir }}/requirements/{{ application_environment }}.txt"
virtualenv: "{{ venv_dir }}"
virtualenv_python: "{{ venv_python }}"
tags: update_code

- name: Change ownership of "{{ scantron_dir }}" folder.
file:
path: "{{ scantron_dir }}"
owner: "{{ non_root_user }}"
group: "{{ non_root_user }}"
recurse: yes
tags: update_code


# PostgreSQL
Expand Down Expand Up @@ -175,6 +178,7 @@
owner: "{{ non_root_user }}"
group: "{{ non_root_user }}"
mode: 0644
tags: update_code

- name: Update production.py with local/production environment variable.
template:
Expand All @@ -185,6 +189,7 @@
group: "{{ non_root_user }}"
mode: 0644
when: application_environment == "production"
tags: update_code

- name: Update django_connector.py with local/production environment variable.
template:
Expand All @@ -194,21 +199,25 @@
owner: "{{ non_root_user }}"
group: "{{ non_root_user }}"
mode: 0644
tags: update_code

- name: Executing "{{ venv_python }} {{ scantron_dir }}/manage.py makemigrations {{ django_project_name }}"
command: "{{ venv_python }} {{ scantron_dir }}/manage.py makemigrations {{ django_project_name }}"
args:
chdir: "{{ scantron_dir }}"
tags: update_code

- name: Executing "{{ venv_python }} {{ scantron_dir }}/manage.py makemigrations"
command: "{{ venv_python }} {{ scantron_dir }}/manage.py makemigrations"
args:
chdir: "{{ scantron_dir }}"
tags: update_code

- name: Executing "{{ venv_python }} {{ scantron_dir }}/manage.py migrate"
command: "{{ venv_python }} {{ scantron_dir }}/manage.py migrate"
args:
chdir: "{{ scantron_dir }}"
tags: update_code

- name: Create folder for Django static files.
file:
Expand Down Expand Up @@ -283,6 +292,7 @@
name: uwsgi.service
state: restarted
enabled: yes
tags: update_code


# NFS
Expand Down
2 changes: 1 addition & 1 deletion ansible-playbooks/roles/master/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ django_user: agent1
django_user_email: changeme@localhost # Filler email address, does not matter.

# uwsgi
uwsgi_version: 2.0.17.1
uwsgi_version: 2.0.18
2 changes: 1 addition & 1 deletion master/django_scantron/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.12"
__version__ = "1.13"
4 changes: 2 additions & 2 deletions master/django_scantron/login/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LoginView
from django.conf.urls import url

urlpatterns = [url(r"^login/", auth_views.login, {"template_name": "django_scantron/login.html"}, name="login")]
urlpatterns = [url(r"^login/", LoginView.as_view(template_name="django_scantron/login.html"), name="login")]
4 changes: 2 additions & 2 deletions master/django_scantron/logout/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LogoutView
from django.conf.urls import url

urlpatterns = [url(r"^logout/", auth_views.logout, {"next_page": "/login"}, name="logout")]
urlpatterns = [url(r"^logout/", LogoutView.as_view(next_page="/login"), name="logout")]
16 changes: 8 additions & 8 deletions master/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Password storage
argon2-cffi==18.1.0
argon2-cffi==19.2.0

# Django
Django==1.11.25
Django==2.2.9

# Forms
django-crispy-forms==1.7.2
django-crispy-forms==1.8.1

# Django environ
django-environ==0.4.5

# Django Extensions
django-extensions==2.1.4
django-extensions==2.2.5

# Django filters for API
django-filter==2.0.0
django-filter==2.2.0

# Django recurrences for periodic tasks
django-recurrence==1.6.0
django-recurrence==1.10.1

# Django REST Framework
djangorestframework==3.9.2
Expand All @@ -29,13 +29,13 @@ drf-yasg==1.16.1
fqdn==1.2.0

# ipython
ipython==6.4.0
ipython

# packaging required for drf-yasg, adding this to be safe
packaging

# Python-PostgreSQL Database Adapter
psycopg2-binary==2.7.5
psycopg2-binary==2.8.4

# Used for django-extensions graph_models
pygraphviz==1.5
Expand Down
Binary file modified scantron_model_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6b9ad89

Please sign in to comment.