Amazon has set up a wide range of web services. We will be using EC2 in this tutorial. First we need to provision resources and start up a virtual machine.
1. First log into AWS Management Console and choose EC2.
2. The overview page shows AWS EC2 resources. There are no running instances. Now we click on “Launch Instance” to set up an instance.
3. Choose an Amazon Machine Image (AMI). Ahsay Backup Software supports Red Hat Linux and Windows Server.
4. Choose the instance type. Instance type is a selection of virtual CPU, memory, storage and network performance. We choose the smallest type for testing purpose. Click “Next: Configure Instance Details”.
5. Follow on-screen instructions to input instance details. Default settings should be fine. Click “Next: Add Storage”
6. Add storage to the instance. Default storage size is 10GB. You can add more if needed. Confirm the storage setting.
7. Amazon interface allows you to add tags to the instance. It’s a very handy feature when you have hundreds of similar virtual machines.
8. Security group is a set of firewall rules that control traffic to your instance. Only allow a minimum amount of ports for connection. Do not open all ports to the public.
Click “Review and Launch”.
9. Review the instance settings. If settings are correct, click “Launch” to start the instance.
10. There are no key pair existing. Create a new key pair and type in a key pair name, then download the key pair file with extension “.pem”. Save the file in a safe place. You will need this file to access your virtual server.
Click “Launch Instances”.
11. Return to the EC2 console page. Wait until your instance state changes from “pending” to “running“.
We have now successfully created a RedHat instance. You can create Windows server instance using similar procedures.
Let’s connect to the server and install Ahsay Backup Software.
Installing AhsayOBS in Linux
1. On the instance overview page, click “Connect”. You will see two methods to connect to your instance. We now use PuTTY to connect the instance.
Using PuTTY requires you to convert the private key format generated by Amazon (.pem) to the required PuTTY format (.ppk). PuTTY has a tool named PuTTYgen to do so. Refer to the AWS documentation for details.
If you are using SSH client in Linux, you can just follow the instructions in AWS “Connect” page.
2. After successful connection, you should see the following screen.
3. Following the AhsayOBS Setup manual, the commands to install AhsayOBS is as follows.
Change to root login
# sudo su –
Download AhsayOBS from http://ahsay-dn.ahsay.com/current/obsr-nix.tar.gz
Define the directory you would like to install the software by settings AhsayOBSR_HOME environment variable.
# OBS_HOME=/usr/local/obs; export OBS_HOME
Untar to the OBS home folder
# mkdir $OBS_HOME
# cp obsr-nix-tar.gz $OBS_HOME
# cd $OBS_HOME
# gunzip obsr-nix.tar.gz
# tar –xf obsr-nix.tar
4. Go to web console to check if AhsayOBS is installed properly. To verify that, please point the web browser to http://<your-backup-server>/.
Installing AhsayOBS in Windows
1. Using Windows Remote Desktop Connection or any other remote desktop client can easily connect to a Windows virtual server.
2. In the AWS Connect page, you can find the IP of the virtual machine. Click “Get Password” to generate the Administrator password by uploading private key file. Your Administrator password will be shown.
3. After successful login, you can download AhsayOBS (exe version) from our website. Execute the obsr-win.exe file downloaded and the install wizard will be shown. Select the language that you would like to use during the installation from the dropdown box and click the [OK].
Best Practices in using AWS
1. Protect your key pairs and access keys
Key pairs consist of a public key and a private key. Access keys are access key ID and secret access key to sign programmatic requests to AWS when you’re using the AWS SDK, REST, or Query APIs. These keys are important credentials that allow access to all your resources, including your billing information. Keep your keys locked away like your credit card number. Don’t send your keys to anyone.
2. Create individual IAM users
AWS allows you to create IAM users as individual users to access your AWS account. You can grant different permissions to each IAM user. If necessary, you can change or revoke an IAM user’s permissions any time. It will be much easier to control permission than using the root account credentials. If your root account credentials are leaked, it would be difficult to revoke them.
(Refer to AWS guide for more best practices: http://docs.aws.amazon.com/IAM/latest/UserGuide/IAMBestPractices.html)
3. Understand the AWS pricing model
AWS has increasingly large number of web products. It’s important for users to understand the pricing model for each product that fits your needs. Misunderstanding or wrong configurations can easily lead to skyrocketing bills at the end of month if you are not careful.
4. Use the monthly calculator to estimate your monthly expense
Amazon has provided tools for you to understand the pricing model. In face of the complexity of products, AWS has provided a monthly calculator to estimate your monthly expenses. It would give you a detailed picture of the cost structure before committing to use AWS for production. (http://calculator.s3.amazonaws.com/index.html).
5. Set up alarm to monitor billing
Get notified for your usage. AWS puts monitoring service into a product called “CloudWatch”, in which you can monitor operational and performance metrics for your AWS cloud resources and applications. It is best practice to create an billing alarm. It will send you notification when the bill has exceeded your expected charge.