Posts

Showing posts from December, 2016

Automating Windows Server backups on Amazon S3

Image
1: Create an Amazon AWS account If you don't already have an AWS account - create it here , it's free. Amazon's "free usage tier" on S3 gives you 5GB free storage from scratch, so after registering, sign in to your "AWS Management Console", select the "S3" tab and create one or more "buckets". 2: Get your access keys You will need security credentials to access your online storage from the server, so click your account name - "Security Credentials" - "Access Keys" and copy your Key ID and Secret. 3: Download "S3Sync" "S3Sync" is a great free command-line application from SprightlySoft. It is .NET-based and even comes with the source codes. At the time of writing this post their website was down, so I published the tool on Google Docs here: S3Sync.zip . The tool syncs a given folder with your S3 bucket. And the best part - unlike similar scripts and utilities it performs a "smar...

AWS CodeDeploy Using S3

Image
AWS has great set of tools which helps simplify the deployment process in their cloud and one such tool is AWS CodeDeploy.  In this blog, we will deploy the application using AWS CodeDeploy using S3. Consider a use case where you have 20 instances and you want to deploy your code or change the configuration file of these instances. The only solution would be to login into each particular instance and then changing the configuration file. AWS CodeDeploy lets you do this in just few steps . You just create a deploy application and your code will be deployed in all these 20 instances. Deploying code without using AWS CodeDeploy                     Deploying code using AWS CodeDeploy There are two ways to deploy code in Amazon Web Services:- Using GIT  Using AWS S3 (Simple Storage Service) Here, we will deploy the code using Amazon S3 service. Let us also understand few useful terms which will b...

Restrict IAM User to Particular Route53 Hosted Zone

Image
Through AWS Internet Access Management ( IAM ) it’s possible to add people to manage all or parts of your AWS account. It takes just a few minutes to setup permissions, roles and a new user but one item I battled to find was how to restrict the permissions of a certain user or group. So, without further delay, here is the change that is needed to restrict permissions to a certain domain in IAM: Setup your new User and Permissions (and Roles if needed). From within Route 53 copy the Hosted Zone ID for the domain you want to allow access. From the IAM dashboard Create a new policy: Change the Hosted zone ID with your hosted zone ID which you want to restrict. {      "Version": "2012-10-17",    "Statement":[       {          "Action":[             "route53:ChangeResourceRecordSets",             "route53:GetHostedZone",      ...

Deployment automation using AWS Code Depoly

Image
                Codedeploy is one of the deployment service by AWS. The application can be deployed using either a s3 bucket or a git repository which contains the deployable content like code, scripts, configurations files, executables etc. In this blog post, we are going to deploy a wordpress application in an elastic, highly available and scalable environment using codedeploy. Get things ready Get a copy of the WordPress source code in the local system using git command: git clone https : / / github . com / WordPress / WordPress . git / tmp / WordPress Create Scripts to run your Application. Make a directory .scripts in the WordPress folder: mkdir - p / tmp / WordPress / . scripts Create the following shell scripts in the .scripts folder: sudo vim install_dependencies.sh: #!/bin/bash yum groupinstall - y "PHP Support" yum install - y php - mysql yum install - y nginx yum install - y php - fpm Next sudo ...

Tuning Your Apache Server

Image
                              Apache configuration has a major affect on your Linode’s performance. The easiest way to increase server performance is to turn off unneeded modules. This guide covers Apache modules, information on which modules to turn off, and other Apache performance tuning options. The steps in this guide require root privileges. Be sure to run the steps below as root or with the sudo prefix. Tools There are a variety of tools that can assist in determining if you need to alter resource settings, including the top command and the load-testing program Siege. Siege’s own Longview service can also help in server monitoring. At minimum, familiarize yourself with the RAM and CPU usage of your server. Discover usage statistics with these commands: echo [PID]  [MEM]  [PATH] &&  ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 20 ps -eo pcpu...