Create an Oracle Java Cloud Service Instance with Cloud Stack

Use Oracle Cloud
Stack to provision instances of both Oracle Java Cloud
Service and Oracle Database Cloud
Service as a single operation.

Oracle Cloud
Stack is a component of Oracle Cloud that enables you to create multiple cloud resources as a single unit called a stack. You create, delete and manage these resources together as a unit, but you can also access, configure, and manage them through their service-specific interfaces. Stacks also define the dependencies between your stack resources, so that Oracle Cloud
Stack creates and destroys the resources in a logical sequence.

Name of the Oracle Cloud
Infrastructure Object Storage Classic container to create

Storage user name and password

The stack name (the predefined parameter serviceName) is used to name the new services. This stack name is joined with the text JCS and DBCS.

Create a Stack with the CLI

In addition to the web console, Oracle Cloud
Stack supports the same command line interface (CLI) that you can use to create and manage Oracle Java Cloud
Service.

Execute the stack create command and specify the template’s name, Oracle-JCS-DBCS-Template. Provide values for the template parameters either as a JSON file or as a command line option. If using the command line option, be sure to properly enclose any values that contain white space or other special characters. For example:

To identify the parameter names to use with the CLI, view or export the template. See Viewing a Template in Using Oracle Cloud Stack
Manager.

Customize the Template

Copy the sample template and add a new parameter, or change the existing parameters used to create the Oracle Java Cloud
Service instance.

Use Oracle Cloud
Stack to copy and update the Oracle-JCS-DBCS-Template template in order to customize your stack’s behavior. Modify the template’s name and contents. Refer to these topics in Using Oracle Cloud Stack
Manager:

While editing a resource in a stack template, place you mouse over a parameter name to view its description.

See below for some examples of customizing this stack template.

Enable Access to the Administration Console

By default, network access to the WebLogic Server Administration Console in an Oracle Java Cloud
Service instance is disabled for security reasons. To enable access to the console after creating a stack, see Enable Console Access for a Service Instance. Alternatively, you can update the template and enable access to the console at the time the service instance is created. Edit the Oracle Java Cloud
Service resource and set enableAdminConsole to true.

Set the WebLogic Server Cluster Size

By default, the Oracle WebLogic Server domain in an Oracle Java Cloud
Service instance contains a single Managed Server to host your Java Enterprise applications. This is appropriate for a development environment, but test or production systems may require a larger cluster of Managed Servers. Oracle Java Cloud
Service allows users to scale out an existing service instance after creating it, but alternatively you can update the stack template. Edit the Oracle Java Cloud
Service resource, expand components and WLS, and then set managedServerCount.

components:
WLS:
...
managedServerCount: 3

Create a Separate Application Database

An Oracle Java Cloud
Service instance requires at least one Oracle Database Cloud
Service deployment in order to host the required Oracle schemas. But a new Oracle Java Cloud
Service instance can also connect to a second database deployment (or a second Pluggable Database in the same database deployment) to separate the Oracle schemas from your application schemas. Create a second database resource in your template and associate it with the Oracle Java Cloud
Service instance.

Add a second Oracle Database Cloud
Service resource to your template named dbcs2. See Creating Resources in Using Oracle Cloud Stack
Manager.

For the database deployment’s serviceName parameter, use the Join function to give the resource a unique name. For example:

'Fn::Join':
- ''
- - 'Fn::GetParam': serviceName
- DBCSAPP

Edit the Oracle Java Cloud
Service resource, expand components and WLS, and then set appDBs to the following value: