- Mais recentes
- Mais votos
- Mais comentários
Hi,
the post_install_args content is passed as argument to the post_install script:
https://github.com/aws/aws-parallelcluster-cookbook/blob/v2.3.1/files/default/fetch_and_run#L24
It is possible to differentiate between master and compute nodes execution by sourcing the /etc/parallelcluster/cfnconfig file and evaluating the cfn_node_type environment variable, whose possible values are MasterServer and ComputeFleet for the master and compute node respectively.
#!/bin/bash
. "/etc/parallelcluster/cfnconfig"
case "${cfn_node_type}" in
MasterServer)
echo "I am the master" >> /tmp/master.txt
;;
ComputeFleet)
echo "I am a compute node" >> /tmp/compute.txt
;;
*)
;
esac
In the /etc/parallelcluster/cfnconfig file of the Compute instances you can also find the master ip, in the cfn_master variable.
The output of the pre/post-install scripts can be found in the /var/log/cfn-init.log and /var/log/cfn-init-cmd.log files.
Please refer to the official docs:
https://aws-parallelcluster.readthedocs.io/en/latest/pre_post_install.html
https://aws-parallelcluster.readthedocs.io/en/latest/configuration.html#pre-install
I just created a patch to clarify the documentation and add an example for the post_install_args usage: https://github.com/aws/aws-parallelcluster/commit/02c08c177c1e732010f62439f08a6939858a379e
Let us know if it helps
Hi Enrico,
yes, your answer helps a lot !
And yes, I am following the official docs, but either I am not finding all answers or not understanding it.
Now I don't get my post_install script to start, post_install shows as NONE, despite me setting an URL to an s3 bucket script in my config. I'll write a new post on this, if the Forum allows me to send a new one, to many post restrictions here ...
Many thanks,
Richard
Can you please post your config? (redact any keys you have in it)
Also if the forum post restrictions are bothering you, you can always open a github issue: https://github.com/aws/aws-parallelcluster/issues
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos