Create Bootstrap Actions to Install Additional Software You can use a bootstrap

Create bootstrap actions to install additional

This preview shows page 106 - 108 out of 395 pages.

Create Bootstrap Actions to Install Additional Software You can use a bootstrap action to install additional software or customize the configuration of cluster instances. Bootstrap actions are scripts that run on cluster after Amazon EMR launches the instance using the Amazon Linux Amazon Machine Image (AMI). Bootstrap actions run before Amazon EMR installs the applications that you specify when you create the cluster and before cluster nodes begin processing data. If you add nodes to a running cluster, bootstrap actions also run on those nodes in the same way. You can create custom bootstrap actions and specify them when you create your cluster. Most predefined bootstrap actions for Amazon EMR AMI versions 2.x and 3.x are not supported in Amazon EMR releases 4.x. For example, configure-Hadoop and configure-daemons are not supported in Amazon EMR release 4.x. Instead, Amazon EMR release 4.x natively provides this functionality. For more information about how to migrate bootstrap actions from Amazon EMR AMI versions 2.x and 3.x to Amazon EMR release 4.x, go to Differences in Amazon EMR 4.x Release Versions in the Amazon EMR Release Guide. Topics Bootstrap Action Basics (p. 100) Run If Bootstrap Action (p. 101) Shutdown Actions (p. 102) Use Custom Bootstrap Actions (p. 102) Bootstrap Action Basics Bootstrap actions execute as the Hadoop user by default. You can execute a bootstrap action with root privileges by using sudo . 100
Image of page 106
Amazon EMR Management Guide Create Bootstrap Actions to Install Additional Software All Amazon EMR management interfaces support bootstrap actions. You can specify up to 16 bootstrap actions per cluster by providing multiple bootstrap-actions parameters from the console, AWS CLI, or API. From the Amazon EMR console, you can optionally specify a bootstrap action while creating a cluster. When you use the CLI, you can pass references to bootstrap action scripts to Amazon EMR by adding the --bootstrap-actions parameter when you create the cluster using the create-cluster command. The syntax for a --bootstrap-actions parameter is as follows: AWS CLI --bootstrap-actions Path=s3:// mybucket / filename ",Args=[ arg1 , arg2 ] If the bootstrap action returns a nonzero error code, Amazon EMR treats it as a failure and terminates the instance. If too many instances fail their bootstrap actions, then Amazon EMR terminates the cluster. If just a few instances fail, Amazon EMR attempts to reallocate the failed instances and continue. Use the cluster lastStateChangeReason error code to identify failures caused by a bootstrap action. Run If Bootstrap Action Amazon EMR provides this predefined bootstrap action to run a command conditionally when an instance-specific value is found in the instance.json or job-flow.json file. The command can refer to a file in Amazon S3 that Amazon EMR can download and execute.
Image of page 107
Image of page 108

You've reached the end of your free preview.

Want to read all 395 pages?

  • Spring '12
  • LauraParker
  • Amazon Web Services, Amazon Elastic Compute Cloud

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes