Closed medined closed 4 years ago
You're very welcome.
Ensure you've set the ssh key and mgmt_cidr variables in tf-nifi.tfvars.
Get the ELB hostname.
You can find the ELB hostname in the terraform.tfstate file, e.g.:
grep '"dns_name"' terraform.tfstate
"dns_name": "chad-dev-elb-1208700909.us-east-2.elb.amazonaws.com",
or via aws cli, e.g.:
aws elb describe-load-balancers --query 'LoadBalancerDescriptions[*].[DNSName, LoadBalancerName]' --output text
chad-dev-elb-1208700909.us-east-2.elb.amazonaws.com chad-test-elb
and I've updated the git project with a terraform output that prints the ELB's DNS whenever terraform apply or terraform output is run, e.g.:
After terraform apply
:
terraform apply -var-file="tf-nifi.tfvars"
data.archive_file.tf-nifi-lambda-file-node-down: Refreshing state...
data.aws_iam_user.tf-nifi-kmsmanager: Refreshing state...
...
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
tf-nifi-elb-dnsname-output = chad-dev-elb-1208700909.us-east-2.elb.amazonaws.com
or terraform output
:
terraform output
tf-nifi-elb-dnsname-output = chad-dev-elb-1208700909.us-east-2.elb.amazonaws.com
via aws cli, e.g.:
aws elb describe-instance-health --load-balancer-name chad-test-elb
# ssh
ssh ubuntu@chad-dev-elb-1208700909.us-east-2.elb.amazonaws.com
# copy to ubuntu home and change permissions
sudo cp /opt/nifi-certificates/admin/keystore.pkcs12 ~/
sudo chown ubuntu ~/keystore.pkcs12
# exit to local machine
exit
# copy via scp from - keep in mind the ELB might connect SCP to another nifi machine (multiple tries may be needed!)
scp ubuntu@chad-dev-elb-1208700909.us-east-2.elb.amazonaws.com ~/keystore.pkcs12
I would suggest grabbing the file from S3 instead! :)
Hi. Thanks for letting this project into the public. In your readme, it says "ssh to ELB hostname" in order to find the keystore.pks12 file. How is that done?
I have run the project and the AWS resources have been created.