Configure pyamicfg for host-ip pairings » History » Version 1
Anchi Cheng, 11/15/2019 11:18 AM
1 | 1 | Anchi Cheng | h1. configure pyamicfg for host-ip pairings |
---|---|---|---|
2 | |||
3 | Feature #4686 was created to handle the case that the computer host default its IP mapping to a card not the one to connect to leginon need. |
||
4 | |||
5 | h2. [[ add host | create the require ip mappings ]] in/etc/hosts (or on Winodows: C:\\WINDOWS\system32\drivers\etc\hosts) |
||
6 | |||
7 | h2. Create specific host-ip pairing in pyami.cfg |
||
8 | |||
9 | # The template is myami/pyami/pyami.cfg.template in your myami git clone. Copy the template file to your global myami configuration directory. You should know where that is thru [[locate global config directory on Windows | this instruction ]] |
||
10 | # find out the name and ip addresses of the hosts that this computer needs to connect to. |
||
11 | # rename the copy as *pyami.cfg* |
||
12 | # edit pyami.cfg according to the mappings |
||
13 | |||
14 | <pre> |
||
15 | [my ip map] |
||
16 | my-k3-computer: 192.168.0.1 |
||
17 | |||
18 | [other ip map] |
||
19 | my-microscop-computer: 192.168.0.2 |
||
20 | my-leginon-computer: 192.168.0.3 |
||
21 | my-database-server: 192.168.0.4 |
||
22 | </pre> |
||
23 | |||
24 | h2. Testing |
||
25 | |||
26 | If you have done either python setup.py installation or PYTHONPATH mapping to the myami directories, you should be able to test. |
||
27 | |||
28 | h3. On Windows, double click your_myami_clone\pyami\mysocket.py |
||
29 | |||
30 | h3. On Linux, type in terminal |
||
31 | |||
32 | <pre> |
||
33 | cd your_myami_clone/pyami |
||
34 | python mysocket.py |
||
35 | </pre> |
||
36 | |||
37 | If the host ip mapping are correct, you should get [OK] in the tests. |
||
38 | <pre> |
||
39 | my-k3-computer ip mapping [OK] |
||
40 | my-microscope-computer ip mapping [OK] |
||
41 | my-leginon-computer ip mapping [OK] |
||
42 | my-database-server ip mapping [OK] |
||
43 | </pre> |