0% found this document useful (0 votes)
31 views17 pages

Oracle Cloud Infrastructure Discovery Whitepaper

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views17 pages

Oracle Cloud Infrastructure Discovery Whitepaper

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Oracle Cloud Infrastructure discovery

Oracle Cloud Infrastructure discovery


ServiceNow Discovery uses the Oracle Cloud Infrastructure discovery pattern to provide real-
time elasticity for enterprise applications by combining Oracle's autonomous services,
integrated security, and serverless compute.
You can use this pattern on the Now Platform using the Paris P3 release or later.

Request apps on the Store

Visit the ServiceNow Store website to view all the available apps and for information about
submitting requests to the store. For cumulative release notes information for all released apps,
see the ServiceNow Store version history release notes.

Prerequisites

Cloud Access Interface store app


Verify the Cloud Access Interface app (version 1.0.0) is installed.
CMDB CI Class Models store app
Verify the CMDB CI Class Models store app (version 1.22.0) is installed.

Discovery and Service Mapping Patterns store app


Verify the Discovery and Service Mapping Patterns store app (version 1.0.75) is installed.

OCI Credentials
Ensure your new OCI credentials are configured to ensure proper access:

We need below properties for Oracle API Credentials

• Tenancy Id
• User Id
• Key Fingerprint
• Private Key

Tenancy Id:

Get the tenancy OCID from the Oracle Cloud Infrastructure Console on the Tenancy
Details page:

1. Open the navigation menu, under Governance and Administration, go


to Administration and click Tenancy Details.
2. The tenancy OCID is shown under Tenancy Information. Click Copy to copy
it to your clipboard.

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 1
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

User Id:

Get the user's OCID in the Console on the page showing the user's details. To get to that
page:

• If you're signed in as the user:

Open the Profile menu ( ) and click User Settings.


• If you're an administrator doing this for another user: Open the navigation menu.
Under Governance and Administration, go to Identity and click Users. Select
the user from the list.
• The user OCID is shown under User Information. Click Copy to copy it to your
clipboard.

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 2
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

Private Key:

There is two ways to generate the key pair

1. You can get the key's Through Oracle Cloud Infrastructure Console

1. Open the Console, and sign in.


2. View the details for the user who will be calling the API with the key pair:
a. If you're signed in as the user:
i. Open the Profile menu ( ) and click User Settings.
b. If you're an administrator doing this for another user: Open the navigation
menu. Under Governance and Administration, go to Identity and
click Users. Select the user from the list.
3. Select API Key Nav Tab

4. Click Add Public Key.


5. Select Generate API Key Pair radio button
6. Download Private Key and Public Key in the dialog box
7. click Add.

8. Convert Private Key to RSA format using online tools (ex


https://decoder.link/rsa_converter ) or openssl rsa command

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 3
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

2. You can get the key's Through commands

Generating an API Signing Key (Linux and Mac OS X)

Use the following OpenSSL commands to generate the key pair in the required PEM
format.

1. If you haven't already, create an .oci directory to store the credentials:

mkdir ~/.oci

2. Generate the private key with one of the following commands.


• To generate the key with no passphrase:
Copy

openssl genrsa -out ~/.oci/oci_api_key.pem 2048

3. Change the file permission to ensure that only you can read the private key file:
Copy

chmod go-rwx ~/.oci/oci_api_key.pem

4. Generate the public key from your new private key:


Copy

openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem

5. Copy the contents of the public key to the clipboard using pbcopy, xclip or a similar tool
(you'll need to paste the value into the Console later). For example:
Copy

cat ~/.oci/oci_api_key_public.pem | pbcopy

Your API requests will be signed with your private key, and Oracle will use the public key
to verify the authenticity of the request. You must upload the public key
to IAM (instructions below).

Generating an API Signing Key (Windows)

If you're using Windows, you'll need to install Git Bash for Windows before running the
following commands.
Note

Be sure to include the openssl binary in your Windows path. On default installations, the
openssl.exe file can be found in C:\Program Files\Git\mingw64\bin.

Use the following OpenSSL commands to generate the key pair in the required PEM format.
© 2021 ServiceNow, Inc. All rights reserved.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 4
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

1. If you haven't already, create a .oci directory to store the credentials. For example:

mkdir %HOMEDRIVE%%HOMEPATH%\.oci

2. Generate the private key with one of the following commands:

• To generate the key with no passphrase:


Copy

openssl genrsa -out %HOMEDRIVE%%HOMEPATH%\.oci\oci_api_key.pem 2048

3. Generate the public key from your new private key:


Copy

openssl rsa -pubout -in %HOMEDRIVE%%HOMEPATH%\.oci\oci_api_key.pem -out


%HOMEDRIVE%%HOMEPATH%\.oci\oci_api_key_public.pem

4. Copy the contents of the public key to the clipboard (you'll need to paste the value into
the Console later). For example:
Copy

type \.oci\oci_api_key_public.pem

Your API requests will be signed with your private key, and Oracle will use the public key
to verify the authenticity of the request. You must upload the public key
to IAM (instructions below).

How to Upload the Public Key

You can upload the PEM public key in the Console, which can be accessed by signing in
here: https://cloud.oracle.com. If you don't have a login and password for the Console,
contact an administrator.

1. Open the Console, and sign in.


2. View the details for the user who will be calling the API with the key pair:
• If you're signed in as the user:

Open the Profile menu ( ) and click User Settings.


• If you're an administrator doing this for another user: Open the navigation menu.
Under Governance and Administration, go to Identity and click Users. Select the
user from the list.
3. Click Add Public Key.
4. Paste the contents of the PEM public key in the dialog box and click Add.

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 5
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

The key's fingerprint is displayed (for example,


12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef).

Notice that after you've uploaded your first public key, you can also use
the UploadApiKey API operation to upload additional keys. You can have up to three API
key pairs per user. In an API request, you specify the key's fingerprint to indicate which
key you're using to sign the request.

Key Fingerprint:

Two ways to Get the Key's Fingerprint

• You can get the key's fingerprint From Oracle Cloud Infrastructure Console

1. Open the Console, and sign in.


2. View the details for the user who will be calling the API with the key pair:

If you're signed in as the user:

Open the Profile menu ( ) and click User Settings.


If you're an administrator doing this for another user: Open the navigation menu.
Under Governance and Administration, go to Identity and click Users. Select the
user from the list.

3. Select API Key Nav Tab


4. Copy the fingerprint

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 6
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

OR

• You can get the key's fingerprint with the following OpenSSL command.

For Linux and Mac OS X:

openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c

For Windows:
Note

If you're using Windows, you'll need to install Git Bash for Windows and run the command
with that tool.

openssl rsa -pubout -outform DER -in \.oci\oci_api_key.pem | openssl md5 -c

When you upload the public key in the Console, the fingerprint is also automatically
displayed there. It looks something like this:
12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 7
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

Create a New Credentials for OCI


1. Log on to ServiceNow instance
2. Navigate to Discovery > Credentials

3. Click New.
4. Select Oracle API Credentials.

5. Enter Name, Tenancy Id, User Id, Key Fingerprint and Private Key

6. Click Submit.

OCI Credentials form

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 8
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

Field Description

Name Enter a unique and descriptive name for the OCI


credentials.

Active Option to use the credential. Select this option.

Tenancy Id Enter the Tenancy OCID.

User Id Enter the User's OCID.

Key fingerprint Enter the Key's fingerprint.

Private Key Enter the RSA Private key, an RSA private key must
be supplied for authentication.

Note: To get the credential information in the


Oracle Cloud Infrastructure Console, see Required
Keys and OCIDs on the Oracle documentation
site.

Create a New Service Account for OCI


1. Navigate to Cloud Provisioning and Governance > Service Accounts

2. Click New.

3. Enter Name
4. For Account Id, enter the Compartment ID
5. Click on the magnifying glass for Discovery credentials.
6. Select OCI Credential
7. Enter a Datacenter URL value such as https://$service.ap-mumbai-
1.oraclecloud.com.
8. Select Datacenter Type as OCI Datacenter
9. Click Submit.
© 2021 ServiceNow, Inc. All rights reserved.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 9
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

OCI Service Account form

Field Description

Name Enter a unique name for the OCI service


account.

Account ID Enter the OCI Compartment id.

Discovery credentials Select the OCI Credential.

Datacenter URL Enter a datacenter value such


as https://$service.ap-
mumbai-1.oraclecloud.com.
Datacenter Type Select the OCI Datacenter
[cmdb_ci_oci_datacenter]

Create a Cloud discovery schedule


Create a discovery schedule to run LDCs on.
1. Navigate to Discovery > Discovery Schedules.

2. Click the Cloud Discovery button.


3. In the Provider field, select OCI.

4. Enter schedule Name


5. Fill in the form to create new account or select existing one

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 10
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

6. On the Select Datacenters page, filter which LDCs you want to run the discovery.

7. Under the Discover Virtual Machines (optional) page, select if you want to run VM OS
Discovery.

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 11
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

8. When you're finished, navigate to the Create Schedule page and select the Finish and Run
button.

9. When Once Discovery Schedule completed you will get the resource detail in Schedule
dashboard

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 12
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

Data collected by Discovery during horizontal discovery

The discovered Oracle configuration data includes the following table and fields.

Resources discovered on the [cmdb_key_value] table

Field Description

Cloud Database

name The name of the database.

object_id Unique identifier of the database.

operational_status Operational status of the database.

vendor The vendor, Oracle.

type The Oracle database type.

version Version of the database.

state State of the database.

comments The attribute is issued for the delete strategy.

install_status Install status.

Image

name The image name.

object_id Unique identifier of the image.

version The version of the guest OS.

guest_os The name of the guest OS.

Service Account

name The account name.

datacenter_type Datacenter type.

account_id Unique identifier of the account.

object_id Unique identifier of the account (same value as


the account id).

discovery_credentials The credentials related to the service account.

is_master_account true when it is the root compartment. false when


it is not the root compartment.

Network

name The network name.

object_id Unique identifier of the network.

cidr The cidr of the network.

domain_name The domain name.

state The state of the network.

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 13
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

NIC

name The NIC name.

object_id Unique identifier of the NIC.

Field Description

public_ip The public IP address.

mac_address The MAC address.

primary Set true/false according to the setup.

private_ip The private ip address.

state The state of the NIC.

Storage Volume

name The name of the storage volume.

object_id Unique identifier of storage volume.

state The state of the storage volume.

volume_id Unique identifier of the storage volume (same


value as the account id).

size The storage volume size.

size_bytes The storage volume size in bytes.

Subnet

name The name of the subnet.

object_id Unique identifier of subnet.

cidr The cidr of the subnet.

domain_name The domain name.

state The state of the subnet.

Virtual Machine

name The VM name.

object_id Unique identifier of VM.

state The state of the VM.

memory Memory size.

cpus Number of CPUs.

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 14
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

CI Relationships

Pattern Name CIs Attributes

Oracle OCI - Autonomous DB cmdb_ci_cloud_database name, object_id,


(LP) operational_status, vendor,
type, version, short_description,
state, comments, install_status

Oracle OCI - Availability Domain cmdb_ci_availability_zone name, region, object_id


(LP)

Oracle OCI - Datacenter (LP) cmdb_ci_oci_datacenter name, region, object_id

Oracle OCI - DB Home (LP) cmdb_ci_cmp_resource name, object_id, version,


comments

Oracle OCI - Exadata (LP) cmdb_ci_cloud_database name, object_id,


operational_status, vendor,
Note: Can only discover type, version, short_description,
DBs on VM and Bare state, install_status
Metal.

Oracle OCI - Fault Domain (LP) cmdb_ci_availability_zone name, object_id, state

Note: When configuring


a Cloud Discovery
scheduler for part of
the LDCs, the Oracle
OCI - Fault Domain
(LP) pattern will not
trigger.

Oracle OCI - Image (LP) cmdb_ci_os_template name, object_id, version,


guest_os

Oracle OCI - Network (LP) cmdb_ci_network name, object_id, cidr,


domain_name, state

Oracle OCI - NIC (LP) cmdb_ci_nic name, object_id, public_ip,


mac_address, primary,
private_ip, state

Oracle OCI - NIC Attachment cmdb_ci_endpoint_vnic and name, object_id


(LP) cmdb_ci_endpoint_subnet

Oracle OCI - Service Account cmdb_ci_cloud_service_account datacenter_type,


Validation account_id, object_id, name,
discovery_credentials

Oracle OCI - Storage cmdb_ci_endpoint_block name, object_id


Attachment (LP)

Oracle OCI - Storage Volume cmdb_ci_storage_volume name, object_id, state,


(LP) volume_id, size, size_bytes

Oracle OCI - Sub Account (LP) cmdb_ci_cloud_service_account datacenter_type,


account_id, object_id, name,
is_master_account
© 2021 ServiceNow, Inc. All rights reserved.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 15
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

Oracle OCI - Subnet (LP) cmdb_ci_cloud_subnet name, object_id, cidr,


domain_name, state
CIs and Attributes

Pattern Name CIs Attributes

Oracle OCI - Active cmdb_ci_oci_datacenter name, region, object id


Datacenters (LP)

Pattern Name CIs Attributes

Oracle OCI - Virtual Machine cmdb_ci_vm_instance name, object_id, state, memory,


(LP) cpus

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 16
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.
Oracle Cloud Infrastructure discovery

© 2021 ServiceNow, Inc. All rights reserved.


ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other 17
countries. Other company names, product names, and logos may be trademarks of the respective companies with which they are associated.

You might also like