forked from pivotal-cf/docs-pcf-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ops-man-api-cli.html.md.erb
95 lines (72 loc) · 5.35 KB
/
ops-man-api-cli.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
title: Using Ops Manager Programmatically and from the Command Line
owner: Ops Manager
---
This topic introduces three tools for running Pivotal Operations Manager operations programmatically and from the command line, rather than from the Ops Manager GUI: The Ops Manager API, the `om` command-line interface (CLI), and Platform Automation tasks.
## <a id='overview'></a> Overview
<%= vars.product_name %> includes three related tools that let you run Ops Manager operations programmatically and from the command line, rather than from the Ops Manager GUI:
* The Ops Manager API. For more information, see the [Ops Manager API](https://docs.pivotal.io/platform/opsman-api) documentation.
* The `om` command-line interface (CLI). For more information about `om`, see the [`om` repository](https://github.com/pivotal-cf/om).
* Platform Automation (Beta) tasks. For more information, see the [Platform Automation](http://docs.pivotal.io/platform-automation) documentation.
These three tools control the Ops Manager VM at different levels of abstraction. Platform operators and tile developers use them as described below.
For more information about tile development, see the [<%= vars.product_name %> Tile Developer Guide](http://docs.pivotal.io/tiledev/index.html).
## <a id='api'></a> Ops Manager API
The Ops Manager API offers the most granular control of the Ops Manager VM, The API enables users to do the following:
- Automate component-level testing of <%= vars.product_name %> product tiles
- Manage Ops Manager user accounts
- Develop and debug product tiles
- Access product property values that are not exposed in a product tile GUI
- Otherwise control the Ops Manager VM directly, programmatically or manually, bypassing the Ops Manager UI. For more information about the Ops Manager interface, see [Using the Ops Manager interface](./pcf-interface.html)
For information about getting started with the Ops Manager API, see [Access the Ops Manager API](./ops-man-api.html#access) in the _Using the Ops Manager API_ topic.
Your Ops Manager serves a local copy of the complete Ops Manager API documentation at `https://YOUR-OPS-MANAGER-FQDN/docs`.
## <a id='om'></a> Ops Manager CLI (om)
The Ops Manager CLI, `om`, calls the Ops Manager API to do the following:
- Perform Ops Manager operations from the command line or scripts
- Manage credentials from the command line or scripts
- Generate configuration files from, and apply saved configurations to, staged product tiles.
For information, including how to install `om` and a usage example, see the [`om` repository](https://github.com/pivotal-cf/om).
## <a id='platform-automation'></a> Platform Automation (Beta)
Platform Automation tasks call the `om` CLI to do the following:
- Serve as building blocks for Continuous Integration (CI) pipelines that automate installation and updating of <%= vars.product_name %> foundations
- Within pipelines, store and retrieve product configuration values from secrets vaults like CredHub and code repositories like GitHub.
For a complete list of Platform Automation tasks, see the [Concourse Tasks](https://docs.pivotal.io/platform-automation/v3.0/reference/task.html) topic in the Platform Automation documentation.
## <a id='example-ops'></a> Examples of Equivalent Operations
The following table lists some common operations using the Ops Manager UI, Ops Manager API, `om` CLI, and Platform Automation tasks, as examples of how different Ops Manager interfaces relate to one another.
For complete lists of operations, consult the references in above.
<table id='example-ops' border="1" class="nice" >
<tr>
<th>UI Action</th>
<th>API Command</th>
<th><code>om</code> Command</th>
<th>Platform Automation (Beta) Task</th>
</tr><tr>
<td>Manually configure the BOSH Director tile</td>
<td>Multiple commands; see <a href="./ops-man-api.html#configure-bosh">Configure the BOSH Director</a> in the <em>Using the Ops Manager API</em> topic</td>
<td><code>om configure-director</code></td>
<td><code>configure-director</code></td>
</tr><tr>
<td>Click <strong>IMPORT A PRODUCT</strong></td>
<td><code>POST</code> product file to <code>/available_products</code></td>
<td><code>om upload-product</code></td>
<td><code>upload-product</code></td>
</tr><tr>
<td>Click the <strong>+</strong> symbol next to a product listing left of <strong>Installation Dashboard</strong></td>
<td><code>POST</code> product name and version to <code>/staged/products</code></td>
<td><code>om stage-product</code></td>
<td><code>stage-product</code></td>
</tr><tr>
<td>Manually configure a product tile</td>
<td>Multiple commands; see <a href="./ops-man-api.html#configure-product">Configure a Product</a> in the <em>Using the Ops Manager API</em> topic</td>
<td><code>om configure-product</code></td>
<td><code>configure-product</code></td> </tr><tr>
<td>Click <strong>STEMCELL LIBRARY</strong> > <strong>IMPORT STEMCELL</strong></td>
<td><code>POST</code> stemcell file to <code>/stemcells</code></td>
<td><code>om upload-stemcell</code></td>
<td><code>upload-stemcell</code></td>
</tr><tr>
<td>Click <strong>Apply Changes</strong></td>
<td><code>POST</code> specified products (or <code>all</code>) and errand lists to <code>/installations</code></td>
<td><code>om apply-changes</code></td>
<td><code>apply-changes</code></td>
</tr>
</table>