Package a virtualenv to deploy across multiple systems?

51 views
Skip to first unread message

Abraham Varricatt

unread,
Sep 21, 2016, 9:25:48 PM9/21/16
to Django users
Hello,

Do we have any standard/recommended way to distribute the python virtualenv used in a django application across multiple servers?

I'm able to write a provisioning script to do the following on a server,

(for brevity, this is just a high-overview)
* Clone the master branch of my django project
* Download, compile and alt-install python 3.5 from sources
* Create a virtualenv folder and configure my environment according to the requirements.txt of my django project
* setup httpd conf files, restart server .. etc

The OS I'm primarily targeting is centos7. For that matter, I'm doing my compiling on a centos7 box as well. 

My concern is that it feels wasteful to repeat the above steps on every system if I'm trying to scale across multiple machines. Is it possible to just provision the virtualenv on a single system, zip the folder and copy-paste to whichever systems I want to deploy to? Are there any concerns I need to be aware of, if I'm going by this approach?

Confused about django provisioning options,
Abraham V.

ludovic coues

unread,
Sep 22, 2016, 6:06:52 AM9/22/16
to django...@googlegroups.com
As long as you use similar hardware and the same OS version
everywhere, a zip should work. You might get some issue if each
machine have a different version of some lib on which python have
dependencies

2016-09-22 3:25 GMT+02:00 'Abraham Varricatt' via Django users
<django...@googlegroups.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/31679960-a802-469c-aea9-6431ea765735%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

Vadim Serdiuk

unread,
Sep 22, 2016, 9:53:08 AM9/22/16
to Django users
Hi. I suggest you to look at Docker.

четверг, 22 сентября 2016 г., 4:25:48 UTC+3 пользователь Abraham Varricatt написал:

Saeon Tao

unread,
Sep 22, 2016, 10:21:49 AM9/22/16
to Django users
i just been learning about openstack... which i think uses a lot of docker... the idea is to make all apps independent of OS

Ricardo Daniel Quiroga

unread,
Sep 22, 2016, 2:36:17 PM9/22/16
to django...@googlegroups.com
create a docker image alternative?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.



--

Ricardo Daniel Quiroga

Vadym Serdiuk

unread,
Sep 22, 2016, 3:10:16 PM9/22/16
to django...@googlegroups.com
=the idea is to make all apps independent of OS=
Yeah! Docker do this. And any more... Docker can launch all parts of application in independent containers. And you can make independent scenarios and even load different libraries for different parts of application. And with docker-composer you can make single scenario for all containers and launch all of them with one command. And with docker-swarm you can create scalable system.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/Nw8MTxqhWMQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.



--
С уважением, Сердюк Вадим.
Reply all
Reply to author
Forward
0 new messages