The purpose of this discussion is to document how to host an iDempiere production environment.
Hosting using AWS
There is no question that Amazon's AWS service makes hosting and supporting iDempiere much easier. You do not need to configure server hardware like raid arrays and storage networks. You can choose just about any size server. Offsite backups are fast. You can create copies of disks and servers without needing to install and learn visualization software like VMWare. There is lots of documentation and tutorials for how to do stuff. And, it is relatively easy to use.
Server Configuration
Here are the server configurations based on load (head count). I recommend that you watch the medium installation example even if you plan to install a small server.
Small: 15 users or less: A single server (hosting both the database and application server) can support a small group of about 15 people or less. It is worth noting that you can push well beyond 15 user on a single server; however, it is also worth noting that moving to the next bullet requires little effort and carries greater performance and flexibility.
Medium: 100 users or less: (Installation demonstration and discussion) Separating the database and application server onto two different servers is the next step. This setup has been know to support 200 users; however, I do not recommend it for above 100 users. If either server fails, you will have 100's of users with nothing to do. Here are script examples of how to install the database on one server and just the WebUI on a separate server.
Large: 5000 users or less: (working notes) Creating redundancy for either your database or application server is the next step. HAProxy has been successfully used to distribute the load across multiple WebUI servers. PGPool2 has been successfully used to create a multi-read database environment with active fail-over. I have yet to see the user limit for this configuration. Its easily hundreds or thousands of users.
2014-07-03 PM Amazon AWS Services Overview
EC2 - Amazon computer (server)
0:01:00 S3 - online storage
0:01:15 Glacier - online cold storage
0:02:00 VPC (virtual private cloud) needed to launch a t2 family server
0:11:30 T2 family of EC2 servers - Required to live in VPC - less expensive - good performance
0:12:45 EC2 Pricing - on-demand, reserved light duty, reserved medium duty, reserved heavy duty
0:17:30 Example calculation - heavy utilization vs on-demand for m3.medium ($730 heavy utilization vs $$1,830 on demand)
0:19:15 How Reserved Instances are charged -buying a contract
0:20:00 My reserved instances for example
0:21:45 Selling reserved instances
0:22:30 Stop instances
0:24:45 Cloud Watch and Auto Scaling
0:26:00 Numbers of concurrent users to t2.micro (x2), t2.small (x4 to 5), t2.medium (x10 to 13), pair of t2.medium (x20 to 25)
0:28:00 Lanching a t2 instance inside a VPC
0:34:30 Another pricing example
0:37:00 Changing an instance type (different than adding a server to a reserved instance)
0:41:00 Issue that was previously solved with Ubuntu and VPC
0:46:00 Cloud Formation
0:46:30 Cloud Front
0:48:00 Direct Connect
0:49:00 RDS - spanning databases across multiple regions with multi-read
Sample AWS Hosting Configuration
Let's assume that you are presently at 25 concurrent users and you expect growth both in terms of transactions and concurrent users over the next three years. Here is a sample configuration that should serve you well:
Here is a list of prescribed hardware (about $50USD/mo)
You can resize any of the above servers as needed to support growth.
The backup/test server would always have yesterday's backup installed. Doing so has the following benefits:
You test disaster recovery every day.
You have a test system that always has current data and configuration so that you can accurately test possible production changes on a test machine first.
If you mess up the backup/test machine, you simply restore from backup again.
openVPN and tinc are a robust and efficient VPN solutions to support both site-to-site and remote-user-to-site vpn connections. There are many many online tutorials about how to install on openVPN server for your local LAN and inside AWS.
AWS VPC (Virtual Private Cloud)
If you plan to host using AWS, you will probably want to create your production EC2 instance of iDempiere or ADempiere in an AWS VPC (Virtual Private Cloud). VPC adds no additional expense over a regular EC2 instance, and you get the benefit of being able to extend your current LAN into the cloud. Here is a tutorial to help you create your EC2 instance inside an AWS VPC.
Here are some quick bullets about this topic:
The VPC firewall is better (has more options) than the normal Security Groups firewall you get when you create an EC2 isntance outside of a VPC.
You can also create a VPN termination point inside your VPC's subnet to allow you to create (1) tunnels between your offices to your iDempiere server and (2) tunnels between your remote users and your iDempiere server.
There are many VPN options available. AWS offers a VPN solution. My favorite open source VPN solution is openVPN. I plan to offer training on how to get openVPN and PFSense (my favorite firewall) up and running to connect a local LAN with the Amazon cloud.
Protecting your System
Make sure you spend time learning how to protect your application server and your database. (link)