Cutomisation Scripts not running


#1

I am trying to get customisation scripts to run when I create a personal HPC cluster on AWS following the documentation at http://docs.alces-flight.com/en/stable/customisation/customisation.html#customisation-storage-config

The customisation scripts are at https://github.com/mikecroucher/alces_flight_customisation
I have mirrored this repo into the S3 bucket s3://walkingrandomly-cluster and configured the cluster to use this using the CloudFormation template. This seems to have taken OK because on the cluster, if I do

alces about customizer

I get

Customizer bucket prefix: s3://walkingrandomly-cluster

Check the structure of my folders on the S3 bucket:-

aws s3 ls s3://walkingrandomly-cluster --recursive

2017-07-30 16:08:33         48 customizer/default/configure.d/run_me.sh
2017-07-29 19:30:56         48 customizer/default/manifest.txt
2017-07-29 19:30:56         24 customizer/default/node-started.d/run_me.sh

There is no evidence that these scripts are running. I am expecting the text ‘I ran’ to appear in the logs but

grep ran /var/log/clusterware/instance.log

Jul 30 15:25:27 [cluster-customizer:initialize] Retrieving customizer preinitializer from: walkingrandomly-cluster/preinitializers/
Jul 30 15:25:27 [cluster-customizer:initialize] No profile found for: walkingrandomly-cluster/customizer-preinitializers

(as an aside – should I have something in that customizer-preinitalizers folder? Nothing in the docs about it that I can find)

The folder /opt/testing should have also been created but on the cluster:

ls /opt/
apps  clusterware  gridware

I’m sure I am missing something obvious. Can anyone help please?


#2

It looks like there is a minor issue in the documentation (so thank you for spotting it!).

You can either add customizer to the CloudFormation S3 path or remove the customizer folder from the S3 bucket. As our docs use a subdirectory in our s3 bucket called customizer we should have noted that would need to be appended to the customisation profile parameter in the CloudFormation, for example:

Customizer bucket prefix: s3://walkingrandomly-cluster/customizer


#3

Thanks for the info Stuart. The CloudFormation template doesn’t like

 s3://walkingrandomly-cluster/customizer

or

 walkingrandomly-cluster/customizer

I get the error

Template validation error: Parameter FlightProfileBucket failed to satisfy constraint: Customization profile bucket name must be a valid S3 bucket name (do not include the s3:// prefix) or be left blank.

in both cases. So, I removed the customizer folder and just had the following in the CloudFormation template

walkingrandomly-cluster

GitHub repo updated https://github.com/mikecroucher/alces_flight_customisation

Contents of the bucket is now (I’ve redacted the stuff in the .git folder)

2017-08-01 08:58:08         41 .git/refs/remotes/origin/master
2017-08-01 08:58:08         48 default/configure.d/run_me.sh
2017-08-01 08:58:08         48 default/manifest.txt
2017-08-01 08:58:08         24 default/node-started.d/run_me.sh

I still can’t get the scripts to run :frowning:


#4

Firstly, the output from alces about customizer is a display bug, therefore when you see Customizer bucket prefix: s3://walkingrandomly-cluster the customizer bucket is in fact Customizer bucket prefix: s3://walkingrandomly-cluster/customizer. So the folder customizer should exist within your S3 bucket (such that the structure matches that in your first post).

Secondly, there is another bug which occurs when setting a custom bucket that removes the profile default from the profiles list. During formation, when you set S3 bucket for customization profiles to walkingrandomly-cluster then you will also need to set Customization profiles to enable to default.

Lastly, the shebang in your scripts is incorrect (missing !), it should be #!/bin/bash instead of #/bin/bash.

Let me know if these changes sort it for you.


#5

All working now. Thank you so much for the help.
you’re a star!