What do I need to know / learn to automatically deploy python?

I am starting a new webapp project in Python to get into an agile mind and I would like to do something "right" about deployment. However, I find the whole virtualenv / fabric / zc.buildout / etc file a bit confusing - I'm used to just uploading PHP files to the server and pointing the web server to it.

Once deployed, the server setup will look something like this, Nginx --proxy-to--> WSGI Webserver (Spawning) --> WSGI Middleware --> WSGI App (probably MNML or similar)


with a python webserver managed by a supervisor.

What deployment / packages / application setting should I look for? And is there some specific directory structure that I need to adhere to with my application to make deployment easier?

+2


source to share


3 answers


You already mentioned creation and that's all you need. Google for example assemblies for different parts. It takes a while to set it up the first time, but then you can reuse the setting between different projects.



Let the superboot run everything, not just the python server. Then start supervisor on reboot with either fron cron or init.d.

+2


source


The deployment history depends on your application. Are you using Django? Then Apache + mod_wsgi

deployment docs
make a good starting point. Then you can search Google in more detail, for example, 2-part , using pip

, virtualenv

, git

and fabric

.



Indeed, fabric

, virtualenv

, and all these other tools are designed to simplify and automate the deployment of the service. Initially, the steps from the documentation are probably enough. Once you get a feel for how things are working, you can go back to improving your process.

+4


source


I have heard good things about Fabric :

Cloth is a Python library and command line tool designed to optimize application deployment or performing system administration tasks over SSH. It provides tools for launching arbitrary shell commands (like a normal user login or via sudo

), uploading and downloading files, etc.

+2


source







All Articles