GithubHelp home page GithubHelp logo

cinder-storage-backend-template's Introduction

Using template to create a storage backend.

  1. Clone template:

sudo apt -y install cookiecutter
cookiecutter https://github.com/openstack-charmers/cinder-storage-backend-template
  1. Edit src/config.yaml

  • In the src/config.yaml add any options that should be configurable by the user. In most cases this is details for connecting to the storage array. Where appropriate the charm will pass these to the cinder principle charm for inclusion in cinder.conf.
  • If the storage driver is to be installed from a ppa then uncomment the driver-* options, otherwise delete them.
  1. Update 'cinder_configuration' in src/lib/charm/openstack/cinder_*

The 'cinder_configuration' method controls configuration options are sent to the principle cinder charm for inclusion in cinder.conf. For example:

If a 'superarray' driver was being configured in step 3 and superarray-username, superarray-password and superarray-hostname config options were added to config.yaml and the array needs driver XXX then 'cinder_configuration' might look like:

def cinder_configuration(self):
    volume_driver = 'cinder.volume.drivers.ARRAYVENDOR.iscsi.ARRAYISCSIDriver'
    driver_options = [
        ('volume_driver', volume_driver),
        ('username', self.config.get('superarray-username')),
        ('password', self.config.get('superarray-password')),
        ('hostname', self.config.get('superarray-hostname'))]
    return driver_options

Which will result in the following section being added to cinder.conf:

    [cinder-superarray]
    volume_driver = cinder.volume.drivers.ARRAYVENDOR.iscsi.ARRAYISCSIDriver
    username = root
    password = password
    hostname = 10.5.0.13
  1. Update unit tests

Edit unit_tests/test_lib_charm_openstack_cinder* and update unit tests.

  1. Update functional tests

Update the bundles in tests/bundles/*yaml as needed and edit tests/tests_cinder_*py to add functional testing.

TODO:

  • Add basic zaza tests
  • Add unit tests
    • Add skeleton readme for generated charm

cinder-storage-backend-template's People

Contributors

camille-rodriguez avatar ajkavanagh avatar thedac avatar chrismacnaughton avatar lourot avatar davecore82 avatar fnordahl avatar guoqiao avatar

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.