Skip to content
Snippets Groups Projects
  1. Apr 03, 2014
  2. Feb 06, 2014
  3. Jan 14, 2014
    • Nadav Har'El's avatar
      Move tests to a separate module · 4d0ed4c3
      Nadav Har'El authored
      
      Instead of always putting the tests into all images, this patch adds the
      option of putting them only in some of the images, by making them into a
      new module, modules/tests.
      
      The default image (images/default.py) continues to require the tests
      modules, so tests are included in the default image. Building with
      "make image=tests" makes an image with only the tests and nothing else.
      Other images (e.g., memcached, cassandra,...) currently do not require
      the tests module, so the generated image does will not include the tests.
      
      With this patch, "make image=memcached", for example, contains only the
      bare minimum needed for memcached, and the resulting qcow image is just
      18 MB, down from 69 MB when we included all the tests.
      
      Fixes #160
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      4d0ed4c3
  4. Jan 08, 2014
  5. Dec 31, 2013
  6. Dec 05, 2013
  7. Dec 04, 2013
    • Tomasz Grabiec's avatar
      modules: Add support for run configurations · ccc51b6f
      Tomasz Grabiec authored
      
          == Description of the problem ==
      
      Currently modules can only specify files which need to be
      copied. There is a need for a module to also declare ways it can be
      run, so that we can automatically prepare a runnable image. It
      should be easy to switch between run configurations.
      
      Currently it is enough for image configuration to happen at the
      time of image make process. In future this should be allowed
      on the already built image.
      
      We also need to be able to combine multiple modules in one
      image. For example in addition to the main application one might want
      to start various services like CLI, management API server, etc.
      
      Java apps should be able to specify JVM arguments, which must be
      passed to the JVM upon its creation, as well as regular run-java
      arguments (classpath, main classes, main arguments, etc.)
      
          == Solution ==
      
      This is not intended to be a permanent solution. The aim is to solve
      immediate need to have a fully modularized build in a scalable way.
      
      Every module has a new kind of file in its root directory which
      holds its configuration. The file is named 'module.py' and is
      a python script which uses osv's api for declaring run configurations.
      
      Using python as config language has several advantages:
       - more expresiveness, unlike json it allows for expression reuse
       - it's easier to extend the config language
       - we don't need as much parsing, gluing, error checking, error
         reporting code because we have it already
      
      There are currently two kinds of applications which can be declared:
      
         run(cmdline)  <- basic .so application
         run_java(jvm_args=[], classpath=[], args=[])  <- java applications
      
      Run configurations can be declared as simple module attributes
      which can be referenced from the image configuration file.
      
      Image configuration
      
      There is a new configuration file kind, which defines which modules
      and which run configurations should be included in the image. Files
      are located using path: ${OSV_BASE}/images/$(image-name).py
      
      Syntax:
      
        require(module) <-- declares that module should be included in the image
        		      and returns an object which allows to access module's
      		      attributes.
      
        run = []  <-- list of run configurations
      
      Example:
      
        _mgmt = require('mgmt')
        run = [ _mgmt.shell ]
      
      To use a particular image configuration run make like this:
      
        make image=fancy-tomcat
      
      The default configuration is named 'default'.
      
      This patch extracts mgmt into a module, which is embedded under
      ${OSV_BASE}/modules/mgmt
      
      The purpose of ${OSV_BASE}/config.json has been changed. It does not
      list modules which should be included anymore, image config file does
      that. It's a module look-up configuration which tells the build where
      to look for modules.
      
      Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      ccc51b6f
  8. Nov 13, 2013
    • Takuya ASADA's avatar
      OSv module support · 0dcf1f8f
      Takuya ASADA authored
      The idea of the patch is basically described in prevoius post:
      
      https://groups.google.com/d/msg/osv-dev/RL2S3AL9TNE/l4XZJo3-lI0J
      
      Whis this patch, you will be able to install OSv apps into disk image on
      "make all" stage.
      
      These apps does not require to exist in OSv repository, you can install
      apps which is on any git repository or svn repository, or on local
      directory.
      
      You'll need to write a config file to add apps, format of the file is
      JSON.
      
      Here's a sample of the file:
      {
         "modules":[
            {
      	 "name":"osv-mruby",
               "type":"git",
               "path":"https://github.com/syuu1228/osv-mruby.git",
               "branch":"master"
            }
         ]
      }
      
      If you add "module" on config file, make all calls script/module.py.
      
      This scripts perform "git clone" to fetch repository to $(out)/module,
      and invoke "make module" on each module.
      
      "make module" should outputs bootfs.manifest/usr.manifest on module
      directory, the script merge bootfs.manifest.skel/usr.manifest.skel and
      module local manifests to single file
      $(out)/bootfs.manifest/$(out)/usr.manifest.
      
      Here's app Makefile example:
      
        https://github.com/syuu1228/osv-mruby/blob/master/Makefile
      
      
      
      It have "module" target, and the target builds all binaries and
      generates *.manifest.
      
      Signed-off-by: default avatarTakuya ASADA <syuu@dokukino.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      0dcf1f8f
Loading