Aws-parallelcluster: Launch Failure when using custom AMI

Created on 5 Mar 2018  路  8Comments  路  Source: aws/aws-parallelcluster

Hi,

I'm trying to launch cluster using custom AMI that I created using ubuntu1404. I keep getting this error message that I can't figure out what's wrong. any help and suggestion will be very helpful.

Thanks!

AWS::EC2::Instance MasterServer Received FAILURE signal with UniqueId i-0effa16fc5c1525cb

my configuration file looks like this. my cfncluster-cli.log file is attached
cfncluster-cli.log

[global]
cluster_template = mycluster
update_check = true
sanity_check = true
vpc_settings = public

[aws]
aws_region_name = us-east-1
aws_access_key_id = XXXX
aws_secret_access_key = XXXX

[cluster default]
key_name = mykey
vpc_settings = public

[vpc public]
vpc_id = vpc-xxxxc
master_subnet_id = subnet-xxxx
use_public_ips = true

[cluster mycluster]
vpc_settings = public
key_name = my key pair
master_instance_type = r4.2xlarge
compute_instance_type = r4.2xlarge
initial_queue_size = 0
max_queue_size = 10
scheduler = sge
custom_ami = ami-125xxx

ephemeral_dir = /scratch

shared_dir = /shared
encrypted_ephemeral = false
master_root_volume_size = 50
ebs_settings = myclusterebs
base_os = ubuntu1404
s3_read_write_resource = arn:aws:s3:::mys3

pre_install = https://s3.amazonaws.com/mys3/cfncluster_install_script.sh

[ebs myclusterebs]
ebs_snapshot_id = snap-xxxxxx
volume_size = 50
volume_type = io1

question

All 8 comments

Copied my response from other issues regard custom AMI

@cgibioinformatics May I understand why you want to customized AMI ?

Suggestion:

  1. Please look at pre_install/post_install option of cfncluster instead of creating custom AMI
  2. If you still want to create AMI, Please use packer command to create ami (E.g. for ubuntu14 https://github.com/awslabs/cfncluster-cookbook/blob/develop/packer_ubuntu1404.json)

Failure reason: user 'jack.yen' don't have cloudformation:CreateStack permission.

2018-01-30 10:19:12,025 - CRITICAL - cfncluster.cfncluster - User: arn:aws:iam::964883540134:user/jack.yen is not authorized to perform: cloudformation:CreateStack on resource: arn:aws:cloudformation:us-east-1:964883540134:stack/cfncluster-mycluster/*

Thanks. It makes sense now. I feel the pre-install/post-install approach is something I need. The permission for the install_script.sh that resides on S3 bucket has to be able to read from public correct? I'm wondering what security I should be aware of. Thanks

S3 bucket should be accessible from Ec2 instances, That doesn't mean it has to be public. You need cfncluster Instance profile having enough permission to read S3 bucket.

Hi, I think I specify it from the configuration file but is getting "403 forbidden" error would you give me some suggestion? Thanks

this is what I specifiy in the configuration
s3_read_write_resource = arn:aws:s3:::mys3bucket

Confusingly it's arn:aws:s3:::mys3bucket/* we should probably update the docs to make this clear.

I'm also running into issues trying to launch a cluster using a custom AMI when following the directions at https://cfncluster.readthedocs.io/en/latest/ami_customization.html.

To keep it simple, I'm using the alinux AMI for us-east-1 found at https://github.com/aws/aws-parallelcluster/blob/master/amis.txt without any customization at all. However, this simple example failed. Is there some other step that is needed? I've read through other issues, but none of them seem to apply here.

Here is my cfncluster config file:
config.txt

Here is the cfn-init.log file from master:
cfn-init.log

Hi @rtsleight,
there is a problem with the documentation link pointing to the amis list.
From the logs you sent, it's likely that you are using cfncluster but you used an ami built for parallecluster.
So, depending from the version that you are using, you should take the ami from the following list:

L

@lukeseawalker thanks for the help! Yes, I'm using cfncluster. The links you sent worked perfectly.

Was this page helpful?
0 / 5 - 0 ratings