Admin Center: a GUI for Open Liberty
The adminCenter-1.0
feature enables the Administrative Center (Admin Center), a web-based graphical user interface (GUI) for configuring, monitoring, and managing Open Liberty servers. In this post, we explain how you can use the GUI and the various tools it provides in Open Liberty.
Set up Admin Center
-
Starting with the 21.0.0.4 release, the Open Liberty All GA Features package includes the Admin Center 1.0 feature. If you’re using a different Open Liberty package, use the featureUtility command to install the
adminCenter-1.0
feature. Run the command from the wlp/bin directory.featureUtility installFeature adminCenter-1.0
-
If your Open Liberty installation does not have a server, create an Open Liberty server named myServer.
server create myServer
-
Configure the
server.xml
file to enable Admin Center and secure login.To use Admin Center, you must enable the
adminCenter-1.0
feature and configure access roles for at least one user to be in either the reader or administrator security role.You can use the following example
server.xml
file to try out Admin Center. This example enables theadminCenter-1.0
feature and configures a basic user registry that defines users in thereader-role
andadministrator-role
security roles:<server description="Admin Center example server"> <!-- Enable features --> <featureManager> <feature>adminCenter-1.0</feature> </featureManager> <!-- Define two users--> <basicRegistry id="basic"> <user name="admin" password="adminpwd" /> <user name="reader" password="readerpwd" /> </basicRegistry> <!-- A user with the administrator-role has full access to the Admin Center --> <administrator-role> <user>admin</user> </administrator-role> <!-- A user with the reader-role has read-only access to the Admin Center --> <reader-role> <user>reader</user> </reader-role> <!-- To protect keystore files that have server authentication credentials, define a keystore and assign it a password --> <keyStore id="defaultKeyStore" password="Liberty" /> <httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="9443" /> </server>
-
If the server is not running, start the server.
server run myServer
Look for server messages that show the
adminCenter
web application is running. After Admin Center is running, you can point a web browser at the application and log in.
Log in to Admin Center
-
Point a web browser at the Admin Center login page:
-
For host_name, specify the IP address or domain name server (DNS) hostname of the computer on which the Open Liberty server is running. If the browser is running on the same computer as the server, you can specify
localhost
. -
For port_number, specify the
httpsPort
value from thehttpEndpoint
element in theserver.xml
file.For example, if your browser is running on the same computer as your server and you use the previous example
server.xml
configuration, the Admin Center URL is:For security reasons Admin Center is only accessible over https.
-
-
If your browser prompts you to confirm that the connection is trusted, specify an exception or otherwise enable the connection to continue to Admin Center.
-
To log in to Admin Center, specify the user name admin and the password adminpwd.
The Toolbox
When you log in to Admin Center, you can see the Toolbox, which contains tools such as the Server Config and Explore tools and a bookmark to openliberty.io.
The following tools are available for Admin Center. The Server Config and Explore tools are available by default. The Java Batch and Open ID Connect tools are available only if you enable and configure the respective Open Liberty features for those functions. To use a tool, select its Toolbox icon.
The Server Config tool
You can use the Server Config tool to view and edit server configuration files in the Open Liberty topology. The Server Config tool displays configuration files such as a server.xml
file in two modes: Design and Source, each of which can be accessed from a browser tab. The Design mode displays the content of configuration files by using graphical controls with inline documentation. The Source mode provides direct access to the file text and has content assist capabilities. You can customize the modes, for example, to add or remove parameter descriptions on the Design mode or to add or remove line numbers on the Source mode.
Before you can edit files, the tool prompts you to add a remoteFileAccess element to the server.xml
file. You can copy the example element from the browser window or configure it manually. If you do not add this element, configuration files are shown in read-only mode.
To enable write access, add the following to your server.xml
file:
<remoteFileAccess>
<writeDir>${server.config.dir}</writeDir>
</remoteFileAccess>
Click server.xml
to display the content of the configuration file:
The Explore tool
You can use the Explore tool to explore and manage resources in the Open Liberty topology. This tool offers options to view information about the server and its applications. You can also use it to stop, start, or restart resources.
The Monitor view on the vertical navigation bar shows the metrics graphically in charts. You can use the Monitor view to track heap memory, loaded classes, active Java™ virtual machine (JVM) threads, and central processing unit (CPU) usage.
The Java Batch tool
If you configure the batchManagement-1.0 feature, you can access the Admin Center Java Batch tool. With the Java Batch tool you can view the progress and status of your Java™ batch jobs, manage their instances, and view their log files.
If the batch jobs or job logs do not reside on the server that runs Admin Center, configure cross origin region sharing (CORS) on each remote server that has batch jobs or job logs. CORS enables Admin Center to request job information from remote servers.
The OpenID Connect (OIDC) tools
If you enable openidConnectServer-1.0 feature and configure OIDC, you can access the Admin Center OIDC tools.
-
OpenID Connect Client Management Tool
You can use this tool to allow an administrator to manage clients on an OpenID Connect provider.
-
OpenID Connect Personal Token Management Tool
You can use this tool to allow a user to manage application passwords and application tokens on an OpenID Connect provider.
-
OpenID Connect Users Token Management Tool
You can use this tool to allow an administrator to revoke application passwords and app-tokens of other users on an OpenID Connect provider.
We hope you enjoyed our brief tour of Admin Center in Open Liberty. As always, let us know if you have any questions about this feature. Thank you for checking it out!