     cmd.on 'close', (code) ->
       console.log 'create lxc process exited with code ', code
       callback()
-
-class Deployment
-  constructor: (@zipUrl, @name, @lxc) ->
-    @kitePath = path.join @lxc.pathToContainers, @lxc.name, "overlay", "opt", "kites"
 
   downloadAndExtractKite: (callback) ->
     {kitePath, zipUrl, kiteName} = this

kite.worker manifest, 

  deploy: (options, callback) ->
    {id, kiteName, zipUrl} = options
    deployment = new Deployment(id, kiteName, zipUrl)
    deployment.create-lxc () ->
      deployment.downloadAndExtractKite deployment.runKite.bind deployment


class Deployment
  @pathToContainers = "/var/lib/lxc"
  constructor: (@zipUrl, @name, @lxc) ->
    @kitePath = path.join @pathToContainers, @name, "overlay", "opt", "kites"

  createLxc: (callback) ->
    cmd = spawn "create-lxc", [@kiteName]
