aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-11-29 00:06:44 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-06 23:40:38 +0100
commitf49be97051c3c5c8bb4386d236197103d3682720 (patch)
tree9b468dad5afbf51cc8ffb82df88754bf11d1d13f /mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra
parentb6689c3e319b66b64bc0fe49366dfdeb4152e664 (diff)
Add NOVCP HA OVS scenario (baremetal, virtual)
Add a new class of scenarios, based on existing baremetal HA scenarios, but instead of having a virtualized control plane (VCP), all Openstack controller services will run directly on the cluster nodes. This change adds the common scaffolding, as well as the OVS scenario. The new scenario(s) can be used on full-baremetal clusters, soon on full-virtual clusters and later on hybrid (virt + bare) clusters. This change defines old (current) style scenario definitions for both baremetal and virtual, both named: - os-nosdn-nofeature-novcp-ha; Prerequisites: 1. Merge-able by name reclass.storage.node definitions Each cluster (e.g. database, telemetry) adds its own set of reclass storage node defitions, which for novcp scenarios should be merged into a single node (kvm) based on the 'name' property. This is not currently supported by upstream reclass 'node.sls' high state, so add support for it via an early patch (required before salt-master-init.sh tries to handle reclass.storage). 2. common reclass classes for novcp Some of the classes in `baremetal-...-common-ha` are not fit for novcp as they define VCP-specific config/inheritance, so add new versions of said classes with novcp in mind or adapt old classes: - parameterize ctl hostname in `openstack_compute.yml`; - new `openstack_control_novcp.yml`; - new `openstack_init_novcp.yml`; 3. Handle hard set names in state files for baremetal nodes Some of our state files (e.g. maas) hardcodes baremetal node names to 'kvm', 'cmp', so we need to align the names in novcp scenario with these values to re-use the maas state. As a future improvement we should parameterize these names in all state files. As a consequence, our baremetal controller nodes will also use 'kvm*' hostnames (instead of 'ctl*'). 4. Add 'noifupdown' to all interfaces on kvm nodes to prevent duplicate IPs/routes created at *any* ifup due to /etc/network/route-br-ex. Patch salt-formula-linux to skip network restart on 'noifupdown', also when routes are present on that interface. JIRA: FUEL-310 Change-Id: Ic67778f63e5ee0334dbfe9547c7109ec1a938d61 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/infra')
0 files changed, 0 insertions, 0 deletions
gle */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
heat_template_version: ocata

description: >
  OpenStack containerized Mistral API service

parameters:
  DockerNamespace:
    description: namespace
    default: 'tripleoupstream'
    type: string
  DockerMistralApiImage:
    description: image
    default: 'centos-binary-mistral-api:latest'
    type: string
  DockerMistralConfigImage:
    description: image
    default: 'centos-binary-mistral-api:latest'
    type: string
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  DefaultPasswords:
    default: {}
    type: json

resources:

  MistralApiBase:
    type: ../../puppet/services/mistral-api.yaml
    properties:
      EndpointMap: {get_param: EndpointMap}
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}

outputs:
  role_data:
    description: Role data for the Mistral API role.
    value:
      service_name: {get_attr: [MistralApiBase, role_data, service_name]}
      config_settings:
        map_merge:
          - get_attr: [MistralApiBase, role_data, config_settings]
      step_config: &step_config
        get_attr: [MistralApiBase, role_data, step_config]
      service_config_settings: {get_attr: [MistralApiBase, role_data, service_config_settings]}
      # BEGIN DOCKER SETTINGS
      puppet_config:
        config_volume: mistral
        puppet_tags: mistral_config
        step_config: *step_config
        config_image:
          list_join:
            - '/'
            - [ {get_param: DockerNamespace}, {get_param: DockerMistralConfigImage} ]
      kolla_config:
         /var/lib/kolla/config_files/mistral_api.json:
           command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/api.log --server=api
           config_files:
           - dest: /etc/mistral/mistral.conf
             owner: mistral
             perm: '0640'
             source: /var/lib/kolla/config_files/src/etc/mistral/mistral.conf
      docker_config:
        step_3:
          mistral_db_sync:
            start_order: 1
            image: &mistral_image
              list_join:
                - '/'
                - [ {get_param: DockerNamespace}, {get_param: DockerMistralApiImage} ]
            net: host
            privileged: false
            detach: false
            volumes:
              - /var/lib/config-data/mistral/etc/:/etc/:ro
              - /etc/hosts:/etc/hosts:ro
              - /etc/localtime:/etc/localtime:ro
            environment:
              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
            command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'upgrade', 'head']
          mistral_db_populate:
            start_order: 2
            image: *mistral_image
            net: host
            privileged: false
            detach: false
            volumes:
              - /var/lib/config-data/mistral/etc/:/etc/:ro
              - /etc/hosts:/etc/hosts:ro
              - /etc/localtime:/etc/localtime:ro
            environment:
              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
            # NOTE: dprince this requires that we install openstack-tripleo-common into
            # the Mistral API image so that we get tripleo* actions
            command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'populate']
        step_4:
          mistral_api:
            start_order: 15
            image: *mistral_image
            net: host
            privileged: false
            restart: always
            volumes:
              - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro
              - /var/lib/config-data/mistral/:/var/lib/kolla/config_files/src:ro
              - /etc/hosts:/etc/hosts:ro
              - /etc/localtime:/etc/localtime:ro
            environment:
              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
      upgrade_tasks:
        - name: Stop and disable mistral_api service
          tags: step2
          service: name=openstack-mistral-api state=stopped enabled=no