Skip to content

Commit

Permalink
Merge pull request #29 from nasa/grc-atf-dev
Browse files Browse the repository at this point in the history
pull misc grc-atf-dev updates into grc-atf
  • Loading branch information
ndc-rkevans authored Aug 2, 2023
2 parents ed60b92 + d067207 commit 7f10859
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 17 deletions.
14 changes: 14 additions & 0 deletions src/roles/apache-php/templates/httpd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,20 @@ Listen 8080

</VirtualHost>

Listen 8082
<VirtualHost *:8082>
DocumentRoot /opt/nonwiki
ServerName NonWikiMainEntrypoint
<Directory /opt/nonwiki>
AllowOverride All
Options Indexes
Require all granted
Allow from all
</Directory>
CustomLog /var/log/httpd/nonwiki-access.log combined
ErrorLog /var/log/httpd/nonwiki-error.log
</VirtualHost>

{% if m_setup_php_profiling -%}
# Enable profiling for PHP
Listen 8089
Expand Down
12 changes: 9 additions & 3 deletions src/roles/haproxy/templates/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ frontend www-http
frontend www-https
bind *:443 ssl crt /etc/haproxy/certs/meza.pem
reqadd X-Forwarded-Proto:\ https

# Keep letsencrypt stuff here for now. Probably add it back later.
# acl letsencrypt-acl path_beg /.well-known/acme-challenge/
# use_backend letsencrypt-backend if letsencrypt-acl

default_backend www-backend

acl nonwiki path_beg -i /nonwiki/
use_backend nonwiki-backend if nonwiki

backend www-backend
redirect scheme https if !{ ssl_fc }
{% for host in groups['app_servers'] -%}
Expand Down Expand Up @@ -99,10 +104,11 @@ backend www-backend
server nd1 127.0.0.1:19999
{% endif %}

{% endif %}


backend nonwiki-backend
redirect scheme https if !{ ssl_fc }
server nonwiki 127.0.0.1:8082 check

{% endif %}

{% if m_setup_php_profiling %}
listen php-profiling
Expand Down
3 changes: 3 additions & 0 deletions src/roles/htdocs/templates/.htaccess.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Allow access to root index.php
RewriteRule ^index.php(.*) - [L]

# Allow certbot access
RewriteRule ^.well-known(.*) - [L]

# Allow access to /wikis directory (where all wiki content and
# and settings are located)
RewriteRule ^wikis(?:/|$)(.*)$ - [L]
Expand Down
5 changes: 2 additions & 3 deletions src/roles/mediawiki/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ blender_footer_wikis: []

# Below all the wikis, links to stuff
blender_footer_links:
- "<a href='https://github.com/enterprisemediawiki/meza'>meza on github</a>"
- "<a href='https://enterprisemediawiki.org'>enterprisemediawiki.org</a>"
- "<a href='https://github.com/nasa/meza'>meza on github</a>"
- "<a href='https://mwstake.org'>mwstake.org</a>"

blender_admins: []
# - { email: [email protected], name: "James Montalvo" }
# - email: [email protected]
# name: Sally Example

Expand Down
3 changes: 2 additions & 1 deletion src/roles/mediawiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@
environment:
TMPDIR: "{{ m_tmp }}"
git:
repo: https://github.com/jamesmontalvo3/WikiBlender.git
# ToDo: migrate WikiBlender from ndc-rkevans to nasa
repo: https://github.com/ndc-rkevans/WikiBlender.git
dest: "{{ m_htdocs }}/WikiBlender"
version: "master"
umask: "0002"
Expand Down
5 changes: 2 additions & 3 deletions src/roles/verify-wiki/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ blender_footer_wikis: []

# Below all the wikis, links to stuff
blender_footer_links:
- "<a href='https://github.com/enterprisemediawiki/meza'>meza on github</a>"
- "<a href='https://enterprisemediawiki.org'>enterprisemediawiki.org</a>"
- "<a href='https://github.com/nasa/meza'>meza on github/nasa</a>"
- "<a href='https://mwstake.org'>mwstake.org</a>"

blender_admins: []
# - { email: [email protected], name: "James Montalvo" }
# - email: [email protected]
# name: Sally Example

Expand Down
13 changes: 6 additions & 7 deletions src/roles/verify-wiki/tasks/init-wiki.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
---


# Import pages required for SemanticMeetingMinutes and rebuild recent changes
# - name: import pages for SemanticMeetingMinutes
# shell: >
# WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/maintenance/importDump.php" --report --debug < {{ m_mediawiki }}/extensions/SemanticMeetingMinutes/ImportFiles/import.xml
# run_once: true
- name: Import all pages registered with PageImporter (e.g. SemanticMeetingMinutes)
shell: >
WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/extensions/PageImporter/importPages.php"
run_once: True
#- name: Import all pages registered with PageImporter (e.g. SemanticMeetingMinutes)
# shell: >
# WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/extensions/PageImporter/importPages.php"
# run_once: True

- name: rebuildrecentchanges.php
shell: >
WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/maintenance/rebuildrecentchanges.php"
run_once: true

# Create an admin user for Demo Wiki only if the wiki was just created
- name: Create "Admin" user on Demo Wiki
- name: Create Admin user on Demo Wiki
shell: >
WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/maintenance/createAndPromote.php" --force --sysop --bureaucrat Admin adminpass12
WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/maintenance/createAndPromote.php" --force --sysop --bureaucrat Admin adminpass!
run_once: true
when: wiki_id == "demo"

0 comments on commit 7f10859

Please sign in to comment.