Move to Cloud: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
No edit summary
Line 108: Line 108:
===Blender===
===Blender===
Still don't have this working, but http://www.noobslab.com/2011/09/nvidia-drivers-for-ubuntu-1110-oneiric.html got me past the first set of errors.
Still don't have this working, but http://www.noobslab.com/2011/09/nvidia-drivers-for-ubuntu-1110-oneiric.html got me past the first set of errors.
== PuTTY Notes ==
To make the display cleaner, in Window > Appearance change the font to Courier New and in Window > Translation change the remote character set to UTF-8.


[[Category:Projects]]
[[Category:Projects]]
[[Category:Code]]
[[Category:Code]]

Revision as of 20:03, 9 January 2013

Currently reading: Programming Amazon EC2.

Setup

One tiny instance will run all the live sites, another tiny instance will be used for development. This will also host a Git server.

Cost

http://calculator.s3.amazonaws.com/calc5.html

Just messing around with the calculator, I can get a pretty sweet setup for less than $25 a month. If I run everything on a single micro instance, it's free.

Plan

  1. Get a tiny instance up and running with a lamp stack
  2. Buy a test domain from Amazon and get that hooked up
  3. Terminate it and make sure the EBS volume sticks around
  4. Reattach the volume to a new instance
  5. Try attaching the volume to larger instance.
  6. Transfer the sites over (data)
  7. Confirm everything is up, running and works
  8. Transfer domains
  9. Try to figure out SSL

Also try

  • Put the database (data) on a separate EBS volume
  • Try running that volume on a separate instance (one for apache, one for MySql) - this would allow a lot of scaleability
  • Running FTP server
  • Running GIT
  • AWS command line tools

Registrars

http://lifehacker.com/5943452/five-best-domain-name-registrars

Should move away from Dot 5, just not what I need.

Things to Learn

  • How to backup/restore an image
  • I should really learn vim
  • https?
  • if I run my own DB, how does load balancing work (I can always just use the Amazon services)
  • Can I install command line tools on an instance - then I can have one instance controlling others
  • http://aws.amazon.com/articles/1663

Notes

startup script (for ubuntu) in /etc/init.d/ec2 and to make sure it's run at startup, "update-rc.d ec2 defaults"

Tools and Setup

Server Type

I've been using Ubuntu server, and that seems to be work very well. The only quirk (and perhaps not a bad one) is that the system does not allow you to log in as root, you must instead issue sudo.

Update

Do this first. Do it.

sudo apt-get update

Server Setup

Tasksel seems to be a good tool for system setup and is already installed in Ubuntu, just run "sudo tasksel".

More here: http://www.unixmen.com/install-lamp-with-1-command-in-ubuntu-1010-maverick-meerkat/

Webmin

Note, the initial attempt to install webmin will fail, but it will tell apt what it needs to finish. When the apt-get -f install command is run, it will get everything and install webmin.

http://www.webmin.com/deb.html

  1. wget http://prdownloads.sourceforge.net/webadmin/webmin_1.610_all.deb
  2. sudo dpkg --install webmin_1.610_all.deb
  3. sudo apt-get -f install
  4. sudo ufw allow 10000
  5. sudo pico /etc/webmin/miniserv.conf
    • change ssl=1 to ssl=0
  6. sudo /usr/share/webmin/changepass.pl /etc/webmin root PASSWORD
  7. sudo /etc/webmin/restart

PhpMyAdmin

sudo apt-get install phpmyadmin

Attaching Database Volume

  1. Attach a volume through AWS interface
  2. sudo parted /dev/DEVICE
    1. mklabel msdo
    2. mkpart primary 1 -1
    3. quit
  3. sudo mkfs.ext4 /dev/DEVICE1
  4. sudo mkdir -m 000 /vol
  5. sudo mount /dev/DEVICE1 /vol
  6. sudo /etc/init.d/mysql stop
  7. sudo mkdir /vol/etc /vol/lib /vol/log
  8. sudo mv /etc/mysql /vol/etc/
  9. sudo mv /var/lib/mysql /vol/lib/
  10. sudo mv /var/log/mysql /vol/log/
  11. sudo mkdir /etc/mysql /var/lib/mysql /var/log/mysql
  12. sudo /etc/init.d/mysql start

VNC Setup

  1. Update the system
  2. Install a desktop either through tasksel or sudo apt-get install ubuntu-desktop
  3. sudo apt-get install vnc4server
  4. vncserver :1
  5. vncserver -kill :1 (starting and stopping it generates some necessary files
  6. sudo pico ~/.vnc/xstartup
    • Erase the last two lines
    • add "gnome-session &" at the end
  7. sudo passwd ubuntu
  8. vncserver :1
  9. Open ports 5900-5910
  10. Connect! I recommend Remmina (or RealVNC for windows)

Blender

Still don't have this working, but http://www.noobslab.com/2011/09/nvidia-drivers-for-ubuntu-1110-oneiric.html got me past the first set of errors.

PuTTY Notes

To make the display cleaner, in Window > Appearance change the font to Courier New and in Window > Translation change the remote character set to UTF-8.