Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "Description": "CloudFormation template for creating an EMR cluster",
- "Outputs": {
- "IPAddress": {
- "Description": "IP address of EMR cluster MasterNode",
- "Value": {
- "Fn::GetAtt": [
- "EMRSampleCluster",
- "MasterPublicDNS"
- ]
- }
- }
- },
- "Parameters": {
- "CoreInstanceCount": {
- "Default": "3",
- "Description": "Number of core instances",
- "Type": "Number"
- },
- "CoreInstanceType": {
- "Default": "m4.xlarge",
- "Description": "Instance Type of the core node",
- "Type": "String"
- },
- "EMRClusterName": {
- "Default": "SecurityPOCCluster",
- "Description": "Cluster name for the EMR",
- "Type": "String"
- },
- "EMRLogDir": {
- "Description": "Log Dir for the EMR cluster",
- "Type": "String"
- },
- "KeyName": {
- "Description": "Name of an existing EC2 KeyPair to enable SSH to the instances",
- "Type": "AWS::EC2::KeyPair::KeyName"
- },
- "MasterInstanceType": {
- "Default": "m4.xlarge",
- "Description": "Instance Type of the master node",
- "Type": "String"
- },
- "Subnet": {
- "Description": "Subnet ID for creating the EMR cluster",
- "Type": "AWS::EC2::Subnet::Id"
- },
- "VPC": {
- "Description": "VPC ID for creating the EMR cluster",
- "Type": "AWS::EC2::VPC::Id"
- },
- "emrReleaseLabel": {
- "Default": "emr-5.9.0",
- "Description": "Release label for the EMR cluster",
- "Type": "String"
- }
- },
- "Resources": {
- "EMRSampleCluster": {
- "Properties": {
- "Applications": [{
- "Name": "Hive"
- },
- {
- "Name": "Spark"
- },
- {
- "Name": "Sqoop"
- },
- {
- "Name": "Hue"
- }
- ],
- "Instances": {
- "CoreInstanceGroup": {
- "InstanceCount": {
- "Ref": "CoreInstanceCount"
- },
- "InstanceType": {
- "Ref": "CoreInstanceType"
- },
- "Market": "ON_DEMAND",
- "Name": "Core Instance"
- },
- "Ec2KeyName": {
- "Ref": "KeyName"
- },
- "Ec2SubnetId": {
- "Ref": "Subnet"
- },
- "MasterInstanceGroup": {
- "InstanceCount": "1",
- "InstanceType": {
- "Ref": "MasterInstanceType"
- },
- "Market": "ON_DEMAND",
- "Name": "Master Instance"
- },
- "TerminationProtected": "false"
- },
- "JobFlowRole": "EMR_EC2_DefaultRole",
- "LogUri": {
- "Ref": "EMRLogDir"
- },
- "Name": {
- "Ref": "EMRClusterName"
- },
- "ReleaseLabel": {
- "Ref": "emrReleaseLabel"
- },
- "ServiceRole": "EMR_DefaultRole",
- "Tags": [{
- "Key": "Name",
- "Value": "EMR Sample Cluster"
- }],
- "VisibleToAllUsers": "true"
- },
- "Type": "AWS::EMR::Cluster"
- },
- "LoadHDFSData": {
- "Properties": {
- "ActionOnFailure": "CONTINUE",
- "HadoopJarStep": {
- "Args": [
- "s3://mahis3bucket/moodys/loadloads3.sh"
- ],
- "Jar": "s3://elasticmapreduce/libs/script-runner/script-runner.jar",
- "MainClass": ""
- },
- "JobFlowId": {
- "Ref": "EMRSampleCluster"
- },
- "Name": "LoadHDFSData"
- },
- "Type": "AWS::EMR::Step"
- },
- "SparkStep": {
- "Properties": {
- "ActionOnFailure": "CONTINUE",
- "HadoopJarStep": {
- "Args": [
- "spark-submit",
- "--deploy-mode",
- "cluster",
- "s3://mahis3bucket/moodys/py5.py",
- "10"
- ],
- "Jar": "command-runner.jar",
- "MainClass": ""
- },
- "JobFlowId": {
- "Ref": "EMRSampleCluster"
- },
- "Name": "SparkStep"
- },
- "Type": "AWS::EMR::Step"
- }
- }
- }
Add Comment
Please, Sign In to add comment