[Ur] "Bare-bones" deployment *without* the compiler - eg, manually copy just the /usr/local/libliburweb_* files to the *remote* machine?

Stefan Scott Alexander stefanscottalexx at gmail.com
Mon Aug 17 20:26:04 EDT 2015


Hi -

TL;DR: Is it possible to do a minimal or "bare-bones" deployment *without*
building & installing the Ur/Web compiler on the *remote* machine - eg,
simply by manually copying the /usr/local/libliburweb_* files (plus
/usr/local/lib/urweb/js/urweb.js) to the remote machine - while of course
also taking care to preserve the same owners/groups, permissions and
symlinks?

---

I would like to deploy a compiled Ur/Web executable to a remote machine
(running Debian 8 Jessie), *without* building & installing the Ur/Web
compiler on that remote machine, for two reasons:

- Ur/Web executables have low RAM usage, so I'd like the smallest/cheapest
VPS possible during testing;

- compiling on a local machine with more RAM would provide better
efficiency and privacy.

Both the local and the remote machines have an identical "base" setup:

- Debian 8 Jessie;

- Postgres 9.4 (with a Linux/Postgres user scott, with the same
local/remote Postgres password)

The local and remote machines differ as follows:

- the local machine has 4 GB RAM, and runs the Ur/Web compiler;

- the remote machine has only 1 GB RAM, and should not run the Ur/Web
compiler.

Now when I try to run the Ur/Web executable on the remote machine:

$ ./myProgram.exe

it gives the error:

./myProgram.exe: error while loading shared libraries: liburweb_http.so.0:
cannot open shared object file: No such file or directory

---

Inspecting /usr/local/lib on the local machine, I see the `liburweb_*`
shared libraries listed at the end of this message, plus
/usr/local/lib/urweb/js/urweb.js.
[See Note 1]

Maybe only those files are needed for deployment? Of course, it would also
be important to take into consideration the owners/groups, permissions and
symlinks.

If someone could confirm that I could deploy remotely simply by *manually*
reconstructing this same /usr/local/lib directory structure on the remote
machine - including /usr/local/lib/urweb/js/urweb.js (while maintaining the
symlinks, owners/groups and permissions), then I'd actually go ahead and
try it this way - since I prefer to develop and compile locally and only
deploy remotely.

Thanks for any help!

---

[Note 1] libs currently on local machine

scott at debian-local:~$ ls -al /usr/local/lib

total 1140
-rw-r--r--  1 root staff 465652 liburweb.a
-rw-r--r--  1 root staff  30242 liburweb_cgi.a
-rwxr-xr-x  1 root staff   1035 liburweb_cgi.la
lrwxrwxrwx  1 root staff     21 liburweb_cgi.so -> liburweb_cgi.so.0.0.0
lrwxrwxrwx  1 root staff     21 liburweb_cgi.so.0 -> liburweb_cgi.so.0.0.0
-rwxr-xr-x  1 root staff  23248 liburweb_cgi.so.0.0.0
-rw-r--r--  1 root staff  78490 liburweb_fastcgi.a
-rwxr-xr-x  1 root staff   1063 liburweb_fastcgi.la
lrwxrwxrwx  1 root staff     25 liburweb_fastcgi.so ->
liburweb_fastcgi.so.0.0.0
lrwxrwxrwx  1 root staff     25 liburweb_fastcgi.so.0 ->
liburweb_fastcgi.so.0.0.0
-rwxr-xr-x  1 root staff  48456 liburweb_fastcgi.so.0.0.0
-rw-r--r--  1 root staff  72456 liburweb_http.a
-rwxr-xr-x  1 root staff   1042 liburweb_http.la
lrwxrwxrwx  1 root staff     22 liburweb_http.so -> liburweb_http.so.0.0.0
lrwxrwxrwx  1 root staff     22 liburweb_http.so.0 -> liburweb_http.so.0.0.0
-rwxr-xr-x  1 root staff  45128 liburweb_http.so.0.0.0
-rwxr-xr-x  1 root staff    980 liburweb.la
lrwxrwxrwx  1 root staff     17 liburweb.so -> liburweb.so.0.0.0
lrwxrwxrwx  1 root staff     17 liburweb.so.0 -> liburweb.so.0.0.0
-rwxr-xr-x  1 root staff 311000 liburweb.so.0.0.0
-rw-r--r--  1 root staff  16690 liburweb_static.a
-rwxr-xr-x  1 root staff   1056 liburweb_static.la
lrwxrwxrwx  1 root staff     24 liburweb_static.so ->
liburweb_static.so.0.0.0
lrwxrwxrwx  1 root staff     24 liburweb_static.so.0 ->
liburweb_static.so.0.0.0
-rwxr-xr-x  1 root staff  16080 liburweb_static.so.0.0.0
drwxrwsr-x  4 root staff   4096 python2.7
drwxrwsr-x  3 root staff   4096 python3.4
drwxr-sr-x  7 root staff   4096 urweb

---

[Note 2] libs currently on remote machine

scott at debian-remote:~$ ls -l /usr/local/lib

total 8
drwxrwsr-x 4 root staff 4096 python2.7
drwxrwsr-x 3 root staff 4096 python3.4

###
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20150817/b6739240/attachment.html>


More information about the Ur mailing list