This can be done by adding custom files to cluster specification - The init script looks for a specially named custom file called user-init, the file has to be called that, and it has to be marked as 'is executable' [Please refer the screenshots].
the user-init file should be a script (should start with something like #!/bin/bash or similar) and it'll run after the rest of our init scripts finish and you can use that to configure whatever custom service you want to configure.
You can also use the custom file mechanism to upload additional files for SignalFX - you could use 'Location Type' Default and the files would be placed at /opt/imply/user and you can reference them there.
Example: I am showing you an example where a user wants to install `SignalFx agent` on each imply managed EC2 instance
here, I have created a `user-init` file and placed it to into `s3-bucket`
The user-init file has below content:
#!/bin/bash curl -sSL https://dl.signalfx.com/signalfx-agent.sh > /tmp/signalfx-agent.sh sudo sh /tmp/signalfx-agent.sh <SOME_ID> --realm us0
Login to imply cloud manager UI > Select the Cluster > Click on `manage` > click on `setup` >navigate to `Advance Config' and expand it > Now click on to ` Add custom file`
When you Add the `custom file` it will ask to you provide below details :
In this example, the path should be :
b) Location Type: I am using the default location, in this case, the init file will be placed inside this directory :
c) Extra Properties: In this case, it should be:
Once you are done with the above configuration, you need to update the cluster!
What is the impact on the running cluster?
As It requires a cluster update and the instances will be recreated so if your cluster is HA and you do a rolling update, there should not be any downtime, otherwise, there will be downtime. If there is an error in the script, you should be able to roll back the update.
Suggestion to be on the safe side :
I will suggest to spin up a TEST cluster and try this first before doing it in PRODUCTION.