public static void addToCookbooksFromGithub(EntitySpec<?> entity, String ...cookbookNames) { for (String cookbookName: cookbookNames) addToCookbooksFromGithub(entity, cookbookName, getGithubOpscodeRepo(cookbookName)); }
protected <T> T getRequiredConfig(ConfigKey<T> key) { return ChefConfigs.getRequiredConfig(getEntity(), key); }
protected void startWithChefSoloAsync() { // TODO make directories more configurable (both for ssh-drivers and for this) String installDir = Urls.mergePaths(AbstractSoftwareProcessSshDriver.BROOKLYN_HOME_DIR, "chef-install"); String runDir = Urls.mergePaths(AbstractSoftwareProcessSshDriver.BROOKLYN_HOME_DIR, "apps/"+entity().getApplicationId()+"/chef-entities/"+entity().getId()); DynamicTasks.queue( ChefSoloTasks.installChef(installDir, false), ChefSoloTasks.installCookbooks(installDir, ChefConfigs.getRequiredConfig(entity(), CHEF_COOKBOOKS), false)); DynamicTasks.queue(ChefSoloTasks.buildChefFile(runDir, installDir, "launch", ChefConfigs.getRequiredConfig(entity(), CHEF_RUN_LIST), entity().getConfig(CHEF_LAUNCH_ATTRIBUTES))); DynamicTasks.queue(ChefSoloTasks.runChef(runDir, "launch", entity().getConfig(CHEF_RUN_CONVERGE_TWICE))); }
public static void addToCookbooksFromGithub(EntityInternal entity, String ...cookbookNames) { for (String cookbookName: cookbookNames) addToCookbooksFromGithub(entity, cookbookName, getGithubOpscodeRepo(cookbookName)); }