Skip to content
This repository
tree: 2b11be1e49
Fetching contributors…

Cannot retrieve contributors at this time

file 68 lines (59 sloc) 2.337 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
module Bosh::Spec
  class Deployments

    def self.minimal_manifest
      # This is a minimal manifest I was actually being able to deploy with. It doesn't even have any jobs,
      # so it's not very realistic though
      {
        "name" => "minimal",
        "release" => {
          "name" => "appcloud",
          "version" => "0.1" # It's our dummy valid release from spec/assets/valid_release.tgz
        },

        "director_uuid" => "deadbeef",
        "networks" => [ { "name" => "a", "subnets" => [ ] }, ],
        "compilation" => { "workers" => 1, "network" => "a", "cloud_properties" => { } },
        "resource_pools" => [ ],

        "update" => {
          "canaries" => 2,
          "canary_watch_time" => 4000,
          "max_in_flight" => 1,
          "update_watch_time" => 20
        }
      }
    end

    def self.simple_manifest
      extras = {
        "name" => "simple",
        "release" => {
          "name" => "bosh-release",
          "version" => "1"
        },

        "networks" => [{ "name" => "a",
                         "subnets" => [{ "range" => "192.168.1.0/24",
                                         "gateway" => "192.168.1.1",
                                         "dns" => [ "192.168.1.1", "192.168.1.2" ],
                                         "static" => [ "192.168.1.10" ],
                                         "reserved" => [ ],
                                         "cloud_properties" => { }
                                       }]
                       }],

        "resource_pools" => [{ "name" => "a",
                               "size" => 10,
                               "cloud_properties" => { },
                               "network" => "a",
                               "stemcell" => {
                                 "name" => "ubuntu-stemcell",
                                 "version" => "1"
                               }
                             }],

        "jobs" => [{ "name" => "foobar",
                     "template" => "foobar",
                     "resource_pool" => "a",
                     "instances" => 3,
                     "networks" => [ { "name" => "a" } ]
                   }]
      }

      minimal_manifest.merge(extras)
    end

  end
end
Something went wrong with that request. Please try again.