Choosing shared Linux AMI machine image for AWS - linux

I know next to nothing about server management and just got started with Amazon Web Services.
I want to deploy a Linux server which runs Apache, MySQL, phpMyAdmin as well as email capabilities (account mgmt and webmail interface) and backup capabilities. I want to administer the server with a nice web user interface like cPanel, doing things like file management, email account management, access to phpMyAdmin.
Therefore I thought about deploying a shared Linux AMI, instead of building and configuring the server myself. I want to make my life easy, that is, deploying something pre-existing which is easy to manage (web user interface) since I haven't got time to learn all about server management right now.
I found this list of images. Which one of these would fit my requirements?

This is an inappropriate use case for EC2. As Amazons CTO Werner Vogels said a few months ago "an EC2 instance is not a server, it's a building block." EC2 is used to provide computing resources to an application that spans multiple, loosely-coupled services. It's not a drop in replacement for a standard VPS.
That's not to say that a lot of people aren't using EC2 instances as servers. However, these are often the same people who bitterly complain about excessive downtime on AWS without realizing that it's mostly their own fault. An application must be designed to be deployed in a cloud-based environment when it's built on an IaaS platform like AWS. If your application is not aware of autoscaling groups and other high-availability features then traditional dedicated hosting will be cheaper, less complex, and more durable than AWS.

I am aware of AMI's for webmin, but not for cPanel. Here is the link:
https://www.virtualmin.com/documentation/aws/virtualmin_gpl_ami
I would echo the comments made by #jamieb however in that this is really not a good use case for EC2. You are limited to a single elastic IP per instance, so you have no ability to do IP-based virtual hosts as you would with a typical VPS.

Related

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.

Allow localhost endpoint in different Azure hosting options

I use a small webserver for inter-process-communication between .NET and and an executable process on the same machine, i.e. a POST request to http://localhost:3000/
This works fine on my local machine when I allow the process with Windows Firewall.
Having tried the same on Azure Websites, I get an error (kind of expected).
Now my question is, which of the other services allows me to open a port and listen locally? All of them? (VM, Workers, Web Roles)
Thanks
When you want to open a PORT (socket) you can use either of VM, Web Role or Worker Role. You just have to be aware of the specifics of each. Just quick tip for differences:
VM is a IaaS Service (Infrastructure-as-a-Service) - this is where you get a VM with OS and you take care of the OS from then on - updates, patches, everything
Web/Worker Roles are PaaS Service (Platform-as-a-Service) - here you get (a fully customizable) environment under Windows OS to run your code. However about OS and Framework patches and updates someone else is taking care of.
One very good article explaining IaaS, PaaS, SaaS is Pizza-as-a-Service. Which I recommend reading.
Then for your concrete scenario, I would advice you to go for a WebRole. You can combine WebRole with worker processes. Here is a quick tip on how to do this.
But, whenever you go for the cloud, be sure to check out the Azure migration cheat-sheet.

What is the difference between Azure Web Site and Azure Cloud service

We are looking to host a website (some css,js, one html file but not aspx, one generic handler).
We deployed in as:
1) Azure Web Site
2) Azure Cloud Service
Both solutions work. There is a question though: which way of hosting it is better and why? Second thing: as there might be a lot of traffic - which solution would be cheaper?
Thanks in advance,
Krzysztofuncjusz
You may want to review this article that explains the primary differences. Web Sites are best for running web applications that are relatively isolated (that do not require elevated security, remote desktop, network isolation...). Cloud services are more advanced because they give you more control over web sites while still remaining flexible. And VMs are for full control over applications that need to be installed and configured (like running SQL Server for example).
I think that main difference in abilities to modify VM and possibility to configure scalability. Web sites is something like classic hosting, without ability to login by rdp. Cloud Services allows you to configure VM and if necessary setup scalability and availability.

Which azure option is good for my TCP game server using node.js?

I am new to Microsoft windows azure cloud and want to run my game server using node.js in azure cloud. I read the windows azure Node.js Developer Center site and it seems my server can run in azure cloud multiple ways.
Which azure option is good for my TCP game server using node.js?
Three options:
Web Site
Cloud Service
Virtual Machine
Web Sites are essentially shared web hosting, which only supports HTTP, so not an option for you.
Cloud Services are probably what you want. This is the core PaaS offering on Windows Azure. It will let you run pretty much whatever you want, as long as it runs on Windows. It supports TCP endpoints. There's are pretty nice tools for Node.js. There are two flavors of running Node in a Cloud Service: a web role or a worker role. Web roles use IIS and run Node.js behind it. That won't work for your raw TCP connections, so you'll want to use a worker role. A worker role will simply launch your Node app and leave it running forever.
Virtual Machines would work fine too, but they don't provide much value compared to Cloud Services. In a cloud service, you can spin up new VMs on demand, a load balancer sits in front of your app distributing traffic, your app will get restarted if it ever crashes, you can have your VM automatically patched without downtime, etc. Unless you can't run in a cloud service for some reason, you rarely want to use a raw VM.
tl;dr You want a worker role in a cloud service. :-)
Windows Azure does have a toolkit for Social Games on Github, this might help you in you in your endeavours, not sure it supports Node.js mind you, there should be some takeaways to help you.
https://github.com/WindowsAzure-Toolkits/wa-toolkit-games
This blog post gives a good breakdown on where to run what and use cases for each.
http://blogs.msdn.com/b/silverlining/archive/2012/06/27/windows-azure-websites-web-roles-and-vms-when-to-use-which.aspx
It really depends on your application, what backend does it have, number of users, performance, latency etc...
A word of warning though, running Node.js on Windows is mostly fine but there are several libraries that will not work. Don't know if it's a hard requirement that you use Azure but there are other Node hosting solutions out there.
Nodejitsu
Nodester
Those are only two, there are more out there.
Disclaimer: I'm building a Node.js hosting solution, modulus.io.

Is Windows Azure a multitenant operating system?

I am trying to understand what is the difference between Windows Azure and other competitors, in the technical level.
From what I understand Azure is a multitenant OS, meaning, that every application is running in some kind of a sandbox based on Hyper-V.
In other words, every application being loaded is running by Azure in its closed sandbox.
Meaning, the operating system is "real", but the application is running in a virtual environment.
That is opposed to, lets say, Amazon EC2, where they give you a virtual machine, with a full virtual operating system (a virtual computer).
Am I right, or have I got it totally wrong?
With respect to multi-tenancy and dedication of an instance to one tenant, both Azure and Amazon EC2 are exactly alike. Both dedicate a VM to you as a compute instance.
Difference between EC2 and Azure (currently) is that Amazon provides you a real VM with an OS and an ability and a REQUIREMENT to manage the OS as well as anything installed on that OS.
Azure takes away some of the "ABILITY" power away from you (currently you don't get to manipulate the OS) while at the same time taking maintenance as well.
In my mind, unless you have some special requirements that require a full access to the OS (and upcoming Azure release will let you actually install stuff on your instances like legacy COM components, etc) I would stick with Azure as it has a less of an administrative cost.
Windows Azure gives you VMs running Windows, just like Amazon EC2 does.
No. In Azure you get a VMs as well (one per role instance). They are just more abstracted from you, than Amazon or Rackspace.
You get different VMs in Azure as well. What happens in Amazon EC2 for instance is that the abstraction ends at the hardware level. Everything above the virtual machines, ie the operating system updates, the application frameworks, the web server, etc; everything needs to be managed by you.
With Azure, the abstraction is taken far above just the hardware level and to an entire application framework level. For instance Web roles are nothing but VMs, preloaded with IIS and .net framework (and other application frameworks) tuned to serve web traffic. You are able to just deploy your application and all the other configurations are handled for you, but underneath it, it is still a VM.

Resources