Before You Begin
This tutorial shows you how to use the Oracle WebLogic Server Administration Console to deploy an application to an Oracle Java Cloud Service instance. You would need about 10 minutes to complete this tutorial.
Background
There are several methods to deploy applications to Oracle Java Cloud Service instances: the WebLogic Server Administration Console, Oracle Fusion Middleware Control, the WebLogic Scripting Tool (WLST), and IDEs such as Oracle Developer Cloud Service. The focus of this tutorial is the WebLogic Server Administration Console. Separate tutorials are available for the other deployment methods.
What Do You Need?
- An Oracle Java Cloud Service instance, with the load balancer enabled.
- Administrator credentials for the WebLogic Server
Administration Console of your Java Cloud Service instance.
Note: These are the credentials that you had specified while creating the instance. In the case of a quickstart instance, you can find the credentials in the credentials zip bundle that you downloaded while creating the instance.
- Access to the WebLogic Server Administration Console must be enabled. See Enabling Console Access in an Oracle Java Cloud Service in Using Oracle Java Cloud Service.
- A Java web application. For this tutorial, download the sample benefits.war application.
Deploy Your Application
- Sign in to Oracle Cloud My Services.
- Click
near the upper left corner of the page, and select Java.
The Oracle Java Cloud Service web console is displayed. - Find the service instance to which you want to deploy the application, and click .
- From the menu that's displayed, select Open
WebLogic Server Console.
The sign-in page of the WebLogic Server Administration Console is displayed.
If you see theuntrusted security certificate
warning, add the certificate to your browser, as an exception, and continue. The text of this warning and the steps to proceed depend on your browser. In Firefox, for example, you can proceed by clicking Advanced and then Add Exception. - Enter your administrator credentials.
Note: These are the credentials that you had specified while creating the instance. In the case of a quickstart instance, you can find the credentials in the credentials zip bundle that you downloaded while creating the instance.
The WebLogic Server Administration Console is displayed.
- Click Lock & Edit.
- Under Domain Structure, click Deployments.
- On the Deployments page, click Install.
- On the Install page, click upload your file(s).
- On the Install Application Assistant page, click Browse
near the Deployment Archive field, and
select the
benefits.war
application that you downloaded earlier. - The name of the selected deployment archive file appears next to the Browse button. Click Next.
- Make sure that the deployment archive file is selected, near the bottom of the page, and then click Next.
- You can install the deployment as either an application or a library. For this tutorial, we'll install it as an application. Click Next
- Select the servers or clusters to which you want to deploy
the application. For this tutorial, we'll deploy the
application to all the servers in the cluster. So click All
servers in the cluster, and then click Next.
Note that the the cluster name (wls003jc_cluster
in this example) would be the first eight characters of your service instance's name followed by_cluster
. - On the Optional Settings page, click Next. The default settings are adequate for this tutorial.
- Review the configuration settings. You can choose to fine-tune your configuration; but for this tutorial, select No, I will review the configuration later, and then click Finish. A message is displayed that the application was deployed successfully. The application is in the Initializing state.
- In the Change Center, click Activate Changes. The application is in the Prepared state and ready to be started.
Start the Application
- In the WebLogic Server Administration Console, on the Summary of Deployments page, go to the Control tab.
- In the Deployments table, select the check box near the application that you just deployed.
- Click Start, and then select Servicing all requests.
- Click Yes to confirm the deployment. The application is now in the Active state and is ready to accept requests.
Test Access to the Application
- Sign in to the Oracle Java Cloud Service Console.
- Click the name of the service instance to which you deployed the sample application.
- On the details page of the service instance, do one of the
following:
- If a Load Balancer section exists,
then expand it, and note the public IP Address of the
load balancer node. In this example, it is
192.0.2.200
. The URL for the application would be in the formathttps://loadBalancer_publicIP/contextRoot
In our example, the URL would behttps://192.0.2.200/benefits
- If you don't see a Load Balancer
section, then expand the WebLogic
section and the Resources subsection,
and note the public IP Address of one of the nodes shown
there.
The URL for the application would be in the format
https://managedServer_publicIP/contextRoot
Example:https://192.0.2.199/benefits
- If a Load Balancer section exists,
then expand it, and note the public IP Address of the
load balancer node. In this example, it is
- Enter the URL that you identified in the previous step in
a browser.
If you see theuntrusted security certificate
warning, add the certificate to your browser, as an exception, and continue. The text of this warning and the steps to proceed depend on your browser. In Firefox, for example, you can proceed by clicking Advanced and then Add Exception.
You should see the home page of your application.