You will issue the following commands:
pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get install mono-complete
The first command makes sure all the local package index are up to date with the changes made in repositories. Second command installs the complete Mono tooling and runtime.
This command downloads the trusted root certificates from the Mozilla LXR web site into the Mono certificate store. Once complete, the Raspberry PI will be capable of making web requests using HTTPS requests within Mono.
pi@raspberrypi ~ $ mozroots --import --ask-remove --machine
You will create a Node.js application inside of Azure Mobile Services
Once you click API, you should see:
Notice the app settings are being read on lines 12 to 14.
It seems strange to me to go to the trouble of installing Mono on the Rasberry Pi so you can use .NET on it, and then use Node.js on Azure on the backend. Seems like the purpose of using Mono on the client is so that you can have an end to end solution that only uses .NET.
Seems to me for a microsoft blog weird to get updating on a linux device wrong. Surely apt-get upgrade would be actually making sure the Pi is up to date. apt-get update just refreshes repo lists?
You would think that updating would be the one thing microsoft users would get right by now....
Ryan W - he has the commands correct. He is refreshing the repo lists and then installing mono. He's not upgrading the device to the latest versions so there is no need for apt-get upgrade.
I don't see a way to respond directly to these questions:
I was thinking C# for everything.
Maybe I'm misunderstanding things. In reference to this statement:
"You will create a Node.js application inside of Azure Mobile Services"
Now that I've tried my best to clarify my first post, do you still have the same questions?
You could base your "mobile service" in a variety of languages and cloud-based options, such as Azure Web Sites, Virtual Machine of your choice (Linux, Windows). You could use WCF or RESTful services running ASP.NET Web API in Azure Web Roles or on a VM. You've got Python, Java, PHP, WordPress, Drupal. Yes, I chose Mobile Services because I like the way it supports Node.js programs. I could have hosted Node.js in many more places than just Mobile Servcies. To me it makes no sense to look at Azure Mobile Services alone, as an end in itself - it is merely one of serveral service abstractions that have been engineered to help developers program in their favorite languages, operating systems, and tooling. I don't think this "strange" at all :-)
So if C# is what you want, then I'd take a look at the ASP.NET Web Api. There are some great libraries that can help you get a shared access signature, upload blobs and everything I showed you.
From what I can tell, "Mobile Services" is a specific product of Microsoft Azure. I was not using it in a generic fashion. There are 2 backend selections currently:
To me, it seems that any solution that only uses one language is better than a solution that uses multiple languages. Needing to manage code in 2 languages is not twice as hard as one language, but it is more difficult.
Does Node.js on the Raspberry Pi not have the needed features for your application?
IMHO, using 2 languages COULD be half as difficult as using one. The extreme example is building device drivers in C versus a thick client app in Java or C#. Building a thick client in C is a lot more work. The libraries and abstractions in C# make thick client development far easier.
In the context of Node.js, I think the packages found here, https://www.npmjs.org/, could potentially make your server code much easier for specific use case scenarios, as compared to other languages. You could end up with a much smaller code base because the libraries may solve your particular problem really well. Less code in a 2nd language is better than lots of code in the same language.
Language choice often ends in a religious war about which language is better. My response is, "to each their own - choose what you are most productive with." As for me, I'm always open to using a second or third language if it results in smaller, more robust code in a shorter amount of time.
I'm getting this while trying to install the root certificates:
Importing certificates into machine store...
Error: System.UnauthorizedAccessException: Access to the path "/usr/share/.mono" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at Mono.Security.X509.X509Store.CheckStore (System.String path, Boolean throwException) [0x00000] in <filename unknown>:0
Thanks Bruno! That was exactly what I needed! I'm a noob to Linux, so I appreciate the help!