diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-06 15:15:48 +0100 |
---|---|---|
committer | Julian Oster <jlnostr@outlook.de> | 2016-11-17 19:22:15 +0100 |
commit | 2e389b0b90f34d795e4bafc43d621955c05850a9 (patch) | |
tree | eb9cd6197751383375339b0fee5ac32f362e3c0a /docs/en/developer | |
parent | 9e0a49e6acf60c3dbf3c479cb36d404239dfda89 (diff) | |
download | wallabag-2e389b0b90f34d795e4bafc43d621955c05850a9.tar.gz wallabag-2e389b0b90f34d795e4bafc43d621955c05850a9.tar.zst wallabag-2e389b0b90f34d795e4bafc43d621955c05850a9.zip |
Reordered documentation
Diffstat (limited to 'docs/en/developer')
-rw-r--r-- | docs/en/developer/asynchronous.rst | 159 | ||||
-rw-r--r-- | docs/en/developer/rabbitmq.rst | 80 | ||||
-rw-r--r-- | docs/en/developer/redis.rst | 75 |
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 @@ | |||
1 | Asynchronous tasks | ||
2 | ================== | ||
3 | |||
4 | In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ or Redis. | ||
5 | |||
6 | Install RabbitMQ for asynchronous tasks | ||
7 | --------------------------------------- | ||
8 | |||
9 | Requirements | ||
10 | ^^^^^^^^^^^^ | ||
11 | |||
12 | You need to have RabbitMQ installed on your server. | ||
13 | |||
14 | Installation | ||
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 | |||
24 | Configuration 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 | |||
32 | Stop RabbitMQ | ||
33 | ^^^^^^^^^^^^^ | ||
34 | |||
35 | .. code:: bash | ||
36 | |||
37 | rabbitmqctl stop | ||
38 | |||
39 | |||
40 | Configure RabbitMQ in wallabag | ||
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
42 | |||
43 | Edit 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 | |||
52 | Enable RabbitMQ in wallabag | ||
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
54 | |||
55 | In internal settings, in the **Import** section, enable RabbitMQ (with the value 1). | ||
56 | |||
57 | Launch RabbitMQ consumer | ||
58 | ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
59 | |||
60 | Depending 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 | |||
85 | Install Redis for asynchronous tasks | ||
86 | ------------------------------------ | ||
87 | |||
88 | In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis. | ||
89 | |||
90 | Requirements | ||
91 | ^^^^^^^^^^^^ | ||
92 | |||
93 | You need to have Redis installed on your server. | ||
94 | |||
95 | Installation | ||
96 | ^^^^^^^^^^^^ | ||
97 | |||
98 | .. code:: bash | ||
99 | |||
100 | apt-get install redis-server | ||
101 | |||
102 | Launch | ||
103 | ^^^^^^ | ||
104 | |||
105 | The server might be already running after installing, if not you can launch it using: | ||
106 | |||
107 | .. code:: bash | ||
108 | |||
109 | redis-server | ||
110 | |||
111 | |||
112 | Configure Redis in wallabag | ||
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
114 | |||
115 | Edit 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 | |||
122 | Enable Redis in wallabag | ||
123 | ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
124 | |||
125 | In internal settings, in the **Import** section, enable Redis (with the value 1). | ||
126 | |||
127 | Launch Redis consumer | ||
128 | ^^^^^^^^^^^^^^^^^^^^^ | ||
129 | |||
130 | Depending 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 | |||
155 | If 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 @@ | |||
1 | Install RabbitMQ for asynchronous tasks | ||
2 | ======================================= | ||
3 | |||
4 | In order to launch asynchronous tasks (useful for huge imports for example), we can use RabbitMQ. | ||
5 | |||
6 | Requirements | ||
7 | ------------ | ||
8 | |||
9 | You need to have RabbitMQ installed on your server. | ||
10 | |||
11 | Installation | ||
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 | |||
21 | Configuration 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 | |||
29 | Stop RabbitMQ | ||
30 | ~~~~~~~~~~~~~ | ||
31 | |||
32 | .. code:: bash | ||
33 | |||
34 | rabbitmqctl stop | ||
35 | |||
36 | |||
37 | Configure RabbitMQ in wallabag | ||
38 | ------------------------------ | ||
39 | |||
40 | Edit 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 | |||
49 | Enable RabbitMQ in wallabag | ||
50 | --------------------------- | ||
51 | |||
52 | In internal settings, in the **Import** section, enable RabbitMQ (with the value 1). | ||
53 | |||
54 | Launch RabbitMQ consumer | ||
55 | ------------------------ | ||
56 | |||
57 | Depending 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 @@ | |||
1 | Install Redis for asynchronous tasks | ||
2 | ==================================== | ||
3 | |||
4 | In order to launch asynchronous tasks (useful for huge imports for example), we can use Redis. | ||
5 | |||
6 | Requirements | ||
7 | ------------ | ||
8 | |||
9 | You need to have Redis installed on your server. | ||
10 | |||
11 | Installation | ||
12 | ~~~~~~~~~~~~ | ||
13 | |||
14 | .. code:: bash | ||
15 | |||
16 | apt-get install redis-server | ||
17 | |||
18 | Launch | ||
19 | ~~~~~~ | ||
20 | |||
21 | The server might be already running after installing, if not you can launch it using: | ||
22 | |||
23 | .. code:: bash | ||
24 | |||
25 | redis-server | ||
26 | |||
27 | |||
28 | Configure Redis in wallabag | ||
29 | --------------------------- | ||
30 | |||
31 | Edit 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 | |||
38 | Enable Redis in wallabag | ||
39 | ------------------------ | ||
40 | |||
41 | In internal settings, in the **Import** section, enable Redis (with the value 1). | ||
42 | |||
43 | Launch Redis consumer | ||
44 | --------------------- | ||
45 | |||
46 | Depending 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 | |||
71 | If 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 | ||