DeployR and R.net

Hi Experts,

I would like to create a web service to execute myscritps.r ( r scripts) But I need to know a better way:

option one: to use DeployR
option two: to create a web service which will use R.net

Please advise!

Thanks,

Tom

Hi Tom,

Thanks for getting in touch! Let me congratulate you for being the first user to ever ask about R scripts deployment. The bad part about this is that we do not have experience deploying such scripts. But i’m sure we can work something out. Correct me if i’m wrong on these two assumptions

Option one: It involves putting a set of R scripts somewhere and execute them using DeployR

Option two: It involves creating a web service that uses the R.net library to do something similar that DeployR would do

If any of those assumptions are correct, then Octopus could help you with your deployment on both cases:

For option one

  1. Pack your R Scripts into a Nuget package.
  2. Deploy them using Octopus.
  3. Have Octopus invoke DeployR.

For Option 2

  1. Pack your R scripts and your service into separate NuGet pacakges.
  2. Deploy them using Octopus.
  3. Call the service or wait for it to execute the scripts.

If my assumptions are not correct, let me know by describing your current deployment process a bit more, so we can see how can we orchestrate it using Octopus.

Regards,

Dalmiro

Hi Dalmiro,

Sorry, i am a web developer. really new on this DeployR. About option one, what i am trying to do is to uploads myscript.r to the DeployR repository via the Repository Manager. It will automatically turn that script into an analytics web service as your web as your deployr_white_paper.pdf mentioned. myscript.r is created by our R programmer. I do not need to know any R. Instead, My role focuses solely on integrating the output of the R programmer’s work (analytics web services) into our applications.

About second option, it is nothing to do with DeployR at all. Instead of using DeployR to create a web service, I can R.NET to create a web service.

Again, thanks for helping on my question. Please advise and which will be a benefit to use DeployR than R.NET.

Best regards,

Tom

Hi Tom,

Both approaches seem doable from Octopus from what i can understand based on my ignorance about R scripts deployments. Octopus bases its deployment strategy on 3 basic steps

  1. Pack whatever you need to deploy on a NuGet package and upload it to a NuGet feed. This step is done outside of Octopus, very often during the build process on a build server.
  2. Use Octopus to extract the contents of the package on a directory
  3. Use Octopus to do whatever is necessary to install/start/activate/etc this content. It might be running a console, starting a service, running a powershell script, etc.

For Option 1, do you have a way to upload myscript.r via the Repository Manager by using command line arguments or a Powershell script? If that is the case, you could

  1. Pack your script into a NuGet package and upload it to a feed
  2. Use Octopus to extract myscript.r into a directory
  3. Run a command to upload the script to wherever you need it.

Let me know if this makes sense to you

Dalmiro