Package org.apache.whirr.service.chef

Examples of org.apache.whirr.service.chef.Recipe


  @Test(timeout = TestConstants.ITEST_TIMEOUT)
  public void testChefRunRecipeFromURL() throws Exception {
    // As chef will be mostly used indirectly in other services
    // this test tests chef's ability to run a recipe, specifically to
    // install nginx.
    Recipe nginx = new Recipe(
        "nginx",
        null,
        "http://s3.amazonaws.com/opscode-community/cookbook_versions/tarballs/529/original/nginx.tgz");

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(nginx);
View Full Code Here


   *
   * @throws Exception
   */
  @Test(timeout = TestConstants.ITEST_TIMEOUT)
  public void testChefRunRecipesFromProvidedCookbooks() throws Exception {
    Recipe java = new Recipe("java");
    java.attribs.put("install_flavor", "openjdk");

    // Recipes have to run directly against ComputeService as they need to be
    // ran as initscripts, a future version of ClusterController might avoid
    // taht.

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(java);

    printResponses(java, responses);

    Statement stmt = Statements.exec("java -version");

    responses = controller
        .runScriptOnNodesMatching(clusterSpec, allNodes, stmt);

    assertResponsesContain(responses, stmt, "Runtime Environment");

    Recipe postgreSql = new Recipe("postgresql", "server");

    responses = runRecipe(postgreSql);

    printResponses(postgreSql, responses);

View Full Code Here

  @Test
  public void testChefRunRecipeFromURL() throws Exception {
    // As chef will be mostly used indirectly in other services
    // this test tests chef's ability to run a recipe, specifically to
    // install nginx.
    Recipe nginx = new Recipe(
        "nginx",
        null,
        "http://s3.amazonaws.com/opscode-community/cookbook_versions/tarballs/529/original/nginx.tgz");

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(nginx);
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testChefRunRecipesFromProvidedCookbooks() throws Exception {
    Recipe java = new Recipe("java");
    java.attribs.put("install_flavor", "sun");

    // Recipes have to run directly against ComputeService as they need to be
    // ran as initscripts, a future version of ClusterController might avoid
    // taht.

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(java);

    printResponses(java, responses);

    Statement stmt = Statements.exec("java -version");

    responses = controller
        .runScriptOnNodesMatching(clusterSpec, allNodes, stmt);

    assertResponsesContain(responses, stmt, "Java(TM) SE Runtime Environment");

    Recipe postgreSql = new Recipe("postgresql", "server");

    responses = runRecipe(postgreSql);

    printResponses(postgreSql, responses);

View Full Code Here

  @Test
  public void testChefRunRecipeFromURL() throws Exception {
    // As chef will be mostly used indirectly in other services
    // this test tests chef's ability to run a recipe, specifically to
    // install nginx.
    Recipe nginx = new Recipe(
        "nginx",
        null,
        "http://s3.amazonaws.com/opscode-community/cookbook_versions/tarballs/529/original/nginx.tgz");

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(nginx);
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testChefRunRecipesFromProvidedCookbooks() throws Exception {
    Recipe java = new Recipe("java");
    java.attribs.put("install_flavor", "openjdk");

    // Recipes have to run directly against ComputeService as they need to be
    // ran as initscripts, a future version of ClusterController might avoid
    // taht.

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(java);

    printResponses(java, responses);

    Statement stmt = Statements.exec("java -version");

    responses = controller
        .runScriptOnNodesMatching(clusterSpec, allNodes, stmt);

    assertResponsesContain(responses, stmt, "Runtime Environment");

    Recipe postgreSql = new Recipe("postgresql", "server");

    responses = runRecipe(postgreSql);

    printResponses(postgreSql, responses);

View Full Code Here

  @Override
  protected void beforeBootstrap(ClusterActionEvent event) throws IOException,
      InterruptedException {

    Recipe ant = new Recipe("maven");

    addStatement(event, ant);
  }
View Full Code Here

  @Test(timeout = TestConstants.ITEST_TIMEOUT)
  public void testChefRunRecipeFromURL() throws Exception {
    // As chef will be mostly used indirectly in other services
    // this test tests chef's ability to run a recipe, specifically to
    // install nginx.
    Recipe nginx = new Recipe(
        "nginx",
        null,
        "http://s3.amazonaws.com/opscode-community/cookbook_versions/tarballs/529/original/nginx.tgz");

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(nginx);
View Full Code Here

   *
   * @throws Exception
   */
  @Test(timeout = TestConstants.ITEST_TIMEOUT)
  public void testChefRunRecipesFromProvidedCookbooks() throws Exception {
    Recipe java = new Recipe("java");
    java.attribs.put("install_flavor", "openjdk");

    // Recipes have to run directly against ComputeService as they need to be
    // ran as initscripts, a future version of ClusterController might avoid
    // taht.

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(java);

    printResponses(java, responses);

    Statement stmt = Statements.exec("java -version");

    responses = controller
        .runScriptOnNodesMatching(clusterSpec, allNodes, stmt);

    assertResponsesContain(responses, stmt, "Runtime Environment");

    Recipe postgreSql = new Recipe("postgresql", "server");

    responses = runRecipe(postgreSql);

    printResponses(postgreSql, responses);

View Full Code Here

TOP

Related Classes of org.apache.whirr.service.chef.Recipe

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.