Create a remote Liberty profile server using developer tools
Overview
We can use developer tools to create and start a remote Liberty profile server.
Prerequisites
For the local system...
- Install developer tools
- Install the Liberty profile runtime environment
- Add the host name of the remote system to the httpEndpoint host attribute in server.xml...
<httpEndpoint host="remote_system_hostname" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
If we use localhost as the host name, the server is not remotely accessible.
For the remote system...
- Have a Liberty profile server installed
- Configure the server for SSL communications
- Create authorization credentials in one of the following ways:
- Add the following configuration item to server.xml.
<quickStartSecurity userName="your_user_name" userPassword="your_password"/>
- Configure a user registry.
- Set the following permissions in server.xml:
<remoteFileAccess> <writeDir>${wlp.user.dir}</writeDir> <writeDir>${server.config.dir}</writeDir> <writeDir>${server.output.dir}</writeDir> </remoteFileAccess>
- Add the restConnector feature to the featureManager element in server.xml:
<feature>restConnector-1.0</feature>
- Ensure that the server is started.
If the server was started when you were editing server.xml, restart the server. Otherwise, we might see errors in the console. Restarting the server resolves the errors.
Create a remote Liberty profile server
- In the workbench, open the Servers view...
Window | Show view | Other
If the Servers view is not visible, navigate to...
Window | Show view | Other
...type Server in the filter text, then, select Servers.
- Right-click within the Servers view and select New > Server.
- Under the server type list, expand IBM and select the WebSphere Application Server Liberty Profile server type.
- Enter the host name of the remote server.
- Click Next. The Liberty Profile Runtime Environment page is displayed.
If you already have a Liberty profile run time installed, we will go directly to the New Remote Liberty Server page, skip to Step 7. Select an installation, install from an archive file, or (for the no-charge developer edition) download and install, the Liberty profile.
If we previously installed the Liberty profile:
Select Choose an existing installation.
In the Path field, type or browse for the directory where you installed the Liberty profile runtime environment, then click Next.
To install the Liberty profile from an archive file that was previously downloaded:
In the How do to create the runtime environment? section of the Liberty Profile Runtime Environment page, select Install from an archive or a repository; click Next.
On the Install Runtime Environment page, in the Enter the destination path field, either type the path for the new directory where to install the Liberty profile runtime environment or browse to the path, then click Next.
If you type a path that does not exist, then a folder for that path is created during the installation.
Select Install a new runtime environment from an archive. Type or browse for the archive where we downloaded the Liberty profile runtime environment, then click Next.
- In the Install Add-ons page, click Install or Install Pending to make the selection of add-on archive files to install on the Liberty profile runtime environment.
We can install an add-on archive file from the local file system, download, or use a combination of both when we install multiple add-on archive files. If the workbench is connected to the internet, the Install Add-ons page is populated with add-on archive files available for download from the WAS dev community download site.
This download site includes add-ons that we can select from the Liberty Repository, such as runtime features, samples, or open source integration.
To install add-on archive files from the local file system, click Add Archive. In the Add-on archive field, type or browse for the add-on archive file on the local file system> OK. If we have more add-on archive files to install from the local file system, repeat this step until we are done.
After completing the selection in the Install Add-ons page, click Next.
- In the License Acceptance page, if you accept the license terms, select I accept the terms of all the license agreements then click Next.
To download and install the no-charge developer edition of the Liberty profile:
In the How do to create the runtime environment? section of the Liberty Profile Runtime Environment page, select Install from an archive or a repository; click Next.
On the Install Runtime Environment page, in the Enter the destination path field, either type the path for the new directory where to install the Liberty profile runtime environment or browse to the path, then click Next.
If you type a path that does not exist, then a folder for that path is created during the installation.
Select Download and install a new runtime environment from, choose a download site, then click Next.
- In the Install Add-ons page, click Install or Install Pending to make the selection of add-on archive files to install on the Liberty profile runtime environment.
We can install an add-on archive file from the local file system, download, or use a combination of both when we install multiple add-on archive files. If the workbench is connected to the internet, the Install Add-ons page is populated with add-on archive files available for download from the WAS dev community download site.
This download site includes add-ons that we can select from the Liberty Repository, such as runtime features, samples, or open source integration.
To install add-on archive files from the local file system, click Add Archive. In the Add-on archive field, type or browse for the add-on archive file on the local file system> OK. If we have more add-on archive files to install from the local file system, repeat this step until we are done.
After completing the selection in the Install Add-ons page, click Next.
- In the License Acceptance page, if you accept the license terms, select I accept the terms of all the license agreements then click Next.
- Complete the user ID, password, and port information for the remote server and click Verify.
The user ID and password must have the appropriate security credentials as defined by the quickStartSecurity configuration item or the user registry of the remote Liberty profile server.
The port is the HTTPS port configured in server.xml.
After clicking Verify, if you see the following message, a local server or remote server is already created with the same name.
The Liberty profile server already exists
We can verify this situation by expanding the following folders in the Enterprise Explorer view and seeing the listed servers in the following projects:
- WebSphere Application Server Liberty Profile
- WebSphere Application Server Liberty Profile (Remote)
The remote directory is shown on the same page if the connection is successful. To resolve this issue of two servers with the same name, we can rename the Remote Directory folder on the remote system.
- In the New Remote Liberty Profile Server page, click Next.
The Remote WebSphere Application Server Settings page is displayed.
- If we do not want to enable remote start, stop, and restart, ensure that Enable the server to start remotely is cleared, click Next, and skip the next step.
- Enable remote start, stop, and restart.
- Select Enable the server to start remotely.
- Select whether the remote server is installed on the Windows operating system or other operating systems.
- Enter the location of the runtime installation and server configuration.
- Enter the remote server authentication information.
For authentication, complete one of the following options.
- To access the remote server with logon credentials, enter your user name and password.
- To access the remote server with SSL, copy the private key file to the computer where the workbench is installed, and specify the key file location and user ID.
For more information about starting a remote server, see the Start a remote WebSphere Application Server topic.
- Optional: Add the projects of the application to the server. On the Add and Remove page, under the Available list, select the projects to add to the server and click Add. The project appears in the Configured list.
- Click Finish.
What to do next
- Edit the server configuration. When we make edits, the remote servers synchronize configuration changes with the remote version of the file. If the configuration files are out of sync with the remote server, then the developer tools prompt you before they overwrite any remote files.
See the Administer the Liberty profile using developer tools topic where we can review information specific to remote servers. Additionally, see the Edit the Liberty profile configuration using developer tools topic.
- Start or stop the server, add or remove applications on the server, and many other tasks. We can perform these tasks using the server menu (right-click on the server to open the pop-up menu) or by selecting the tray buttons in the Servers view.
In the Servers view, we must select the server entry to perform these tasks. Do not select the server configuration, such as the Server Configuration [server.xml] entry for performing these tasks.
Parent topic: Set up the Liberty profile