Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update playbooks for current deployment #317

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions deploy/playbooks/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
create: yes

# rabbitmq must be installed after the hostname is set
- include: rabbitmq.yml
- include_tasks: rabbitmq.yml

- name: "ensure a home for {{ app_name }}"
become: true
Expand Down Expand Up @@ -105,14 +105,14 @@
- "{{ binary_root }}"
- "{{ repos_root }}"

- include: postgresql.yml
- include_tasks: postgresql.yml
tags:
- postgres

- include: systemd.yml
- include_tasks: systemd.yml
tags:
- systemd

- include: nginx.yml
- include_tasks: nginx.yml
tags:
- nginx
4 changes: 2 additions & 2 deletions deploy/playbooks/roles/common/tasks/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
become: true
register: ssl_cert

- include: ssl.yml
- include_tasks: ssl.yml
when: development_server == true or use_self_signed_ssl

- name: "check if {{ nginx_ssl_cert_path }} exists"
Expand Down Expand Up @@ -59,7 +59,7 @@
state: "link"
become: true

- include: letsencrypt.yml
- include_tasks: letsencrypt.yml
when:
- development_server == false
- use_letsencrypt
Expand Down
2 changes: 1 addition & 1 deletion deploy/playbooks/roles/common/tasks/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# config file then we will fail to reset it next time around. This would
# leave the app without the access to the database.
- name: generate pseudo-random password for the database connection
shell: python -c "exec 'import os; print os.urandom(30).encode(\'base64\')[:${length}]'"
shell: python3 -c "exec('import os; import base64; print(base64.b64encode(os.urandom(30))[:${length}])')"
register: db_password
changed_when: false

Expand Down
6 changes: 3 additions & 3 deletions deploy/playbooks/roles/common/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---

system_packages:
- python-dev
- python3-dev
- git
- g++
Expand All @@ -14,11 +13,12 @@ system_packages:
- nginx
- vim
# needed for the ansible apt_repository module
- python-apt
- python-apt-dev
# - libsemanage-python
- python
- python3
- liblz4-tool
- zstd
- virtualenv

ssl_requirements:
- openssl
Expand Down
2 changes: 1 addition & 1 deletion deploy/playbooks/roles/statsd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
file: path={{ app_home }}/src/statsd owner=node group=node
when: permissions.stat.pw_name != 'node'

- include: systemd.yml
- include_tasks: systemd.yml

- name: Configure statsd
become: true
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
psycopg2==2.8.2
psycopg2-binary==2.9.9
gunicorn<20.1.0
pecan
sqlalchemy==1.3.0
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
install_requires=[
"pecan",
"sqlalchemy==1.3.0",
"psycopg2==2.8.2",
"psycopg2-binary==2.9.9",
"pecan-notario",
"python-statsd",
"requests",
Expand All @@ -43,9 +43,9 @@
'Topic :: Utilities',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
entry_points="""
[pecan.command]
Expand Down