-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aurélien Bompard <[email protected]>
- Loading branch information
Showing
90 changed files
with
3,876 additions
and
4,212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tahrir/templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
APP_MODULE=tahrir.app:create_app() | ||
UPGRADE_PIP_TO_LATEST=true | ||
ENABLE_MICROPIPENV=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[python: **.py] | ||
[jinja2: **/templates/**.html] | ||
extensions=jinja2.ext.i18n,jinja2.ext.autoescape,jinja2.ext.with_ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This file configuration values for development | ||
|
||
SECRET_KEY = "development" | ||
TEMPLATES_AUTO_RELOAD = True | ||
SESSION_COOKIE_HTTPONLY = True | ||
SESSION_COOKIE_SECURE = False | ||
|
||
SQLALCHEMY_DATABASE_URI = "sqlite:////home/vagrant/tahrir.db" | ||
OIDC_CLIENT_SECRETS = "/home/vagrant/client_secrets.json" | ||
|
||
TAHRIR_ADMIN_GROUPS = ["admins"] | ||
TAHRIR_PNGS_PATH = "/home/vagrant/fedora-badges/pngs" | ||
TAHRIR_USE_FEDMSG = False | ||
|
||
TAHRIR_EMAIL_DOMAIN = "tinystage.test" | ||
TAHRIR_FAS_URL = "https://auth.tinystage.test/noggin" | ||
|
||
# Cache | ||
CACHE = { | ||
"backend": "dogpile.cache.dbm", | ||
"expiration_time": 10000, | ||
"arguments": { | ||
"filename": "/home/vagrant/cachefile.dbm", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,75 +11,53 @@ | |
- name: configure fedora-messaging to point at tinystage rabbitmq | ||
lineinfile: | ||
path: /etc/fedora-messaging/config.toml | ||
regexp: "amqp_url = \"amqp://\"" | ||
line: "amqp_url = \"amqp://fedoramessages:[email protected]\"" # gitleaks:allow | ||
regexp: 'amqp_url = "amqp://"' | ||
line: 'amqp_url = "amqp://fedoramessages:[email protected]"' # gitleaks:allow | ||
|
||
- name: Setup development instance of tahrir | ||
command: poetry install | ||
become: yes | ||
become_user: vagrant | ||
args: | ||
chdir: /home/vagrant/tahrir | ||
|
||
- name: copy the developemnt.ini file | ||
copy: | ||
src: development.ini | ||
dest: /home/vagrant/development.ini | ||
mode: 0644 | ||
owner: vagrant | ||
group: vagrant | ||
|
||
|
||
- name: read client_secrets.json | ||
register: client_secrets_json | ||
ansible.builtin.slurp: | ||
path: /home/vagrant/client_secrets.json | ||
|
||
- name: extract stuff from client_secrets.json | ||
set_fact: | ||
client_secrets: "{{ client_secrets_json.content |b64decode | from_json }}" | ||
|
||
- name: Update development.ini | ||
lineinfile: | ||
dest: /home/vagrant/development.ini | ||
line: "oidc.fedora.client_id = {{client_secrets.web.client_id}}" | ||
owner: vagrant | ||
|
||
- name: Update development.ini | ||
lineinfile: | ||
dest: /home/vagrant/development.ini | ||
line: "oidc.fedora.client_secret = {{client_secrets.web.client_secret}}" | ||
owner: vagrant | ||
|
||
chdir: /home/vagrant/tahrir | ||
|
||
- name: copy the secret.ini and alembic.ini files | ||
- name: copy the config files | ||
copy: | ||
src: "{{ item }}" | ||
dest: /home/vagrant/{{ item }} | ||
mode: 0644 | ||
owner: vagrant | ||
group: vagrant | ||
loop: | ||
- secret.ini | ||
- tahrir.cfg | ||
- alembic.ini | ||
|
||
- name: get the fedora badges | ||
git: | ||
repo: https://pagure.io/fedora-badges.git | ||
dest: /home/vagrant/fedora-badges | ||
|
||
- name: load the fedora badges in the DB | ||
command: poetry run python ./devel/load-badges.py /home/vagrant/development.ini | ||
- name: Create or update the database | ||
command: poetry run flask tahrir sync-db | ||
environment: | ||
FLASK_CONFIG: /home/vagrant/tahrir.cfg | ||
FLASK_APP: /home/vagrant/tahrir/tahrir/app.py | ||
FLASK_DEBUG: 1 | ||
become: yes | ||
become_user: vagrant | ||
args: | ||
chdir: /home/vagrant/tahrir | ||
|
||
- command: poetry run sync_tahrir_db /home/vagrant/development.ini | ||
- name: load the fedora badges in the DB | ||
command: poetry run flask tahrir load-badges | ||
environment: | ||
FLASK_CONFIG: /home/vagrant/tahrir.cfg | ||
FLASK_APP: /home/vagrant/tahrir/tahrir/app.py | ||
FLASK_DEBUG: 1 | ||
become: yes | ||
become_user: vagrant | ||
args: | ||
chdir: /home/vagrant/tahrir | ||
chdir: /home/vagrant/tahrir | ||
|
||
- name: Install the systemd unit files for tahrir service | ||
copy: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.