Liferay AWS EC2 instance selection - amazon-ec2

I am just exploring AWS for hosting Liferay 6.2. What is the decent EC2 instance type I should select considering 2GB Heap space allocated to Liferay and 10 concurrent users.
I started to evaluate free micro tier and Liferay does not startup obviously because 1GB is not enough.
I don't want to go and create each instance type in increasing order of power and then terminate. So if somebody has already done something similar and could recommend a starting EC2 instance type will be helpful.

Related

Having Redis and Meilisearch on a EC2 instance

I am using an EC2 instance for my meilisearch and i am wondering if i could install redis on the same EC2 instance.
How do you manage to deploy a redis instance and a search instance, do you do as multiple instances or have only one instance ?
I am using an EC2 instance for my meilisearch and i am wondering if i
could install redis on the same EC2 instance.
There's nothing stopping you from installing all the software you want on a single EC2 instance. You would only need to make sure your server has enough CPU and RAM resources available to run both services.
How do you manage to deploy a redis instance and a search instance, do
you do as multiple instances or have only one instance ?
This part of your question is too broad. Are you trying to minimize costs? Maximize throughput? Is this for testing, or a live production environment? Will you need fault-tolerance and automatic disaster recovery?
There is no single "best" or "correct" answer to how you run these services, it all depends on your specific needs.

What is the best practice to manage EC2 instance up/down/hibernate scheduler?

We have 2 - 3 EC2 c5.9xlarge instances for research.
Besides the option to shut them down on a particular hour according to a scheduler please advise what is the best way to keep them up and running when I "touch" them by connecting/clicking them or any other wake up policy?
My goal is to save expenses and I am trying to find a best practice to manage these instances wisely.
Please advise from your professional experience.
You can utilize the EC2 Hibernation feature via which you can pause/resume your instances. This would give you the convenience of resuming your instances with all the processes running just like the way you had left the instance saving you a lot of time and effort in setting up the environment and reach your productive state faster.
Currently, EC2 Hibernation is available for Amazon Linux 2, Amazon Linux and Ubuntu 18.04. It is supported for your instance type which you use.
More details can be viewed here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html
If you have Jenkins or other CI/CD tool available you can create a job there that would enable/disable particular EC2 instances. If you want something smaller then you can use aws-cli with cron and do the same. Some of my customers turn their VMs on at 7 AM and turn them off at 7 PM (mostly for testing/staging environments).

Application Deployment - Web + REST backend

I have an application which ember.js based front end, express.js based REST APIs with postgre as DB. There is also an android application consuming the REST APIs.
I want to deploy this application in cloud. I am very new to this area and not sure what approach to take that will be economical too. Its a startup application and will not have huge traffic in the start. I have been doing RnD on heroku and amazon aws.
Can any one please guide what deployment setup will be reliable and economical for me? Should I use cloude Db?. Any guide line or reference material will be great help.
Sorry If you find this question too generic.
Cheers
You can use AWS EC2 micro instance initially which is low cost.
Once you create the instance, you can install the tools required for you in instance.
What you need is create a AWS account and create the instance. In order to create a instance you can do it from console. Later you can access the instance using secrete key and access key. If you are a new user to AWS. Yo can get the usage free for one year.
As part of AWS’s Free Usage Tier, new AWS customers can get started with Amazon EC2 for free.
More details about free usage and pricing
As your application grows you can use Opscode Chef or puppet for configuration management.

Cheapest, future-scalable way to host a HTTPS PHP Website on AWS?

I've already got an RDS instance configured and running, but currently we're still running on our old web host. We'd like to decrease latency by hosting the code within AWS.
Two concerns:
1) Future scalability
2) Redundancy ... not a huge concern but AWS does occasionally go down.
Has anyone had this problem where they just need to cheaply run what is essentially a database interface via a language such as PHP/Ruby, in 2 regions? (with one as a failover)
Does Amazon offer something that automatically manages resources, that's also cost effective?
Amazon's Elastic Beanstalk service supports both PHP and Ruby apps natively, and allows you to scale your app servers automatically.
In a second region, run a slave RDS instance off of your master (easy to set up in RDS) and have another beanstalk setup there ready as a failover.

Using EC2 to run CPU-heavy tasks

So I'm trying to figure out what's involved with doing the following using EC2:
I've got a desktop application that sometimes has to do cpu-intensive operations. What I need to do is offload these tasks to a cloud server which will run a version of the app specifically to handle the running of that task and return the results.
There will be situations where multiple instances of the desktop app are being run by different users and several might request offloading of tasks concurrently.
My question: Can the desktop app establish its own new EC2 instance to do the work and, if so, does is there a single ip address that it connects to to start the instance creation? When the instance is created, does it get its own IP address?
As you can see by my question I'm misunderstanding some key part of the EC2 system. Some clarification would be much appreciated
Amazon has an EC2 API that can be used to create, modify, or delete instances. This API is available in many of the popular programming languages so your desktop app should be able able to stat an EC2 instance and offload the work automatically.
http://www.programmableweb.com/api/amazon-ec2/links
Each new EC2 instance has its own unique public IP address which can be retrieved via the APIs mentioned above.
Amazon EC2 has a free usage tier that allows you to run one micro instance at a time, free for a year. So go ahead and try it out, even if you run more than one instance at a time, its super cheap. At least use the free micro instance to become farmiliar with how EC2 works.
In your code
Detect need to offload computation
Use EC2 API to create another instance of a saved virtual machine state you previously
setup
Use the API to get the IP address of the new instance
Connect to the IP address of the instance you just started and tell it what work to do

Resources