Code Monkey home page Code Monkey logo

ansible-ha-storage's People

Contributors

mgrzybek avatar

Watchers

 avatar  avatar

ansible-ha-storage's Issues

[crm script] create resources instead of appending existeng ones

In order to append resources to tho storage group we need to run cluster commands to create them.
It could be easier to let the role create them for us. For example, they could be directly written in the crm script.

Before:

  vars:
    ha_storage:
      openrc: /etc/openrc.sh
      cinder_volumes:
        - 55659db9-1bea-46e1-a894-4b257be72bdd
        - 548ef897-32b6-4331-99b7-4823ac6680cd
      volume_group: db
      filesystems:
        - lv: data
          size: 20G
          fstype: xfs
          mountpoint: /srv/data
      append_resources:
        - name: pgsql

After:

  vars:
    ha_storage:
      openrc: /etc/openrc.sh
      cinder_volumes:
        - 55659db9-1bea-46e1-a894-4b257be72bdd
        - 548ef897-32b6-4331-99b7-4823ac6680cd
      volume_group: db
      filesystems:
        - lv: data
          size: 20G
          fstype: xfs
          mountpoint: /srv/data
      append_resources:
        -  name: postgresql-service
           type: docker
           params:
               - allow_pull=true
               - image=postgresql:11
               - run_opts="-v /srv/data:/data"

SFEX support

When only one device is used to create a volume group / pool, it is possible to deal with exclusiveness using sfex.

In order to use this mechanism, we need to sub-divide the given device:

  • first partition for sfex (a few megabytes is enough)
  • second partition for data

Moreover, we need some OS-related aspects and configuration:

  • does this agent exist on the given system?
  • how to update the existing crm scripts / mechanism?

Refactor ha_storage variable

For instance, you can only deploy one volume group per play. So as to deploy several volume groups, a list of properties should be given, such as:

# Global parameters
ha_storage_global:
    use_sfex_ra_github: true
    http_proxy: http://proxy.local

# Volume groups
ha_storage_volume_groups:
    # First volume group
    - volume_group: test
      fs: zfs
      zpool_mountpoint: /srv
      use_clvm: false
      use_sfex: true
      cluster_attribute_name: role
      cluster_attribute_value: cache
      luns:
          - id: /dev/disk/by-id/ata-VBOX_HARDDISK_VB60e589c7-a5211949
            alias: lun-dc-1
      filesystems:
          - lv: log
            size: 2G
            fstype: xfs
            mountpoint: /srv/log
          - lv: cache
            size: 2G
            fstype: xfs
            mountpoint: /srv/squid

    # Another volume group
    - volume_group: db
      fs: zfs
      zpool_mountpoint: /srv
      cluster_attribute_name: role
      cluster_attribute_value: database
      luns:
        - id: /dev/vdb
          alias: lun-dc-1
        - id: /dev/vdc
          alias: lun-dc-2
      filesystems:
        - lv: data
          size: 20GB
          mountpoint: data
        - lv: xlog
          size: 2GB
          mountpoint: xlog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.