Project

General

Profile

Using Redux to serve images on myamiweb » History » Version 15

Jim Pulokas, 10/05/2012 02:32 PM

1 1 Anchi Cheng
h1. Using Redux to serve images on myamiweb
2
3
h2. Installation
4
5
# Follow [[Web_Server_Installation]] but ignore warning on not using php 5.3
6
# Install redux prerequisites as found in its README file
7 4 Anchi Cheng
# Install myami-redux branch of myami on the webserver machine.  Redux needs write permission at its installation location to write fftw wisdom file.
8 2 Anchi Cheng
9 6 Neil Voss
<pre>
10
sudo easy_install fs
11
</pre>
12
13 2 Anchi Cheng
h2. Configurations:
14
15 3 Anchi Cheng
# Assign redux server in myamiweb
16 2 Anchi Cheng
<pre>
17
define('SERVER_HOST',"your_hostname")
18
</pre>
19
20 3 Anchi Cheng
# Using Redux cache
21
** At myamiweb/config.php
22 2 Anchi Cheng
<pre>
23
define('USE_REDUX_CACHE',true)
24
</pre>
25 3 Anchi Cheng
** Turn it on or off in redux/pipeline.py
26
** Input the desired disk_cache_path, disk_cache_size, and mem_cache_size in the next few lines
27
** Create the disk_cache_path before running redux if cache will be used
28 7 Neil Voss
<pre>
29 8 Neil Voss
mkdir /tmp/redux
30
chmod 777 /tmp/redux
31 7 Neil Voss
</pre>
32 2 Anchi Cheng
33
h2. Test Installation
34
35 15 Jim Pulokas
# Using Redux to do simple input output (simple client with no reduxd server needed):<pre>redux --filename=test.jpg --oformat=PNG > test.png</pre>Make sure the resulting test.png is in fact an image and not an error message.
36
# Run the server:  run the following on a command line:<pre>reduxd</pre>leave it running for the following...
37
# Test command line client connecting to the server<pre>redux --server_host=localhost --filename=test.jpg --oformat=PNG > test.png</pre>Note: The input file name is from the perspective of the reduxd server, so be sure to give it an absolute path (unlike the first test, which was not accessing the server)
38 2 Anchi Cheng
39 12 Gabriel Lander
h2. Using redux server with myamiweb
40 2 Anchi Cheng
41 15 Jim Pulokas
# start reduxd server if not already running from the above test:<pre>reduxd</pre>
42 14 Jim Pulokas
# click on "[test dataset]" on your main myamiweb home page, or go directly to the URL: myamiweb/viewerxml.php
43 15 Jim Pulokas
# test by accessing your own images from Leginon in myamiweb/imageviewer.php
44 10 Neil Voss
45 15 Jim Pulokas
h2. starting reduxd at boot
46 11 Neil Voss
47
<pre>
48
sudo cp -v myami/redux/init.d/reduxd /etc/init.d/
49
sudo service reduxd start
50
</pre>