Deployment of block chain in cloud - azure

I have create cordapp in azure VM. now i want to deploy that cordapp into Azure cloud server so that client from anywhere can hit cordapp. but i confused whether i have to use webapps or inbuilt Blockchain module in marketplace. if so, how to do deploy?

You can deploy a node to a cloud server by following the instructions here: https://docs.corda.net/deploying-a-node.html.
You can then interact with your node remotely, using either:
An RPC client (e.g. https://github.com/corda/cordapp-template-java/blob/release-V3/clients/src/main/java/com/template/Client.java)
A server (e.g. https://github.com/corda/cordapp-template-java/tree/release-V3/clients/src/main/java/com/template/webserver)
The node shell over SSH (Corda V3 onwards - see https://docs.corda.net/head/shell.html#the-shell-via-ssh)

Related

NodeJs + Puppeteer on Azure App Services fails to run

I've wrote a simple NodeJs (ExpressJs) server that uses Puppeteer to generate PDF files on JSON data being passed to it. While locally everything is working like charm, I'm struggling to run this server on Azure App Services.
I've created a Resource group, within it I've created an App Servces instance (running on Linux) that is connected to my repo at Azure DevOps (via the Deployment Center).
My server has two endpoints:
/ - returns a JSON - { status: "ok" }. I'm using this to validate the running server instance.
/generate-pdf - uses the Puppeteer to generate and return a PDF file.
After successfully starting the App Service instance I'm able to access the "/" route and get a valid response but upon accessing the "/generate-pdf" route the result is "502 - Bad Gateway".
Does my instance require some additional configuration that I haven't done?
Does App Services can not run Puppeteer? Perhaps there is a different service on Azure that I need to use?
Is there a way to automate the process via the Azure DevOps pipeline or release?
Any questions/thoughts/FAQs are more than welcomed. Thanks =)
I'm answering my own question: as was mentioned here https://stackoverflow.com... the Azure App Services does not allow the use of GDI (which is required by Chrome) regardless if you're using Linux or Windows based system. The solution was to put the NodeJs application into a Docker container and manually install Chrome. Once you have a container - just upload it to the Azure App Services and viola!
By default App Servies exposes 80 and 443 ports, so if your application listens on a different port be sure to specify it via the WEBSITES_PORT environment variable.
In my case, I had to upload the Docker image to the Docker hub but you can also set up a pipeline to automate the process.
I've built the Docker image on my M1 Pro and it led to some arch issues when the container was uploaded to Azure. Be sure to add the --platform linux/amd64 in the image-building step if you're building for Linux.

How to deploy realm object server to cloud foundry

https://realm.io/docs/get-started/installation/developer-edition/
Seems like realm object server is base on nodejs, however I could not make it working.
By far, I could deploy it to cloud foundry successfully, but it just don't work.
Realm studio just hangs there.
apps to cloud foundry are deployed with the cf push command and they will run inside Linux Container. The contents of the linux container will put together by a buildpacks. Since realm is a NodeApp you should look at the NodJS buildpack documentation https://docs.cloudfoundry.org/buildpacks/node/node-tips.html
Apps running on Cloud Foundry container have an ephemeral disk therefore if your realm application needs a persistent disk you should not run it on a container in Cloud Foundry. Unless you have a Service Broker that can mount NFS volumes into the container.

Deploying NodeJs to Service Fabric Cluster

Has Anyone had any experience to deploy a RESTFul nodejs service to service fabric?
What tools are possible, Jenkins or even code ship
Found a knowledge base article from Microsoft here, looks like you just package it up and drop in into a folder location for Service fabric to consume
https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-deploy-multiple-apps
To deploy a RESTFul node.js service to service fabric you need to have a Node.js host - to actually run your JavaScript. There are three options for that:
Create custom executable and deploy it as Service Fabric guest. Example: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-deploy-multiple-apps
Use Dicker containers on Service Fabric: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-tutorial-package-containers
Use SupercondActor to host Node.js API natively inside Service Fabric stateless service. See GitHub repo: https://github.com/SupercondActor/platform-app-angular

How do I update the version of iisnode on a Windows Azure Cloud Service image

I had a working Windows Azure Web Site running my node.js app and everything was working fine. I ended up needing to run a native node.js module (fibers), which necessitated that I move to a Windows Azure Cloud Service. I used the Convert to Azure Cloud Service wizard, which created a web role that allowed me to deploy my app as a cloud service and run fibers under node. So far so good.
My app requires WebSockets, which are supported under Azure Web Sites (more or less automagically when you turn it on from the config UX). I've been fighting to get WebSockets working with the Cloud Service for a few days now, and I have determined that my problem is that the version of iisnode that runs by default in a Cloud Service is too old to support node.js WebSockets in the normal way. The Cloud Service installs iisnode version 1.21 and the WebSockets support in iisnode didn't show up until version 2.0 (I have no idea why the Cloud Service image uses that crusty old version of iisnode).
Note that I don't want to use a worker role and listen on a different port (which I gather is how a lot of people address this).
Unfortunately, I cannot figure out how to install a more up to date version of iisnode in my Cloud Service (I gather that it's possible to run an installer at the startup of the Cloud Service (possibly via setup_web.cmd), but that's as far as I've gotten.
Any pointers on what I need to do to get my Azure Cloud Service running a newer version of iisnode?
To update the version of iisnode installed on Azure Hosted Service you need to:
Download the newest x64 installer for iisnode from http://go.microsoft.com/?linkid=9784331
Include that *.msi file in the package you are deploying to the Hosted Service.
In your setup_web.cmd, install the new iisnode with msiexec /i iisnode-full-iis7-v0.2.7-x64.msi /passive. This must be run as admin, but then I believe setup_web.cmd already runs as admin.
Alternativelty, for a one-off installation, you can just TS to the machine and install it manually.
By the way, what is preventing you from using the native module in Windows Azure Web Sites?

migrating from EC2 to Azure

First of all, I have never used Amazon EC2 neither Windows Azure. But I have a task to move application from EC2 to Azure. App is a REST api written in node.js. Currently I know that there is one EC2 instance with ubuntu with runing app on it. App is deployed to server/instance using tool called Capper. App uses some database and redis. This api is used by mobile clients.
My question is what is the simplest way to move app from EC2 to Azure and what type of service to use on Azure for hosting such app?
You will need to either deploy a Linux-based VM in Azure's "Virtual Machines". Check this article out for assistance: http://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
Alternatively, you can deploy a node.js app on Windows Azure Websites, by adding a new "Web site" thru the management portal, and pick the node.js template from the gallery of predefined templates.
HTH

Resources