# When editing this file, remember that http://www.yamllint.com is your friend :-)
---

driver_plugin: vagrant
use_vagrant_berkshelf_plugin: true
driver:
  vagrantfile_erb: Vagrantfile.erb

provisioner:
  name: chef_zero

platforms:
  - name: centos-7.0
    driver:
      # Nah, not working :( Using Vagrantfile.erb
      # network:
      #   - ["private_network", {ip: "192.168.33.23"}]
      box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box
    # driver_config:
    #   require_chef_omnibus: 12.4.1


suites:
  - name: ci
    run_list:
      - recipe[alfresco::default]
    data_bags_path: "test/integration/data_bags"
    attributes: {
      "name": "chef-alfresco-testing",
      "hostname": "chef-alfresco-testing",
      "alfresco" : {
        "ssl_enabled" : false,
        # TODO - should disable only dhparam
        "skip_certificate_creation" : true,
        "public_protocol" : "http",
        "log.json.enabled" : false,
        "mailsmtp_databag" : "credentials",
        "mailsmtp_databag_item" : "outbound-email",
        "jmxremote_databag" : "credentials",
        "jmxremote_databag_items" : ["systemsmonitor", "systemscontrol"]
      },
      "artifact-deployer" : {
        "maven" : {
          "timeout" : 1500,
          "repositories" : {
            "private" : {
              "url" : "https://artifacts.alfresco.com/nexus/content/groups/private",
              "username" : "<%= ENV['NEXUS_USERNAME'] %>",
              "password" : "<%= ENV['NEXUS_PASSWORD'] %>"
            }
          }
        }
      },
      "nginx" : {
        "use_nossl_config" : true
      }
    }
  # TODO make it default
  - name: community
    run_list:
      - recipe[alfresco::default]
    data_bags_path: "test/integration/data_bags"
    attributes: {
      "name": "img-basic-test",
      "hostname": "alfresco-allinone-test",
      "nginx" : {
        "proxy_host_header" : "$host:8800",
        "use_nossl_config" : true
      },
      "alfresco" : {
        "ssl_enabled" : false,
        "skip_certificate_creation" : true,
        "public_protocol" : "http",
        "public_portssl" : "80",
        "log.json.enabled" : false,
        "jmxremote_databag" : "credentials",
        "jmxremote_databag_items" : ["systemsmonitor", "systemscontrol"],
        "properties" : {
           # TODO - This looks weird, needs testing
           "aos.port" : "8800"
        }
      },
      "artifact-deployer" : {
        "maven" : {
          "timeout" : 1500
        }
      },
      "haproxy" : {
        "bind_ip" : "0.0.0.0"
      }
    }
  - name: enterprise
    run_list:
      - recipe[alfresco::default]
    data_bags_path: "test/integration/data_bags"
    attributes: {
      "name": "img-basic-test",
      "hostname": "alfresco-allinone-enterprise-test",
      "nginx" : {
        "proxy_host_header" : "$host:8800",
        "use_nossl_config" : true
      },
      "alfresco" : {
        "version" : "5.0.2",
        "edition" : "enterprise",
        "ssl_enabled" : false,
        "skip_certificate_creation" : true,
        "public_protocol" : "http",
        "public_portssl" : "80",
        "log.json.enabled" : false,
        "jmxremote_databag" : "credentials",
        "jmxremote_databag_items" : ["systemsmonitor", "systemscontrol"],
        "properties" : {
           # TODO - This looks weird, needs testing
           "aos.port" : "8800"
        }
      },
      "artifact-deployer" : {
        "maven" : {
          "timeout" : 1500,
          "repositories" : {
            "private" : {
              "url" : "https://artifacts.alfresco.com/nexus/content/groups/private",
              "username" : "<%= ENV['NEXUS_USERNAME'] %>",
              "password" : "<%= ENV['NEXUS_PASSWORD'] %>"
            }
          }
        }
      },
      "haproxy" : {
        "bind_ip" : "0.0.0.0"
      }
    }
