Wednesday, 24 August 2016

Updating Routing table for VPC Peering Connection

To check out how to create AWS VPC Peering  go to link : Creating AWS VPC Peering. After that we need to add the Peer connection details in Routing tables.

  •  From Right side of navigation panel, choose Route Tables.
  •  Select the route table that's associated with the subnet in which your    instance resides.
  •  Choose Routes, Edit, Add Route. In Destination section, enter the IP address range to which the network traffic in the VPC peering connection must be directed.

Creating AWS VPC Peering

AWS VPC(Virtual Private Cloud) provide you logically isolated private cloud infrastructure, where you can launch your AWS resources in a isolated virtual network. If you have more than one AWS VPC and if you have a requirement to connect resources in one VPC to other VPC, AWS Peering come in handy.VPC Peering doesn't use any separate hardware for establishing connection it use existing infrastructure of VPC to create VPC peering.

                                    To create an Amazon VPC Peering, first login to your  AWS management console  and select  VPC dashboard. In navigation panel select peering connection and then chose Create VPC Peering Connection as

                                   In "Create VPC Peering Connection" dialogue box select your local VPC id in   Local VPC to Peer* section and also select the VPC id to  which you want to connect at VPC*.

                                  In the conformation dialogue box chose OK. VPC peering connection we just created is still in pending status the owner of the account need to confirm the request.

 To accept VPC peering connection
  •  Go to VPC navigation panel and select Peering connection
  •  Select a pending VPC peering connection (the status is pending- acceptance), and choose Actions, Accept Request.
  •  In the confirmation dialog box, choose Yes, Accept    

UPDATE : Updating AWS Peering details in Routing table is explained in Creating AWS VPC Peering

Friday, 12 August 2016

Configuring Elastic file System (EFS)

Amazon EFS provide elastic file system for your EC2 instance, its storage capacity grow and shrink based on your requirement. EFS is  very easy to create and mount to your instance. Login to your AWS Managment Console and select Elastic file system dashboard. Click on  Create File System button.


                                                               Then select your VPC  name from VPC option. Only instance in the selected  VPC can access the File system.You can create mount target for all of your availability zone , so that instance in specified availability zone can access the File system. . Create a mount target to the specified subnet in your availability zone in next step.

                                                          In next step, you can add a tag and select a performance mode. Its optional you can also go with default one.

                                In next step you can review your EFS configuration and confirm to create a new EFS .
Now we need to install nfs client in your EC2 Instance.I am using debian flavour Instance.


After installing nfs client ,create a folder to which EFS file system you need to be attached.I had created a folder web_content

Now type the following command to automatically look your instance availability zone and attach the EFS using dns name for that availablity zone. Provide File system id and instance folder path to below command

 sudo mount -t nfs4 -o nfsvers=4.1 $(curl -s<filesystemid> <folderpath>

Wednesday, 10 August 2016

Understanding Amazon EBS PART 2

To get a basic understanding about Amazon EBS got to Understanding Amazon EBS . Now lets checkout how to create, delete and copy a Snapshot.

                                                        To create an Amazon EBS Snapshot, first login to your AWS management console and select EC2 dashboard. Chose Snapshots from navigation panel on the left side.Chose Create Snapshot option. 

                                                                         In Create Snapshot dialog box select the volume by using volume ID or name tag of which snapshot to be taken.Also provide the unique Name and description for the snapshot.

                                                To delete a snapshot, chose Snapshot from EC2 navigation panel and then select snapshot which you want to delete. Chose delete from the action list and confirm snapshot delete operation, before that don't forget to confirm the snapshot name so wrong one not get deleted.

                                                     To Copy a snapshot , chose Snapshot from EC2 navigation panel and then select snapshot which you want to copy.Select Copy from the action list

                                                                    In Copy Snapshot dialog box select the destination region and encryption (only if you want to encrypt the snapshot).

Creating Amazon Machine Image & Launching Instance from AMI

Amazon AMI  is a template which contain  the root volume of your instance. its contains the operating system,application server and your application.To create an AMI from running instance first login to your Amazon management console and got to EC2 service section from there. Select the Instance of which you want to create the AMI. Right click on the instance and chose create image from the Image context menu.

After selecting Create image option, create image dialogue box will open. Provide a unique Image name there and description there. Also if you don't  want to reboot the instance while taking AMI, check the No Reboot option.Best way is to stop the instance and take the AMI,so no data corruption will happen.

After you chose Create image, a pop-up will appear with unique  AMI id and ami creation pending status. It will take some time to complete the AMI image creation and will depend on your Instance capacity.You can check the image  status by using Ami Id,  which you got while ami creation time.Go to the left side of EC2 dashboard and check using ami id in AMI section.

                                                                         To launch a new Instance from the ami image you created. Select the image using the ami id  from AMI section on the left side of EC2 dashboard. Left click on ami image and select Launch option as mentioned below

Then chose the instance type,storage and security group all as per your requirement.Which i had already explained in Launch EC2 Instance in AWS Link 

Tuesday, 9 August 2016

Creating EC2 Volume in AWS

Lets check how to create a volume in AWS Infrastructure. First login to your AWS management console and select EC2 option from your Amazon web services.Then got to Elastic Block Store section and select Volume option.Now its time to create a volume ,click on create volume Option.

After selecting Create volume option new pop up window will open like below

Provide the details as per your requirement.I don't think more explanation need to provide here everything is explained in the screenshot itself ie size limit,type and zone etc. If you want to Encrypt the volume don't forget to select the Encryption field. 

Associate Elastic IP to EC2 Instance

In this tutorial you will learn how to associate an Elastic static ip address to an  EC2 Instance. We already discussed how to setup an EC2 Instance and make sure the instance is running state.
                                                            First login to your AWS management console and select EC2 option from your Amazon web services.Click on Elastic IPs from the left options. Before associate elasstic ip we need to allocate one first.Click on Allocate New Address . 

In the pop menu select EIP used in as EC2 or VPC as per your setup.Then click on Associate address to select the instance which you want to associate the IP Address.


Creating Security Group in AWS

We have already discussed how to Launch on EC2 Instance in Amazon Web Service. Now lets check out how to setup an security group in AWS. Security Group specify  the Inbound and Outbound rule for your instance. It act like a firewall, which tell us type of port open to inside and outside of the instance.

                                                           Login to your EC2 Dashboard and select security group option  from  Network and Security section.Click on the Create Security Group menu.

Now in next popup section, provide the security group name and a description. If you are using Instance inside a VPC, select the vpc name in VPC section. Now add the security group rule in Inbound and Outbound Section.

Launching EC2 Instance in AWS

Lets check out how to setup an virtual server in your Amazon Web service.First login to your AWS management console :

Select EC2 option from your Amazon web services

Select Launch instance option to create a new virtual server known as Amazon EC2 Instance.

In Step 1  process  chose an AMI  template as per your requirement. You can find different flavour of templates in AWS market place, Community ami and also your own pre-build AMI in "My AMIs" Section.

In Step 2  process chose an instance type based on your hardware requirement.

In Step 3 specify the configuration Details,  you need to specify how many instance you want to launch, what type of network(Classic or Vpc), subnet and IAM role you need. Also don't forget to assign manual primary ip address in Network interface section.

In Step 4 , Add new volume and assign it size which you need to plugin to EC2 Instance.

In step 5, Add the tag value to the instance. Key-Value you specify  is case sensitive.

In Step 6, Assign a new security group or existing security group which you already created. Security group specify instance inbound and outbound traffic rule 

In Step 7 , Review and launch your instance.

Wednesday, 27 July 2016

Enable OpsCenter User Login


                          Enable OpsCenter web user authentication by adding below value in file /etc/opscenter/opscenterd.conf

                    enabled = True 

  Restart opscenter service after that

                   service opscenterd restart   

  The default admin username is admin and the password is admin .