mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Rename distweb to internetarchive
This commit is contained in:
parent
b506187ace
commit
6bd2575f51
8 changed files with 50 additions and 50 deletions
|
@ -21,11 +21,11 @@
|
||||||
when: minetest_install
|
when: minetest_install
|
||||||
tags: minetest
|
tags: minetest
|
||||||
|
|
||||||
- name: DISTWEB
|
- name: INTERNETARCHIVE
|
||||||
include_role:
|
include_role:
|
||||||
name: distweb
|
name: internetarchive
|
||||||
when: distweb_install
|
when: internetarchive_install
|
||||||
tags: distweb
|
tags: internetarchive
|
||||||
|
|
||||||
- name: Recording STAGE 9 HAS COMPLETED ====================
|
- name: Recording STAGE 9 HAS COMPLETED ====================
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
distweb_port: 4244
|
internetarchive_port: 4244
|
||||||
distweb_dir: '{{ iiab_base }}/distweb'
|
internetarchive_dir: '{{ iiab_base }}/internetarchive'
|
||||||
# for testing purposes, install and enable
|
# for testing purposes, install and enable
|
||||||
distweb_install: True
|
internetarchive_install: True
|
||||||
distweb_enabled: True
|
internetarchive_enabled: True
|
||||||
#distweb_install: False
|
#internetarchive_install: False
|
||||||
#distweb_enabled: False
|
#internetarchive_enabled: False
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- { role: nodejs, tags: ['nodejs'], when: distweb_install }
|
- { role: nodejs, tags: ['nodejs'], when: internetarchive_install }
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
- name: FAIL (STOP INSTALLING) IF nodejs_version is not set to 10.x
|
- name: FAIL (STOP INSTALLING) IF nodejs_version is not set to 10.x
|
||||||
fail:
|
fail:
|
||||||
msg: "Archorg install cannot proceeed, as it currently requires Node.js 10.x, and your nodejs_version is set to {{ nodejs_version }}. Please check the value of nodejs_version in /opt/iiab/iiab/vars/default_vars.yml and possibly also /etc/iiab/local_vars.yml"
|
msg: "Archorg install cannot proceeed, as it currently requires Node.js 10.x, and your nodejs_version is set to {{ nodejs_version }}. Please check the value of nodejs_version in /opt/iiab/iiab/vars/default_vars.yml and possibly also /etc/iiab/local_vars.yml"
|
||||||
when: distweb_install and (nodejs_version != "10.x")
|
when: internetarchive_install and (nodejs_version != "10.x")
|
||||||
|
|
||||||
- name: Clone distributed web mirror supported by Internet Archive
|
- name: Clone distributed web mirror supported by Internet Archive
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/internetarchive/dweb-mirror
|
repo: https://github.com/internetarchive/dweb-mirror
|
||||||
dest: "{{ distweb_dir }}"
|
dest: "{{ internetarchive_dir }}"
|
||||||
force: yes
|
force: yes
|
||||||
depth: 1
|
depth: 1
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
@ -20,16 +20,16 @@
|
||||||
- cmake
|
- cmake
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Run 'sudo npm install --allow-root --unsafe-perm=true' to create /opt/iiab/distweb/node_modules (CAN TAKE ~5 MINUTES)
|
- name: Run 'sudo npm install --allow-root --unsafe-perm=true' to create /opt/iiab/internetarchive/node_modules (CAN TAKE ~5 MINUTES)
|
||||||
command: sudo npm install --allow-root --unsafe-perm=true
|
command: sudo npm install --allow-root --unsafe-perm=true
|
||||||
args:
|
args:
|
||||||
chdir: "{{ distweb_dir }}"
|
chdir: "{{ internetarchive_dir }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# CONFIG FILES
|
# CONFIG FILES
|
||||||
|
|
||||||
- name: "Install from templates: distweb.service (systemd), distweb.conf (Apache)"
|
- name: "Install from templates: internetarchive.service (systemd), internetarchive.conf (Apache)"
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
|
@ -37,53 +37,53 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'distweb.service.j2', dest: '/etc/systemd/system/distweb.service' }
|
- { src: 'internetarchive.service.j2', dest: '/etc/systemd/system/internetarchive.service' }
|
||||||
- { src: 'distweb.conf', dest: '/etc/apache2/sites-available/distweb.conf' }
|
- { src: 'internetarchive.conf', dest: '/etc/apache2/sites-available/internetarchive.conf' }
|
||||||
|
|
||||||
|
|
||||||
- name: Create symlink distweb.conf from sites-enabled to sites-available, for short URLs http://box/sugar & http://box/distweb (if distweb_enabled)
|
- name: Create symlink internetarchive.conf from sites-enabled to sites-available, for short URLs http://box/sugar & http://box/internetarchive (if internetarchive_enabled)
|
||||||
file:
|
file:
|
||||||
src: /etc/apache2/sites-available/distweb.conf
|
src: /etc/apache2/sites-available/internetarchive.conf
|
||||||
path: /etc/apache2/sites-enabled/distweb.conf
|
path: /etc/apache2/sites-enabled/internetarchive.conf
|
||||||
state: link
|
state: link
|
||||||
when: distweb_enabled and is_debuntu
|
when: internetarchive_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Remove symlink /etc/apache2/sites-enabled/distweb.conf (if not distweb_enabled)
|
- name: Remove symlink /etc/apache2/sites-enabled/internetarchive.conf (if not internetarchive_enabled)
|
||||||
file:
|
file:
|
||||||
path: /etc/apache2/sites-enabled/distweb.conf
|
path: /etc/apache2/sites-enabled/internetarchive.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: not distweb_enabled and is_debuntu
|
when: not internetarchive_enabled and is_debuntu
|
||||||
|
|
||||||
|
|
||||||
# RESTART/STOP SYSTEMD SERVICE
|
# RESTART/STOP SYSTEMD SERVICE
|
||||||
|
|
||||||
# with "systemctl daemon-reload" in case mongodb.service changed, etc
|
# with "systemctl daemon-reload" in case mongodb.service changed, etc
|
||||||
- name: Enable & Restart 'distweb' systemd service (if distweb_enabled)
|
- name: Enable & Restart 'internetarchive' systemd service (if internetarchive_enabled)
|
||||||
systemd:
|
systemd:
|
||||||
name: distweb
|
name: internetarchive
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: distweb_enabled
|
when: internetarchive_enabled
|
||||||
|
|
||||||
- name: Disable & Stop 'distweb' systemd service (if not distweb_enabled)
|
- name: Disable & Stop 'internetarchive' systemd service (if not internetarchive_enabled)
|
||||||
systemd:
|
systemd:
|
||||||
name: distweb
|
name: internetarchive
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
when: not distweb_enabled
|
when: not internetarchive_enabled
|
||||||
|
|
||||||
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box/distweb (not just http://box:{{ distweb_port }})
|
- name: Restart Apache service ({{ apache_service }}) to enable/disable http://box/internetarchive (not just http://box:{{ internetarchive_port }})
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}" # httpd or apache2
|
name: "{{ apache_service }}" # httpd or apache2
|
||||||
state: restarted
|
state: restarted
|
||||||
when: distweb_enabled
|
when: internetarchive_enabled
|
||||||
|
|
||||||
- name: Add 'distweb' variable values to {{ iiab_ini_file }}
|
- name: Add 'internetarchive' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
path: "{{ iiab_ini_file }}"
|
path: "{{ iiab_ini_file }}"
|
||||||
section: distweb
|
section: internetarchive
|
||||||
option: "{{ item.option }}"
|
option: "{{ item.option }}"
|
||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -91,5 +91,5 @@
|
||||||
value: Archive Org Distributed Web
|
value: Archive Org Distributed Web
|
||||||
- option: description
|
- option: description
|
||||||
value: '"Dweb-mirror is intended to make the Internet Archive experience and UI available offline."'
|
value: '"Dweb-mirror is intended to make the Internet Archive experience and UI available offline."'
|
||||||
- option: distweb_enabled
|
- option: internetarchive_enabled
|
||||||
value: "{{ distweb_enabled }}"
|
value: "{{ internetarchive_enabled }}"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# distweb_port is set to 4244 in /roles/archoeg/defaults/main.yml
|
# internetarchive_port is set to 4244 in /roles/archoeg/defaults/main.yml
|
||||||
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
||||||
|
|
||||||
RedirectMatch ^/archive.org$ /distweb
|
RedirectMatch ^/archive.org$ /internetarchive
|
||||||
RedirectMatch ^/archive$ /distweb
|
RedirectMatch ^/archive$ /internetarchive
|
||||||
|
|
||||||
ProxyPass /distweb http://localhost:{{ distweb_port }}/distweb
|
ProxyPass /internetarchive http://localhost:{{ internetarchive_port }}/internetarchive
|
||||||
ProxyPassReverse /distweb http://localhost:{{ distweb_port }}/distweb
|
ProxyPassReverse /internetarchive http://localhost:{{ internetarchive_port }}/internetarchive
|
||||||
|
|
|
@ -4,13 +4,13 @@ After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory={{ distweb_dir }}
|
WorkingDirectory={{ internetarchive_dir }}
|
||||||
ExecStart=/usr/bin/node {{ distweb_dir }}/internetarchive -s
|
ExecStart=/usr/bin/node {{ internetarchive_dir }}/internetarchive -s
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
SyslogIdentifier=distweb
|
SyslogIdentifier=internetarchive
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -63,7 +63,7 @@ cups_port={{ cups_port }}
|
||||||
transmission_http_port={{ transmission_http_port }}
|
transmission_http_port={{ transmission_http_port }}
|
||||||
transmission_peer_port={{ transmission_peer_port }}
|
transmission_peer_port={{ transmission_peer_port }}
|
||||||
sugarizer_port={{ sugarizer_port }}
|
sugarizer_port={{ sugarizer_port }}
|
||||||
distweb_port={{ distweb_port }}
|
internetarchive_port={{ internetarchive_port }}
|
||||||
nodered_port={{ nodered_port }}
|
nodered_port={{ nodered_port }}
|
||||||
mosquitto_port={{ mosquitto_port }}
|
mosquitto_port={{ mosquitto_port }}
|
||||||
minetest_port={{ minetest_port }}
|
minetest_port={{ minetest_port }}
|
||||||
|
@ -106,7 +106,7 @@ if [ "$services_externally_visible" == "True" ]; then
|
||||||
$IPTABLES -A INPUT -p tcp --dport $calibreweb_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $calibreweb_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p tcp --dport $cups_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $cups_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p tcp --dport $sugarizer_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $sugarizer_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p tcp --dport $distweb_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport internetarchive_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p tcp --dport $nodered_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $nodered_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p tcp --dport $mosquitto_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $mosquitto_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p tcp --dport $transmission_http_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $transmission_http_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
|
|
|
@ -453,6 +453,9 @@ calibreweb_port: 8083 # PORT VARIABLE HAS NO EFFECT (as of January 2019)
|
||||||
calibreweb_url: /books
|
calibreweb_url: /books
|
||||||
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
||||||
|
|
||||||
|
#InternetArchive Dweb service - port needs wider scope
|
||||||
|
internetarchive_port: 4244
|
||||||
|
|
||||||
# Minetest is an open source clone of the Minecraft building blocks game
|
# Minetest is an open source clone of the Minecraft building blocks game
|
||||||
minetest_install: False
|
minetest_install: False
|
||||||
minetest_enabled: False
|
minetest_enabled: False
|
||||||
|
@ -461,9 +464,6 @@ minetest_server_admin: Admin
|
||||||
minetest_default_game: carbone-ng # only carbone-ng and minetest are supported
|
minetest_default_game: carbone-ng # only carbone-ng and minetest are supported
|
||||||
minetest_flat_world: False
|
minetest_flat_world: False
|
||||||
|
|
||||||
#Distweb service from archive.org - port needs wider scope
|
|
||||||
distweb_port: 4244
|
|
||||||
|
|
||||||
# CONSIDER THESE 2 NEW OPENSTREETMAP (OSM) APPROACHES INSTEAD, AS OF 2018:
|
# CONSIDER THESE 2 NEW OPENSTREETMAP (OSM) APPROACHES INSTEAD, AS OF 2018:
|
||||||
# - http://download.iiab.io/content/OSM/vector-tiles/
|
# - http://download.iiab.io/content/OSM/vector-tiles/
|
||||||
# - http://oer2go.org/viewmod/en-worldmap-10
|
# - http://oer2go.org/viewmod/en-worldmap-10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue