Apologies, but chef/vagrant etc... have so many tools built around them that sometimes it is difficult to figure which one is a good fit for the problem at hand. So before getting started with the actual work, I'd like to confirm which tool to look at.
I am spinning up VirtualBox instances with Vagrant, using Chef. It mostly works, but is slow at times and some of the least interesting steps from my point of view seem the most challenging to automate.
Basically, my current system consists of:
install a bunch of fairly static prerequirements, some of which are hard to automate (cx_oracle) or big.
build my actual application.
Here's a flowchart of sorts
Vagrant
+---------------------+
|Ubuntu 14.04 box |
+---------------------+
+---------------------+ +-----------------------+ +----------------------------+
|Chef with berkshelf +------->+ install complicated +----> | |
| | | static requirements | | postgres |
+-------------------+-+ +-----------------------+ | |
| | |
| | cx_oracle connectivity |
| | |
| | |
| | large databases that are |
| | fixed and do not change |
| +----------------------------+
|
| +-----------------------+ +----------------------------+
| | dynamic stuff for my | | python code |
+--------> | build +----> | pip requirements |
+-----------------------+ | database migrations |
| |
+----------------------------+
What I would like to do.
It would help my workflow if I could only do the first part occasionally and save it to a new box. And it would really help me if I could cheat by doing complicated "fixed" configuration manually and automate it later.
I have seen Packer, but it seems like a bit of overkill, because I don't need to start from say a Ubuntu server download, I would much rather start with my existing Ubuntu 14.04 Vagrant.
Here's what I would like to do instead. The export mechanism bit is what I am trying to figure out.
Given that I am on VirtualBox only for now, and that I don't mind some manual steps to build my enhanced box, would vagrant package do the trick?
And, if I wanted to move to full automation of the first step, is that where Packer comes in? Are there other tools I should look at instead?
+---------------------+
|Ubuntu 14.04 box |
+---------+-----------+
|
^
+---------+-----------+ +-----------------------+ +----------------------------+
|manually +-----^+ istall complicated +----> | |
|(or with Chef) | | static requirements | | postgres |
+---------+-----------+ +-----------------------+ | |
| | cx_oracle connecti^ity |
| | databases |
| +----------------------------+
|
|
v
+---------------------+
|**EXPORT MECHANISM** | +--------+
+---------------------+ |
|
|
|
+------------------+ |
| Vagrant step #2 | |
+------------------+ |
|
|
+---------------------+ |
|my custom box | <--------++
+---------------------+
+---------------------+
|Chef with berkshelf |
| |
+----------------+----+
|
|
|
|
|
|
|
|
| +-----------------------+ +----------------------------+
| | dynamic stuff for my | | python code |
+--------> | build +----> | pip requirements |
+-----------------------+ | database migrations |
| |
+----------------------------+