Run Oro Application on the AWS Cloud Platform Using Prepared Amazon Machine Image¶
The Amazon Machine Image (AMI) with OroCRM Community Edition is listed on the Amazon Web Services Marketplace. With its help, you can effortlessly and quickly set up an instance with a working OroCRM Community Edition application on the Amazon EC2 platform, as described in details further in this article.
Deploying a single EC2 instance is helpful when you need to review Oro application features or use the out-of-the-box uncustomized application version for low and medium traffic websites.
Every AMI (Amazon Machine Image) contains an installed Oro Application along with the LEMP stack:
|OS||Ubuntu v. 16.04 LTS|
|Web server||Nginx v.1.10|
|PHP||PHP-FPM and PHP CLI v.7.1|
|Other tools||NodeJS v.4.2, Git v.2.7.4, Composer v.1.6.3|
Table of Contents
- Sign in to the AWS Management Console.
- Open the EC2 Dashboard page (the item Services -> EC2 in the top menu).
The EC2 Dashboard enables you to observe and controll all information related to your AWS EC2 instances.
This redirects you to the first step of the multi-step EC2 instance launching wizard.
- To select the source for the AMI to run on the EC2 instance, click AWS Marketplace in the panel to the left.
Now you have to choose the source for the Amazon Machine Image that will be run on the EC2 instance.
A list of AMIs with all Oro applications is displayed.
Select the required AMI from the list and click Select (e.g. OroCRM Community Edition with Demo Data).
You are redirected to the description page of the selected AMI with the information on the application, a list of suitable EC2 instance types, and more.
You are then redirected to the next step of the installation.
- Select the checkbox next to the m4.large instance type and click Review and Launch.
You can choose a different type of the EC2 cloud but make sure that it meets the Oro application System Requirements.
Clicking Review and Launch redirects you to the final installation step. Steps 3 to 6 are skipped as they contain the reasonable preconfigured default values. Should you need to change the default values, return to Steps 3 to 6.
- Click Launch on the bottom right.
You are prompted to select an existing public or private key pair for the secure SSH access to your instance or create a new key pair.
- Click Create a new key pair, provide its name in the field and click Download Key Pair.
Store the downloaded .pem private key file in a secure and accessible location. If you lose the file, you will not be able to log into your EC2 instance using SSH.
- Click Launch Instances.
You are then redirected to the Launch Status page where you can access the usage instructions, the software management page and other helpful resources.
- Click View Instances on the bottom right.
You are redirected to the Instances page with a list of your launched EC2 instances and the information on their state and status.
- Click on the required instance from the list to view its description on the bottom.
Below the launched instances list shown the detailed information about the selected instance.
You will require the following information to access your instance:
|Instance ID||(e.g., i-02197201a92cd0470)|
|Public DNS||(e.g., ec2-32-213-221-145.compute-1.amazonaws.com)|
|IPv4 Public IP||(e.g., 220.127.116.11)|
Note this information down for further reference.
- The instance setup is finished.
Once the 2/2 checks passed status is displayed, you can run the application. For more information, see the Usage section below.
Access the Oro Application¶
To access your Oro application, use the http://<PublicDNS>/ or http://<PublicIP>/ URLs with username admin and AWS <Instance ID> as a password.
Optionally, you can setup DNS service to put your domain name to the IP address and, therefore, you OroCommerce site will be accessible on your domain name URL.
Access with SSH¶
To connect to the EC2 instance using SSH, use the key pair file that you have downloaded previously and the ubuntu username.
Change the directory to the one where the .pem key file is stored.
cd <.pem file storage directory>
Set permissions for the .pem file to 400.
chmod 400 <.pem file name>
Log into the EC2 instance with Oro Application.
ssh -i /path/to/file/filenamewithkeys.pem ubuntu@<Public IP>
ssh -i /path/to/file/filenamewithkeys.pem ubuntu@<Public DNS>
For additional information, please see the AWS guide Connecting to Your Linux Instance Using SSH.
Manage the EC2 Instance¶
With the help of the EC2 management console, you can:
- Create additional instances based on the Oro application AMIs
- Connect to the running instances using a Java SSH client directly from your browser
- Pause or terminate your EC2 instance
For detailed information about EC2 instances management features please see the AWS guide Getting Started with Amazon EC2.