示例#1
0
def _puppet_provision(env, classes):
    env.safe_sudo('mkdir -p %(path)s' % puppet)
    manifest_body = "node default {\n%s\n}\n" % _build_node_def_body(env, classes)
    config_files = {"manifest.pp": manifest_body}
    upload_config(puppet, config_folder_names=["modules"], config_files=config_files)
    # TODO: Allow yum based install
    _apt_packages(pkg_list=["puppet"])
    with cd(puppet.path):
        env.safe_sudo("sudo puppet apply --modulepath=modules manifest.pp")
示例#2
0
def _chef_provision(env, _omnibus=True):
    env.safe_sudo('mkdir -p %(path)s' % chef)

    omnibus(env)

    config_files = {'node.json': json.dumps(chef.json),
                    'solo.rb': SOLO_RB % chef}
    upload_config(chef, config_folder_names=['cookbooks', 'data_bags', 'roles'], config_files=config_files)

    with cd(chef.path):
        env.safe_sudo('chef-solo -c solo.rb -j node.json')
示例#3
0
def _chef_provision(env, _omnibus=True):
    env.safe_sudo('mkdir -p %(path)s' % chef)

    omnibus(env)

    config_files = {'node.json': json.dumps(chef.json),
                    'solo.rb': SOLO_RB % chef}
    upload_config(chef, config_folder_names=['cookbooks', 'data_bags', 'roles'], config_files=config_files)

    with cd(chef.path):
        env.safe_sudo('chef-solo -c solo.rb -j node.json')