Oracle by Example brandingDeploying an Application to Oracle Java Cloud Service by Using the WebLogic Server Administration Console

section 0Before 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.

section 1Deploy Your Application

  1. Sign in to Oracle Cloud My Services.
  2. Click Dashboard menu near the upper left corner of the page, and select Java.
    The Oracle Java Cloud Service web console is displayed.
  3. Find the service instance to which you want to deploy the application, and click Menu Icon.
    consoles menu
    Description of the illustration consoles_menu.png
  4. 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 the untrusted 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.
  5. 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.

    WebLogic Server Administration Console sign-in
    Description of the illustration wls_console_100.png
  6. Click Lock & Edit.
    Lock and edit
    Description of the illustration lock_and_edit_click.png
  7. Under Domain Structure, click Deployments.
    Deploymetnst
    Description of the illustration domain_struct_deployments.png
  8. On the Deployments page, click Install.
    Install deployment
    Description of the illustration wl_deployments_page_install.png
  9. On the Install page, click upload your file(s).
    Click upload files
    Description of the illustration upload_your_files_big.png
  10. On the Install Application Assistant page, click Browse near the Deployment Archive field, and select the benefits.war application that you downloaded earlier.
    Install Application Application
    Description of the illustration install_app_asst.png
  11. The name of the selected deployment archive file appears next to the Browse button. Click Next.
    Upload file, Next
    Description of the illustration deploy_file_next.png
  12. Make sure that the deployment archive file is selected, near the bottom of the page, and then click Next.
    Install file, next
    Description of the illustration upload_file_next.png
  13. You can install the deployment as either an application or a library. For this tutorial, we'll install it as an application. Click Next
    Install as application
    Description of the illustration install_as_app.png
  14. 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.
    The cluster is selected
    Description of the illustration deploy_to_all_servers_in_cluster.png
  15. On the Optional Settings page, click Next. The default settings are adequate for this tutorial.
  16. Select deployment settings
    Description of the illustration optional_deploy_settings.png
  17. 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.
    Finish deploying
    Description of the illustration deployment_review.png
    A message is displayed that the application was deployed successfully.
    Success!
    Description of the illustration success_message.png
    The application is in the Initializing state.
    App is in the initializing state
    Description of the illustration distribute_initializing.png
  18. In the Change Center, click Activate Changes.
    Activate changes
    Description of the illustration cc_activate_chages.png
    The application is in the Prepared state and ready to be started.
    Prepared state
    Description of the illustration app_is_deployed.png

section 2Start the Application

  1. In the WebLogic Server Administration Console, on the Summary of Deployments page, go to the Control tab.
    Control tab
    Description of the illustration control_tab.png
  2. In the Deployments table, select the check box near the application that you just deployed.
    Install deployment
    Description of the illustration select_file_to_start.png
  3. Click Start, and then select Servicing all requests.
    Start servicing all requests
    Description of the illustration select_start.png
  4. Click Yes to confirm the deployment.
    Start the deployment
    Description of the illustration start_deployment_yes.png
    The application is now in the Active state and is ready to accept requests.
    Start requests sent to deployments.
    Description of the illustration app_is_active.png

section 3Test Access to the Application

  1. Sign in to the Oracle Java Cloud Service Console.
  2. Click the name of the service instance to which you deployed the sample application.
    Finding out the public IP of the LB node
    Description of the illustration public_ip_lb.png
  3. 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.
      LB node's IP address
      Description of the illustration ip_lb.png
      The URL for the application would be in the format https://loadBalancer_publicIP/contextRoot
      In our example, the URL would be https://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.
      Managed server node's IP address
      Description of the illustration ip_ms.png
      The URL for the application would be in the format https://managedServer_publicIP/contextRoot
      Example: https://192.0.2.199/benefits
  4. Enter the URL that you identified in the previous step in a browser.
    If you see the untrusted 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.
    App deployed and running
    Description of the illustration benefits_app_deployed_lb_443.jpg

more informationWant to Learn More?