Skip to content

Commit 3432020

Browse files
committed
add post-install snippet
1 parent efcdca6 commit 3432020

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,30 @@ Note: *while almost all components are under the Apache2 license, only **[Promet
4747

4848
## How to install it
4949

50-
You can simply use the post-install script that you can find [here](https://github.com/aws-samples/aws-parallelcluster-monitoring/blob/main/post-install.sh) as it is, or customize it as you need. For instance, you might want to change your [Grafana password](https://github.com/aws-samples/aws-parallelcluster-monitoring/blob/main/docker-compose/docker-compose.master.yml#L43) to something more secure and meaningful for you, or you might want to customize some dashboards by adding additional components to monitor.
50+
You can simply use the post-install script that you can find [here](https://github.com/aws-samples/aws-parallelcluster-monitoring/blob/main/post-install.sh) as it is, or customize it as you need. For instance, you might want to change your [Grafana password](https://github.com/aws-samples/aws-parallelcluster-monitoring/blob/main/docker-compose/docker-compose.master.yml#L43) to something more secure and meaningful for you, or you might want to customize some dashboards by adding additional components to monitor.
51+
```
52+
#Load AWS Parallelcluster environment variables
53+
. /etc/parallelcluster/cfnconfig
54+
55+
#get git-hib repo to clone and the installation script
56+
github_repo=$(echo ${cfn_postinstall_args}| cut -d ',' -f 1 )
57+
setup_command=$(echo ${cfn_postinstall_args}| cut -d ',' -f 2 )
58+
monitoring_dir_name=$(basename -s .git ${github_repo})
59+
60+
case ${cfn_node_type} in
61+
MasterServer)
62+
cd /home/$cfn_cluster_user/
63+
git clone ${github_repo}
64+
;;
65+
ComputeFleet)
66+
67+
;;
68+
esac
69+
70+
#Execute the monitoring installation script
71+
bash -x "/home/${cfn_cluster_user}/${monitoring_dir_name}/parallelcluster-setup/${setup_command}" >/tmp/monitoring-setup.log 2>&1
72+
exit $?
73+
```
5174
The proposed post-install script will take care of installing and configuring everything for you through the [install-monitoring.sh](https://github.com/aws-samples/aws-parallelcluster-monitoring/blob/main/parallelcluster-setup/install-monitoring.sh) script. Though, few additional parameters are needed in the AWS ParallelCluster config file: the post_install_args, additional IAM policies, security group, and a tag. You can find an AWS ParallelCluster template [here](https://github.com/aws-samples/aws-parallelcluster-monitoring/blob/main/parallelcluster-setup/pcluster-template.config). Please note that, at the moment, the installation script has only been tested using [Amazon Linux 2](https://aws.amazon.com/amazon-linux-2/).
5275

5376
```

0 commit comments

Comments
 (0)