I am trying to setup a nodeJS app environment with mongoDB cluster all deployed in Google cloud. I have created a mongoDB cluster as given in Google Cloud documentation. But after this I could not find any documentation on how to get that working with nodeJS environment.
Is there any documentation or tutorial for end to end Google Cloud setup?
Try the "MEAN" stack from Bitnami from the Cloud Launcher: is a on-click-deploy solution for Mongo/Express/Angular/Node.
This is good to getting started, when you know how the stack works you can opt for docker images for Mongo and Node and deploy that on Kubernetes to get a fully-managed cluster env.
Related
I want to deploy my Node.js application to a Linux box with least possible manual command runs. I want to deploy it to Pivotal Cloud Foundry (PCF).
My application needs to connect to Oracle DB for which I am using node-oracledb and Oracle instant client.
However, I am confused how to automate downloading, unzipping and then setting up the PATH environment variable on the box for Oracle Instant Client in PCF.
Can someone suggest to me how this can be achieved?
I'm not familiar with how cloud integration works but I have been assigned a task to try and find out a documentation on IBM portal which would provide a way to perform some specific actions on virtual cloud servers (virtual machines) instances like create, start, stop, delete, restart, upgrade etc. So far I have had no success in finding out such documentation. Although all of this has been already finalized with api's on Node js with aws ec2, alibaba ecs, azure cloud, google cloud and oracle cloud. Only service we are struggling with is IBM. Before this was done with Terraform service in golang but now we are shifting to node js. Any help would be appreciated.
The available api docs are here: https://cloud.ibm.com/docs?tab=api-docs
javascript APIs are not available. The python, go and raw (curl) APIs for VPC are here: https://cloud.ibm.com/apidocs/vpc. The vpc will include creating "instance"s within a vpc.
Unfortunately javascript is not currently available. You can craft your own based on the curl or use the "ibmcloud is ACTION" command line. All of the command line have json output.
How can we authenticate to a mongodb database which is in azureVM ?
How can i write helm chart for that ?
What are the prerequisites for that ?
Anyone have any idea about this?
The easiest way how to do that and guide you should be a Microsoft tutorial about Node.js application development for Azure Kubernetes Service using Azure Dev Spaces:
https://learn.microsoft.com/en-gb/azure/dev-spaces/get-started-nodejs
There you will get:
1. How to enable Azure Dev Spaces on your AKS
2. How to develop the first Node.js app with sample code
3. How to generate helm chart for Node.js app
4. How to deploy and test it locally
Inside Node.js app you should use the most popular mongodb client which is: https://www.npmjs.com/package/mongodb
Regarding npm package documentation, there is also a lot of online tutorials on how to work with that package:
https://www.guru99.com/node-js-mongodb.html
I have a Nodejs script which will fetch data from bigquery and populate some of it in a database (running on Google Cloud Platform).
If the script is fetchdata.js, then running it on server from the command line would be node fetch.js
However, I am not sure how to accomplish this with the Google Cloud Platform.
It seems that I have to deploy this script as a separate service (using Google App engine/ Compute engine) and then call that service externally (using the browser) to execute that piece of code. Am I missing something here?
Earlier I thought this could be accomplished using Google Cloud Functions but even that does not seem to be the correct use case.
Yes, You would need a client to connect to you SQL (database) in order to insert the fetched data and for that you would need to use one of the services (Google Compute Engine or Google App Engine)
In App Engine you can run your NodeJS script and then connect the App Engine instance to Cloud SQL database ( if you are using Google Cloud SQL database )
In Compute Engine, you can run the script and connect the Compute Engine Virtual Machine to the database
I want to deploy cluster of nodejs with mongodb replication set on gcp with the help of kubernetes, till now I am able to deploy nodejs cluster on gcp with kubernetes and mongodb replication set separately with the help of this
pkdone/gke-mongodb.
Can anyone help me or provide me a link of any tutorial or documentation.
This example here on Kubernete's official Github account shows in details how to create your cluster on GCP with a NodeJS web service and a MongoDB instance.
https://github.com/kubernetes/examples/tree/master/staging/nodesjs-mongodb
This other post by #jaydestro was very helpful for me. It covers in details the whole process using MongoDB Atlas.
https://medium.com/google-cloud/modern-distributed-application-deployment-with-kubernetes-and-mongodb-atlas-4ec9eff5bab2