Following are the steps to create a new EC2 Instance which has the Apache Solr Stack provided by Bitnami.
Login to your AWS console, and go to EC2 Management Console.
Click on the Button “Launch Instance” to create a new instance.
Select tab “Amazon MarketPlace” and search for “Bitnami Solr” , You should see two results, Select the Instance with Title “Apache Solr powered by Bitnami”.
4. In the next step choose the Instance type as per your memory and storage requirements. Click ‘Review And Launch’
5. On Launching the instance you may have to create a new key-pair to log into the instance, or you may choose to login with existing key-pair (if you have).
You can see the new Solr Instance Running in your EC2 Instances within couple of minutes.
Transferring Indexed Data to EC2 Solr Instance.
If you already have the Solr indexed data on your local machine that you wish to transfer to the Bitnami Solr Instance , following are the steps
Go into EC2 Management Console and Copy the Public DNS name for your newly created Solr Instance. It should be something like (EC2-XX-XX-XX-XX.us-west-2.compute.amazonaws.com)
Open your FTP Client to connect to this Instance via SFTP. I use FileZilla. The username for the Solr Instance is bitnami, and you need to attach your key-pair file into the settings for SFTP login.
Once you are able to login into the Instance , you should be able to see the default directory listing under /home/bitnami
You can transfer your indexed data (index directory) into this directory. You can now disconnect the FTP Client.
Now SSH into your bitnami Solr instance.
ssh -i Downloads/macnew.pem bitnami@ec2-XX-XX-XX-XX.us-west-2.compute.amazonaws.com
Go to folder /opt/bitnami/ apache-solr. In this folder you can create your new directory for your index and configuration file.
As an Example I have created a folder with my project-name that contains two folders ‘primary’ and reindex’ , both these folders further contains necessary configuration files like core.properties and a conf directory under these folder contains schema.xml and solrconfig.xml
Once you are done with creating the necessary configuration files and folders, You can now move your indexed data to your directory under index-folder/index-name/data/index
Starting solr server. If you have the solr server already running you can stop it via going into bin directory and running ./solr stop -p 8983
You may need to switch to user solr sudo su - solr to start the solr server via ./solr -p 8983 -s path/to/solr/index
To see the Solr Console via browser you can do a tunnel SSH via ssh -N -L 18983:127.0.0.1:8983 -i path/tp/keyfile.pem bitnami@ec2-XX-XX-XX-XX.us-west-2.compute.amazonaws.com