Skip to content

Commit fe95234

Browse files
committed
Merge branch 'main' into lh/notarization-setup
2 parents cb666ee + 4897784 commit fe95234

208 files changed

Lines changed: 5519 additions & 379 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTION.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Your contribution is welcome! Thank you for your interest in contributing to the
1010

1111
## Developer Guide
1212

13+
Prerequisites:
14+
15+
- [`Go`](https://go.dev/doc/install) 1.21+
16+
- [`yamllint`](https://yamllint.readthedocs.io/en/stable/quickstart.html)
17+
1318
### Repository structure
1419

1520
The CLI commands are located under `internal/cmd`, where each folder includes the source code for a `group` of commands. Inside `pkg` you can find several useful packages that are shared by the commands and provide additional functionality such as `flags`, `globalflags`, `tables`, etc.
@@ -23,9 +28,9 @@ Check the [Authentication](README.md#authentication) section on the README.
2328
These commands can be executed from the project root:
2429

2530
- `make project-tools`: install the required dependencies
26-
- `make build`: compiles the CLI and saves the binary under _./bin/stackit_
27-
- `make lint`: lint the code and examples
28-
- `make generate-docs`: generates Markdown documentation for every command
31+
- `make build`: compile the CLI and save the binary under _./bin/stackit_
32+
- `make lint`: lint the code
33+
- `make generate-docs`: generate Markdown documentation for every command
2934
- `make test`: run unit tests
3035

3136
#### Local development
@@ -54,7 +59,7 @@ To test your changes, you can either:
5459

5560
To make your contribution, follow these steps:
5661

57-
1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/stackit-cli/pulls) and [Issues](https://github.com/stackitcloud/stackit-cli/issues)to make sure the contribution you are making has not been already tackled by someone else.
62+
1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/stackit-cli/pulls) and [Issues](https://github.com/stackitcloud/stackit-cli/issues) to make sure the contribution you are making has not been already tackled by someone else.
5863
2. Fork the repo.
5964
3. Make your changes in a branch that is up-to-date with the original repo's `main` branch.
6065
4. Commit your changes including a descriptive message

INSTALLATION.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Installation
22

3-
## macOS
3+
## Package managers
44

5-
The STACKIT CLI is available to download and install through the [Homebrew](https://brew.sh/) package manager.
5+
### macOS
6+
7+
The STACKIT CLI can be installed through the [Homebrew](https://brew.sh/) package manager.
68

79
1. First, you need to register the [STACKIT tap](https://github.com/stackitcloud/homebrew-tap) via:
810

@@ -13,44 +15,54 @@ brew tap stackitcloud/tap
1315
2. You can then install the CLI via:
1416

1517
```shell
16-
brew install stackit-cli
18+
brew install stackit
1719
```
1820

19-
## Linux
21+
### Linux
2022

21-
We will soon distribute the STACKIT CLI via [Snap](https://snapcraft.io/). For the moment, you can either install via [Homebrew](https://brew.sh/) or refer to the [manual installation](#manual-installation) guide.
23+
We are working on distributing the CLI using a package manager for Linux. For the moment, you can either install via [Homebrew](https://brew.sh/) or refer to the [manual installation](#manual-installation) guide.
2224

23-
## Windows
25+
### Windows
2426

25-
We will soon distribute the STACKIT CLI via [Chocolatey](https://chocolatey.org/). For the moment, please refer to the [manual installation](#manual-installation) guide.
27+
We are working on distributing the CLI using a package manager for Windows. For the moment, please refer to the [manual installation](#manual-installation) guide.
2628

2729
## Manual installation
2830

29-
Alternatively, you can get the STACKIT CLI by downloading a pre-compiled binary or compiling it from source.
31+
You can also get the STACKIT CLI by compiling it from source or downloading a pre-compiled binary.
3032

31-
### Pre-compiled binary
33+
### Compile from source
3234

33-
1. Download the binary corresponding to your operating system and CPU architecture from our [Releases](https://github.com/stackitcloud/stackit-cli/releases) page
34-
2. Extract the contents of the file to your file system and move it to your preferred location (e.g. your home directory)
35-
3. (For macOS only) Right click on the executable, select "Open". You will see a dialog stating the identity of the developer cannot be confirmed. Click on "Open" to allow the app to run on your Mac. We soon plan to certificate the STACKIT CLI to be trusted by macOS
35+
If you have Go 1.16+ installed, you can directly install via:
3636

37-
### Compile from source
37+
```shell
38+
go install github.com/stackitcloud/stackit-cli@latest
39+
```
40+
41+
> For more information, please refer to the [`go install` documentation](https://go.dev/ref/mod#go-install)
42+
43+
Alternativelly, you can:
3844

3945
1. Clone the repository
4046
2. Build the application locally by running:
4147

4248
```bash
43-
$ make build
49+
make build
4450
```
4551

4652
To use the application from the root of the repository, you can run:
4753

4854
```bash
49-
$ ./bin/stackit <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
55+
./bin/stackit <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
5056
```
5157

5258
3. Skip building and run the Go application directly using:
5359

5460
```bash
55-
$ go run . <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
61+
go run . <GROUP> <SUB-GROUP> <COMMAND> <ARGUMENT> <FLAGS>
5662
```
63+
64+
### Pre-compiled binary
65+
66+
1. Download the binary corresponding to your operating system and CPU architecture from our [Releases](https://github.com/stackitcloud/stackit-cli/releases) page
67+
2. Extract the contents of the file to your file system and move it to your preferred location (e.g. your home directory)
68+
3. (For macOS only) Right click on the executable, select "Open". You will see a dialog stating the identity of the developer cannot be confirmed. Click on "Open" to allow the app to run on your Mac. We soon plan to certificate the STACKIT CLI to be trusted by macOS

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ After successful authentication, the CLI stores credentials in your OS keychain.
7676
To authenticate as a user, run the command below and follow the steps in your browser.
7777

7878
```bash
79-
$ stackit auth login
79+
stackit auth login
8080
```
8181

8282
### Activate a service account
8383

8484
To authenticate using a service account, run:
8585

8686
```bash
87-
$ stackit auth activate-service-account
87+
stackit auth activate-service-account
8888
```
8989

9090
For more details on how to setup authentication using a service account, check our [authentication guide](./AUTHENTICATION.md).
@@ -94,27 +94,27 @@ For more details on how to setup authentication using a service account, check o
9494
You can configure the CLI using the command:
9595

9696
```bash
97-
$ stackit config
97+
stackit config
9898
```
9999

100100
The configurations are stored in `~/stackit/cli-config.json` and are valid for all commands. For example, you can set a default `project-id` by running:
101101

102102
```bash
103-
$ stackit config set --project-id xxxx-xxxx-xxxxx
103+
stackit config set --project-id xxxx-xxxx-xxxxx
104104
```
105105

106106
To remove it, you can run:
107107

108108
```bash
109-
$ stackit config unset --project-id
109+
stackit config unset --project-id
110110
```
111111

112112
Run the `config set` command with the flag `--help` to get a list of all of the available configuration options.
113113

114114
You can lookup your current configuration by checking the configuration file or by running:
115115

116116
```bash
117-
$ stackit config list
117+
stackit config list
118118
```
119119

120120
You can also edit the configuration file manually.

docs/stackit.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Manage STACKIT resources using the command line
44

5+
### Synopsis
6+
7+
Manage STACKIT resources using the command line.
8+
This CLI is in a BETA state.
9+
More services and functionality will be supported soon. Your feedback is appreciated!
10+
511
```
612
stackit [flags]
713
```
@@ -21,9 +27,10 @@ stackit [flags]
2127

2228
* [stackit auth](./stackit_auth.md) - Provides authentication functionality
2329
* [stackit config](./stackit_config.md) - CLI configuration options
24-
* [stackit curl](./stackit_curl.md) - Execute an authenticated HTTP request to an endpoint
30+
* [stackit curl](./stackit_curl.md) - Executes an authenticated HTTP request to an endpoint
2531
* [stackit dns](./stackit_dns.md) - Provides functionality for DNS
2632
* [stackit mongodbflex](./stackit_mongodbflex.md) - Provides functionality for MongoDB Flex
33+
* [stackit opensearch](./stackit_opensearch.md) - Provides functionality for OpenSearch
2734
* [stackit organization](./stackit_organization.md) - Provides functionality regarding organizations
2835
* [stackit project](./stackit_project.md) - Provides functionality regarding projects
2936
* [stackit service-account](./stackit_service-account.md) - Provides functionality for service accounts

docs/stackit_auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Provides authentication functionality
44

55
### Synopsis
66

7-
Provides authentication functionality
7+
Provides authentication functionality.
88

99
```
1010
stackit auth [flags]
@@ -28,6 +28,6 @@ stackit auth [flags]
2828
### SEE ALSO
2929

3030
* [stackit](./stackit.md) - Manage STACKIT resources using the command line
31-
* [stackit auth activate-service-account](./stackit_auth_activate-service-account.md) - Activate service account authentication
32-
* [stackit auth login](./stackit_auth_login.md) - Login to the STACKIT CLI
31+
* [stackit auth activate-service-account](./stackit_auth_activate-service-account.md) - Authenticates using a service account
32+
* [stackit auth login](./stackit_auth_login.md) - Logs in to the STACKIT CLI
3333

docs/stackit_auth_activate-service-account.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## stackit auth activate-service-account
22

3-
Activate service account authentication
3+
Authenticates using a service account
44

55
### Synopsis
66

7-
Activate authentication using service account credentials.
7+
Authenticates to the CLI using service account credentials.
88
Subsequent commands will be authenticated using the service account credentials provided.
99
For more details on how to configure your service account, check our Authentication guide at https://github.com/stackitcloud/stackit-cli/blob/main/AUTHENTICATION.md.
1010

docs/stackit_auth_login.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## stackit auth login
22

3-
Login to the STACKIT CLI
3+
Logs in to the STACKIT CLI
44

55
### Synopsis
66

7-
Login to the STACKIT CLI
7+
Logs in to the STACKIT CLI using a user account.
88

99
```
1010
stackit auth login [flags]

docs/stackit_config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CLI configuration options
44

55
### Synopsis
66

7-
CLI configuration options
7+
CLI configuration options.
88

99
```
1010
stackit config [flags]
@@ -28,7 +28,7 @@ stackit config [flags]
2828
### SEE ALSO
2929

3030
* [stackit](./stackit.md) - Manage STACKIT resources using the command line
31-
* [stackit config list](./stackit_config_list.md) - List the current CLI configuration values
32-
* [stackit config set](./stackit_config_set.md) - Set CLI configuration options
33-
* [stackit config unset](./stackit_config_unset.md) - Unset CLI configuration options
31+
* [stackit config list](./stackit_config_list.md) - Lists the current CLI configuration values
32+
* [stackit config set](./stackit_config_set.md) - Sets CLI configuration options
33+
* [stackit config unset](./stackit_config_unset.md) - Unsets CLI configuration options
3434

docs/stackit_config_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## stackit config list
22

3-
List the current CLI configuration values
3+
Lists the current CLI configuration values
44

55
### Synopsis
66

7-
List the current CLI configuration values
7+
Lists the current CLI configuration values.
88

99
```
1010
stackit config list [flags]

docs/stackit_config_set.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## stackit config set
22

3-
Set CLI configuration options
3+
Sets CLI configuration options
44

55
### Synopsis
66

7-
Set CLI configuration options.
8-
All of the configuration options can be set using an environment variable, which takes precedence over what is configured.
7+
Sets CLI configuration options.
8+
All of the configuration options can be set using an environment variable, which takes precedence over what is configured.
99
The environment variable is the name of the flag, with underscores ("_") instead of dashes ("-") and the "STACKIT" prefix.
10-
Example: to set the project ID you can set the environment variable STACKIT_PROJECT_ID
10+
Example: to set the project ID you can set the environment variable STACKIT_PROJECT_ID.
1111

1212
```
1313
stackit config set [flags]
@@ -33,6 +33,7 @@ stackit config set [flags]
3333
-h, --help Help for "stackit config set"
3434
--membership-custom-endpoint string Membership custom endpoint
3535
--mongodbflex-custom-endpoint string MongoDB Flex custom endpoint
36+
--opensearch-custom-endpoint string OpenSearch custom endpoint
3637
--resource-manager-custom-endpoint string Resource manager custom endpoint
3738
--service-account-custom-endpoint string Service Account custom endpoint
3839
--session-time-limit string Maximum time before authentication is required again. Can't be larger than 24h. Examples: 3h, 5h30m40s (BETA: currently values greater than 2h have no effect)

0 commit comments

Comments
 (0)