On AWS Deployment Using AMI
This page guides you through cloning deploying Lyftrondata on an Amazon EC2 instance by setting up the deployment environment, installing and starting Lyftrondata,
INFO
The instructions have been tested on RHEL 8 and Ubuntu 22.04.
Requirementsβ
To test Lyftrondata, we recommend a
t3a.medium
instanceTo deploy Lyftrondata in a production environment, we recommend a
t3a.xlarge
instance
Setup & Installation Lyftrondata
Setup EC2 using AMI and Configure Security Group:
Navigate to EC2 Dashboard: Click on "Services" and select "EC2" from the list of available services.
Launch Instance: In the EC2 dashboard, click on "Launch Instance" to start the instance creation process.
Choose AMI: Select the "My AMIs" tab and choose the cloned AMI from the list.
Select Instance Type: Choose "t2.xlarge" as the instance type and proceed to configure other details.
Configure Instance Details: Specify necessary details like subnet, IAM role, and other configurations. Ensure the correct networking settings.
Add Tags: Optionally, add tags to the instance for better organization.
Configure Security Group: Create a new security group or select an existing one. Ensure that all ports are open to allow inbound and outbound traffic mention on documents. follow this steps AWS-Security Group
Review and Launch: Review the instance details and click on "Launch".
Create New Key Pair: Choose to create a new key pair. Download the private key file and keep it secure.
Launch Instance: After downloading the key pair, launch the instance.
Once launched, you can connect to the EC2 instance using the downloaded key pair and start using it as needed.
Configuration Env file
To configure the environment files for the specified applications (LyftrondataDB
, LyftrondatasyncAPI
, LyftrondatasyncReduxUI
), follow these step-by-step instructions:
Locate Environment Configuration Files:
Navigate to the root directory of each application where the environment configuration files are located.
Open Environment Configuration Files:
Open the environment configuration file for each application (e.g.,
.env
or.env.example
).
Replace VM IP and Port:
Find the variables related to the database host and port (e.g.,
DB_HOST
andDB_PORT
).Replace the placeholder values with your VM's IP address and the corresponding port number.
Update URLs:
Locate the variables representing URLs (e.g.,
master_url
,log_host_ip
,airflow_dag_url
,airflow_trigger_url
).Update these URLs with your VM's IP address and port numbers where applicable.
Change AWS Access Key and Secret Key:
Find the variables for AWS access key ID and secret access key (e.g.,
aws_access_key_id
andaws_secret_access_key
).Replace the empty values with your IAM user's AWS access key ID and secret access key.
aws_access_key_id=
******
aws_secret_access_key=
********
Modify Bucket Names and URLs:
Update the variables representing bucket names (e.g.,
bucket_name
, lyftlogos_bucket_name, etc.) with the desired bucket names.Adjust the URLs if necessary.
UI ENV
API ENV
DB ENV
Save Changes:
Save the changes made to each environment configuration file.
Restart Applications (if necessary):
If the applications are already running, you may need to restart them for the changes to take effect.
Verify Configuration:
Test the applications to ensure that they are using the updated configuration values correctly.
Execute Script to start the application:
Here's a simple bash script that navigates to each directory and runs the specified nohup
command:
Save this script to a file, for example, run_servers.sh
, and make it executable using the following command:
Then you can run the script by executing ./run_servers.sh
in your terminal. This will navigate to each directory and run the specified commands using nohup
.
Last updated