How to deploy a node.js application on AWS whose source code is inside a custom gitlab repository ? - node.js

I have a node js application whose source code is residing in a gitlab repository. This gitlab server is maintained by my company. Hence anyone outside the company network has to access the gitlab repo through VPN only.
Now I want to deploy the node js app in an AWS EC2 instance (t2.micro possibly).
I have seen that if the source code is in github, we can install git in the AWS EC2 instance and pull the code directly. But with the code residing in a gitlab repo in my company network what can be done to deploy the app in AWS ?
And how shall updates for my server be handled ?

You can create a VPN connection to your VPC and your Company network so that the Instance in your network can access your company network directly.
Here is the AWS documentation for your reference VPN Connections

Related

Change a version of a code of a fastapi deployed in an instance ec2 aws

I have deployed an api (fastApi) in an instance EC2 AWS with cloning a repository github and nginx but i have changed the code of the api and i need to deployed my api with the modifications.
I have cloned again the repository but i still have the old code which is deployed.

Is it possible to mirror a Bitbucket repository hosted in a private domain in Google Cloud Source Repositories?

Would like to know if mirroring can be setup between a BitBucket server hosted in a company domain with Google Cloud Source repositories?
I assume you're talking about BitBucket Self-Hosted Server. Currently there's no way to mirror BitBucket Server from Cloud Source Repository (CSR) side, only the cloud Bitbucket.
However you can try to set up a manual mirrorring from BitBucket side. I've never tested this configuration, but here you will find instructions on how to do it with GitHub using remotes. You can try it using CSR instead. Here are the instructions on how to add CSR as remote.

How does one deploy multiple micro-services in Node on a single AWS EC2 instance?

We are pretty new to AWS and looking to deploy multiple services into one EC2 instance.
Each micro-service is developed in its own repository.
Each service will have its own endpoint URL
Services may talk to each other
Services can be updated/deployed separately
Do we need a beanstalk for each? I hope not.
Thank you in advance
So the way we tackled a similar issue at our workplace was to leverage the multi-container docker platform supported by Elastic Beanstalk in most AWS regions.
The way this works in brief is, we had dedicated repositories for each of our services in ECR (Elastic Container Registry) where the different "versioned" images were deployed using a deploy script.
Once that is configured and set up, all you would need is deploy a Dockerrun.aws.json file which basically highlights all the apps you would want to deploy as part of the docker cluster into 1 EC2 instance (make sure it is big enough to handle multiple applications). This is the file where one would also highlight link between applications (so they can talk to one another), port configurations, logging drivers and groups (yea we used AWS CloudWatch for logging) and many other fields. This JSON is very similar to one's docker-compose.yml which is used to bring up your stack for local development and testing.
I would suggest checking out the sample example configuration that Amazon provides for more information. Also, I found the docker documentation to be pretty helpful in this regard.
Hope this helps!!
It is not clear if you have a particular tool in mind. If you are using any tool for deployment of a single micro-service, multiple should be the same.
How does one deploy multiple micro-services in Node on a single AWS
EC2 instance?
Each micro-service is developed in its own repository.
Services can be updated/deployed separately
This should be the same as deployment of a single micro-service. As long as they have different path and port that they are running on, it should be fine.
Each service will have its own endpoint URL
You can use nginx as a reverse proxy which can redirect your request from port 80 to the required port of your micro service.
Services may talk to each other
This again should not be an issue. You can either call them directly with the port number or via fully qualified name and come back via nginx.

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.

How to serve my content with nodejs vm on google cloud

I created a nodejs virtual machine instance on google cloud (compute engine). I also created 3 mongodb instances on the compute engine. Now I pushed my local application to the google cloud repository. How do I link the app.js file to this server so it starts running the script and serving the files. I already changed the A record of my domain that I registered with godaddy so it's external ip is the same as that of the nodejs server I am running but all I am getting is this page.
Bitnami developer here.
You need to copy your files to the remote repository, create the configuration files and after that you have to include that configuration in the configuration of Apache to serve the application. It looks like you have done most of the work, but there may be an error in one of the steps. This guide will help you to configure your application in order to access it properly.
https://wiki.bitnami.com/Applications/Bitnami_Custom_Node.js_Application
I hope it helps.
Jota

Resources