|
| 1 | +[](https://opensource.org/licenses/Apache-2.0) |
1 | 2 |  |
2 | 3 |  |
3 | 4 |
|
|
6 | 7 | This repository contains the source for the operations management system. It |
7 | 8 | contains the sources for both the CLI and the Service. |
8 | 9 |
|
9 | | -## CLI |
10 | | -The CLI tool is used to bootstrap Codesphere cluster on customer sites and |
| 10 | +## OMS CLI |
| 11 | + |
| 12 | +The OMS CLI tool is used to bootstrap Codesphere cluster on customer sites and |
11 | 13 | replaces the formerly used private cloud installer. |
12 | 14 |
|
13 | | -### How to Build? |
| 15 | +### Installation |
14 | 16 |
|
15 | | -```shell |
16 | | -make build-cli |
| 17 | +You can install the OMS CLI in a few ways: |
| 18 | + |
| 19 | +#### Using GitHub CLI (`gh`) |
| 20 | + |
| 21 | +If you have the [GitHub CLI](https://cli.github.com/) installed, you can install the OMS CLI with a command like the following. |
| 22 | +Note that some commands may require you to elevate to the root user with `sudo`. |
| 23 | + |
| 24 | +##### ARM Mac |
| 25 | + |
| 26 | +``` |
| 27 | +gh release download -R codesphere-cloud/oms -O /usr/local/bin/oms-cli -p "oms-cli*darwin_arm64" |
| 28 | +chmod +x /usr/local/bin/oms-cli |
17 | 29 | ``` |
18 | 30 |
|
19 | | -### How to Test? |
| 31 | +##### Linux Amd64 |
20 | 32 |
|
| 33 | +``` |
| 34 | +gh release download -R codesphere-cloud/oms -O /usr/local/bin/oms-cli -p "oms-cli*linux_amd64" |
| 35 | +chmod +x /usr/local/bin/oms-cli |
| 36 | +``` |
21 | 37 |
|
22 | | -### How to Use? |
| 38 | +#### Using `wget` |
23 | 39 |
|
| 40 | +This option requires to have the `wget` and `jq` utils installed. Download the OMS CLI and add permissions to run it with the following commands: |
| 41 | +Note that some commands may require you to elevate to the root user with `sudo`. |
24 | 42 |
|
25 | | -## Service |
| 43 | +##### ARM Mac |
26 | 44 |
|
27 | | -### How to Build? |
| 45 | +``` |
| 46 | +wget -qO- 'https://api.github.com/repos/codesphere-cloud/oms/releases/latest' | jq -r '.assets[] | select(.name | match("oms-cli.*darwin_arm64")) | .browser_download_url' | xargs wget -O oms-cli |
| 47 | +mv oms-cli /usr/local/bin/oms-cli |
| 48 | +chmod +x /usr/local/bin/oms-cli |
| 49 | +``` |
28 | 50 |
|
29 | | -```shell |
30 | | -make build-service |
| 51 | +##### Linux Amd64 |
| 52 | + |
| 53 | +``` |
| 54 | +wget -qO- 'https://api.github.com/repos/codesphere-cloud/oms/releases/latest' | jq -r '.assets[] | select(.name | match("oms-cli.*linux_amd64")) | .browser_download_url' | xargs wget -O oms-cli |
| 55 | +mv oms-cli /usr/local/bin/oms-cli |
| 56 | +chmod +x /usr/local/bin/oms-cli |
31 | 57 | ``` |
32 | 58 |
|
33 | | -### How to Test? |
| 59 | +#### Manual Download |
| 60 | + |
| 61 | +You can also download the pre-compiled binaries from the [OMS Releases page](https://github.com/codesphere-cloud/oms/releases). |
| 62 | +Note that some commands may require you to elevate to the root user with `sudo`. |
| 63 | + |
| 64 | +1. Go to the [latest release](https://github.com/codesphere-cloud/oms-cli/releases/latest). |
34 | 65 |
|
| 66 | +2. Download the appropriate release for your operating system and architecture (e.g., `oms-cli_darwin_amd64` for macOS, `oms-cli_linux_amd64` for Linux, or `oms-cli_windows_amd64` for Windows). |
35 | 67 |
|
36 | | -### How to Use? |
| 68 | +3. Move the `oms-cli` binary to a directory in your system's `PATH` (e.g., `/usr/local/bin` on Linux/Mac, or a directory added to `Path` environment variable on Windows). |
37 | 69 |
|
| 70 | +4. Make the binary executable (e.g. by running `chmod +x /usr/local/bin/oms-cli` on Mac or Linux) |
38 | 71 |
|
39 | | -## How to add a command to one of the binaries? |
| 72 | +#### Available Commands |
40 | 73 |
|
41 | | -This project currently uses a fork of cobra-cli with locally-scoped variables: https://github.com/NautiluX/cobra-cli-local |
| 74 | +The OMS CLI organizes its functionality into several top-level commands, each with specific subcommands and flags. |
| 75 | + |
| 76 | +See our [Usage Documentation](docs) for usage information about the specific subcommands. |
| 77 | + |
| 78 | +### How to Build? |
42 | 79 |
|
43 | 80 | ```shell |
44 | | -cobra-cli add -L -d cli -p install postgres |
| 81 | +make build-cli |
45 | 82 | ``` |
46 | 83 |
|
47 | | -This command will add the following command to the CLI: |
| 84 | +See also [CONTRIBUTION.md] |
| 85 | + |
| 86 | +## Service |
| 87 | + |
| 88 | +The service implementation is currently WIP |
| 89 | + |
| 90 | +### How to Build? |
48 | 91 |
|
49 | 92 | ```shell |
50 | | -oms-cli install postgres |
| 93 | +make build-service |
51 | 94 | ``` |
| 95 | + |
| 96 | +## Community & Contributions |
| 97 | + |
| 98 | +Please review our [Code of Conduct](CODE_OF_CONDUCT.md) to understand our community expectations. |
| 99 | +We welcome contributions! All contributions to this project must be made in accordance with the Developer Certificate of Origin (DCO). See our full [Contributing Guidelines](CONTRIBUTING.md) for details. |
0 commit comments