I have an EC2 running on AWS that I would like to migrate to an on-prem server. This, I understand, would require cloning EC2 which is answered here. The remaning task would be to run the EC2 clone on an on-prem server. Wat would be the steps to accomplish this. The on prem is running Redhat dist.
Thank you!
Related
I am interesting how to connect to MySQL which runs on EC2 instance from application deployed on AWS Beanstalk.
Will be grateful for any help.
Curious why aren't you using the RDS instance instead of EC2? This document explains the step, the process should be pretty much similar as long as your mysql server is up and running:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html
The company I'm working for recently decided to deploy a new application with docker swarm on AWS using EC2 instances. We set up a cluster of three EC2 instances as nodes (one manager, two workers) and we use stack to deploy the services.
The problem is that one of the services, a django app, runs into a timeout when trying to connect to the postgres database that runs on RDS in the same VPC. But ONLY when the service publishes a port.
A service that doesn't publish any port can connect to the DB just fine.
The RDS endpoint gets resolved to the proper IP, so it shouldn't be a DNS issue and the containers can connect to the internet. The services are also able to talk to each other on the different nodes.
There also shouldn't be a problem with the security group definition of the db, because the EC2 instances themselves can get a connection to the DB.
Further, the services can connect to things that are running on other instances within the VPC.
It seems that it has something to do with swarm (and overlay networks) as running the app inside a normal container with a bridge network doesn't cause any problems.
Stack doesn't seem to be the problem, because even when creating the services manually, the issue still persists.
We are using Docker CE version 19.03.8, on Ubuntu 18.04.4 LTS and docker-compose version 3.
The problem come when you config your swarm subnet conflict with your subnets in VPC. You must change your swarm subnet different CIDR.
I have been working on a React web app and I need to deploy it now. I have the codebase in GitLab and I'm using Gitlab pipeline to run the tests and create build and deploy. For deployment I need to deploy it to a EC2 instance. My pipeline runs well until creating the build. Now the problem is how to push that created build to the EC2 instance. Can someone help me in here. I tried in the following way.
Gitlab CI deploy AWS EC2
It showed me connection time out message instead of connecting to ec2 instance. After that I allowed all IPs to access the instance with SSH using the security groups. Then it worked fine for me. But the problem is it's not secure to allow all IPs to access SSH. How can I solve this problem.
I have implemented the Elastic Search by installing it into the EC2 as well as consuming the Managed service from aws.
Is there any similar way to install the ElastiCache into the EC2 rather than using managed service from AWS. If there is, how it will be installed in EC2?
Redis and Memcached both are very popular software for caching the data. You can install these on any platform including the EC2 server. You can follow memcached installation and Redis installation to install them on Ubuntu EC2 instance. AWS also offers the managed version of these as ElastiCache, wherein you have to choose which one you want to use ie Redis or Memcached.
As mentioned in the home page of elastiCache :
Managed, Redis or Memcached-compatible in-memory data store.
Benefits of having a self-managed (wherein you have to install/manage Redis or elasticsearh) is nicly explained here.
How do we connect AWS Lightsail to Elasticache? I've set VPC peering but that's as far as I get. Anyone knows a step-by-step guide that shows how to do it?
[edit]
We have an application that uses Memcached to persist some data between nodes. The installation currently uses 4 servers: two nodes, 1 RDBMS and 1 Memcached server and is currently running on DigitalOcean servers. Our intention is to install the nodes on Lightsail servers and use AWS services directly from the Lightsail servers, such as RDS and Elasticache.
There are no problems connecting to an RDS MySQL instance from the Lightsail servers but a timeout occurs when trying to attach to the Memcached service. I know it's a security issue, I just can't find any doc that makes that connection work.