mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Updating Readme and Provisioning code
This commit is contained in:
parent
aac8913d2f
commit
3b7d70c5b8
3 changed files with 61 additions and 14 deletions
|
@ -29,3 +29,30 @@ You can manage the backend Calibre-web server manually with the following comman
|
|||
systemctl status calibre-web
|
||||
|
||||
systemctl stop calibre-web
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
You can login using the default administration account. Then select "Configuration"
|
||||
under admin panel.
|
||||
|
||||
Upgrading
|
||||
---------
|
||||
Reinstalling Calibre-web automatically upgrades to the latest version. Please backup your configuration
|
||||
before reinstalling. To retain your configuration set calibre-web_provision variable to False.
|
||||
|
||||
You can manually upgrade while following commands:
|
||||
|
||||
$ cd /opt/calibre-web
|
||||
|
||||
$ sudo git pull
|
||||
|
||||
Backup Content
|
||||
--------------
|
||||
Calibre-web stores its configuration into SQLite database file /library/calibre-web/metadata.db.
|
||||
The content is stored in various folders under /library/calibre-web. Please backup the files before
|
||||
upgrading. Also set calibre-web_provision varilable to False before upgrading.
|
||||
|
||||
Known Issues
|
||||
------------
|
||||
Current implementation of the calibre-web in Internet in a box doesn't include https/SSL configuration.
|
||||
Some of the administration login urls might not work.
|
||||
|
|
|
@ -11,9 +11,13 @@ calibre-web_home: "{{ content_base }}/calibre-web"
|
|||
calibre-web_http_port: 8083
|
||||
calibre-web_url: /calibre-web
|
||||
calibre-web_path: "{{ iiab_base }}/calibre-web"
|
||||
calibre-web_exec_path: {{ calibre-web_path }}/cps.py
|
||||
calibre-web_exec_path: "{{ calibre-web_path }}/cps.py"
|
||||
|
||||
# calibre-web system user
|
||||
# Calibre-web setup will be provisioned with default administration account, metadata.db and
|
||||
# language. You could turn this to 'False' while reinstalling/upgrading calibre-web.
|
||||
calibre-web_provision: True
|
||||
|
||||
#calibre-web system user
|
||||
calibre-web_user: root
|
||||
|
||||
# calibre-web admin account
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- name: Create calibre-web folders to store data and configuration files
|
||||
- name: Create calibre-web folders to store data and configuration files.
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
owner: "{{ calibre-web_user }}"
|
||||
|
@ -9,7 +9,7 @@
|
|||
- "{{ calibre-web_home }}"
|
||||
- "{{ calibre-web_path }}"
|
||||
|
||||
- name: Checkout calibre-web github repo
|
||||
- name: Download calibre-web github repository.
|
||||
git:
|
||||
repo: https://github.com/janeczku/calibre-web.git
|
||||
dest: "{{ calibre-web_path }}"
|
||||
|
@ -17,29 +17,39 @@
|
|||
version: master
|
||||
when: internet_available
|
||||
|
||||
- name: Download calibre-web dependencies
|
||||
- name: Download calibre-web dependencies into vendor subdirectory.
|
||||
- pip:
|
||||
chdir: "{{ calibre-web_path }}"
|
||||
requirements: "{{ calibre-web_path }}/requirements.txt"
|
||||
extra_args: "--target vendor --no-cache-dir"
|
||||
|
||||
- name: Create calibre-web systemd service unit, httpd2 configuration and initial database
|
||||
- name: Create calibre-web systemd service unit and httpd2 configuration.
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "{{ item.mode }}"
|
||||
owner: root
|
||||
group: root
|
||||
owner: {{ calibre-web_user }}
|
||||
group: {{ apache_user }}
|
||||
with_items:
|
||||
- { src: 'calibre-web.service.j2', dest: '/etc/systemd/system/calibre-web.service', mode: '0644' }
|
||||
- { src: 'calibre-web.conf.j2', dest: '/etc/apache2/sites-available/calibre-web.conf', mode: '0644' }
|
||||
- { src: 'metadata.db', dest: '{{ calibre-web_home }}/metadata.db', mode: '0644' }
|
||||
|
||||
- name: Ask systemd to reread unit files (daemon-reload)
|
||||
- name: Provision calibre-web with default administration account and database.
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "{{ item.mode }}"
|
||||
owner: {{ calibre-web_user }}
|
||||
group: {{ apache_user }}
|
||||
with_items:
|
||||
- { src: 'metadata.db', dest: '{{ calibre-web_home }}/metadata.db', mode: '0644' }
|
||||
when: calibre-web_provision
|
||||
|
||||
- name: Ask systemd to reread unit files (daemon-reload).
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Enable calibre-web service
|
||||
- name: Enable calibre-web service.
|
||||
service:
|
||||
name: calibre-web
|
||||
enabled: yes
|
||||
|
@ -50,21 +60,25 @@
|
|||
command: a2ensite calibre-web.conf
|
||||
when: calibre-web_enabled
|
||||
|
||||
- name: Restart Apache after enabling calibre-web httpd2 site
|
||||
- name: Restart Apache after enabling calibre-web httpd2 site.
|
||||
command: apachectl -k graceful
|
||||
when: calibre-web_enabled
|
||||
|
||||
- name: Disable calibre-web service
|
||||
- name: Disable calibre-web service.
|
||||
service:
|
||||
name: calibre-web
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: not calibre-web_enabled
|
||||
|
||||
- name: Disable calibre-web httpd2 site
|
||||
- name: Disable calibre-web httpd2 site.
|
||||
command: a2dissite calibre-web.conf
|
||||
when: not calibre-web_enabled
|
||||
|
||||
- name: Restart Apache after disabling calibre-web httpd2 site.
|
||||
command: apachectl -k graceful
|
||||
when: not calibre-web_enabled
|
||||
|
||||
- name: Add 'calibre-web' to list of services at /etc/iiab/iiab.ini
|
||||
ini_file:
|
||||
dest: "{{ service_filelist }}"
|
||||
|
@ -84,3 +98,5 @@
|
|||
value: "{{ calibre-web_http_port }}"
|
||||
- option: enabled
|
||||
value: "{{ calibre-web_enabled }}"
|
||||
- option: True
|
||||
value: "{{ calibre-web_provision }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue