Skip to content

Commit

Permalink
Add docs for sync-cloud resources
Browse files Browse the repository at this point in the history
  • Loading branch information
tirthct committed Oct 8, 2024
1 parent 70daf3d commit a3eacc2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,38 @@ The following flags are available for `patch subscription`:
##### Examples

* Patch a subscription by its ID and change the status to 'Reserved' (dry run) `echo '{ "status": "Reserved" }' | ocm support patch subscriptions [subID]`

### Sync cloud resources

OCM Support CLI can be used to sync cloud resources and generate quota rules in AMS.

This command involves:
1. cloning uhc-account-manager repo
2. replacing quota-cloud-resources.csv
3. generating quota rules by executing `make generate-quota`
4. pushing to a remote branch in AMS so an MR can be opened (note: it does not currently open the MR for you, but does provide the gitlab link to open the MR)

Note that the command does NOT support the following:
- Removing cloud resources
- Adding incorrect cloud resources for which quota rules cannot be generated

#### Prerequisites
- Update `3. Cloud Resources` sheet [here](https://docs.google.com/spreadsheets/d/1HGvQnahZCxb_zYH2kSnnTFsxy9MM49vywd-P0X_ISLA/edit?usp=sharing) and export as CSV in your local machine.

#### Usage
Use the following command to add cloud resources in AMS:
```
ocm support sync-cloud-resources OCM-0000 \path\to\file --dry-run=false
```
`branch-name` : Branch name for adding instances. Must include the JIRA ticket number. E.g. OCM-0000, OCM-0000-my-test-branch, etc.

`csv-path` : File path for the exported CSV.

Once the command is completed, you will be provided with a gitlab link to open and MR. Please ping @ocm-core-team in [#forum-cluster-management](https://redhat.enterprise.slack.com/archives/CB53T9ZHQ) Slack channel to review the MR.

The following flags are available for `sync-cloud-resources`:

```
--dry-run If false, it commits the generated cloud resources and quota rule changes to the remote branch at https://gitlab.cee.redhat.com/service/uhc-account-manager
-h, --help help for sync-cloud-resources
```

0 comments on commit a3eacc2

Please sign in to comment.