howto deploy web2py on amazon ec2
DESCRIPTION
Step by step instructions to deploy web2py one one Amazon EC2 InstanceTRANSCRIPT
![Page 1: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/1.jpg)
web2py Amazon EC2Basic How-to
![Page 2: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/2.jpg)
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.
![Page 3: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/3.jpg)
Ready to deploy an Instance
An instance is a ready made virtual machine that will run on the amazon cloud.
Choose "AMS Management Console"
![Page 4: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/4.jpg)
Start to deploy an Instance
Click on "Launch Instance"
![Page 5: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/5.jpg)
Choose an Instance
Choose one of the ubuntu servers
we tried ami-2675974f
32 bits are "small instance"
EMB ones have persistence storage
![Page 6: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/6.jpg)
... keep going ...
![Page 7: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/7.jpg)
... keep going ...
![Page 8: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/8.jpg)
... careful now (security) ...Give a name to your security .pem certificate
Save it on a safe place on your machine
Remember your.pem
![Page 9: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/9.jpg)
... keep going ...
Leave security group as "default"
![Page 10: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/10.jpg)
Back to Your Instances
Wait for your Instance to start
Its IP address is under "public DNS"
Remember instanceip
![Page 11: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/11.jpg)
Allow AccessClick on Security Groups
Select the "default" group (the only one)
At the bottom enable ssl, http, https
![Page 12: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/12.jpg)
Almost done...Connect to your instance
localhost> ssh -i [your.pem] [instanceip]
![Page 13: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/13.jpg)
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
![Page 14: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/14.jpg)
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
![Page 15: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/15.jpg)
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)"
![Page 16: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/16.jpg)
Done
Now you are ready to connect to
http://[instanceip]
https://[instanceip]/admin
![Page 17: Howto deploy Web2py on amazon Ec2](https://reader033.vdocuments.site/reader033/viewer/2022061119/546b21b9af795976298b4a5d/html5/thumbnails/17.jpg)
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.