 
 class Deployment
   @pathToContainers = "/var/lib/lxc"
-  constructor: (@zipUrl, @name, @lxc) ->
-    @kitePath = path.join @pathToContainers, @name, "overlay", "opt", "kites"
+  constructor: (@kiteName, @version, @zipUrl) ->
+    @kitePath = path.join Deployment.pathToContainers, "#{@kiteName}-#{@version}", "overlay", "opt", "kites"
 
   createLxc: (callback) ->
     cmd = spawn "create-lxc", [@kiteName]


console.log "deployer:", manifest.name

manifest.name = "Deployer_#{os.hostname()}_#{uuid.v4()}"
kite.worker manifest, 

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

    return callback null, "Hello, I'm #{name}! This is Deployer"



          
          cmd.on 'close', (code) ->
            console.log 'unzip process exited with code ', code
            manifestFilePath = path.join(kitePath, kiteName, "manifest.json")
            content = JSON.parse fs.readFileSync(manifestFilePath)
            content.version = version
            fs.writeFileSync manifestFilePath, JSON.stringify(content)
            callback()

  runKite: () ->
