Comments (26)
I wonder how we can get the pid on windows. Also how to kill a process. We may have some commands which we cannot do as well as on linux.
Thought working my way to port the launcher script so we can run jube.
from jube.
I've done some googling; not sure its that easy TBH :)
A process name (the name of the folder that the start/stop scripts are run within) is unique; I wonder if we need to pass the process name into the start process command; so we can grep the running processes for the name.
http://ss64.com/nt/tasklist.html
Not sure if that works mind you :)
from jube.
It's tricky, but I think it should be possible. For example, if you create a file called test.vbs with the following content:
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("notepad")
WScript.Echo oExec.ProcessID
And you run it with cscript test.vbs
then it prints out the pid of the running notepad process that it launched.
from jube.
I just found tasklist as a command. I dont remember such a command from my old windows days. Though it shows the pid for the tasks. And there is also jps from java itself.
from jube.
Yay got a bit working now.
I can now run or start jube on Windows using the launcher script. And just got it able to figure out the pid as well. I haven't yet looked at starting a process as nohub so when you use start.bat you get a 2nd dos window.
But take notice of screenshot below where it prints the pid of jube which is 3056.
And there is a taskkill
command so we can kill it also with taskkill /pid 3056
.
from jube.
who-hooo!
from jube.
I noticed that Karaf uses a Start/Stop class on windows. We could always use some Java code if that helps (though TBH not sure what Java can do that a .BAT/.CMD can't ;)
from jube.
Yeah I thought that as well we could drop a tool JAR somewhere to use.
Though if it was windows 95 it may be a problem but seems like the newer windows from xp/2000 kinda is possible. I just got the status and start/run to work.
The only problem is that there is no nohup
to start a process in the background etc. I guess its the service wrapper thingy needed. Though lets see how far I get today so we have a java image working on windows. I expect then the tomcat/karaf images is easier to port as well. And I suppose the wildfly one is doable as well.
from jube.
And btw I tried a winbash project that is a .exe and a set of ports of linux commands. It was able to run the launcher .sh scripts. Though the ps
command was not available - but I though it was icky to have to distribute an .exe file to go along.
from jube.
Ah cool! :)
It wouldn't be a biggie to include winbash.exe inside the jube distro so that processes can use it?
from jube.
Okay I got the java jube image covered now (fingers crossed).
Still to go is the tomcat / karaf and wildfly images
from jube.
Tomcat is now done, so its karaf and wildfly tomorrow
from jube.
Behold we are conquering windows now. Just got jube being able to run the camel-spring quickstart.
from jube.
Don't fall of the chair, but we got jube with tomcat running on windows now. Even the hawtio connect button worked, though I had to type admin/admin 2 times.
from jube.
who-hoo! Just in time for a Friday beer to celebrate! :)
from jube.
And it even works as a service. I can access 9001 or what the port was, and its proxied to the 57xxx port that tomcat runs. And I killed tomcat, and jube just started a new Tomcat ;)
Yes its time for a beer and dinner. Have a nice weekend.
from jube.
awesome stuff - yay! Have a great weekend too!
BTW I've been trying to make most REST-ish or web-ish quickstarts respond to the / directory so that if you open a quickstart from the Services tab it does something useful. e.g. the cxf-rest war does now - so folks can just click a few times and test out the quickstarts nicely - via kube services
from jube.
And Karaf is also running now
from jube.
I wonder if the HTTP server of Karaf should be exposes as a kube service?
from jube.
Yeah. I guess different Apps may use karaf and wish to expose different services.
So it might be nice for each quickstart for example to define its own service; so you could view all, say, karaf CXF quickstarts as a single service - which is different from the Camel quickstarts etc
from jube.
Ah yeah, so if a quickstart leverages the HTTP server of Karaf, then it should expose it as a service.
And currently that is mostly the soap/rest karaf quickstarts.
from jube.
There is 2 images left, wildfly and zookeeper.
from jube.
Yeah. I started adding services to some of the quickstarts so they work like that. e.g.
- https://github.com/jstrachan/quickstarts/blob/changes/apps/api-registry/src/main/resources/kubernetes-extra.json
- https://github.com/jstrachan/quickstarts/blob/changes/quickstarts/java/cxf-cdi/src/main/resources/kubernetes-extra.json
then if you run those quickstarts, they appear on the Services tab in hawtio and you can click on the URL to try out the quickstart ;)
Incidentally it'd be awesome if the fabric8:json maven goal that generates the kubernetes JSON, also detected if a fabric8.service.port property was set & automatically generated the service entry in the JSON too (we'd have to switch from being a vanilla ReplicationController to being a Config to do that) - then we can start deleting all these kuberentes-extra.json files - which are tricky to write and very error prone - and just reuse the labels / container port / service port from the maven properties to generate a JSON file with the service definition inside too.
Mostly its a case of changing this template to detect the fabric8.service.port and if present add a Service definition
https://github.com/jstrachan/fabric8/blob/changes/components/kubernetes-template/src/main/resources/io/fabric8/templates/default.mvel
I've just raised #3163 to track this
from jube.
I logged #155 about the missing wildfly image. Then closing this as we have for 4 kinds now that are used by the quickstarts.
from jube.
guys, any good reason why not use powershell? given how many problems you have with batch scripts...
from jube.
For jube we have a number of different images for
- java = standalone java
- tomcat
- karaf
- wildfly
And for the last 3 they have .bat scritps to run on windows. So its only the standalone java we had to do ourself 100%.
For powershell what would that bring to the table? Do you see any improvement we can do?
And you are sure welcome to help with the support on Windows and jube in general ;)
from jube.
Related Issues (20)
- Jube should use port range for allocating ports
- Jube image is not build for a project of package type 'pom' HOT 4
- replace HostName -> Minion in jube
- Failed to create snapshot ... http://localhost:8585/api/v1beta1/services: Invalid argument HOT 4
- generate unique host ports for each service
- jube images break with spring fat jars - due to maven ordering HOT 1
- jube should have an upper limit of retries if an image fails to start...
- add incrementing resourceVersion to the REST API for easier caching in hawtio
- support the /api/v1betaN/proxy/services/$service/path and /api/v1betaN/proxy/pods/$podId:$port/path REST APIs from Kubernetes HOT 5
- migrate to using the hawtio 2.x UI inside jube
- Classpath issue makes Jube fails to start HOT 1
- Jube maven plugin to be able to auto download the image dependency its using HOT 1
- a pure java kubelet for working with kubernetes / OpenShift?
- Running quickstart fatjar on jube on windows fails - not sure maven/* works HOT 2
- Apps in app library does not start on windows HOT 2
- Use hawtio v2 instead of old v1 for jube HOT 14
- Move the FAQ from jube old website to fabric8
- Use 2.2-SNAPSHOT instead of 2.0-SNAPSHOT
- Is deployment in the 2.1.11 release broken? HOT 5
- jube report nullpointerexception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jube.