Deploying Connector on the Endpoint Itself Overview
Prepare The Script
There are two ways to download the connector to an endpoint:
1. Download the connector from the internet using the scripts below:
- For CentOS, RHEL, OracleLinux, SUSE, AmazonLinux (Terraform-DeployJetPatchConnectorFromInternetOnLinux.sh)
- For Ubuntu (Terraform-DeployJetPatchConnectorFromInternetOnDebian.sh)
Run The Script On Remote Machines
1. Upload the script you just prepared in Terraform For this article we assume the script is located in :
/terraform/jetpatch/Terraform-DeployJetPatchConnectorFromInternetOnLinux.sh
2. Create the file provision main.tf
Now we need to create the Terraform file provision that will transfer that script to the remote server(s) and execute it. This article refers it as: main.tf
. (Download main.tf file)
provisioner "file" {
source = "/terraform/jetpatch/Terraform-DeployJetPatchConnectorFromInternetOnLinux.sh"
destination = "/tmp/Terraform-DeployJetPatchConnectorFromInternetOnLinux.sh"
}
provisioner "remote-exec" {
inline = [
"chmod +x /tmp/Terraform-DeployJetPatchConnectorFromInternetOnLinux.sh",
"sudo /tmp/Terraform-DeployJetPatchConnectorFromInternetOnLinux.sh",
]
}
}
Important:
- Source as to be changed following the directory use/share.
- Indentation of brackets is important. We recommend you configure the downloaded main.tf file.
3. Create the file provisions variables.tf
We will not be able to configure for you this file as it changes with your environment but you can download an example of variables.tf here.
4. Once those files are created you can use the terraform commands to syntax check and prepare the deployment:
terraform init
The init argument will initialize the environment.
5. Then issue:
terraform plan -out main.plan
The plan argument will syntax check the files and prepare the deployment.
6. Deploy the script
terraform apply main.plan
--------------------------------------------------------------------------------------------------------------------
(optional commands)
To view data about the instance execute
terraform show
To destroy the instance execute:
terraform destroy
Comments
0 comments
Article is closed for comments.