Tuesday, 25 August 2015

AWS Elastic Beanstalk


                                             AWS Elastic Beanstalk

Create and deploying a New Application in the AWS Management Console.
AWS Elastic Beanstalk deploys and manages applications in the AWS cloud.
Developer can upload application, and Elastic beanstalk, automatically handles the deployment details
Of capacity provisioning, load Balancing, Auto Scaling, and Application health Monitoring
Deploying the Application

In the AWS Management Console, on the Services menu, click Elastic Beanstalk.

Step 1Application info
                Application name Box Give agoutamsignup-app
                Description :ElasticBeanstalk

Step 2 : Environment type
Click on Create web server,
                                Environment tier Webserver
                                Predefined Configuration Python
                                Environment Type Single Instance

 Step 3 : Application Version
                                Source Select Radio Button Upload your own
                                Upload Sample Application eb-py-flask-signup-v1.1.0

Step 4 : Environment Information
                                Environment Name agoutamsignup-app

Step 5 :Additional Resources
 Don't Select Additional Resources

 Step 6 Configuration Details
                Instance type t1.micro
                emailabhishekvitmca@yahoo.com
Step 7 :  Environment Tags
Step 8 :Review Information
If Status is green means ready to use

AWS Console -Click on IAM
Click Policy- Blue Button create Policy -Select blue button create your own Policy

Policy name agoutamsignupapppolicy
Copy below Policy and paste

{
  Version 2012-10-17,
  Statement [
    {
      Effect Allow,
      Action   [ dynamodbPutItem ],
      Resource [  ]
    },
    {
      Effect Allow,
      Action   [ snsPublish ],
      Resource [  ]
    }
  ]
}

Click -Create Policy Button

 Click Roles in left, Click on role name aws-elasticbeanstalk-ec2-role
Under permission section. Click Attach Policy
Click the check box next to your SignupAppPolicy and click Attach Policy
In Resultant Attach Policy window, click Policy Type and choose Customer Managed polices
Click the checkbox next to your signupapppolicy and click attach policy

Trying the Application.
On Aws service menu .click Elastic Beanstalk, click name of application in the box
On the green ,signupapp-env


Open the application by clicking the URL at the top of elastic Beanstalk dashboard













.










Sunday, 23 August 2015

AWS-CloudFront Distribution Webpage



                   CloudFront Distribution Webpage

Create Bucket in Amazon S3 console :goutam and make it Public.


Add Files and Folder and give Permission to avail,
Make public read priviledges
click set details,on set details dialog box,click set Permission
On set Permission dialouge box,Make Everything public
And Click Start Upload

Click on file name and then on properties.




Files Uploaded  so can be avail over Internet


Go to Aws Management console ->click services ->Click cloudFront
Click Create Distribution

On Select a delivery method for your content page,in the Web Section click Get Started to select
select web as delivery method.


 On the next page,click origin Domain Name  box and select bucket containing Public accessible image


Currently while AWS create distribution ,Status of distribution would be in progress and wait unless and untill status changed to Deployed

Once Status changed to Deployed and State is Active ,Note down the Domain name which act as URl
and can Be accessed over internet


Save file as TestCloudFront .html in Desktop
  1. My Cloud Front Test-EdurekaProject
  2. My Text content goes here
  3. alt -"my test image "



  • In Line 5 Modify Img src with Cloudfront domain name  and  Open TestCloudFront.html file in Browser able to see content over Internet


    --------------------To Delete a Distribution---------------------------
    Right pane of Amazon CloudFront Console ,check the check box for distribution and click diable
    and then window prompt for confirmation click yes Disbale.wait till Status changes from disable ->Deployed


    verify and wait till Status changed to deployed

    Check the chek box for distribution and click delete and click yes,Delete to confirm


    -------------------To Delete an Amazon S3 Bucket----------------------
    Go to Amazon S3 Console and ,select Bucket Click Actions and  click Delete ,click Ok in message box




    AWS-CloudFormation WordPress Installation



                                     AWS-CloudFormation WordPress Installation



    Step 1: To Create a Template which is a Json file that serves as a blueprint to specify the configuration of all the

    Demo to create Stack from Template
    Step 1: Login to AWS console Management -> Click on CloudFormation

     The sample template creates an Amazon EC2 instance and installs WordPress with a Local MySQL database for storage on it.
     The sample WordPress template contains an input parameter contains an input parameter , Key Name  which specifies the Amazon EC2 key Pair for the Amazon Ec2 instance which is declared in the template.
    Need a Valid key Pair before Developer can use the sample template.
    To see your Key pairs, open the Amazon EC2 console and then click on key Pairs in the navigation pane.
    If Developer doesn't have an Amazon EC2 key pair, create a Key Pair in the same region where you are creating the stack.


     AWS Wordpress template to create a Stack.
    Click on the AWS Cloudformation icon on the AWS Management Console homepage.->Click Create a New Stack
    The create stack wizard starts name your stack MyWPTestStack.
    For the Source, select select a sample template
    Scroll to the single Instance Samples section in the drop-down list group, choose the Wordpress Blog option, and then click next.

    2) On Specify Parameters Page
    On the Specify Parameters page, enter the DBPassword and the DBRoot Password, specify the DBDeveloper Developer name.

    And select the name of a Valid Amazon EC2 key pair from the Key Name dropdown list.
    Use CloudFormationSample and In SSH Location field, the Key pair created in the earlier step.
    The rest of the parameters are automatically populated from the template. Click Next to continue.
    Use CloudFormationSample, the key pair created in the earlier step. The Rest of the parameters are automatically populated from the template .Click next to continue.



     AWS Cloudformation creates the resources that are specified in the template.
    Automatically taken to the AWS Cloudformation console which shows a list of your stacks.
    Your stack's status should be CREATE_IN_PROGRESS

    Developer can see different events and their status, such as CREATE_IN_PROGRESS or CREATE_COMPLETE.

    Click on Parameter Tab to see ,Parameter specify .



    Events Tab will provide details of Various Steps Internally Happening for WordPress Blog instaltion

    Resources Tab will Indicate  various  AWS Service being Installed as Part of WordPress Installtion

    Templates Tab Defines Template Used by CloudFormation for Wordpress Blog Instaltion.








    After AWS CloudFormation sucessfully creates the stack, the status of the stack changes to create_complete. and Can be Verify by clicking Output Tab

    To Complete the Wordpress installation

    On the Outputs tab, click the Value for the WebsiteURL

    On the web page for the Wordpress installation, follow on-screen instruction to complete the Wordpress Installation.


    Provide Input As Admin of WordPress Installtion like username ,Password etc

    Once Installation completed ,Admin Screen will Appear And User Ready to use the Blog



    For Deleting the Installation,Click on delete Tab at the Top and WordPress Installation  would be deleted automatically.