How can we host Solr 5+ as a Java app on Azure? I am following this article https://azure.microsoft.com/en-in/documentation/articles/web-sites-java-get-started/ to create a Java app in Azure.
However, Since Solr 5, Java Servlet (Tomcat) is inbuilt into the Solr install files, and it is an executable file!
Any idea, how to get it working on Windows Azure infrastructure that scales well when needed.
There's an MS OpenTech project that runs Solr on Azure inside a Worker Role. It's been created for Solr 4.x but you should be able to modify it to work with the latest version.
https://github.com/MSOpenTech/Windows-Azure-Solr
If you want something that's easier to set up, you can get a pre-configured Linux image that includes Solr from VM Depot. This can be deployed easily to Azure:
https://vmdepot.msopentech.com/List/Index?sort=&search=solr
As I know, you can create an template Ubuntu VM contains Solr to install Solr 4.0.0/4.8.1/4.9.0 on the Azure new portal, as the follow picture.
If you have to install Solr 5+, I suggest you can create the Azure VM and follow the solr offical getstart document to do it.
On Azure, there is a cloud search-as-a-service solution called Azure Search that allows you to easily add a robust search experience to the application using a simple REST API or .NET SDK without managing search infrastructure and becoming an expert in search.
I recommend you can try to use the Azure Search to realize your needs. Please move to https://azure.microsoft.com/en-us/documentation/articles/search-what-is-azure-search/ to know it.
Related
I am using Java Client Library to use google Dialogflow. My questions is what happens when we use "appEnginedeploy" using gradle? Where is the code stored and more importantly how the implemented database and other files of code stored and accessed by our agent?
Thanks!
appEngineDeploy is setup to deploy the code to App Engine, a computing platform on Google Cloud. Code and associated project files are stored as they are in your project.
It's not entirely a VM, so you shouldn't necessarily think of App Engine as locating filepaths. If the project can make the links locally, then it should behave the same way in App Engine.
With regards to databases, it would depend if you're using an embedded database or using a hosted solution through another Google Cloud service. Presumably you'd use the database APIs for a Cloud service as shown in the documentation.
I want to use Apache Solr, or Elastic Search, or some form of Apache Lucene on my website. Do I have to have a completely separate server for it to run on?
My website runs on AWS on a Tomcat instance. I know that I can simply spin up an elastic search instance on AWS and use that. My goal is to do it without having to spend that money, and just use it on the server I already have. Is this possible?
The question is usually what problem you want to solve, and then deciding whether Elastic or Solr can be the solution to that problem.
But yes, you can run both elasticsearch and Solr on your existing server. You'd install either by following the installation guides in their manuals, and they'll both run as server daemons separate from your existing Tomcat installation.
Older versions of Solr was distributed as a .war file that you could run in Tomcat, but this is not (officially) supported any longer, and is not recommended (at it would require a bit of manual hacking).
You'd then write code in your existing webapp to query Solr or Elasticsearch for the information you want to retrieve.
I am working on a Servlet/JSP project and I want to host it on aws.amazon.com. I have already signed up for Amazon Web Services and after signing in this page opens up and I have no idea what to do or which option to select.
I think AWS provides a lot of customization with a lot advanced technical options to choose from, but this is difficult for beginners who just want to make their site running.
My project will use these:-
JSP/Servlets
CSS
MySQL
Struts2
Tomcat WebServer
I would suggest these approaches to study:
Elastic BeanStalk - This is AWS simply hosting model. If you're not IT savy you should pursue this approach
EC2 with MySQL RDS - In this case you'll create a Virtual Machine(s) (EC2) install Tomcat and other dependencies and deploy your app. You'll then use RDS to store your data (which is MySql as a service)
EC2 only - YOu'll do the same as 2. but install your own instance of MySql. There may be AMI's offered that you can provision that will meet your application requirements.
Other reading:
Route53 if your going to use AWS for your domain records
Elastic Load Balancing if your going to need High Availability
Elastic Block Store if you want persistent disks accross VMs
Network Security Groups to secure your VMs (for 1. and 2.)
Virtual Private Cloud for additional security
CloudFormation if you want to automate provisioning
There are many articles on: AWS Architecture
There is a eclipse plugin for Amazon web services.
The AWS Toolkit provides an AWS Java web project template for use in Eclipse. The template creates a web tools platform (WTP) dynamic web project that includes the AWS SDK for Java in the project's classpath. Your AWS account credentials and a simple index.jsp file are provided to help you get started. The following instructions assume you have installed both the Eclipse IDE for Java EE Developers and the AWS Toolkit plug-in. For more information, see Setting Up the AWS Toolkit for Eclipse.
Also check this & this
I would recommend 1st approach using Beanstalk to deploy your jsp application. There you are going to leverage all the advantages of AWS like load balancing, auto scaling, ddb and DW support and many other technologies. With Beanstalk you setup dev environment on your local machine and deploy the changes in AWS and once setup is done you are done...
May be you will need to spend some time on migrating from MySQL but that will be work on longer duration when you are going to have lot of users.
I am working on a project which requires to create a VM in azure. I have worked on AWS where I can use the AWS api to programatically create a VM in AWS. Can I do the same on Azure?
Yes, you can programmatically create VMs in Windows Azure by consuming Windows Service Management REST API. I wrote a blog post some days ago about consuming this API using Java which you can read here: http://gauravmantri.com/2013/08/25/consuming-windows-azure-service-management-api-in-java/. You just have to write code for consuming appropriate operations available in Service Management API.
My team has recently put out some major updates to the Java SDK and what's available in service management areas in our 0.6.0 release. You can check out the README in our repository to see a detailed of what all the SDK can do, and this post provides some guidance on getting started with the service management SDK using Maven and Eclipse.
Yes, you can programmatically create virtual machines in Azure using
Java SDK.
But you need to configure your java program as an application in
Azure portal.
Check this link for authenticating a java program in
azure.
Here is a sample piece of code from Azure SDK for creating a Linux
virtual
VirtualMachine linuxVM = azure.virtualMachines().define("myLinuxVM")
.withRegion(Region.US_EAST)
.withNewResourceGroup("myResourceGroup")
.withNewPrimaryNetwork("10.0.0.0/28")
.withPrimaryPrivateIpAddressDynamic()
.withNewPrimaryPublicIpAddress("mylinuxvmdns")
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
.withRootUserName("tirekicker")
.withSsh(sshKey)
.withSize(VirtualMachineSizeTypes.STANDARD_D3_V2)
.create();
I am deploying a web application developed in Java over Microsoft Windows Azure.
How to use caching in Windows Azure for Java web application at configuration level?
I don't want to write any code for caching. If there is a way to enable caching for particular folder or particular content type.
Have you taken a look at this. There is a section on configuring the cache.