Configure pyamicfg for host-ip pairings » History » Revision 2
Revision 1 (Anchi Cheng, 11/15/2019 11:18 AM) → Revision 2/3 (Anchi Cheng, 11/15/2019 11:26 AM)
h1. configure pyamicfg for host-ip pairings 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. h2. [[add_host|create [[ add host | create the require ip mappings ]] in/etc/hosts (or on Winodows: C:\\WINDOWS\system32\drivers\etc\hosts) h2. Create specific host-ip pairing in pyami.cfg # 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 ]] # find out the name and ip addresses of the hosts that this computer needs to connect to. # rename the copy as *pyami.cfg* # edit pyami.cfg according to the mappings <pre> [my ip map] my-k3-computer: 192.168.0.1 [other ip map] my-microscop-computer: 192.168.0.2 my-leginon-computer: 192.168.0.3 my-database-server: 192.168.0.4 </pre> h2. Testing If you have done either python setup.py installation or PYTHONPATH mapping to the myami directories, you should be able to test. h3. On Windows, double click your_myami_clone\pyami\mysocket.py h3. On Linux, type in terminal <pre> cd your_myami_clone/pyami python mysocket.py </pre> If the host ip mapping are correct, you should get [OK] in the tests. <pre> my-k3-computer ip mapping [OK] my-microscope-computer ip mapping [OK] my-leginon-computer ip mapping [OK] my-database-server ip mapping [OK] </pre>