We have multiple spring boot (release 1.4.3) applications each deployed on multiple linux redhat servers. The applications are managed using systemctl commands.
We would like to be able to monitor, stop and start the applications from a web dashbord.
Is there an existing tool to do this sort of thing?
You can read more about spring-boot-admin, the link is here
which provides UI for adminstrating Spring Boot applications. I have an Spring Boot project and i am using it.
It shows health status, some statistics metrics of memory usage, threads usage and so on.
They don't have the feature to stop/start applications. In my opinion you should rely on your OSs features to start and stop a process. For example as a init.d-service or in cas you are using docker by controlling your container via kubernetes or sth. else. quoted from one of the project contributor. More talkings about the stop/start topic is here
Related
Is it possible to run a Spring Boot REST API service on top of Node.js instead of Tomcat,
or if not Node.js which are the other possible servers on which we can run our Spring Boot REST Application.
Please help me figure it out.
NodeJs is a server to run Javascript code. It can not run a Java web application, which needs a JVM (Java Virtual Machine) to be run into a JVM. Before you ask, no, NodeJS can not run a JVM. Is is just not made for that. To understand what I mean, it's like wanting a car to run with a outboard engine... Definitly not possible.
So NO, you can't run your Spring Boot REST Application on the top of NodeJs server.
If you don't want to use a Tomcat, then there is other options for you:
https://blog.idrsolutions.com/2015/04/top-10-open-source-java-and-javaee-application-servers/
I am using .NET core on Debian.
Trying to get list of all services and their status. (Equivalent to service --status-all)
I tried System.ServiceProcess.ServiceController.GetServices() but it seems to be Win32 only.
There is System.Diagnostics.Process.GetProcesses() in .Net COREFX libraries which gives me a list of all processes (including service processes like cron).
How to?
Distinguish which processes are running as a service.
Get just a list of services and their statuses.
There is no such tooling in .NET Core. Linux/Unix/BSD specific behavior (like service management) was shifted to later releases (if at all).
In classic Unix/Linux there is no way to determine if a process is a service. Each service use a different way (user, process group, background, parent pid, ...). Also the service status cannot be determined. This situation is even more complicated with systemd which can do on-the-fly service activation when certain ports get activated. However, do not expect anything standardized like the Windows Services.
To figure out, how you can determine which process is a service, you need to ultimately consult the Debian documentation and may invoke a command line utility instead of an API method.
Some years ago we deployed several OSGi-based Spring Integration (SI) applications in Virgo. However, apparently SI has moved away from OSGi. So, in absence of Virgo container, what is best way to run an SI app in production now? Say, a simple app that monitors a file system location & loads file data into Oracle? Is it just java -jar?
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". You can run a small production applications on it, you can consider using Spring Cloud then.
If you are looking for a container then think about SpringSource Tc Server - based on Pivotal Tc Server (an enterprise version of Apache Tomcat) as a platform. This is the drop-in replacement for Apache Tomcat that's optimized for Spring.
I need to make an application that runs as a server that accepts connections from various clients and responds to their requests (via proprietary protocol). This server also needs a GUI for configuration and monitoring. I (of course) need to run the server as a service, and the GUI has to be available only at certain moments. Since the server service and GUI share some of the hardware resources and part of the configuration they would run on the same machine. I would like that the GUI and the whole long running service are one process that will run in the background; the GUI would than be invoked (shown) only when needed.
My question is: can this be done with a JavaFX 2 GUI and how?
Thanks in advance
Josip
So you need Monitoring and Management in a Java application? You should be using the Java Management Extensions (JMX) Technology. http://docs.oracle.com/javase/6/docs/technotes/guides/management/overview.html
And if you decide that you can't just use a standard JMX client or create a plugin then you create your JavaFX application as a JMX client.
I have a Windows application that does some calculations and is called from command line. On my Windows machine, I have a PHP script running under Apache that executes the application and shows the output.
Is there any hosting solution that I can use to do the same? I can't figure out if EC2 or Azure are the right solutions. Basically, I need a web server + ability to execute my application.
Suggestions? Thanks.
You can host your application on AppHarbor, the .NET Platform-as-a-Service. You can either port your web frontend to .NET or try to get your PHP stuff working with Phalanger. AppHarbor is working on Background Tasks, which might be a good match for your workload.
I would just run the PHP script you already have under IIS in a Windows Azure web role.
If it is a Windows Application and you have the source code I would go with an Azure Worker Role. The advantage of using a PaaS (as Azure) instead of an IaaS (as Amazon) is that you wont have to bother of keeping the server up to date.
The real investment in time will be when you rewrite your application to make it work as a Worker Role. The time needed to do this work depends on how your application works right now. If is uses a lot of disc access it might be difficult and perhaps an Amazon server would be better. But if it only crunches numbers in memory an Azure Worker Role is a very good candidate.
The real advantage of using an Amazon server is that you probably wont need to do any work at all. Except maintaining the server.
As described in the question both Azure and EC2 will do the job very well. This is the kind of task both systems are designed for.
So the question becomes really: which is best? That depends on two things: what the application needs to do and your own experience and preference.
As it's a Windows application there should probably be a leaning towards Azure. While EC2 supports Windows, the tooling and support resources for Azure are probably deeper at this point.
If cost is a factor then a (somewhat outdated) resource is here: http://blog.mccrory.me/2010/10/30/public-cloud-hourly-cost-comparison/ -- the conclusion is that, by and large, Azure and Amazon are roughly similar for compute charges.
Steve Marx has a blog post that describes how to run another web server (i.e not IIS) on Azure
This potentially has everything you need - you can deploy Apache and your executable and run it in exactly the same way.
Alternatively - you can deploy your executable along side a bit of code in a worker role that would run that application periodically, all depending on your exact requirements