aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/en/developer
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-11-18 09:28:20 +0100
committerGitHub <noreply@github.com>2016-11-18 09:28:20 +0100
commit19d401b15c1151bfa6c2364f31cc1eb87e7c99ef (patch)
tree9c47399f9b1a9ad2228ec365a1fd5e20edc7771f /docs/en/developer
parent9e0a49e6acf60c3dbf3c479cb36d404239dfda89 (diff)
parent50540682ffcaa6acf16f3b17cede3da9694c494f (diff)
downloadwallabag-19d401b15c1151bfa6c2364f31cc1eb87e7c99ef.tar.gz
wallabag-19d401b15c1151bfa6c2364f31cc1eb87e7c99ef.tar.zst
wallabag-19d401b15c1151bfa6c2364f31cc1eb87e7c99ef.zip
Merge pull request #2550 from wallabag/reorder-documentation
Reordered documentation
Diffstat (limited to 'docs/en/developer')
-rw-r--r--docs/en/developer/asynchronous.rst159
-rw-r--r--docs/en/developer/rabbitmq.rst80
-rw-r--r--docs/en/developer/redis.rst75
3 files changed, 159 insertions, 155 deletions
diff --git a/docs/en/developer/asynchronous.rst b/docs/en/developer/asynchronous.rst
new file mode 100644
index 00000000..6a991cf6
--- /dev/null
+++ b/docs/en/developer/asynchronous.rst
@@ -0,0 +1,159 @@
1Asynchronous tasks
2==================
3
4In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ or Redis.
5
6Install RabbitMQ for asynchronous tasks
7---------------------------------------
8
9Requirements
10^^^^^^^^^^^^
11
12You need to have RabbitMQ installed on your server.
13
14Installation
15^^^^^^^^^^^^
16
17.. code:: bash
18
19 wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
20 apt-key add rabbitmq-signing-key-public.asc
21 apt-get update
22 apt-get install rabbitmq-server
23
24Configuration and launch
25^^^^^^^^^^^^^^^^^^^^^^^^
26
27.. code:: bash
28
29 rabbitmq-plugins enable rabbitmq_management # (useful to have a web interface, available at http://localhost:15672/ (guest/guest)
30 rabbitmq-server -detached
31
32Stop RabbitMQ
33^^^^^^^^^^^^^
34
35.. code:: bash
36
37 rabbitmqctl stop
38
39
40Configure RabbitMQ in wallabag
41^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43Edit your ``app/config/parameters.yml`` file to edit RabbitMQ configuration. The default one should be ok:
44
45.. code:: yaml
46
47 rabbitmq_host: localhost
48 rabbitmq_port: 5672
49 rabbitmq_user: guest
50 rabbitmq_password: guest
51
52Enable RabbitMQ in wallabag
53^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
55In internal settings, in the **Import** section, enable RabbitMQ (with the value 1).
56
57Launch RabbitMQ consumer
58^^^^^^^^^^^^^^^^^^^^^^^^
59
60Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
61
62.. code:: bash
63
64 # for Pocket import
65 bin/console rabbitmq:consumer -e=prod import_pocket -w
66
67 # for Readability import
68 bin/console rabbitmq:consumer -e=prod import_readability -w
69
70 # for Instapaper import
71 bin/console rabbitmq:consumer -e=prod import_instapaper -w
72
73 # for wallabag v1 import
74 bin/console rabbitmq:consumer -e=prod import_wallabag_v1 -w
75
76 # for wallabag v2 import
77 bin/console rabbitmq:consumer -e=prod import_wallabag_v2 -w
78
79 # for Firefox import
80 bin/console rabbitmq:consumer -e=prod import_firefox -w
81
82 # for Chrome import
83 bin/console rabbitmq:consumer -e=prod import_chrome -w
84
85Install Redis for asynchronous tasks
86------------------------------------
87
88In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis.
89
90Requirements
91^^^^^^^^^^^^
92
93You need to have Redis installed on your server.
94
95Installation
96^^^^^^^^^^^^
97
98.. code:: bash
99
100 apt-get install redis-server
101
102Launch
103^^^^^^
104
105The server might be already running after installing, if not you can launch it using:
106
107.. code:: bash
108
109 redis-server
110
111
112Configure Redis in wallabag
113^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
115Edit your ``app/config/parameters.yml`` file to edit Redis configuration. The default one should be ok:
116
117.. code:: yaml
118
119 redis_host: localhost
120 redis_port: 6379
121
122Enable Redis in wallabag
123^^^^^^^^^^^^^^^^^^^^^^^^
124
125In internal settings, in the **Import** section, enable Redis (with the value 1).
126
127Launch Redis consumer
128^^^^^^^^^^^^^^^^^^^^^
129
130Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
131
132.. code:: bash
133
134 # for Pocket import
135 bin/console wallabag:import:redis-worker -e=prod pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log
136
137 # for Readability import
138 bin/console wallabag:import:redis-worker -e=prod readability -vv >> /path/to/wallabag/var/logs/redis-readability.log
139
140 # for Instapaper import
141 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-instapaper.log
142
143 # for wallabag v1 import
144 bin/console wallabag:import:redis-worker -e=prod wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log
145
146 # for wallabag v2 import
147 bin/console wallabag:import:redis-worker -e=prod wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log
148
149 # for Firefox import
150 bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log
151
152 # for Chrome import
153 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log
154
155If you want to launch the import only for some messages and not all, you can specify this number (here 12) and the worker will stop right after the 12th message :
156
157.. code:: bash
158
159 bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12
diff --git a/docs/en/developer/rabbitmq.rst b/docs/en/developer/rabbitmq.rst
deleted file mode 100644
index 7ee8a5ce..00000000
--- a/docs/en/developer/rabbitmq.rst
+++ /dev/null
@@ -1,80 +0,0 @@
1Install RabbitMQ for asynchronous tasks
2=======================================
3
4In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ.
5
6Requirements
7------------
8
9You need to have RabbitMQ installed on your server.
10
11Installation
12~~~~~~~~~~~~
13
14.. code:: bash
15
16 wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
17 apt-key add rabbitmq-signing-key-public.asc
18 apt-get update
19 apt-get install rabbitmq-server
20
21Configuration and launch
22~~~~~~~~~~~~~~~~~~~~~~~~
23
24.. code:: bash
25
26 rabbitmq-plugins enable rabbitmq_management # (useful to have a web interface, available at http://localhost:15672/ (guest/guest)
27 rabbitmq-server -detached
28
29Stop RabbitMQ
30~~~~~~~~~~~~~
31
32.. code:: bash
33
34 rabbitmqctl stop
35
36
37Configure RabbitMQ in wallabag
38------------------------------
39
40Edit your ``app/config/parameters.yml`` file to edit RabbitMQ configuration. The default one should be ok:
41
42.. code:: yaml
43
44 rabbitmq_host: localhost
45 rabbitmq_port: 5672
46 rabbitmq_user: guest
47 rabbitmq_password: guest
48
49Enable RabbitMQ in wallabag
50---------------------------
51
52In internal settings, in the **Import** section, enable RabbitMQ (with the value 1).
53
54Launch RabbitMQ consumer
55------------------------
56
57Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
58
59.. code:: bash
60
61 # for Pocket import
62 bin/console rabbitmq:consumer -e=prod import_pocket -w
63
64 # for Readability import
65 bin/console rabbitmq:consumer -e=prod import_readability -w
66
67 # for Instapaper import
68 bin/console rabbitmq:consumer -e=prod import_instapaper -w
69
70 # for wallabag v1 import
71 bin/console rabbitmq:consumer -e=prod import_wallabag_v1 -w
72
73 # for wallabag v2 import
74 bin/console rabbitmq:consumer -e=prod import_wallabag_v2 -w
75
76 # for Firefox import
77 bin/console rabbitmq:consumer -e=prod import_firefox -w
78
79 # for Chrome import
80 bin/console rabbitmq:consumer -e=prod import_chrome -w
diff --git a/docs/en/developer/redis.rst b/docs/en/developer/redis.rst
deleted file mode 100644
index ea084e66..00000000
--- a/docs/en/developer/redis.rst
+++ /dev/null
@@ -1,75 +0,0 @@
1Install Redis for asynchronous tasks
2====================================
3
4In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis.
5
6Requirements
7------------
8
9You need to have Redis installed on your server.
10
11Installation
12~~~~~~~~~~~~
13
14.. code:: bash
15
16 apt-get install redis-server
17
18Launch
19~~~~~~
20
21The server might be already running after installing, if not you can launch it using:
22
23.. code:: bash
24
25 redis-server
26
27
28Configure Redis in wallabag
29---------------------------
30
31Edit your ``app/config/parameters.yml`` file to edit Redis configuration. The default one should be ok:
32
33.. code:: yaml
34
35 redis_host: localhost
36 redis_port: 6379
37
38Enable Redis in wallabag
39------------------------
40
41In internal settings, in the **Import** section, enable Redis (with the value 1).
42
43Launch Redis consumer
44---------------------
45
46Depending on which service you want to import from you need to enable one (or many if you want to support many) cron job:
47
48.. code:: bash
49
50 # for Pocket import
51 bin/console wallabag:import:redis-worker -e=prod pocket -vv >> /path/to/wallabag/var/logs/redis-pocket.log
52
53 # for Readability import
54 bin/console wallabag:import:redis-worker -e=prod readability -vv >> /path/to/wallabag/var/logs/redis-readability.log
55
56 # for Instapaper import
57 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-instapaper.log
58
59 # for wallabag v1 import
60 bin/console wallabag:import:redis-worker -e=prod wallabag_v1 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v1.log
61
62 # for wallabag v2 import
63 bin/console wallabag:import:redis-worker -e=prod wallabag_v2 -vv >> /path/to/wallabag/var/logs/redis-wallabag_v2.log
64
65 # for Firefox import
66 bin/console wallabag:import:redis-worker -e=prod firefox -vv >> /path/to/wallabag/var/logs/redis-firefox.log
67
68 # for Chrome import
69 bin/console wallabag:import:redis-worker -e=prod instapaper -vv >> /path/to/wallabag/var/logs/redis-chrome.log
70
71If you want to launch the import only for some messages and not all, you can specify this number (here 12) and the worker will stop right after the 12th message :
72
73.. code:: bash
74
75 bin/console wallabag:import:redis-worker -e=prod pocket -vv --maxIterations=12