In our example, we are running couple of high traffic websites on AWS EC2. Monthly data transfer out is more than 30TB. Just the bandwidth charges from AWS is almost $4000.
With CloudFlare in the front and caching all our assets (Images, Css and JS), it saves us over 20TB bandwidth per month. That’s more than $2500 savings.
Not to mention that you can get tons of other great features from CloudFlare, such as Web Application Firewall.
Worth mentioning that CloudFront from AWS charges same bandwidth rate as AWS EC2, so THUMB down to CloudFront & THUMB up to CloudFlare.
As of today, AWS WorkSpace (Standard) only comes with 50G user data (D drive). You can install WorkDoc client on your WorkSpace to have your data synced. However, if your WorkDoc data exceed 50G, this will fill up your WorkSpace D drive very quickly.
Here a work around:
- Start a EC2 Windows instance with a big enough EBS, say 300G. This instance must be launched in the same VPC as your WorkSpace.
- Join this instance to your AWS Directory, same Directory as your WorkSpace
- Install WorkDoc client on this EC2 instance and share the WorkDoc folder to Directory/Users
- Added this instance to the existing WorkSpace Controller security group or make sure it is accessible to WorkSpaces via Port 445
- In each WorkSpace, just map the shared drive on this EC2 instance. \\[ec2 instance computer name]\workdoc
There you have it, good speed, plenty of spaces for your WorkDoc data.
For how to join EC2 instance to your AWS Directory, please refer to this Doc (I am in AWS Sydney region, and we can only do this manually): http://docs.aws.amazon.com/directoryservice/latest/adminguide/join_windows_instance.html
You will also be able to add Directory Management tools on this EC2 instance for management purpose.
Hope this helps. If you have other ideas and suggestions, please feel free to let me know.
First of all, I am new to Ubuntu.
I am a Centos fan for last couple of years, but have heard of Ubuntu is a great system too, especially user friendly.
Today, one client asked me to rebuild a Amazon server for his Zend Framework PHP Web Application dut to its current stability issue. (Amazon Linux seems to have issue with MySQL which causes MySQL memory issue randomly). I figured it is a good time for me to try Ubuntu.
First, start up a new Amazon micro instance with Ubuntu LTS (LTS seems to be more stable and long term support).
Install Zend Server 6.0 Community Edition
Zend Server CE has made the installation so easy for us.
- SSH to server
- download Zend Server (DEB/RPM Installer Script)
- Unzip it and run the install script as root:
./install_zs.sh 5.3 or ./install_zs.sh 5.4 if you need 5.4 version PHP
- Simply ‘y’ when prompt
- Done – navigate to http://<server ip> you will see “It works”
- apt-get install mysql-server
- Please be noted the default MySQL sock is in here: /var/run/mysqld/mysqld.sock
- Navigate to http://<server ip>:10081 and set up the Zend Server
- Deploy Application
- Follow this link to download phpMyAdmin package and install it via Zend Server
- Well, you may want to disable the auto login for security reason, change auth_type to http in this file:
Set up FTP
- Follow this link
Have been played with both Async and Unison, I found Unison is more powerful, especially on 2 way syncing include deletion. Unison is easy to get start as well.
You can setup Unison by compiling the source, but it is not as easy as I thought – I ran into some libraries dependency conflicts.
Luckily, I am working on Centos servers. I can just use Yum to install it.
Enable Fedora EPEL repos for your Yum with protectbase
rpm -Uvh epel-release-5-4.noarch.rpm
yum install yum-protectbase.noarch -y
Install Unison via Yum
yum install unison -y
Enable SSH Access without Password
On local host, do these:
#followed by three ENTERs
ssh-copy-id -i .ssh/id_rsa.pub root@remotehost
Sample Unison Command
/usr/bin/unison /web/live1 ssh://remoteserver/web/live2 \
-ignore "Path WEB-INF/config" \
-ignore "Path WEB-INF/derby" \
-ignore "Path WEB-INF/test/test.xml"
HowTo Use unison File Synchronizer
3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id
I have installed many Linux systems, from Fedora, and now fall in love with Centos.
The best thing is you can install a lot of popular software just via YUM.
Here I just want to share that RPMForge is almost a must Repos you should add into your YUM.
It gives you a lot of useful packages that doesn’t come with default, such as phpmyadmin.
For how to install RPMForge, just follow this page.
On the other hand, if you would need latest version on PHP53, MYSQL etc, you should consider IUS Community.
It is proudly supported by RackSpace and comes with a lot of latest version packages.
For how to get started with IUS, just follow their Client User Guide.
Another tips to install latest version of PHP from IUS is to install php53u instead of php.
Server Time Issue
In Australia, we have day light saving in summer, which confuses a lot of my servers’ timing. To make it easier, just set up the NTP service and configure the right timezone.
- make a backup: mv /etc/localtime /etc/localtime.bak
- cp /usr/share/zoneinfo/Australia/Sydney /etc/localtime
Set up NTP:
- yum install ntp
- chkconfig ntpd on
- ntpdate 0.au.pool.ntp.org
- /etc/init.d/ntpd start
Please note that if you are doing the time setting on virtual system, like XenServer, you should change time on host because normally the guest system’s default time setting is locked with host.
With this new feature enabled in Amazon, what are the most valuable benefits can I get?
- All the system data are stored in Amazon EBS now and don’t need to worry data will be lost after system crashed or stopped.
- With Create-Image function, for Amazon EBS backed instance, we can now create an AMI much quicker and easier (one step). It will create a snapshot of current running instance’s EBS and then register that snapshot as an AMI automatically. To delete that snapshot, you will need to de-register that AMI first.
- Instance can be stopped without losing any data and can be restarted later on when you need it. (save $$ too).
What to be more careful?
- Data will be LOST if instance is TERMINATED! The whole EBS (Volume) will be deleted if you terminate the instance.
What you can do to be safer? (refer to: http://alestic.com/2010/01/ec2-instance-locking)
- Change the way of shutting down from inside of instance (Default to Stop, so no need to change manually)
- Change to Not deleting the EBS after termination.
- Change to instance attribute to disable API terminate command
- Having script to backup your data to S3 regularly
- Having script to take snapshot regularly
Amazon EC2 Instance provides key pair for SSH accessing, which is better than login and password authentication. However, if you still want to SSH with login and password – You can do that.
- Login to instance with keypair
ssh -i xxx.pem ......
- Change /etc/ssh/sshd_config file
- (Optional) Enable root access
- Restart SSHD
- (Optional) Try restart your instance if still doesn’t work