mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
commit
67256a92f1
17 changed files with 57 additions and 30 deletions
|
@ -8,7 +8,7 @@ addons:
|
|||
- sourceline: ppa:ansible/ansible
|
||||
packages:
|
||||
# - python-pip # @arky had used this starting in 2018
|
||||
- ansible-base # Install latest ansible-base e.g. 2.10.7+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible
|
||||
- ansible-base # Install latest ansible-base e.g. 2.10.9+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible
|
||||
# - python3-pymysql # These 7-or-8 packages are not needed during this very rapid --syntax-check
|
||||
# - python3-psycopg2
|
||||
# - python3-passlib
|
||||
|
|
|
@ -21,6 +21,14 @@ If your IIAB was `installed <http://wiki.laptop.org/go/IIAB/FAQ#Is_a_quick_insta
|
|||
|
||||
[*] If you're not sure, verify that your IIAB's `/etc/iiab/local_vars.yml <http://wiki.laptop.org/go/IIAB/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it.3F>`_ contains ``lokole_install: True`` and ``lokole_enabled: True``
|
||||
|
||||
By default in an offline community, ``lokole_sim_type: LocalOnly`` is set (e.g. instead of ``lokole_sim_type: Ethernet``) and email addresses will look like:
|
||||
|
||||
``joe@none.lokole.ca``
|
||||
|
||||
2021-05-15: in future, communities should be able to customize their subdomain, to set up Internet-capable email addresses like:
|
||||
|
||||
``sue@kinshasalibrary.lokole.ca``
|
||||
|
||||
Administration
|
||||
--------------
|
||||
|
||||
|
|
|
@ -18,11 +18,10 @@ lokole_install_path: "{{ content_base }}/lokole" # /library/lokole
|
|||
lokole_venv: "{{ lokole_install_path }}/venv" # /library/lokole/venv
|
||||
|
||||
# Info needed to run Lokole:
|
||||
|
||||
lokole_user: lokole
|
||||
lokole_run_directory: "/home/{{ lokole_user }}/state"
|
||||
|
||||
lokole_url: /lokole
|
||||
lokole_full_url: "http://{{ iiab_hostname }}.{{ iiab_domain }}{{ lokole_url }}" # http://box.lan/lokole
|
||||
|
||||
lokole_run_directory: /home/{{ lokole_user }}/state
|
||||
lokole_domain_socket: "{{ lokole_run_directory }}/lokole_gunicorn.sock"
|
||||
lokole_sim_type: LocalOnly
|
||||
|
||||
lokole_full_url: "http://{{ iiab_hostname }}.{{ iiab_domain }}{{ lokole_url }}" # http://box.lan/lokole
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
# https://github.com/iiab/iiab/blob/master/roles/httpd/templates/refresh-wiki-docs.sh#L51-L52
|
||||
|
||||
|
||||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
#- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
# set_fact:
|
||||
# apache_install: True
|
||||
# apache_enabled: True
|
||||
|
||||
- name: APACHE - run 'httpd' role
|
||||
include_role:
|
||||
name: httpd
|
||||
#- name: APACHE - run 'httpd' role
|
||||
# include_role:
|
||||
# name: httpd
|
||||
|
||||
|
||||
- name: "Install 8 packages for Lokole: python3, python3-pip, python3-venv, python3-dev, python3-bcrypt, libffi-dev, libssl-dev, libopenjp2-7"
|
||||
|
|
|
@ -53,10 +53,10 @@
|
|||
- celery
|
||||
- lokole
|
||||
|
||||
#- name: Enable/Disable/Restart Apache if primary
|
||||
- name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache
|
||||
#- name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache
|
||||
- name: Enable/Disable/Restart Apache if primary
|
||||
include_tasks: apache.yml
|
||||
#when: not nginx_enabled
|
||||
when: not nginx_enabled
|
||||
|
||||
- name: Enable/Disable/Restart NGINX if primary
|
||||
include_tasks: nginx.yml
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
location {{ lokole_url }}/ {
|
||||
proxy_pass http://127.0.0.1:{{ apache_port }}{{ lokole_url }}/;
|
||||
location = {{ lokole_url }}/favicon.ico {
|
||||
alias {{ lokole_venv }}/lib/python{{ python_ver }}/site-packages/opwen_email_client/webapp/static/favicon.ico;
|
||||
}
|
||||
|
||||
location ~ ^{{ lokole_url }}/static/(.*)$ {
|
||||
alias {{ lokole_venv }}/lib/python{{ python_ver }}/site-packages/opwen_email_client/webapp/static/$1;
|
||||
}
|
||||
|
||||
location {{ lokole_url }}/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://unix:/{{ lokole_domain_socket }};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
export OPWEN_SIM_TYPE='LocalOnly'
|
||||
export OPWEN_STATE_DIRECTORY='{{lokole_run_directory}}'
|
||||
export OPWEN_SIM_TYPE='{{ lokole_sim_type }}'
|
||||
export OPWEN_STATE_DIRECTORY='{{ lokole_run_directory }}'
|
||||
export OPWEN_APP_ROOT='{{ lokole_url }}'
|
||||
export OPWEN_MAX_UPLOAD_SIZE_MB=10
|
||||
export OPWEN_SYNC_SCHEDULE='1,16,31,46 * * * *'
|
||||
export OPWEN_SESSION_KEY='{{ lookup('password', '/dev/null chars=ascii_letters,digits,_ length=32') }}'
|
||||
export OPWEN_PASSWORD_SALT='{{ lookup('password', '/dev/null chars=ascii_letters,digits,_ length=16') }}'
|
||||
export OPWEN_CLIENT_NAME='{{ iiab_hostname }}'
|
||||
export OPWEN_ROOT_DOMAIN='{{ iiab_domain }}'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
2. Without PHP available via FastCGI, any function at all for PHP-based applications validates NGINX.
|
||||
|
||||
3. Current state of IIAB App/Service migrations as of 2021-04-15:
|
||||
3. Current state of IIAB App/Service migrations as of 2021-05-15:
|
||||
|
||||
1. These support "Native" NGINX but ***NOT*** Apache
|
||||
* Admin Console
|
||||
|
@ -27,6 +27,7 @@
|
|||
* gitea
|
||||
* kiwix
|
||||
* kolibri
|
||||
* lokole
|
||||
* mediawiki
|
||||
* munin
|
||||
* nextcloud
|
||||
|
@ -35,7 +36,6 @@
|
|||
|
||||
3. These support Apache but ***NOT*** "Native" NGINX. They use a "Shim" to [proxy_pass](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) from NGINX to Apache on port 8090. See [roles/3-base-server/tasks/main.yml#L11](../3-base-server/tasks/main.yml#L11) for a list of IIAB Apps/Services that auto-enable Apache.
|
||||
* elgg
|
||||
* lokole
|
||||
* moodle
|
||||
* nodered
|
||||
|
||||
|
@ -55,4 +55,4 @@
|
|||
* transmission
|
||||
* vnstat
|
||||
|
||||
[*] The 4 above starred roles could use improvement, as of 2021-04-15.
|
||||
[*] The 4 above starred roles could use improvement, as of 2021-05-15.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
APT_PATH=/usr/bin # Avoids problematic /usr/local/bin/apt on Linux Mint
|
||||
CURR_VER=undefined # Ansible version you currently have installed
|
||||
GOOD_VER=2.10.8 # Orig for 'yum install [rpm]' & XO laptops (pip install)
|
||||
GOOD_VER=2.10.9 # Orig for 'yum install [rpm]' & XO laptops (pip install)
|
||||
|
||||
# We install the latest 'ansible-base' from PPA, using an OS 'CODENAME' below:
|
||||
# https://launchpad.net/~ansible/+archive/ubuntu/ansible
|
||||
|
@ -42,12 +42,12 @@ fi
|
|||
#apt install python3-pymysql python3-psycopg2 python3-passlib python3-pip python3-setuptools python3-packaging python3-venv virtualenv
|
||||
#ansible-galaxy collection install -r collections.yml
|
||||
|
||||
# TEMPORARILY USE ansible-base 2.10.8 (REMOVE W/ "pip3 uninstall ansible-base")
|
||||
#pip3 install ansible-base==2.10.8 # Start new shell, so /usr/local/bin works
|
||||
# TEMPORARILY USE ansible-base 2.10.9 (REMOVE W/ "pip3 uninstall ansible-base")
|
||||
#pip3 install ansible-base==2.10.9 # Start new shell, so /usr/local/bin works
|
||||
|
||||
# TEMPORARILY USE ANSIBLE 2.9.20 (REMOVE IT WITH "pip uninstall ansible")
|
||||
# TEMPORARILY USE ANSIBLE 2.9.21 (REMOVE IT WITH "pip uninstall ansible")
|
||||
#apt install python-pip
|
||||
#pip install ansible==2.9.20
|
||||
#pip install ansible==2.9.21
|
||||
|
||||
# TEMPORARILY USE ANSIBLE 2.4.2 DUE TO 2.4.3 MEMORY BUG. Details: iiab/iiab#669
|
||||
#echo "Install http://download.iiab.io/packages/ansible_2.4.2.0-1ppa~xenial_all.deb"
|
||||
|
|
|
@ -24,3 +24,4 @@ sshd_service: ssh
|
|||
php_version: 7.3
|
||||
postgresql_version: 11
|
||||
systemd_location: /lib/systemd/system
|
||||
python_ver: 3.7
|
||||
|
|
|
@ -24,3 +24,4 @@ sshd_service: ssh
|
|||
php_version: 7.4
|
||||
postgresql_version: 13
|
||||
systemd_location: /lib/systemd/system
|
||||
python_ver: 3.9
|
||||
|
|
|
@ -28,3 +28,4 @@ php_version: 7.4
|
|||
# "postgresql_version: 11.2" failed (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 19.04)
|
||||
postgresql_version: 12
|
||||
systemd_location: /lib/systemd/system
|
||||
python_ver: 3.8
|
||||
|
|
|
@ -260,6 +260,7 @@ jupyterhub_enabled: True
|
|||
# Lokole (email for rural communities) from https://ascoderu.ca
|
||||
lokole_install: True
|
||||
lokole_enabled: True
|
||||
#lokole_sim_type: Ethernet
|
||||
|
||||
mediawiki_install: True
|
||||
mediawiki_enabled: True
|
||||
|
|
|
@ -260,6 +260,7 @@ jupyterhub_enabled: False
|
|||
# Lokole (email for rural communities) from https://ascoderu.ca
|
||||
lokole_install: False
|
||||
lokole_enabled: False
|
||||
#lokole_sim_type: Ethernet
|
||||
|
||||
mediawiki_install: False
|
||||
mediawiki_enabled: False
|
||||
|
|
|
@ -260,6 +260,7 @@ jupyterhub_enabled: False
|
|||
# Lokole (email for rural communities) from https://ascoderu.ca
|
||||
lokole_install: False
|
||||
lokole_enabled: False
|
||||
#lokole_sim_type: Ethernet
|
||||
|
||||
mediawiki_install: False
|
||||
mediawiki_enabled: False
|
||||
|
|
|
@ -26,3 +26,4 @@ php_version: 7.4
|
|||
# "postgresql_version: 11.2" failed (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 19.04)
|
||||
postgresql_version: 12
|
||||
systemd_location: /lib/systemd/system
|
||||
python_ver: 3.8
|
||||
|
|
|
@ -26,3 +26,4 @@ php_version: 7.4 # 2020-04-22: Will Ubuntu 21.10 require 8.0?
|
|||
# "postgresql_version: 11.2" failed (too detailed for /etc/systemd/system/postgresql-iiab.service on Ubuntu 19.04)
|
||||
postgresql_version: 13 # 2020-04-22: Will Ubuntu 21.10 require 14?
|
||||
systemd_location: /lib/systemd/system
|
||||
python_ver: 3.9
|
||||
|
|
Loading…
Reference in a new issue