https://redmine.vrspace.org/https://redmine.vrspace.org/favicon.ico?15861924032022-09-11T15:33:45ZRedmineVRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4772022-09-11T15:33:45ZNate Lager
<ul></ul><p>First question... <br />The easiest way to pass in config (like.. vidu's location and password) would be on the command line.</p>
<p>I pass the config file on the command line so I can tell vrspace where to find the custom config if there is one, with</p>
<p>```<br /> --spring.config.location=/config/application.properties<br />```<br />Can I do the same thing for other items in the config file? For example, could I add:</p>
<p>```<br />--openvidu.publicurl=http://127.0.0.1:4080 --openvidu.secret=somekindapss<br />```</p>
<p>?</p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4782022-09-11T15:35:48ZNate Lager
<ul></ul><p>still learning the markup used by redmine.. I think you get the point that my ```'s were meant to be the command line args im attempting to add to java.</p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4792022-09-11T15:49:50ZNate Lager
<ul></ul><p>RTFM</p>
<p>I now see the answer to two of my questions in the wiki. Client browsers need access to vidu directly if im reading your diagram properly. and the command line looks like</p>
<p><code>-Dopenvidu.publicurl=YOUR_URL and -Dopenvidu.secret=YOUR_SECRET</code></p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4802022-09-12T10:23:29ZJosip Almasi
<ul></ul><p>Nate Lager wrote:</p>
<blockquote>
<p>still learning the markup used by redmine.. I think you get the point that my ```'s were meant to be the command line args im attempting to add to java.</p>
</blockquote>
<p>Right, try < pre > and < /pre > tags, like</p>
<pre>
whatever
</pre> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4812022-09-12T11:06:29ZJosip Almasi
<ul></ul><p>OK to answer your questions:</p>
<p>See image at <a class="external" href="https://redmine.vrspace.org/projects/vrspace-org/wiki#Software-Architecture">https://redmine.vrspace.org/projects/vrspace-org/wiki#Software-Architecture</a><br />So both browser and VRSpace server talk to OpenVidu.<br />VRSpace server handles chatroom creation and destruction on demand, when first user enters/last user exits a space.<br />For each user, a token is requested from OpenVidu, and passed to the client. The browser then uses the token to connect to chatroom for the world.</p>
<p>Then, see <a class="external" href="https://redmine.vrspace.org/projects/vrspace-devops/wiki">https://redmine.vrspace.org/projects/vrspace-devops/wiki</a> - VRSpace DevOps project is not public, but you should have access.<br />Note plenty of ProxyPass/ProxyPassReverse pairs.</p>
<p>In vrspace-ssl.ssl, this is about static content, as we have 1G+ of it, and it grows with every model you get from sketchfab. So everything that's not static, needs to be explicitly ProxyPass-ed. We can't simply ProxyPass everything, as it would cause embedded tomcat to server static content. That in turn error instead of 3D canvas when vrspace server is down.</p>
<p>Then we have much the same in vidu-ssl.conf, but with a bit different purpose, in a word - hack :) It just wouldn't work without it, though I don't recall exact symptoms. Initially I attempted to run OpenVidu on the same web server, but ultimately failed. It's just not made for this, requires it's own FQDN. So I ended buying a wildcard cert. These ProxyPasses are are artifacts of my previous attempts, proxying everything might just work for you.</p>
<p>Also note special handling of websocket proxying.</p>
<p>Now that I mention certs, this is major hustle with both. I'd love to have functional Let's Encrypt setup, with auto-renewal and everything.</p>
<p>State of the system is persisted into the database. DB contains worlds, users, bots, content... everything. It's populated by VRSpace server, on demand. And is queried all the time, like select * from world where coordinates < my_coordinates+radius. Specifically, these are stored: <a class="external" href="https://www.vrspace.org/docs/javadoc/org/vrspace/server/obj/package-summary.html">https://www.vrspace.org/docs/javadoc/org/vrspace/server/obj/package-summary.html</a><br />This embedded database is exactly the same Neo4J that you get if you download stand-alone server, listens on the same port and everything, except it doesn't come with fancy UI that comes with Neo4j distro. Meaning, you can't really manage it as it is. But you can connect fancy UI that you've downloaded with Neo4j distro to it.<br />So I think it's simply out of scope, keep it simple.</p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4822022-09-12T12:36:45ZNate Lager
<ul></ul><p>Josip Almasi wrote:</p>
<blockquote>
<p>OK to answer your questions:</p>
<p>See image at <a class="external" href="https://redmine.vrspace.org/projects/vrspace-org/wiki#Software-Architecture">https://redmine.vrspace.org/projects/vrspace-org/wiki#Software-Architecture</a><br />So both browser and VRSpace server talk to OpenVidu.<br />VRSpace server handles chatroom creation and destruction on demand, when first user enters/last user exits a space.<br />For each user, a token is requested from OpenVidu, and passed to the client. The browser then uses the token to connect to chatroom for the world.</p>
<p>Then, see <a class="external" href="https://redmine.vrspace.org/projects/vrspace-devops/wiki">https://redmine.vrspace.org/projects/vrspace-devops/wiki</a> - VRSpace DevOps project is not public, but you should have access.<br />Note plenty of ProxyPass/ProxyPassReverse pairs.</p>
<p>In vrspace-ssl.ssl, this is about static content, as we have 1G+ of it, and it grows with every model you get from sketchfab. So everything that's not static, needs to be explicitly ProxyPass-ed. We can't simply ProxyPass everything, as it would cause embedded tomcat to server static content. That in turn error instead of 3D canvas when vrspace server is down.</p>
<p>Then we have much the same in vidu-ssl.conf, but with a bit different purpose, in a word - hack :) It just wouldn't work without it, though I don't recall exact symptoms. Initially I attempted to run OpenVidu on the same web server, but ultimately failed. It's just not made for this, requires it's own FQDN. So I ended buying a wildcard cert. These ProxyPasses are are artifacts of my previous attempts, proxying everything might just work for you.</p>
<p>Also note special handling of websocket proxying.</p>
<p>Now that I mention certs, this is major hustle with both. I'd love to have functional Let's Encrypt setup, with auto-renewal and everything.</p>
<p>State of the system is persisted into the database. DB contains worlds, users, bots, content... everything. It's populated by VRSpace server, on demand. And is queried all the time, like select * from world where coordinates < my_coordinates+radius. Specifically, these are stored: <a class="external" href="https://www.vrspace.org/docs/javadoc/org/vrspace/server/obj/package-summary.html">https://www.vrspace.org/docs/javadoc/org/vrspace/server/obj/package-summary.html</a><br />This embedded database is exactly the same Neo4J that you get if you download stand-alone server, listens on the same port and everything, except it doesn't come with fancy UI that comes with Neo4j distro. Meaning, you can't really manage it as it is. But you can connect fancy UI that you've downloaded with Neo4j distro to it.<br />So I think it's simply out of scope, keep it simple.</p>
</blockquote>
<p>Thanks for all the info. Should this issue be under the vrspace-devops project then?</p>
<p>Once I have everything worked out, I want to make each piece of the vrspace deployment as automate-able as possible.</p>
<p>My usual deployment of any web based app is to not bother with ssl at the container level, and instead handle that at the proxy. Do you see any reason that wont work out here?</p>
<p>vidu appears to make its own internal self signed tls cert. So that container will have tls at its disposal, but vrspace does not, correct?</p>
<p>Letsencrypt is a great solution. Openvidu's docs suggest that it can use letsencrypt simply by enabling it and making sure the proper ports are open to the world. If we could do the same in vrspace, that would make it much simpler to keep the tls connections up from the user all the way to the service, encrypting the back-channel traffic as much as the public.</p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4832022-09-12T13:31:49ZJosip Almasi
<ul></ul><p>Nate Lager wrote:</p>
<blockquote>
<p>Thanks for all the info. Should this issue be under the vrspace-devops project then?</p>
</blockquote>
<p>No. DevOps is not public because it exposes configuration of a live server. Like, production :) The configuration wasn't peer reviewed so I'm not exactly sure it's safe. (what do you think?)<br />But since you intend to publish everything, it should be open.</p>
<blockquote>
<p>Once I have everything worked out, I want to make each piece of the vrspace deployment as automate-able as possible.</p>
<p>My usual deployment of any web based app is to not bother with ssl at the container level, and instead handle that at the proxy. Do you see any reason that wont work out here?</p>
</blockquote>
<p>No, but my knowledge of containers is poor. You'll need some way to access the server log, at least. That shouldn't require ssh.</p>
<blockquote>
<p>vidu appears to make its own internal self signed tls cert. So that container will have tls at its disposal, but vrspace does not, correct?</p>
</blockquote>
<p>Yeah but vidu self-signed cert is not exactly a feature. Users get mysterious errors visible only in javascript console, until they open vidu link manually and accept the cert there.<br />You can also enable self-signed cert in vrspace server, just set server.ssl.enabled=true.<br />I've opted to terminate ssl on the proxy.</p>
<blockquote>
<p>Letsencrypt is a great solution. Openvidu's docs suggest that it can use letsencrypt simply by enabling it and making sure the proper ports are open to the world. If we could do the same in vrspace, that would make it much simpler to keep the tls connections up from the user all the way to the service, encrypting the back-channel traffic as much as the public.</p>
</blockquote>
<p>Right.</p>
<p>Now, did you see that OpenVidu isn't just a program, it's bundle of bunch of servers behind nginx? OpenVidu is essentially chatroom manager for kurento, there's stun servers and whatnot in there. By setting up another reverse proxy in front of it all, like I did, you end up with too complex topology.<br />So I think one container with proxy+vrspace and another one with openvidu as it is may be the optimal solution. But that requires two FQDNs and valid certificates for both.</p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=4872022-09-20T09:00:29ZBenjamin LIPERE
<ul></ul><p>Hello Nate Lager.</p>
<p>I am doing something on Kubernetes, right now I have Infrastrucutre problems, but once fixed, it will only need OpenVidu.<br />Euh ....</p>
<p>Where do I restart ??<br />++</p> VRSpace.org - Feature #156: Easily Deployable Containerhttps://redmine.vrspace.org/issues/156?journal_id=5712024-02-12T14:17:19ZJosip Almasi
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>done long time ago</p>