diskimage-builder how to deploy custom RPM?

asked 2015-11-26 21:33:38 -0500

thalesfc gravatar image

Dear all,

tl;dr how to install my rpm package on CEntOs7 using diskimage-build ?

I want to use diskimage-builder to create an unix-vm-image and embed my application inside that image. (This is, I am trying to create an unix appliance for my software).

At the current stage, I have generated a working myCentOs7.raw image, and I also have foo.rpm which contains my software "foo". The problem is how to perform the installation of foo.rpm (which contains package foo) onto myCentOs.raw?

During image generation, I have tried the following:

  1. Create file package-installs.json:

    { "bar": null, "java-1.7.0-openjdk": null }

  2. Copied package-installs.json to diskimage-builder/elements/centos7/ and to diskimage-builder/elements/package-installs

  3. cp foo.rpm /tmp/foo.rpm
  4. Created file: source-repository-foo:

    foo package /tmp /tmp/foo.rpm

  5. Copied source-repository-foo to diskimage-builder/elements/source-repositories/
  6. runned: disk-image-create ... <other-parameters> package-installs centos7 source-repositories

What happen`s then?

I receive the following message: "Unsupported repository type: package"

edit retag flag offensive close merge delete