1

I am looking for a way to build a development environment (IDE, Databases, etc...) within a fresh linux install, and then repackage that setup into an installation that can be installed on other machines (new developers). Does anyone know of any tools to do this? I am using Kubuntu.

Andrew Rhyne
  • 5,060
  • 4
  • 28
  • 41

3 Answers3

1

I suggest you to build your own .deb package. In that package you can add all your dependencies and programs you need. I think that would be the cleanest solution with some benefits like versions etc.

We use that in combination with FAI in our company.

Update:

Are you familiar with .deb packages? We generally use the packages that ship with Ubuntu if possible.

Anyway, assume you have some software that is not in the Ubuntu repo, for example Eclipse with some pre-installed plugins and other fancy stuff. I will give you an idea with a simplified step by step instruction.

  • Download Eclipse
  • Unpack the eclipse archive to /tmp/eclipse
  • Configure eclipse and install some plugins

At this point your eclipse installation is ready to use. So now let's create a .deb file containing that eclipse installation. There are many tutorials howto create a debian package, i will show you a simple way.

  • Somewhere create a folder where you will package your stuff. I will use /home/user/packages/eclipse
  • in that folder create a folder DEBIAN
  • copy your eclipse installation from /tmp/eclipse/ to /home/user/packages/eclipse/opt/development/eclipse
  • in the DEBIAN folder create three files: control, postinst and postrm

Put something like the following into the control file:

Package: eclipse
Version: 1.0
Architecture: all
Maintainer: Your Name <somethat@somewhere.com>
Depends: openjdk-7-jdk
Section: development
Priority: optional
Description: Eclipse with some plugins

In the postinst you create a symlink from your eclipse executable to say /usr/local/bin/eclipse.

In the postrm you remove that symlink.

By now you should have a directory structure like the following:

eclipse
├── DEBIAN
│   ├── control
│   ├── postinst
│   └── postrm
└── opt
    └── development
        └── eclipse
            ├── about_files
            ├── about.html
            ├── artifacts.xml
            ├── configuration
            ├── dropins
            ├── eclipse
            ├── eclipse.ini
            ├── epl-v10.html
            ├── features
            ├── icon.xpm
            ├── libcairo-swt.so
            ├── notice.html
            ├── p2
            ├── plugins
            └── readme 

Change into /home/user/packages and execute dpkg-deb --build eclipse . You should now have your eclipse debian package (eclipse_1.0_all.deb) that is ready to install on the other computers.

The next step would be to setup a APT repository :)

Copy the package to the new comupter and run dpkg -i <packagename> to install the package.

Hope i could help.

HOWTO build debian binary packages

Ortwin Angermeier
  • 5,957
  • 2
  • 34
  • 34
  • How would I go about building deb packages? What I need is a grouping of third party software along with our own database snapshot and git snapshot. Git/database are easy. – Andrew Rhyne Dec 14 '12 at 20:54
1

Hmm I have not read too much good stuff about the KDE in Ubuntu. Anyway, if (and that's a big IF) you would like to look into openSUSE instead, there is the SUSE studio: http://susestudio.com/ See this FAQ: http://susestudio.com/help/faq.html

s-m-e
  • 3,433
  • 2
  • 34
  • 71
  • I am actually in the process of looking at that, but I cannot figure out how to preconfigure phpstorm within it? – Andrew Rhyne Dec 15 '12 at 03:41
  • Hmm if this is not part of openSUSE, you can do this: http://susestudio.com/help/faq.html#how_can_i_upload_custom_rpms Besides, you can upload & change files within the appliance - so you can bring in your configuration. – s-m-e Dec 15 '12 at 12:57
  • This actually works REALLY well. You can create it, set up the dev environment using a disk image and testrunner, export the changed files and push them back into the build and rebuild it as an ISO. GREAT! – Andrew Rhyne Dec 18 '12 at 04:58
0

Have a look at preseeding. It's a technique that allows you to pre-define installation flow.

favoretti
  • 29,299
  • 4
  • 48
  • 61
  • This looks great, but I am wondering if there is a way to do this with an actual image? Ideally, we should do it with preseeding, but the stakeholder obviously has that call and I think he might bite on it harder if it was on a disk and he didn't have to trust server hardware to deliver it. – Andrew Rhyne Dec 14 '12 at 17:05
  • Preseeding can install anything from a disk as well. If repository on a disk will contain all the needed packages - you just specify disk as an installation source without relying on the internet. Installation of custom software can then be either deb packages or just scripted post-install routines or whatever you need, basically. – favoretti Dec 15 '12 at 13:50