Download - Howto deploy Web2py on amazon Ec2
web2py Amazon EC2Basic How-to
Create an EC2 Account
http://aws.amazon.com/ec2/
Use you Amazon login to register for EC2
Give your credit card info
You will be billed differently depending on the instance you choose and the site traffic. Later we will use the smaller possible instance.
Ready to deploy an Instance
An instance is a ready made virtual machine that will run on the amazon cloud.
Choose "AMS Management Console"
Start to deploy an Instance
Click on "Launch Instance"
Choose an Instance
Choose one of the ubuntu servers
we tried ami-2675974f
32 bits are "small instance"
EMB ones have persistence storage
... keep going ...
... keep going ...
... careful now (security) ...Give a name to your security .pem certificate
Save it on a safe place on your machine
Remember your.pem
... keep going ...
Leave security group as "default"
Back to Your Instances
Wait for your Instance to start
Its IP address is under "public DNS"
Remember instanceip
Allow AccessClick on Security Groups
Select the "default" group (the only one)
At the bottom enable ssl, http, https
Almost done...Connect to your instance
localhost> ssh -i [your.pem] [instanceip]
Almost done...Install web2py
localhost> ssh -i [your.pem] [instanceip]> wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh> chmod +x setup-web2py-ubuntu.sh> ./setup-web2py-ubuntu.sh
Almost done...This will take a while and may ask you some questions
localhost> ssh -i [your.pem] [instanceip]> wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh> chmod +x setup-web2py-ubuntu.sh> ./setup-web2py-ubuntu.shbla bla bla
Almost done...Enable the admin interface
localhost> ssh -i [your.pem] [instanceip]> wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh> chmod +x setup-web2py-ubuntu.sh> ./setup-web2py-ubuntu.shbla bla bla> sudo -u www-data bash> cd /home/www-data/web2py> python -c "from gluon.main import save_password; save_password('hello',443)"
Done
Now you are ready to connect to
http://[instanceip]
https://[instanceip]/admin
Caveats
What have we done?
We have setup a virtual machine running on the Amazon cloud with web2py running on it.
What have we NOT done?
We have not setup elastic computing and storage.
Can it be done?
Yes. But it is not described here.