Oracle by Example brandingConnecting from the Administration Server to the Managed Server in a Clustered Oracle Java Cloud Service

Before You Begin

Purpose

This tutorial provides instructions for creating a clustered Oracle Java Cloud Service (JCS) domain and provisioning Oracle Data Integrator (ODI) Cloud Service to it.

The topology of the domain that you create can vary, depending upon how many virtual machines and how many Managed Servers that you provision as part of your Oracle Java Cloud Service subscription.

Time to Complete

The tutorial will take about 15 minutes to complete.

Background

You should be familiar with how to install and configure ODI on premises. You can find most of that information on the web in the ODI home page, documentation, and in Oracle Learning Library (OLL) tutorials such as ODI Getting Started.

Scenario

ODI can run on Windows or Linux, can be managed with a web-based Console or standalone Studio GUI, with or without WebLogic Server (WLS). It can use agents deployed in Standalone, Collocated, and Java Enterprise Edition (JEE) mode. This tutorial will assume Linux for both the client workstation and server, managed by the Weblogic Administration Console, with WLS installed as JCS, and the agents deployed in JEE mode.

The topology of the domain you create can vary, depending upon how many virtual machines and how many Managed Servers you provision as part of your Java Cloud Service subscription.

Note — Only the Enterprise Installation is supported on ODI Cloud Service.

Context

This tutorial assumes a clustered JCS deployment.

What Do You Need?

You will need to be familiar with the Oracle Java Cloud Service. If you are not then it is strongly recommended that you run through the Getting Started with Oracle Java Cloud Service tutorial before attempting this one.

Make sure you are familiar with the prerequisites required for Oracle Java Cloud Service on OCI.

The instructions in this tutorial assume that you have performed all of these tasks:

  1. Ensure that you have subscriptions for Oracle Storage, Oracle Cloud Infrastructure (OCI) Database, Oracle Virtual Cloud Network, and Oracle Java Cloud Service environments.

    For more information, see Signing Up for Oracle Cloud Infrastructure.

  2. Create the VM public and private keys.

    The VM public key is used by the new instance's VM for authentication when you connect to it using an SSH client. When you connect, you must provide the private key that matches the public key.

    When creating an OCI Database instance and Java Cloud Service (JCS) instance you need to specify the public key. You generate an SSH public/private key pair using a standard SSH key generation tool. For more information, see Creating SSH Keys for Use with Oracle Cloud Services in the Oracle Learning Library.

  3. Configure an OCI Database instance that meets the Java Cloud Service deployment requirements, including adding a specific policy so that the database appears on the Oracle Java Cloud Service web console as an infrastructure schema database choice.

    For instructions, see:

  4. Note: When creating the OCI Database instance to use with the Oracle Java Cloud Service, make sure you have created a policy to permit Oracle Platform Services to create instances in your VCN. Keep the policy current. The policy should include:

    • Allow service PSM to inspect vcns in compartment
    • Allow service PSM to use subnets in compartment
    • Allow service PSM to use vnics in compartment
    • Allow service PSM to manage security-lists in compartment
    • Allow service PSM to manage all-resources in compartment
    Set up the credentials to provide access to the object storage bucket, so that you can select Automatic Backup as the backup option for the database.

Connecting from the Administration Server to the Managed Server in an Oracle Java Cloud Service Cluster

  1. Get the host name and private IP address of VM2 and of the Load Balancer:
    1. Sign in to the My Services application and go to the My Services Dashboard.
    2. In the Oracle Compute Cloud Service section, click the Open Service Console link.
      Service Overview
      Description of this image
    3. On the instance details page, make a note of the host name and the public IP address of the second node, and the Public IP address of the load alancer.
  2. Copy the private key file to the Administration server
    1. Close the VNC connection to the Administration server, and then close the two terminal sessions you used to create the SSH tunnel.
    2. Copy the private key file to the /tmp directory on the Administration Server. Open a terminal session and enter the command:
      scp -i path_to_private_key_file path_to_private_key_file opc@IP_of_JCS Instance_Admin_Server:/tmp

      In the preceding command:

      Parameter Description
      path_to_private_key is the path to the SSH private key file that matches the public key used when your instance was created
      IP_of_JCS Instance_Admin_Server is the public IP address of the Admin Server VM in n.n.n.n format.
      opc is the user account.
      For example:
      scp -i keys/key-20170605 keys/key-20170605 opc@10.10.10.10:/tmp
    3. Now you need to make a copy of the file so that it can be accessed by the oracle user as you will be SSH tunnelling from the Administration server to the managed server (on the second node).

      Start by connecting to the Administration server using SSH:

      ssh -i path_to_private_key_file opc@IP_of_JCS Instance_Admin_Server

      For example:

      ssh -i keys/key-20170605 opc@10.10.10.10
    4. Change to the /tmp directory:
      cd /tmp
    5. Make a copy of the private key file on the Administration server and give anyone full access to it:
      cp keyfile keyfile-1
      chmod 777 keyfile-1

      Where keyfile represents the name of the private key file, and keyfile-1 represents the name of the copy of the private key file

      For example:

      cp key-20170605 key-20170605-1
      chmod 777 key-20170605-1
    6. Delete the private key file you originally copied over:
      rm keyfile

      For example:

      rm key-20170605
    7. Change to the oracle user:
      sudo su oracle
    8. Make a copy the copy of the private key file and give it the original name:
      cp keyfile-1 keyfile

      For example:

      cp key-20170605-1 key-20170605
    9. Now you have the private key file owned by the oracle user. All that needs doing is to set the permissions on it to be limited as before:
      chmod 600 keyfile

      For example:

      chmod 600 key-20170605
    10. Change back from the oracle user to opc.
      exit
    11. Delete the private key file copy owned by opc:
      rm keyfile-1

      For example:

      rm key-20170605-1
    12. Close the terminal session.
  3. Now, reconnect to the Administration server and start VNC again.
    Use the ssh command as in step 3 - Connecting to the Oracle Java Cloud Service Environment Using SSH - to log in to the second node as oracle user.
    1. Open a terminal session and enter the following command:
      $> ssh –i /tmp/private_key_file opc@host_name_of_VM2

      Where private_key_file represents the name of the private key file you just copied over, and host_name_of_VM2 represents the host name of the second node. Note: Use the host name of the second node, not its public IP address.

      For example:

       ssh -i /tmp/key-20170605 opc@myjcsodi-wls-2

      Enter the passcode for the private key file, if prompted.

    2. Switch to the oracle user
      sudo su oracle
    3. Disable the screen saver and start the VNC server:
      gconftool-2 -s -t bool /apps/gnome-screensaver/lock_enabled false
      vncserver -nolisten local -geometry 1680x1050
    4. Open a second terminal session and enter the following command to open a tunnel to the second node:
      ssh -i /tmp/private_key_file -L 5901:127.0.0.1:5901 opc@host_name_of_VM2 -N

      Where host_name_of_VM2 represents the host name of the second node. As before, it is not an IP address!

      For example:

      ssh -i /tmp/key-20170605 -L 5901:127.0.0.1:5901 opc@myjcsodi-wls-2 -N

      You can ignore any messages about the bind address already being in use.
      Enter the password for VNC when prompted.

    5. To get desktop access for the Oracle Java Cloud Server instance, use the VNC Viewer on the Administration server to connect to localhost:5901.
      vncviewer
      In the Window that opens, enter localhost:5901 and click OK.
      Window for VNC Viewer. Enter the localhost and port
      Description of this image
    6. Enter the password when prompted
    7. Once VNC connects you to the second node, as before, you want to turn off the screen saver, otherwise you could find yourself locked out of it.
      Select System/Preferences/Screensaver menu item. In the resulting Screensaver Preferences dialog box, make sure Activate screensaver when computer is idle is not selected.
      Turn off screen saver
      Description of this image

Install the ODI software onto the managed server, as shown in the Installing Oracle Data Integrator OBE.

Once you have installed ODI on the managed server, close the VNC Viewer and then shut the two terminal sessions you opened on the Administration server for the SSH tunnel.

Now you can create the ODI repository using the Repository Creation Utitlity.

Want to Learn More?