# vim: set ts=2 et:
openstack-services:
  series: trusty
  services:
    mysql-hacluster:
      charm: hacluster
    rabbitmq-server:
      charm: rabbitmq-server
      constraints: mem=1G
      num_units: 2
    ceph:
      charm: ceph
      num_units: 3
      constraints: mem=1G
      options:
        monitor-count: 3
        fsid: 6547bd3e-1397-11e2-82e5-53567c8d32dc
        monitor-secret: AQCXrnZQwI7KGBAAiPofmKEXKxu5bUzoYLVkbQ==
        osd-devices: /dev/vdb
        osd-reformat: "yes"
        ephemeral-unmount: /mnt
    keystone:
      charm: keystone
      constraints: mem=1G
      num_units: 2
      options:
        admin-password: openstack
        admin-token: ubuntutesting
        vip: 10.5.100.1
    keystone-hacluster:
      charm: hacluster
    openstack-dashboard:
      charm: openstack-dashboard
      constraints: mem=1G
      num_units: 2
      options:
        vip: 10.5.100.2
    dashboard-hacluster:
      charm: hacluster
    nova-compute:
      charm: nova-compute
      num_units: 3
      constraints: mem=4G
      options:
        config-flags: "auto_assign_floating_ip=False"
        enable-live-migration: False
        enable-resize: False
    nova-cloud-controller:
      charm: nova-cloud-controller
      constraints: mem=1G
      num_units: 2
      options:
        network-manager: Neutron
        vip: 10.5.100.3
    ncc-hacluster:
      charm: hacluster
    neutron-gateway:
      charm: neutron-gateway
      constraints: mem=4G
      num_units: 2
      options:
        instance-mtu: 1350
        bridge-mappings: physnet1:br-ex
    cinder:
      charm: cinder
      num_units: 2
      options:
        block-device: "None"
        glance-api-version: 2
        vip: 10.5.100.4
      constraints": mem=1G
    cinder-hacluster:
      charm: hacluster
    cinder-ceph:
      charm: cinder-ceph
    glance:
      charm: glance
      constraints: mem=1G
      num_units: 2
      options:
        vip: 10.5.100.5
    glance-hacluster:
      charm: hacluster
    swift-proxy:
      charm: swift-proxy
      constraints: mem=1G
      num_units: 2
      options:
        zone-assignment: manual
        replicas: 3
        swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
        vip: 10.5.100.6
    swift-proxy-hacluster:
      charm: hacluster
    swift-storage-z1:
      charm: swift-storage-z1
      constraints: mem=1G
      options:
        zone: 1
        block-device: vdb
        overwrite: "true"
    swift-storage-z2:
      charm: swift-storage-z2
      constraints: mem=1G
      options:
        zone: 2
        block-device: vdb
        overwrite: "true"
    swift-storage-z3:
      charm: swift-storage-z3
      constraints: mem=1G
      options:
        zone: 3
        block-device: vdb
        overwrite: "true"
  relations:
    - [ keystone, keystone-hacluster ]
    - [ nova-cloud-controller, ncc-hacluster ]
    - [ nova-cloud-controller, rabbitmq-server ]
    - [ nova-cloud-controller, glance ]
    - [ nova-cloud-controller, keystone ]
    - [ nova-compute, nova-cloud-controller ]
    - - nova-compute
      - rabbitmq-server:amqp
    - [ nova-compute, glance ]
    - [ nova-compute, ceph ]
    - [ glance, glance-hacluster ]
    - [ glance, keystone ]
    - [ glance, ceph ]
    - [ glance, "cinder:image-service" ]
    - [ glance, rabbitmq-server ]
    - [ cinder, cinder-hacluster ]
    - [ cinder, rabbitmq-server ]
    - [ cinder, nova-cloud-controller ]
    - [ cinder, keystone ]
    - [ cinder, cinder-ceph ]
    - [ cinder-ceph, ceph ]
    - [ neutron-gateway, nova-cloud-controller ]
    - [ "neutron-gateway:amqp", rabbitmq-server ]
    - [ openstack-dashboard, keystone ]
    - [ openstack-dashboard, dashboard-hacluster ]
    - [ swift-proxy, keystone ]
    - [ swift-proxy, swift-proxy-hacluster ]
    - [ swift-proxy, swift-storage-z1 ]
    - [ swift-proxy, swift-storage-z2 ]
    - [ swift-proxy, swift-storage-z3 ]
openstack-database-relations:
  relations:
    - [ mysql, mysql-hacluster ]
    - [ keystone, mysql ]
    - [ nova-cloud-controller, mysql ]
    - [ nova-compute, mysql ]
    - [ glance, mysql ]
    - [ cinder, mysql ]
openstack-mysql-database:
  inherits:
  - openstack-services
  - openstack-database-relations
  services:
    mysql:
      charm: mysql
      constraints: mem=1G
      num_units: 2
      options:
        vip: 10.5.100.10
        vip_cidr: 16
openstack-percona-database:
  inherits:
  - openstack-services
  - openstack-database-relations
  services:
    mysql:
      charm: percona-cluster
      constraints: mem=1G
      num_units: 2
      options:
        vip: 10.5.100.10
        vip_cidr: 16
        root-password: crapper
        sst-password: crapper
openstack-neutron-api:
  inherits: openstack-services
  services:
    neutron-api:
      num_units: 2
      charm: neutron-api
      constraints: mem=1G
      options:
        neutron-security-groups: True
        vip: 10.5.108.1
        flat-network-providers: physnet1
    neutron-api-hacluster:
      charm: hacluster
      options:
        corosync_mcastaddr: 226.94.1.8
        corosync_key: "JFgMRJhNfKnmBRGm+rbAwpZmd/1FX08SCzOzDg/teaVtfGf60QYBCrpRYQzjzM2f+iNpGFuYEW8fXd+Dvquns6E1v7JbSt7oPRi2DYfdXXHc3EYkhimPG7h/VvnhaabLQ5z8CuQzaVJL1Fp25n4Rs5V4d71sgE5IR0skkWC6YO8="
    neutron-openvswitch:
      charm: neutron-openvswitch
  relations:
  - [ neutron-api, mysql ]
  - [ neutron-api, rabbitmq-server ]
  - [ neutron-api, nova-cloud-controller ]
  - [ neutron-api, neutron-openvswitch ]
  - [ neutron-api, keystone ]
  - [ neutron-gateway, neutron-api ]
  - [ neutron-openvswitch, nova-compute ]
  - [ neutron-openvswitch, rabbitmq-server ]
  #hacluster relation
  - [ neutron-api, neutron-api-hacluster ]
precise-icehouse:
  inherits: openstack-mysql-database
  series: precise
  overrides:
    openstack-origin: cloud:precise-icehouse
    source: cloud:precise-icehouse
trusty-icehouse:
  inherits:
  - openstack-neutron-api
  - openstack-percona-database
  series: trusty
# kilo
trusty-kilo:
  inherits:
  - openstack-neutron-api
  - openstack-percona-database
  series: trusty
  overrides:
    openstack-origin: cloud:trusty-kilo
    source: cloud:trusty-kilo
trusty-kilo-proposed:
  inherits: trusty-kilo
  overrides:
    openstack-origin: cloud:trusty-kilo/proposed
    source: cloud:trusty-proposed/kilo
trusty-kilo-staging:
  inherits: trusty-kilo
  overrides:
    openstack-origin: ppa:ubuntu-cloud-archive/kilo-staging
    source: ppa:ubuntu-cloud-archive/kilo-staging
# liberty
trusty-liberty:
  inherits:
  - openstack-neutron-api
  - openstack-percona-database
  series: trusty
  overrides:
    openstack-origin: cloud:trusty-liberty
    source: cloud:trusty-liberty
trusty-liberty-proposed:
  inherits: trusty-liberty
  overrides:
    openstack-origin: cloud:trusty-liberty/proposed
    source: cloud:trusty-liberty/proposed
trusty-liberty-staging:
  inherits: trusty-liberty
  overrides:
    openstack-origin: ppa:ubuntu-cloud-archive/liberty-staging
    source: ppa:ubuntu-cloud-archive/liberty-staging
