Deploy DBConvert Streams to Amazon EC2.
We are going to create an instance on Amazon Elastic Compute Cloud (EC2), and the steps to deploy DBConvert Streams on it are as follows:
Launch Amazon EC2 Instance.
Here are the general steps to launch an EC2 instance on AWS:
- Log in to the AWS Management Console.
- Navigate to the EC2 dashboard.
- Click on the
Launch Instance
button. - Choose an Amazon Machine Image (AMI) - this is the operating system and software that the instance will use.
- Select the instance type - this determines the hardware resources available to the instance, such as CPU, memory, and storage.
The minimum hardware resources required for launching DBConvert Streams on an AWS EC2 server are 1 CPU / 2 GB RAM. You may begin with an AWS
t2.micro
instance and opt for a more powerful server if high throughput is expected when replicating data between the source DB and target. - Select or create a key pair to access the instance via SSH.
- Click on the
Launch instanse
button and wait until the new instance is initialized.
After the instance is launched, it will typically take a few minutes to become available. Once it is up and running, you can connect to it via SSH.
Connect to Amazon EC2.
- Click the
Connect
button at the top - Navigate to the 'SSH client' tab to view your instance connection details.
- Copy and paste the command into terminal to connect to your instance using its Public DNS via ssh. To connect to your instance using its Public DNS via SSH, copy and paste the following command into your terminal:
bash
ssh -i "/path/to/your/key.pem" ec2-user@public-dns-name
Note that you will need to replace /path/to/your/key.pem
with the file path to the private key file you used to launch the instance, and public-dns-name
with the Public DNS of your instance. Also, make sure that the security group associated with the instance allows incoming SSH traffic on port 22.
Example:
bash
ssh -i "~/.ssh/dbs.pem" [email protected]
Install Docker.
To install Docker on your EC2 instance, follow these steps:
- Run the command below to ensure your operating system has the latest security updates and bug fixes for its installed packages.bash
sudo yum update
- Run the following command to install docker.bash
sudo yum install docker
- Add
ec2-user
to thedocker
group to run Docker commands without using thesudo
command.bashsudo usermod -a -G docker ec2-user
- Switch the current shell session to the
docker
group, allowing the user to run Docker commands without opening a new shell session.bashnewgrp docker
- Enable the Docker service to start automatically at boot time.bash
sudo systemctl enable docker.service
- Start the Docker servicebash
sudo systemctl start docker.service
Install Docker Compose.
Since DBConvert Streams relies on several services, it's advisable to utilize Docker Compose to initiate the necessary containers. This tool allows you to define and run multi-container Docker applications, simplifying managing the services and dependencies required by DBConvert Streams.
- Install the Python package manager pip for Python 3bash
sudo yum install python3-pip
- Install Docker Compose.bash
pip3 install --user docker-compose
To learn how to use Docker Compose files to initiate DBS services, refer to the DBS docker containers section of the DBConvert Streams guide.