Using the GoogleCloud Observer, you can define a full load job that will read services
data from the Google Cloud Platform's Compute Services through Google's Compute Services SDK, and
then generate a topology.
Before you begin
Important: The Google Cloud Observer supports the cloud/SaaS Google Cloud
version.
The GoogleCloud Observer is installed as part of the core installation procedure.
The GoogleCloud Observer supports GoogleCloud's compute services. Ensure you have the GoogleCloud
details in hand, such as the Project ID, Service Account Key File and Zone, before running the
observer job.
Remember: Swagger documentation for the observer is available at the following default
location: https://<your
host>/1.0/googlecloud-observer/swagger
About this task
The GoogleCloud Observer supports a transient (one-off) Load job that loads all requested
topology data via Google's Compute Services SDK to build the topology, and then exit.
googlecloud_observer_common.sh
- The configuration file you use to customize GoogleCloud Observer settings.
- The parameters defined here are then used by the
googlecloud_observer_load_start.sh
to trigger the GoogleCloud Observer jobs. Tip: Alternatively, you can set the appropriate environment variables. If an environment
variable is set, it takes precedence over the configuration file settings.
You define and start the following job. You must edit the parameters in the configuration file
before running this job.
- Full Topology Upload job
- A transient (one-off) job that loads all requested topology data.
- This job is started by the
googlecloud_observer_load_start.sh
script.
Note: You must create a service account key file or use an existing one to allow the
GoogleCloud Observer to discover resources from GoogleCloud.
Procedure
To create a service account key file
-
From the Google Cloud Platform dashboard, under your 'Project ID', go to APIs and
Services and then choose Credentials.
The Credentials page is displayed listing a number of
authentication methods.
-
Select the Service account authentication service
-
From Create Credentials, choose Service
account.
-
Complete the service account details, then click Create to create a new
service account.
-
Select the role, then click Continue and
Done.
-
To download the .json file from the Credentials page, click .
-
Select the new service account, then choose Create key from the overflow
menu (the three dots under the Actions column).
-
Choose a key type of JSON, then click Create. A
.json file will be downloaded.
- For on-prem, store the .json file under
/opt/ibm/netcool/asm/security
- For OCP, follow these
steps to store the service account key file as a secret.
The filename will be used in the observer parameter
(service_account_key_file) for the full load job.
To edit the parameters in the configuration file
-
Open the
googlecloud_observer_common.sh
configuration file and edit the
following parameters:
Table 1. GoogleCloud Observer
parameters
Parameter |
Action |
Details |
Project ID |
Enter the Google Cloud Platform Project ID. |
Required |
Service Account Key File |
Supply the Google Cloud Platform Service Account Key File.
Copy the json file to the $ASM_HOME/security directory for on-prem.
|
Required |
Zone |
Specify the Google Cloud Platform Zones. |
Required. |
Proxy Host |
Specify the proxy host via which to connect. |
Optional |
Proxy Port |
Specify the proxy port. Set as per HTTP/HTTPS Proxy Host. |
Optional. Defaults to 8080. |
Proxy Username |
Specify the proxy username. Set for basic auth proxy. |
Optional |
Proxy Password |
Specify the proxy password. Set if Proxy Username has been specified |
Optional. Must be encrypted. |
Proxy Secure |
Specify whether the proxy server is secure. Set to 'true' for HTTPS proxy. |
Optional. Default is 'false'. |
Job schedule |
Specify when the job should run, and whether it should run at regular intervals.
By default the job runs immediately, and only once.
Optionally you can specify a future date and time for the job to run, and then set it to
run at regular intervals after that.
|
Optional. Transient (one-off) jobs only.
If you set a job schedule, the run intervals must be at least 90 seconds apart, and if you set
them at less than 15 minutes, a warning is displayed, as the frequency can impact system
performance.
|
Observer job description |
Enter additional information to describe the job. |
Optional |
To start the Load job
-
To start the GoogleCloud Observer Full Topology Upload job, use the following command:
$ASM_HOME/bin/googlecloud_observer_load_start.sh
Results
This job loads all requested topology data, and runs only once. Run this job whenever you need
GoogleCloud topology data refreshed.
Trouble: While the job is running, the status of
discovered resources may appear as 'indeterminate' in the topology until the full upload is
complete.
What to do next
You can also use the following scripts:
- googlecloud_observer_load_stop.sh
- Stops the Load job
- googlecloud_observer_job_list.sh
- Lists the status of current jobs
- googlecloud_observer_log_level.sh
- Sets the log level
Remember: As an alternative to being configured using the Observer Configuration
UI, observer jobs have scripts to start and stop all available jobs, to list the status of a current
job, and to set its logging levels. These scripts can be run with -h or
--help to display help information, and with -v or
--verbose to print out the details of the actions performed by the script,
including the full cURL command. For the on-prem version of Agile Service Manager, observer scripts
are configured for specific jobs by editing the script configuration files.