You have hit on the major points. For the hostname, I can offer a concrete example. In the script that starts my application:
# Permit OS variable substitution for starting the VM
export REPLACE_OS_VARS=true
# Get the EC2 fully-qualified hostname for the node name
export PUBLIC_HOSTNAME=`curl -s http://169.254.169.254/latest/meta-data/public-hostname`
Then in rel/vm.args you can set the node name using the env var:
-name <%= release_name %>@${PUBLIC_HOSTNAME}


















