summaryrefslogtreecommitdiffstats
path: root/puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml
blob: 1e6529602dd25475dff31c3a1b0505c133b745a4 (plain)
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
69
70
71
72
73
74
heat_template_version: 2015-04-30

description: Configure hieradata for Neutron Big Switch configuration

parameters:
  server:
    description: ID of the controller node to apply this config to
    type: string
  NeutronBigswitchRestproxyServers:
    description: 'Big Switch controllers ("IP:port,IP:port")'
    type: string
  NeutronBigswitchRestproxyServerAuth:
    description: 'Big Switch controller credentials ("username:password")'
    type: string
  NeutronBigswitchRestproxyAutoSyncOnFailure:
    description: Resynchronize with the new master server on Big Switch failover.
    type: boolean
    default: true
  NeutronBigswitchRestproxyConsistencyInterval:
    description: Keepalive message interval (from Neutron to Big Switch controller).
    type: number
    default: 60
  NeutronBigswitchRestproxyNeutronId:
    description: Unique identifier of the Neutron instance for the Big Switch controller.
    type: string
    default: 'neutron'
  NeutronBigswitchRestproxyServerSsl:
    description: Whether Neutron should use SSL to talk to the Big Switch controllers.
    type: boolean
    default: true
  NeutronBigswitchRestproxySslCertDirectory:
    description: Directory where Big Switch controller certificate will be stored.
    type: string
    default: '/var/lib/neutron'


resources:
  NeutronBigswitchConfig:
    type: OS::Heat::StructuredConfig
    properties:
      group: os-apply-config
      config:
        hiera:
          datafiles:
            neutron_bigswitch_data:
              mapped_data:
                neutron_enable_bigswitch_ml2: true
                neutron::plugins::ml2::bigswitch::restproxy::servers: {get_input: restproxy_servers}
                neutron::plugins::ml2::bigswitch::restproxy::server_auth: {get_input: restproxy_server_auth}
                neutron::plugins::ml2::bigswitch::restproxy::auto_sync_on_failure: {get_input: restproxy_auto_sync_on_failure}
                neutron::plugins::ml2::bigswitch::restproxy::consistency_interval: {get_input: restproxy_consistency_interval}
                neutron::plugins::ml2::bigswitch::restproxy::neutron_id: {get_input: restproxy_neutron_id}
                neutron::plugins::ml2::bigswitch::restproxy::server_ssl: {get_input: restproxy_server_ssl}
                neutron::plugins::ml2::bigswitch::restproxy::ssl_cert_directory: {get_input: restproxy_ssl_cert_directory}

  NeutronBigswitchDeployment:
    type: OS::Heat::StructuredDeployment
    properties:
      name: NeutronBigswitchDeployment
      config: {get_resource: NeutronBigswitchConfig}
      server: {get_param: server}
      input_values:
        restproxy_servers: {get_param: NeutronBigswitchRestproxyServers}
        restproxy_server_auth: {get_param: NeutronBigswitchRestproxyServerAuth }
        restproxy_auto_sync_on_failure: {get_param: NeutronBigswitchRestproxyAutoSyncOnFailure}
        restproxy_consistency_interval: {get_param: NeutronBigswitchRestproxyConsistencyInterval}
        restproxy_neutron_id: {get_param: NeutronBigswitchRestproxyNeutronId}
        restproxy_server_ssl: {get_param: NeutronBigswitchRestproxyServerSsl}
        restproxy_ssl_cert_directory: {get_param: NeutronBigswitchRestproxySslCertDirectory}

outputs:
  deploy_stdout:
    description: Deployment reference, used to trigger puppet apply on changes
    value: {get_attr: [NeutronBigswitchDeployment, deploy_stdout]}