-
Notifications
You must be signed in to change notification settings - Fork 48
View Solr and Zookeeper dashboards in AWS
Both Solr and Exhibitor (which is used to manage the Zookeeper ensemble) provide a web-based dashboard for viewing status and interacting with the service. As an administrator of the Hyku stack, it is often convenient to be able to view these dashboards, especially when troubleshooting Solr or Zookeeper related problems. In the AWS deployment, both Solr and Zookeeper run in a private subnet within a VPC; this means the dashboards cannot be accessed directly, so a set of steps is needed to make this possible.
-
Open up the necessary ports in the Solr and Zookeeper security groups.
Note: This step only needs to be done once, then it will work for everyone needing to connect afterwards. This step could also be included in CloudFormation.
- For Solr, this is port 8983. For Exhibitor, this is port 80.
- In the AWS EC2 console, select
Security Groups
and search for "BastionSecurityGroup" (there should be only one result.) Copy the Group ID, it should be something like "sg-12345678". - Still in the
Security Groups
section, search for "SolrSecurityGroup" (there should be only one result.) Select theInbound
tab, and clickEdit
. Select toAdd Rule
. For the port, use 8983, for the source, paste in the bastion security group ID. Select Save. - Still in the
Security Groups
section, search for "ZookeeperSecurityGroup" (there should be only one result.) Select theInbound
tab, and clickEdit
. Select toAdd Rule
. For the port, use 80, for the source, paste in the bastion security group ID. Select Save.
-
Set up a tunneled ssh connection, allowing a local port to push to the necessary port on the solr or zookeeper node.
- In the AWS EC2 console, select
Instances
. Select the bastion instance and copy its Public DNS value. Select one of each of the solr and zookeeper instances and copy their private IP addresses. - In a terminal, run:
ssh -i keypair.pem -L 8983:<solr-node-ip>:8983 ec2-user@<bastion-dns-name>
. This sets up an ssh connection to the solr instance, which forwards requests from local port 8983 to the same port on the solr instance. The keypair is the same used to log in to the bastion instance. - In another terminal, run:
ssh -i keypair.pem -L 8984:<zookeeper-node-ip>:80 ec2-user@<bastion-dns-name>
. This sets up an ssh connection to the zookeeper instance, which forwards requests from local port 8984 to port 80 on the zookeeper instance.
- In the AWS EC2 console, select
-
Configure a browser to proxy requests through localhost ports
- Firefox has an add-on called FoxyProxy which is convenient for this purpose, but most browsers can be set up with a proxy. Note that this is not a SOCKS proxy.
- To view the Solr UI, set the proxy to point to host
localhost
and port8983
- To view the Exhibitor UI (for zookeeper), set the proxy to point to host
localhost
and port8984
-
Use the browser with the proxy settings to open the dashboard UI
- For Solr: http://localhost/solr/
- For Exhibitor (Zookeeper): http://localhost/exhibitor/v1/ui/index.html