Change scripts for load and run to copy conf files into their corresponding directories
Currently, we copy all the conf to the nodes (/opt/conf). Script should take their corresponding files and copy them into the corresponding folders of each engine.
The scripts are in terraform/modules/compute_set/files/[load|run]/database/*sh
(except entrypoint.sh).
Remember that datadir (data directory location) is the same for ALL engines: /opt/data.
Here is the snippet that copies the conf files:
# https://www.terraform.io/docs/provisioners/file.html
# trailing slash handling is important here. We want to keep the code agnostic
# as possible, but configuration can vary considerably between each engine.
# So, we copy the entire folder to /opt/conf and we let the custom scripts to
# handle this.
#
provisioner "file" {
source = "conf"
destination = "/opt/conf"
connection {
type = "ssh"
user = "${var.globalconfig["sshuser"]}"
private_key = "${file("~/.ssh/id_rsa_${var.globalconfig["project"]}")}"
}
}