Skip to main content

Posts

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 #...

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 > Replicatio n > add rul e.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 ...

AWS S3: LIFECYCLE MANAGEMENT

Lifecycle management is and important feature available for s3 buckets.Using that we can move the contents in s3 to IA s3, glaciers or even delete it after a particular period of time that we set.In this scenerio we will create a life cycle management policy for an s3 bucket with versioning enabled.For that first go to our bucket. From Management > Add lifecycle rule On the window that appears give the name of our life cycle management rule under rule name.If we want to apply the policy for particular object in bucket we can also mention it under prefix.Then click next. In this window we will give details about transitions.We can see current version and previous version options there since we have versioning enabled.Here first we will set policy for current version.We will set 30 days for transition to IA and 60 to glaci er.It means that after 30 days the content will moves to IA and again after 30 days it will moves to glacier.Similarly set it for previous versions.Th...

AWS S3: VERSIONING

Versioning is an important feature provided by s3.We can enable versioning while creating an s3 bucket.For that from aws dashboard > S3 > Create bucket On first section appears give name of the bucket.The name should be globally unique.Also specify region.Then click next.On the next step activate the properties we want.As we want to enable versioning enable that and click next.On next window we have to set permissions.Here under manage public permissions give public read access to bucket and then click next and create bucket.     We can see our bucket is created.Now we want to upload a file to bucket.Open notepad and make a sample file and save it.Now go inside or bucket and upload it. This is my sample file.Now to upload it go inside the bucket and click upload . Click on add files and select the file we saved earlier and click next.No we want to set permissions for that. Select grant public read access to the object under manage p...