4

I am constantly delivering RPM packages upon every new version of some project.

Every version is dependent on some developing prerequisites

  1. CentOS 7
  2. git
  3. Some npm packages.
  4. Some Python PIP packages
  5. Some shared objects

I'm dealing with this issue currently with having a virtual machine for every release, and that is very convenient to release every version - just load the ova file of the specific machine and you are ready to go.

but the problem is, the overhead of dealing with virtual machines: cloning and other operations - taking too much time.

What do you recommend in order to do it much more easier?

  • 1
    What infrastructure are you using for your VMs? Have you considered using Docker containers? – James Shewey Jul 10 '17 at 17:07
  • 2
    Would it be better? i'm using VirtualBox – Amit Arie Jul 12 '17 at 6:35
  • 1
    Please edit your question to add what you're using and context – Tensibai Jul 12 '17 at 21:44
2

Have you considered setting up a build server (i.e. Jenkins, TeamCity) with disposable build agents?

If you do it in the cloud (i.e. via ec2 integration), you can literally set up an AMI with generic dependencies, then configure it to spin up a new VM for each build agent, which can be configured whichever way, and then delete the VM once you've done publishing your artifact (i.e. RPM).

  • 2
    It sounds like he is using VMWare based on his comment "just load the ova file" – James Shewey Jul 11 '17 at 22:21
  • 2
    It would work the same way, though. VMware does have a decently powerful API, which you can also utilize through config management. You could bake a VM with required dependencies (i.e. build agent, gcc, git, npm, etc), snapshot it, and then use this Ansible module to clone it as needed: docs.ansible.com/ansible/vsphere_guest_module.html. OP's problem is time management and overhead, and proper automation is the solution to that. Specific tooling is irrelevant. – maplebird Jul 12 '17 at 3:49
  • 1
    I'm using virtualbox, on some development machine, not a build server. Vshpere server can help in this case? and what would be better? VM or something like Jenkins? – Amit Arie Jul 12 '17 at 6:33
2

For a laptop, desktop or standalone server, consider trying out Docker containers. These containers are designed to allow you to provide differing libraries, packages and shared objects uniquely to each application. You can have several different Docker containers running different and even conflicting libraries for the same application. You should be able to then use these to package and compile your RPMs.

Because these containers run on a single kernel instead of having to power the overhead of multiple kernels, you will be able to run more simultaneously. Furthermore, because Docker uses the underlying file system and creates unions instead of keeping an entire second copy of a whole disk image, managing and cloning containers is faster, lighter weight, will require less storage and since there is no boot sequence to go through, they should start and stop faster.

They are also compatible with Jenkins, TeamCity, Vagrant and several other build server software suites, AWS/EC2 and many configuration management systems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.