whiskeylover / idreamoftoast

idreamoftoast
Apache License 2.0
1 stars 0 forks source link

Investigate deployment strategy #3

Closed danriti closed 11 years ago

danriti commented 11 years ago

Preliminary plan is to deploy on Dreamhost, so need to do some investigations!

danriti commented 11 years ago

I want to make deployment of code a single command. This can be accomplished with one of several strageties:

Post-receive hook

After doing some preliminary research, this seems rather doable with Dreamhost with the following architecture:

Fabric

http://docs.fabfile.org/en/1.4.3/tutorial.html

danriti commented 11 years ago

@whiskeylover i'm ready to start integrating the application on dreamhost, so I'm gonna need dreamhost panel access!

Dreamhost has the ability to grant others access to your panel: https://panel.dreamhost.com/index.cgi?tree=users.access

whiskeylover commented 11 years ago

@danriti I've given you access to idreamoftoast.com domain.

danriti commented 11 years ago

@whiskeylover awesome! just checked and it looks good, i will start getting this setup tonight!

danriti commented 11 years ago

@whiskeylover i need the ability to Manage Users on your dreamhost panel (so i can SSH to the box)! let me know when you got a second to hook it up =)

whiskeylover commented 11 years ago

@danriti You now have "Manage Users" privileges on "notfunk" user.

danriti commented 11 years ago

@whiskeylover unfortunately, Dreamhost uses a One User Per Domain policy. Thus, we need to have a single user account that we both use to SSH into the server.

right now the whiskeylover account is setup to run the domain, so we can either both use this account, use mine, or delete notfunk and create a shared one. whichever you decide, just make sure I have access to the account (and email/text me the password!)

whiskeylover commented 11 years ago

@danriti -- I've just give you the access to the domain and removed myself for the time being. We can think about the shared access in the evening. But for the time being, you have access. Let me know if it doesn't work.

Also, I tried deploying the files yesterday and earlier today, and found out a few things

You'll see a different project in the folder right now. I was just trying out a few things. Feel free to rm -r * from the idreamoftoast.com folder and configure it from scratch.

danriti commented 11 years ago

@whiskeylover just got home and going to dig into this tonight! however, i need to know if you did anything peticular to get this to work locally. a detailed list of procedures would be helpful...let me know!

danriti commented 11 years ago

@whiskeylover so i'm getting stuff started, however i need access to create a MySQL database! hook me up =)

danriti commented 11 years ago

@whiskeylover so i wiped out your initial work and started from scratch. got a fair amount configured already, however I still need access to creating MySQL databases to continue. let me know when you got a free moment to hook me up and i will continue~

whiskeylover commented 11 years ago

@danriti -- I've created a database called idreamoftoast. I'm emailing you details separately. You have all privileges on this database.

whiskeylover commented 11 years ago

@danriti -- just noticed that I've hardcoded the address 127.0.0.1:5000 in a few places in index.html, dream.html and assets/js/app.js. Can you either change them to idreamoftoast.com or change them to relative addresses.

danriti commented 11 years ago

@whiskeylover yah doing worry about the hardcoded address. that is going to become a relative address.

basically my plan is to make a new branch called production. this will allow us to see how different our assumed development environment was from production. then i will be able to start working on merging them together so that their is little to no difference!

whiskeylover commented 11 years ago

just got home and going to dig into this tonight! however, i need to know if you did anything peticular to get this to work locally. a detailed list of procedures would be helpful...let me know!

@danriti -- I ran two servers. One was a python -m SimpleHTTPServer for the public folder, and the other one was the python toast/app.py for the flask environment.

Nothing special otherwise.

danriti commented 11 years ago

@whiskeylover we are live! http://idreamoftoast.com/dream.html

mysql> select name, created_on from dream;
+-------+---------------------+
| name  | created_on          |
+-------+---------------------+
| pizza | 2013-05-03 05:30:24 |
+-------+---------------------+
1 row in set (0.00 sec)

we got a bunch of work ahead of us, but we can partially celebrate now =)

whiskeylover commented 11 years ago

Yay!

Thanks @danriti

danriti commented 11 years ago

Since initial deployment was a success, going to close this issue and create new ones in favor of some of the changes I'm making to merge development and production.