Running an ICS connected engine with xboard on EC2

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Running an ICS connected engine with xboard on EC2

Postby jdart » 05 Jul 2012, 02:51

I have sometimes run my engine on an Amazon EC2 server, connected to a chess server. I'm using it on Linux.

The simplest way to do this is to use X11 forwarding. That will allow you to start xboard on a remote machine, display the user interface on your local machine, and run it as though it were local. But there are a couple of disadvantages. First, the UI startup time is large and it is not very responsive run in this way. Second, if you drop your connection to the remote box, the connection to ICS drops, too.

If you want to just fix the connection dropping problem, you can apparently use Xpra (http://xpra.org/) or Xvnc (http://www.hep.phy.cam.ac.uk/vnc_docs/xvnc.html), which will let you detach from the UI and then resume connection to it later if you want. But that still leaves the performance problem. (Iam told NX (http://www.nomachine.com/download.php) can make this better and support disconnected operation but haven't tried it).

My objective is actually simpler: just be able to start xboard on the remote system, leave it running (immune to disconnection from the session that started it), and be able to control the engine from another account using the ZIPPYPASSWORD feature. I don't need the UI from the original session at all. (I understand icsDrone can do this too, but it is specific to freechess.org and similar servers, and I know xboard is reliable and works with multiple servers, so I'd prefer to use that).

This can be done by running xboard in xvfb, a kind of dummy X server that just accepts display requests but doesn't actually display on a physical screen.

Most Amazon instance types have very minimal compute cycles. To make this work on the higher-end Amazon instances (Cluster Compute Instances), you need to install an X11 environment, because by default they are set up as servers and don't have X11.

The following steps will do this:

Launch instance creation wizard
select Ubuntu 12.04 cluster server type
set availability region (example: us-east-1b)
select a key pair you have previous constructed
select a security group (this should enable connection to port 22)

Now you can ssh to the remote instance, with a command like this:

ssh -i amazoneast2.pem ubuntu@ec2-184-73-29-249.compute-1.amazonaws.com

Now edit /etc/apt/sources.list (using sudo).

Add the following line to the file, then save and exit.

deb http://us.archive.ubuntu.com/ubuntu/ precise main

Then run these commands to install a desktop environment:

Code: Select all
sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get install texinfo
sudo apt-get install xorg-dev
sudo apt-get install xvfb
sudo apt-get install x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps


Now download an xboard release and extract it. I used xboard-4.5.3a, which I happened to have around.

Cd to the source directory and type

./configure --enable-zippy --disable sigint

and then type "make" to build xboard.

Now finally you are ready to run.

Next step is to start Xvnc like this:

nohup Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &

and then run xboard as follows:

export DISPLAY=:1
export ZIPPYPASSSWORD=xxx
nohup x-terminal-emulator -e "./xboard -ics -icshost $host \
-zp -keepAlive 3 -debugMode true -zippyMaxGames 4 -ponder \
-xquiet -fcp \"/files/arasan-14.3.0/export/arasanx-64 -H 2G -c 4 -ics -t\" \
-icslogon logon.ini -xexit -autoflag" 2>&1 >xboard-log &

xboard has to be run under x-terminal-emulator, otherwise it will complain about having no keyboard input.

Replace the arasanx-64 line with your chess engine path. "logon.ini" should contain your chess server login and password, on separate lines. You can now disconnect your ssh session and xboard will just keep running. You can use the ZIPPYPASSWORD to control the engine from another account.

--Jon
User avatar
jdart
 
Posts: 105
Joined: 26 Sep 2004, 21:11
Location: San Jose, CA

Re: Running an ICS connected engine with xboard on EC2

Postby H.G.Muller » 05 Jul 2012, 06:24

I have considered making a 'NoBoard' port of XBoard that would remove all GUI features and other X11 code. This is not completely trivial, because XBoard also uses an X11 call to dispatch incoming I/O events (from the engine pipes, ICS socket or xterm).

There is very little incentive to do that, however, because ICSdrone already fills that niche.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Running an ICS connected engine with xboard on EC2

Postby jdart » 05 Jul 2012, 14:24

I'd still like to have a headless version, because icsDrone is for FICS and similar servers only, and it is not being maintained, as far as I can tell.
User avatar
jdart
 
Posts: 105
Joined: 26 Sep 2004, 21:11
Location: San Jose, CA

Re: Running an ICS connected engine with xboard on EC2

Postby H.G.Muller » 05 Jul 2012, 19:58

Well, I know hardly anything about ICSdrone, as I neither use FICS nor ICC. But isn't it open source? It could be (far) easier to adapt ICSdrone to ICC than cleanse all X11 code out of XBoard...
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Running an ICS connected engine with xboard on EC2

Postby Miguel A. Ballicora » 06 Jul 2012, 05:08

H.G.Muller wrote:Well, I know hardly anything about ICSdrone, as I neither use FICS nor ICC. But isn't it open source? It could be (far) easier to adapt ICSdrone to ICC than cleanse all X11 code out of XBoard...


I am pretty sure that the last version was already ported to use ICC by Marcel van Kervinck.

Miguel
User avatar
Miguel A. Ballicora
 
Posts: 160
Joined: 03 Aug 2005, 02:24
Location: Chicago, IL, USA

Re: Running an ICS connected engine with xboard on EC2

Postby jdart » 08 Jul 2012, 02:04

Miguel A. Ballicora wrote:
I am pretty sure that the last version was already ported to use ICC by Marcel van Kervinck.

Miguel


Yes, but Marcel's docs say he's not sure it works in tournament mode.

--Jon
User avatar
jdart
 
Posts: 105
Joined: 26 Sep 2004, 21:11
Location: San Jose, CA

Re: Running an ICS connected engine with xboard on EC2

Postby H.G.Muller » 08 Jul 2012, 07:23

Well, if that is the case, it should be easily fixed.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Running an ICS connected engine with xboard on EC2

Postby Michel » 14 Jul 2012, 19:35

I am weighing in a bit late in this discussion.

icsdrone works just fine on ICC (thanks to Marcel).

The latest version is in git. Run



to get it.

Here is the command I use for GnuCheese at FICS

./icsdrone -icsPort 23 -owner IOEO -program "polyglot -noini -log true -ec ./gnuchess -uci UseGaviotaTableBases=true" -loginScript GnuCheese.script -timeseal ./timeseal.Linux -book performance.bin -shortLogFile /home/vdbergh/public_html/GnuCheese.txt -daemonize on -proxyPort 5001 -proxy on -proxyLogin off


I control icsdrone through its proxy feature (options: -proxyPort 5001 -proxy on). Icsdrone can optionally proxy the ICS it is connected to. You can then connect xboard to this proxy. This is just like xboard with zippy except that icsdrone keeps running after you disconnect xboard.

I run icsdrone on a remote server, but for security I make it listen on localhost only. I then forward this port using ssh port forwarding.

ssh -fN -L 5000:localhost:5001 <remote server>
xboard -ics -icshost localhost


The ssh command forwards the remote port 5001 to the port 5000 on localhost.

Here is the man page of icsdrone

http://hardy.uhasselt.be/Toga/icsdronen ... ERVIEW.txt
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 18 guests