Serve an opencpu app on an ipv4 address in a windows environment - r

The way opencpu "productionnise" an app is to get your own linux server then to install your package and then launch your app.
Before that, I am still in a dev environment, where I work on a windows machine.
I would like to run the app locally behind a firewall and send the ipv4 link of my machine to a collegue, to allow him to test my app, using my machine as a server.
Is there a way to serve my app on the Ipv4 address of my windows machine?
From what I understand, on a windows machine, the adviced architecture would be more to use a vm to emulate a linux server. But if there is a way to avoid it, it would be nice.

You can start a local OpenCPU server via opencpu::ocpu_start_server(), which uses port 5656 by default. If you then point your browser to http://<your-ip>:5656/ocpu, you will be greeted with the normal OpenCPU interface.

Related

Using Apigility on a remote server

I have successfully installed Apigility to a remote CentOS server. It tell me to go to http://localhost:8888 to access the admin panel. This server does not have a GUI installed so I don't have the ability to remote in to use a web browser. Is there a workaround to access the Apigility interface remotely, possibly restricting access to my IP address? If not do I have to install it on my local machine and then deploy my work to the remote server?
You could add a .htaccess
file
to set a password on it
If you're deploying to AWS you should be able to configure your SecurityGroup to only allow request to your installation if you're trying to access it.
if you want to develop your application right now I would recommend to have a local installation in a docker container or so to perform your changes. If you're going live you shouldn't change anything in the admin surface either.
centOS server using terminal if i am right. The best way to do this with centOs server in terminal is to open port 8888 to the public and access the server from another system serverIP:8888 (using tools like firewalld in the centOs server. U will have to install firewalld) https://www.rootusers.com/how-to-open-a-port-in-centos-7-with-firewalld/

How do I view the Meteor app running on the VM at localhost:3000?

Hi I'm trying to make my first meteor app. I just made an app and have run it. I've also upgraded to latest meteorite and meteor. I just created a new app and have run it.
App running at: http://localhost:3000/
But I cannot view this webpage on my host computer. I'm running meteor on an ubuntu vm.
It was working before I updated meteorite and meteor and installed the iron-router package to an app I'm working on.
check in the console you might have the error as template is not defined, Meteor is not defined etc...
I too was unable to connect to the Meteor App that was being developed on a centos VM.
The followuing worked:
Setup:
Windows 7/8.1 with Following tools installed:
Putty
VMW Workstation
Centos VM (Server or GUI based)
Chrome/Mozilla Browsers
Launch the VM from VMW Workstation
Console into the VM using Putty
Launch the Meteor App. Will show its listening at localhost?3000
Launch a new session of Putty.
Go To SSH-Tunnels - Source: 3000, Destination - Localhost:3000. Save this settings
Connect to the VM with these settings
Launch the browser and and navigate to localhost:3000
Worked for me, hope does for all
As you have determined, the message on the vm regarding localhost:3000 refers to the vm that is running meteor, and localhost on your computer refers to your computer.
The secure fix for this is to create an encrypted tunnel to connect localhost:3000 on your computer to localhost:3000 on the remote computer.
Start the meteor app on the VM so that you get the message about it being ready on localhost:3000
On the local computer open another terminal window and initiate a second connection to the VM with:
ssh -L 3000:localhost:3000 yourUSER#remoteHOST
This assumes you are running Linux. If you are on Windows, look at the options for your SSH client. It may have similar options to create tunnels.
Open a web browser on your local computer and go to http://localhost:3000
The ssh tunnelling software will sense the connection to localhost:3000 on your computer and will connect you to localhost:3000 on the remote, forwarding the data through an encrypted tunnel.
If this seems like a lot of trouble, there are paid developer platforms like http://nitrous.io that can run meteor and have a web based IDE that can simplify this sort of thing for you so you do not need to run the tunnel. Another way to simplify is to not use a remote VM, but install Meteor on the home computer and only copy the code to a VM when it is finished and ready for production.
If you don't want to run on localhost:3000 at all, but on the webserver on port 80, you might check to see if there is an environment variable that switches the code from development mode to production.

Can RStudio (IDE NOT server) be configured to use remote R setup?

I am transitioning my debian setup into one where all debian-repository external apps run in dedicated docker containers.
In this context rstudio, of which I am a heavy user, has me puzzled ... does anybody have insight into whether it's possible to run it as a client to remote R installation?
What is a very cool feature of RStudio is RStudio Server. You install RStudio Server on you Ubuntu server and log in to a specific port where RStudio Server is running. You then get your full RStudio interface in your web browser. This allows you to run all your R analyses from any computer that has a modern browser and an internet connection.
R then runs on the remote server, asking almost no resource from the computer you are connecting from.

How to deploy standalone ServiceStack website

I am working on a small website based on an example ServiceStack project. It is a standalone web app so that there is no need for IIS etc. Currently I start the server at http://localhost:8080 and opening the website in my local browsers seems to work fine.
My PC has a dedicated IP and I hope to test my server from another computer. I can successfully get a Python server running using python -m SimpleHTTPServer 8000, so network is working fine.
But the remote computer cannot access my ServiceStack server. I think there should be a simple setting somewhere to get it working. But I searched online, there is much information about IIS and ASP.Net. But my app is standalone and is independent of Asp.net. It is supposed to be running on Linux as well as on Windows. (Though I will only deploy on a Windows machine now.)
It will work fine on your local computer because the firewall doesn't block local traffic. If you want any other computer to access services running on your machine you will need to open the ports on the firewall.
This can be configured from the Windows Firewall in Control Panel

How to access a local asp.net server on OSX through parallels 7.

I'm running visual studio 2010 on Windows 7 through parallels on my mac. I want to be able to access its local host on osx for testing purposes. I really have no idea what steps that I'd have to take to do this, so any help at all would be appreciated.
Map the VM's IP to a domain in your /private/etc/hosts file in OSX (i.e. testsite.local) or just access via the VM's IP directly. Of course, for the same, map in your VM's host file as well (i.e. c:/Windows/system32/drivers/etc/hosts map 127.0.0.1 to testsite.local)
Map appropriately in IIS in VM.
Make sure applicable port/s are opened in your VM Windows firewall (standard port 80 and 443 usually enough).
Done.
I very rarely use the built-in VS Development Server, so can't say anything on that.
Troubleshooting:
Make sure it works in the VM first ;-)
Turn off your firewall temporarily to make sure it's not a firewall issue.
Make sure you've got your network settings set applicable. I haven't been working with a Mac for all that long, so haven't bothered testing with anything other than bridged.
The answer is NO:
https://serverfault.com/questions/82899/can-i-access-cassini-from-a-remote-machine
Cassini, the built in web server, only listens on Localhost.
The recommended way to do it is to setup IIS 7 on Windows 7 and attach the Visual Studio debugger to your application pool process.
If you can get a tool like Fiddler for Mac that supports reverse proxy abilites you could try:
http://abhishekdev.posterous.com/how-to-access-a-cassini-iis-for-web-projects
Or maybe setup a SSH proxy (VM as the server and ssh tunnely from Mac to VM)?
If you go to Terminal and type in the command "ifconfig" and look for the "vnic1" section which is the last section to be printed and it has an ip address called "inet" e.g. "10.37.129.2" this will take you directly to local host.
If it doesn't work you must ensure that your parallels is set to a shared network under the preferences network section.

Resources