{"action":"created","issue":{"url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy/issues/1","repository_url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy","labels_url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy/issues/1/comments","events_url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy/issues/1/events","html_url":"https://github.com/rifaterdemsahin/awscodedeploy/issues/1","id":354089974,"node_id":"MDU6SXNzdWUzNTQwODk5NzQ=","number":1,"title":"Step by Step Documentation about how to implement","user":{"login":"rifaterdemsahin","id":5270036,"node_id":"MDQ6VXNlcjUyNzAwMzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5270036?v=4","gravatar_id":"","url":"https://api.github.com/users/rifaterdemsahin","html_url":"https://github.com/rifaterdemsahin","followers_url":"https://api.github.com/users/rifaterdemsahin/followers","following_url":"https://api.github.com/users/rifaterdemsahin/following{/other_user}","gists_url":"https://api.github.com/users/rifaterdemsahin/gists{/gist_id}","starred_url":"https://api.github.com/users/rifaterdemsahin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rifaterdemsahin/subscriptions","organizations_url":"https://api.github.com/users/rifaterdemsahin/orgs","repos_url":"https://api.github.com/users/rifaterdemsahin/repos","events_url":"https://api.github.com/users/rifaterdemsahin/events{/privacy}","received_events_url":"https://api.github.com/users/rifaterdemsahin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-26T12:13:43Z","updated_at":"2018-09-03T16:28:18Z","closed_at":null,"author_association":"OWNER","body":"STEP 1 Create code deploy ( Screenshots )\r\nSTEP 2\r\n\r\n\r\nAlso include the necessary links for the reader to be able to go deep dive to the information"},"comment":{"url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy/issues/comments/418157066","html_url":"https://github.com/rifaterdemsahin/awscodedeploy/issues/1#issuecomment-418157066","issue_url":"https://api.github.com/repos/rifaterdemsahin/awscodedeploy/issues/1","id":418157066,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODE1NzA2Ng==","user":{"login":"madhavisringarapu","id":21379935,"node_id":"MDQ6VXNlcjIxMzc5OTM1","avatar_url":"https://avatars3.githubusercontent.com/u/21379935?v=4","gravatar_id":"","url":"https://api.github.com/users/madhavisringarapu","html_url":"https://github.com/madhavisringarapu","followers_url":"https://api.github.com/users/madhavisringarapu/followers","following_url":"https://api.github.com/users/madhavisringarapu/following{/other_user}","gists_url":"https://api.github.com/users/madhavisringarapu/gists{/gist_id}","starred_url":"https://api.github.com/users/madhavisringarapu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhavisringarapu/subscriptions","organizations_url":"https://api.github.com/users/madhavisringarapu/orgs","repos_url":"https://api.github.com/users/madhavisringarapu/repos","events_url":"https://api.github.com/users/madhavisringarapu/events{/privacy}","received_events_url":"https://api.github.com/users/madhavisringarapu/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T16:28:18Z","updated_at":"2018-09-03T16:28:18Z","author_association":"COLLABORATOR","body":"AWS CODEDEPLOY CREATING REDIS USING ANSIBLE\r\nStep by step documentation about how to implement this:\r\n\r\nPlease make sure that you add the following files to your project for this to work \r\n     appspec.yml \r\n     the entire scripts folder \r\n\r\nStep1:\r\n\r\n1. Create IAM Roles \r\nCodeDeploy & EC2CodeDeploy \r\n•  Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/. Create role with CodeDeploy name.\r\n \r\n \r\n \r\nCreate CodeDeploy role attach the following policy(codedeployec2) in permissions:\r\n// Policy Role for Code Deploy\r\n{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Action\": [\r\n        \"autoscaling:PutLifecycleHook\",\r\n        \"autoscaling:DeleteLifecycleHook\",\r\n        \"autoscaling:RecordLifecycleActionHeartbeat\",\r\n        \"autoscaling:CompleteLifecycleAction\",\r\n        \"autoscaling:DescribeAutoscalingGroups\",\r\n        \"autoscaling:PutInstanceInStandby\",\r\n        \"autoscaling:PutInstanceInService\",\r\n        \"ec2:Describe*\"\r\n      ],\r\n      \"Effect\": \"Allow\",\r\n      \"Resource\": \"*\"\r\n    }\r\n  ]\r\n}\r\nAttach the following policy in edit trust relationship.\r\n// Policy Trust for Code Deploy\r\n{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Sid\": \"\",\r\n      \"Effect\": \"Allow\",\r\n      \"Principal\": {\r\n        \"Service\": [\r\n          \"codedeploy.us-west-2.amazonaws.com\",\r\n          \"codedeploy.us-east-1.amazonaws.com\"\r\n        ]\r\n      },\r\n      \"Action\": \"sts:AssumeRole\"\r\n    }\r\n  ]\r\n}\r\nCreate EC2CodeDeploy  role like the above role and attach the following policy.\r\n// Instance Role for EC2 Instance\r\n{ \r\n    \"Version\": \"2012-10-17\", \r\n    \"Statement\": [   \r\n      {     \r\n          \"Action\": [       \r\n              \"s3:Get*\",       \r\n              \"s3:List*\"     \r\n          ],     \r\n          \"Effect\": \"Allow\",     \r\n          \"Resource\": \"*\"   \r\n      } \r\n    ]\r\n}\r\nStep2:\r\n\r\nCreate EC2 instance with following categories \r\n\r\n     a. Choose AMI: Amazon Linux AMI \r\n\r\n     b. Choose Instance type: t2.micro \r\n\r\n     c. Configure Instance: Choose EC2CodeDeploy IAM role \r\n\r\n     d. Tag Instance: Name it what you please \r\n\r\n     e. Configure Security Group: \r\n\r\n         HTTP TCP 80 0.0.0.0/0 \r\n\r\n         HTTP TCP 80 ::/0 \r\n\r\n         SSH TCP 22 (YOUR IP ADDRESS) \r\n\r\n         HTTPS TCP 443 0.0.0.0/0 \r\n\r\n         HTTPS TCP 443 ::/0 \r\n\r\n     f. LAUNCH INSTANCE \r\n\r\n3. SSH into EC2 instance \r\n\r\n4. Command line of Amazon Linux AMI \r\n\r\n     a. When server is booted \r\n\r\n          sudo su \r\n\r\n          yum -y update \r\n\r\n          yum install -y aws-cli \r\n\r\n          cd /home/ec2-user \r\n\r\n     b. Here you will setup your AWS access, secret, and region. \r\n\r\n          aws configure \r\n\r\n          aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1 (if in east AWS) \r\n\r\n          aws s3 cp s3://aws-codedeploy-us-west-2/latest/install . --region us-west-2 (if in west AWS) \r\n\r\n          chmod +x ./install \r\n\r\n     c. This is simply a quick hack to get the agent running faster. \r\n\r\n          sed -i \"s/sleep(.*)/sleep(10)/\" install \r\n\r\n          ./install auto \r\n\r\n     d. Verify it is running. \r\n\r\n          service codedeploy-agent status\r\nAfter successful completion of the above process we will get the code deploy agent status as below.\r\n \r\n\r\nStep3:\r\nOpen CodeDeploy service in AWS console and create a application and deployment group as following.\r\n \r\nChoose the EC2 instance on which you want to deploy your application by selecting the instance tags . \r\n \r\n\r\nAfter successful deployment of application you will get the page like below. \r\n\r\nAfter deployment of the application we will get the following page.\r\n \r\nOpen the ec2 instance by using public ip of the instance in browser you will get the webpage which I have deployed using the code deploy.I have deployed web application using code deploy so I am getting this webpage.\r\n\r\n \r\nNow our application is deploy,I want to install a redis server on this instance using a ansible playbook.\r\nInstall Ansible locally and run the redis.yml which I have put in my github account.\r\nTo run the playbook run the command: $ansible-plabook redis.yml\r\nRedis server will be installed on our instance.\r\n\r\n"}}
{"actor":{"display_login":"madhavisringarapu"}}