Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88643 > unrolled thread
| Started by | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| First post | 2015-04-08 11:24 +1000 |
| Last post | 2015-04-08 05:00 -0700 |
| Articles | 5 — 4 participants |
Back to article view | Back to comp.lang.python
Automate deployment of Python application from multiple VCS repositories Ben Finney <ben+python@benfinney.id.au> - 2015-04-08 11:24 +1000
Re: Automate deployment of Python application from multiple VCS repositories Paul Rubin <no.email@nospam.invalid> - 2015-04-07 18:52 -0700
Re: Automate deployment of Python application from multiple VCS repositories Damien Wyart <damien.wyart@free.fr> - 2015-04-08 12:10 +0200
Re: Automate deployment of Python application from multiple VCS repositories Damien Wyart <damien.wyart@free.fr> - 2015-04-08 12:20 +0200
Automate deployment of Python application from multiple VCS repositories Matt <matthew@baltrusitis.com> - 2015-04-08 05:00 -0700
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2015-04-08 11:24 +1000 |
| Subject | Automate deployment of Python application from multiple VCS repositories |
| Message-ID | <mailman.129.1428456298.12925.python-list@python.org> |
Howdy all,
What tools are available to automate deployment of a Python application
comprising many discrete modules, spread across different code bases in
different VCS repositories?
My idea is to have a single definition (itself under VCS control) that
specifies VCS locations and branches, a hierarchy into which all the
modules fit, and a deployment host.
host foo:
repo ‘spam-common <URL>’, branch ‘trunk’, at ‘./common/’
repo ‘beans <URL>’, branch ‘version 6.1’, at ‘./’
repo ‘sausage <URL>’, branch ‘trunk’, at ‘./third-party/sausage/’
host bar:
repo ‘spam-common <URL>’, branch ‘maint’, at ‘./common/’
repo ‘beans <URL>’, branch ‘version 7.0’, at ‘./’
repo ‘eggs <URL>’, branch ‘master’, at ‘./third-party/eggs/’
repo ‘toast <URL>’, branch ‘trunk’, at ‘./third-party/eggs/toast/’
repo ‘sausage <URL>’, branch ‘version 1.4’, at ‘./third-party/sausage/’
The deployment tool, when told which host specification to use, then
gathers the code by exporting it from its disparate branches, fits it
into the directory hierarchy, and deploys that to the specified host.
The goal is to be able to have multiple host specifications, each of
which needs a different set of code repositories (and often different
branches within those repositories) to be built into the deployed
application.
What frameworks are there to do this for Python code?
--
\ “Know what I hate most? Rhetorical questions.” —Henry N. Camp |
`\ |
_o__) |
Ben Finney
[toc] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2015-04-07 18:52 -0700 |
| Message-ID | <87egnvfkt8.fsf@jester.gateway.sonic.net> |
| In reply to | #88643 |
Ben Finney <ben+python@benfinney.id.au> writes: > host foo: > repo ‘spam-common <URL>’, branch ‘trunk’, at ‘./common/’ > repo ‘beans <URL>’, branch ‘version 6.1’, at ‘./’ ... > What frameworks are there to do this for Python code? I don't know what's out there for Python, but that reminds me a bit of the Erlang tool "rebar": https://github.com/rebar/rebar I half remember that there was a later alternative to rebar that had similarities and maybe improvements. Anyway, these might be worth looking at if you're thinking of developing a Python tool.
[toc] | [prev] | [next] | [standalone]
| From | Damien Wyart <damien.wyart@free.fr> |
|---|---|
| Date | 2015-04-08 12:10 +0200 |
| Message-ID | <5524fe88$0$3300$426a34cc@news.free.fr> |
| In reply to | #88643 |
* Ben Finney <ben+python@benfinney.id.au> in comp.lang.python: > What tools are available to automate deployment of a Python > application comprising many discrete modules, spread across different > code bases in different VCS repositories? Fabric might help but is more "low-level" than what you seem to look for. http://docs.fabfile.org/en/latest/tutorial.html -- DW
[toc] | [prev] | [next] | [standalone]
| From | Damien Wyart <damien.wyart@free.fr> |
|---|---|
| Date | 2015-04-08 12:20 +0200 |
| Message-ID | <552500f9$0$3051$426a34cc@news.free.fr> |
| In reply to | #88658 |
> Fabric might help but is more "low-level" than what you seem to look > for. > http://docs.fabfile.org/en/latest/tutorial.html Elsewhere in the spectrum is Saltstack, but application deployment usecases are not that well documented. https://groups.google.com/forum/#!msg/salt-users/w9hxKpXVL04/5NIHE9aYWscJ -- DW
[toc] | [prev] | [next] | [standalone]
| From | Matt <matthew@baltrusitis.com> |
|---|---|
| Date | 2015-04-08 05:00 -0700 |
| Message-ID | <20595511-d653-46be-b03b-a4bfd05d0085@googlegroups.com> |
| In reply to | #88643 |
This seems highly do-able with Ansible. They have a git module, if that's your VCS, that fits in here perfectly.
I would make two lists of variables, the first for repo URL/branch info and the second for their destinations. Then Ansible uses simple YAML to write the commands. Here's an overly simplified version that I'm typing up quick on my phone:
- for each item in /git_variables.yml
git clone {{ host }} {{ branch }} {{ destination }}
Relevant info is here:
http://docs.ansible.com/playbooks_variables.html
http://docs.ansible.com/playbooks_loops.html
http://docs.ansible.com/git_module.html
I'm in #python and #ansible as heatmeiser if you need any low level detail.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web