I've created a create-react-app locally and I'm using serverless framework for all my local db and apis.
I've just realised I have no idea how I'm going to publish the react app part of my application to AWS.
What is the best way to publish a react app in AWS? Or what are the common ways to do this?
no worries, AWS have a solution.
https://aws.amazon.com/elasticbeanstalk/
Just one tiny point. This service is free, but the resources deployed whit it are not, so be careful.
Your first job in AWS is to create Cloud Watch alarm when you reach price point. I have alerts when my mountly bill reach 10$, 20$ 100$.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html
Related
So I have 2 assignments for different job applications. I can deploy on Heroku by using the free Cluster in Mongodb Atlas, but how would they get the second application to work on their computer? I want it to be as easily done as possible for them, but it seems that they will need to download Node.js and MongoDB compass to their computer.
Any other suggestions?
have you considered using a PaaS?
If you build the app only for the purpose of the interview then it means the webapp should be "accessible/live" only for a few hours at max while it's being reviewed.
The major cloud providers have some free tiers which should help host your app for the interview for free.
(for DB MongoDB Atlas should be good enough)
There are many articles on that since the cloud is very popular nowadays.
Services like: Azure Web Apps, Azzure App Service, Google App Engine and so on should work.
I am trying to make a portfolio-building app on aws. I am using reactjs for the front end, lambda(nodejs) for the backend, and other various technologies like dynamodb and API Gateway. My question is, how do I get the react content served up every time someone goes to my domain name? Is it done through lambda? Do I need an ec2 instance? I am stuck on this and if someone can help me out I would really appreciate it. Thanks!
There are many approaches you could use to set this up, it depends on what type or architecture you are looking for. I prefer to use AWS lambda functions attached to the API gateway for backend How To Build Your First Serverless API with AWS Lambda and API Gateway, and for frontend host the react.js app in s3 through cloudfront. This setup means that your entire application is serverless and you will be hard pressed to make it out of the free tier on AWS. Here is a great blog article detailing how to set this up Deploying create-react-app to S3 and CloudFront
So where is your front end running?
It could be many locations:
EC2 instance
Elastic Beanstalk (either as a Node app, or as a Docker container)
ECS/EKS (with or without Fargate)
As a series of Lambdas (running behind an ALB)
Without knowing your application and experience of AWS services it's quite hard to advise exactly where you should host it. However, once you decide which one of these you are using you can points its target A record/CNAME at your domain name by editing the A record/CNAME in your hosting provider.
So I have a web application where the Frontend is written in React and the backend is written in NodeJs/NestJs, and are in the stages of deploying the application. I have a Linode server running Ubuntu, and my initial thoughts was to install Docker & Kubernetes (I will need a couple more servers) and then spin up containers for the front and backend, and a separate server hosting the database. Since the requirements are high uptime, scaleability and modularity.
So is this a good way to go about setting up the application? Are there any pros and cons with this setup except pricing because of the amount of servers needed? Or are there any other options available that could be more benefitial?
Thanks in advance.
It depends if you want to make DevOps job or not, and also about the budget you have.
If you really want to stay in control of your clusters, scalability of them and money is not a worry, then kubernetes is a good alternative.
Disclaimer: I don't know Linode and have no idea if there is some GCP compatible services.
For front-end, you said it was react: The hosting service of firebase, here's a tutorial.
And the good news is that you can alternatively use any cloud platform with a storage service like Google Storage, AWS S3 or Azure.
For back-end, I would suggest App Engine or functions, I'm having a great experience using App Engine and is a lot easier to configure than any pods, deployments, ingress and all steps to deploy a kubernetes cluster. I'm not really sure if you can use NestJs with Cloud Functions and all FaaS options.
Also, this suggestion will make you spend a lot less than a whole k8s infrastructure.
But, of course, it depends on your case.
I want to achieve something that Google Play store offers i.e. releasing app to a set of users and the rest of users will keep seeing the existing app.
Is there a way to achieve this with a web app deployed using Docker and GCP?
Someone shared an interesting article about Canary build.
Canary Deployments are where you roll out the new version of your service while keeping the older one alive. Some customers will be routed to the new version while others will be routed to your existing version.
https://stackify.com/canary-deployments/
Me and my team are working on a product deployed in Azure, all of our backend services will be deployed by using k8s service in Azure and it seems like the most pragmatic and right choice for us.
We also have ReactJS frontend for some of backend services. We deploy them by using Docker and k8s at this moment. We started thinking about scaling of our web apps and found that everything can be done by Azure Web Apps.
I would like to know what is best practice of web app deployment in Cloud(Azure in my case):
Should I use Azure Web App service for this purpose?
Or it is better to keep everything in my k8s cluster
Any link or a book as source of true might be even better :)
Update 1:
I also found out that web apps can be deployed by using Blob Storage and Azure functions to access the static content from the Blob Storage. What do you think?
Azure WebApp is a perfect option for your requirement check this link for more details and guide