Skip to content
Draft
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ xref:reference-manual.adoc#osgi[`osgi`]::
Remote Shell Commands].
xref:reference-manual.adoc#osgi-shell[`osgi-shell`]::
Provides interactive access to the Apache Felix Gogo remote shell for
the execution of OSGi shell commands. For procedural information in
this guide, see xref:overview.adoc#to-run-apache-felix-gogo-remote-shell-commands[To Run Apache Felix Gogo
Remote Shell Commands].
the execution of OSGi shell commands. For procedural information in
this guide, see xref:overview.adoc#to-run-apache-felix-gogo-remote-shell-commands[To Run Apache Felix Gogo
Remote Shell Commands].
xref:reference-manual.adoc#set[`set`]::
Sets the values of one or more configurable attributes. For procedural
information in this guide, see xref:monitoring.adoc#configuring-monitoring[Configuring
Expand Down
1 change: 0 additions & 1 deletion docs/administration-guide/src/main/asciidoc/loe.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ prev=toc.adoc

* xref:overview.adoc#gkvay[1-1 Determining if the DAS Requires Restart]
* xref:overview.adoc#gkvba[1-2 Determining if an Instance Requires Restart]
* xref:overview.adoc#GSADG1053[1-3 Listing Apache Felix Gogo Remote Shell Commands]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be kept, do not remove this, this functionality works

* xref:overview.adoc#GSADG1054[1-4 Running a Remote Shell Command]
* xref:overview.adoc#gjkrh[1-5 Determining the Services That an OSGi Bundle Provides]
* xref:general-administration.adoc#giwdr[2-1 Running an asadmin Utility Subcommand in Single Mode]
Expand Down
121 changes: 0 additions & 121 deletions docs/administration-guide/src/main/asciidoc/overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -811,14 +811,6 @@ administer this framework, use the either of the following tools:
Felix Gogo] remote shell. This shell is provided with {productName}.
The shell uses the Felix Gogo shell service to interact with the OSGi
module management subsystem.
* GlassFish OSGi Administration Console. This console is distributed as
an add-on component for {productName} or as a set of files from the
Maven GlassFish repository. In both distributions, the GlassFish OSGi
Web Console is provided as an extension to the Administration Console
and as a standalone web application. The GlassFish OSGi Administration
Console is a customized version of the
http://felix.apache.org/documentation/subprojects/apache-felix-web-console.html[Apache
Felix Web Console].

These tools enable you to perform administrative tasks on OSGi bundles
such as:
Expand Down Expand Up @@ -991,119 +983,6 @@ service.id = 68
gogo$
----

[[to-download-and-install-the-glassfish-osgi-web-console]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the OSGi Web Console was removed from GlassFish. The other OSGi functionality is still supported.

Please remove only the following sections:

  • "To Download and Install the GlassFish OSGi Web Console"
  • "To Access the GlassFish OSGi Web Console Through the {productName} Administration Console"

Keep the rest of the OSGi documentation:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the OSGi Web Console was removed from GlassFish. The other OSGi functionality is still supported.

Web console exists in the source tree under appserver/osgi-platforms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I didn't know about this. However, that module is just a phony. I added it to the GlassFish modules directory, it adds a tab for server and instances, but when the tab is clicked, it just redirects to http://localhost:8080/osgi/system/console/bundles, which is not found. I assume that this URL used to be provided either by Felix or by some external plugin and now it's just not there.

See https://github.com/eclipse-ee4j/glassfish/blob/master/appserver/osgi-platforms/glassfish-osgi-console-plugin/src/main/resources/osgiConsole.jsf.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there's a Web Console by Felix, which is probably what the GlassFish OSGi Web Console plugin wants to redirect to: https://github.com/apache/felix-dev/tree/master/webconsole

I couldn't get it running easily with GlassFish. I downloaded the Felix Web Console bundle from Maven Central, but it requires a few more bundles and either some integration with GlassFish or a bundle that runs it inside an embedded Jetty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a few hours, I managed to deploy the Felix Web Console:
image

It requires to download around 10 bundles from Maven central and install them into the GlassFish modules directory, and also modify the glassfish/config/osgi.properties file to set a few properties. I managed to run it only via an embedded Jetty, on a separate port, and with a hardcoded username and password in osgi.properties.

I also managed to deploy it using a HTTP bridge bundle but that requires some more config and probably a custom bundle to integrate the Felix servlet to GlassFish. Security could be also bridged so that it's protected by GlassFish user and password. But, again, some more coding required.

If we decided it's worth it, I will modify the docs to describe how to install the OSGi Web Console. If not, I will just write a blog about it and we can just merge this PR and remove the docs.


===== To Download and Install the GlassFish OSGi Web Console

The GlassFish OSGi Web Console is distributed as follows:

* As an add-on component for {productName}
* As a set of files from the https://maven.java.net[GlassFish Maven
repository]

In both distributions, the GlassFish OSGi Web Console is provided as an
extension to the Administration Console and as a standalone web
application.

1. Perform one of the following sets of steps, depending on how you are
obtaining the GlassFish OSGi Web Console.
* If you are obtaining the console as an add-on component, install the
GlassFish OSGi Admin Console component.
* If you are obtaining the console from the Maven repository, download
and unzip the required files.
2. Download the following files to the parent of the `glassfish7`
directory of your {productName} installation.
http://maven.glassfish.org/content/groups/glassfish/org/glassfish/packager/glassfish-osgi-http/3.1.2/glassfish-osgi-http-3.1.2.zip[`glassfish-osgi-http-3.1.2.zip`]
+
http://maven.glassfish.org/content/groups/glassfish/org/glassfish/packager/glassfish-osgi-gui/3.1.2/glassfish-osgi-gui-3.1.2.zip[`glassfish-osgi-gui-3.1.2.zip`]
3. Unzip the files that you downloaded.
+
The contents of the files are added to the
as-install``/modules/autostart`` directory of your {productName}
installation.
4. Restart the DAS. For instructions, see xref:domains.adoc#to-restart-a-domain[To Restart a Domain].

[[GSADG797]]

Next Steps

After downloading and installing the GlassFish OSGi Web Console, you can
access the console as explained in the following sections:

* xref:#to-access-the-glassfish-osgi-web-console-through-the-glassfish-server-administration-console[To Access the GlassFish OSGi Web Console Through the
{productName} Administration Console]
* <<To Access the GlassFish OSGi Web Console as a Standalone Web Application>>

[[to-access-the-glassfish-osgi-web-console-through-the-glassfish-server-administration-console]]

===== To Access the GlassFish OSGi Web Console Through the {productName} Administration Console

A tab for the GlassFish OSGi Web Console is provided for the DAS and for
every {productName} instance in a domain.

1. Ensure that the DAS and the instance for which you want to access
the GlassFish OSGi Web Console are running.

2. Start the {productName} Administration Console.
For instructions, see <<Administration Console>>.

3. Open the Administration Console page for the DAS or instance for
which you are accessing the GlassFish OSGi Web Console.
* For the DAS, in the navigation tree, select the server (Admin Server) node.
* For a standalone instance, perform these steps:
.. In the navigation tree, expand the Standalone Instances node.
.. Under the Standalone Instances node, select the instance.
* For a clustered instance, perform these steps:
.. In the navigation tree, expand the Clusters node.
.. Under the Clusters node, select the cluster that contains the instance.
The General Information page for the cluster opens.
.. In the General Information page for the cluster, click the Instances tab.
The Clustered Server Instances page for the cluster opens.
.. In the Server Instances table on the Clustered Server Instances
page, select the instance.

4. On the Administration Console page for the DAS or instance, click
the OSGi Console tab. You are prompted for the user name and password of the administrative
user of the GlassFish OSGi Web Console.

5. In response to the prompt, provide the user name and password of the
administrative user of the GlassFish OSGi Web Console.
The user name and password of this user are both preset to `admin`.
The GlassFish OSGi Web Console page opens.

[[to-access-the-glassfish-osgi-web-console-as-a-standalone-web-application]]

===== To Access the GlassFish OSGi Web Console as a Standalone Web Application

1. Ensure that the DAS or the instance for which you want to access the
GlassFish OSGi Web Console is running.

2. In a web browser, open the following location:
+
[source]
----
http://host:http-port/osgi/system/console/
----
host::
The host where the DAS or instance is running.
http-port::
The port on which {productName} listens for HTTP requests.
The default is 8080.

+
For example, if the DAS is running on the local host and {productName} listens
for HTTP requests on the default port, open the following location:
+
[source]
----
http://localhost:8080/osgi/system/console/
----

3. When prompted, provide the user name and password of the
administrative user of the GlassFish OSGi Web Console.
+
The user name and password of this user are both preset to `admin`.

[[keytool-utility]]

==== `keytool` Utility
Expand Down