Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to include recipes smartly #1765

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 24, 2019

  1. Added ability to include recipes smartly

    Roles can get smart by making recipe inform the role about its dependencies
    across the proposal.
    
    So a recipe will be included by the role only if the attributes
    registered by the recipe are actually changed in current chef-client
    run.
    
    a recipe can register its dependencies as
    ```
    mydependson = {
        "horizon::server" => [
            ['glance','api','bind_port']
        ]
    }
    
    BarclampLibrary::Barclamp::DependsOn.add(mydependson)
    ```
    So here the "horizon::server"  is informing about its
    dependencies.
    
    This is accomplished by comparing the value of the current attributes of node
    against the one already stored in the databag after the previous successful
    chef-client run.
    
    BarclampLibrary::Barclamp::DependsOn.add:
    takes in a map:
    
         recipe_name => [
                    [barclampname,drill,down,till,value],
                    [otherbarclampname,onlyhere],
                   ]
    
    This map is flushed and recreated only everyrun, however like resources
    this could also be cached.
    
    this behaviour can be altered by adding flag to config and using it
    'include_recipe_smartly', however that is an extension to this behavior
    and can be addressed in subsequent commits
    
    Use the role(proposal) that was committed to compare against databag
    
    This object enables us to do real comparison on proposal level.
    
    Thus every barclamp can have proposal level dependency
    
    hound fixes and refactor
    Sumit Jamgade committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    51f94a3 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2019

  1. added commnets

    Sumit Jamgade committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    5d04197 View commit details
    Browse the repository at this point in the history