Skip to main content

Posts

AWS RDS: CREATING AN RDS INSTANCE

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud.In this article we will explain about creating a mysql database using aws RDS.
From AWS RDS dashboard click on instances > Then click on Launch DB instances.



First we need to select engine.Here we will go with Mysql engine.Then click next.On the next window appears we will select our use case.We will go with Production-Mysql and click next.




On the next window that appears we can select various options such as mysql version ,instance class,storage type,size multi-az deployment and so on.Here we selecting t2-micro as size, storage type as general purpose SSD and mysql version as mysql 5.6.39.Also we are not going with multi-AZ deployment.We can also see estimated cost over here.




Under settings we can give the db identifier name.Also we can give username and password for it.


Under network and security give the details about subnet and vpc. Here we are giving …

WORKING WITH VOLUMES AND PERSISTENT DATA IN DOCKER

We can use volumes with docker for persistent storage.To create a volume use command
#docker volume create mytestvol
This will create a volume named mytestvol. To list it
#docker volume ls
We can see our volume mytestvol is listed in it. To inspect that
#docker volume inspect mytestvol
The volumes that we create will be created inside /var/lib/docker/volumes.Go inside that folder and we can see that our volume mytestvol is present there

To delete a volume
#docker volume rm mytestvol2
Here mytestvol2 is the new volume that we created.



Now we will check how to mount a volume to a container.
#docker container run -dit --name mygoof --mount source=volpool,target=/vol centos:centos6

Here docker will run a new centos6 container with a new volume named volpool attached to /vol directory of centos container.Here docker will create a new volume automatically.Now check
#docker volume ls
We can see new volume volpool is created
#docker ps
We can see our container named mygoof running

Now to ins…

DOCKER SWARM WALKTHROUGH

Swarm is native clustering for the docker. When docker engine runs in swarm mode, to manage cluster state manager node implement the Raft Consensus Algorithm.
In this article we will setup one manager node and 3 worker nodes which are separate virtual machines running in AWS.

Pre-Requisites: > Docker installed and running on all instances.
                          > Static IP for all instances
                          > Network connectivity between all instances
                          > Ports 2377 (network communications),7946(swarm node communication),4789(overlay network) should be open.


First go to our manager node.Now to check whether swarm is active or not
#docker system info | grep Swarm

Now to initialize # docker swarm init
or else we can also give
#docker swarm init --adverstise-addr ip-of-managernode

To list the nodes
#docker node ls
We can see only one manager node is there which is the leader.(Note: We can also run multiple manager nodes.But only one leade…

AWS S3: CROSS REGION REPLICATION

Cross-region replication is a bucket-level configuration that enables automatic, asynchronous copying of objects across buckets in different AWS Regions.It helps to replicate data of one bucket with another bucket in another region.For cross region replication to takes place versioning should be enabled in both buckets.Consider we have a bucket named mytestbuck333 on Us West(Oregon) region.Now we will create another bucket named new-bucket333 in Asia Pacific(Mumbai) region with versioning enabled.


Now go inside bucket mytestbuck333.From Management > Replication > add rule.Here we can select weather we want to replicate all contents of bucket or a pericular object.Select as per our need.Here we are selecting whole bucket.Then click next. Here select the name of bucket to which we want to replicate and click next.






Now select IAM role.As we have not created any role select create new role and click next and then save.



Now go inside our new bucket and check.We can see that no conten…