Skip to content

Commit 5b773ed

Browse files
fatih-acarclaude
andcommitted
docs: give infrahub-collect its own install guide
Duplicate the install guide per tool instead of sharing one page: - New guides/install-collect.mdx adapted for the collect binary, without the backup-only material (Helm in-band subchart, database credentials, systemd backup timer) - Each sidebar tool category now starts with its own install guide - Readme, collect guide prerequisites, and configuration reference link to the per-tool install pages Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 863bb14 commit 5b773ed

5 files changed

Lines changed: 185 additions & 8 deletions

File tree

docs/docs/guides/collect-troubleshooting-bundle.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,20 @@ Before collecting a bundle:
2222
<Tabs>
2323
<TabItem value="docker" label="Docker Compose" default>
2424

25-
- The `infrahub-collect` binary is installed ([installation guide](./install.mdx))
25+
- The `infrahub-collect` binary is installed ([installation guide](./install-collect.mdx))
2626
- Docker and Docker Compose are available to your user
2727
- The Infrahub Compose project is running (fully or partially)
2828

2929
</TabItem>
3030
<TabItem value="kubernetes" label="Kubernetes">
3131

32-
- The `infrahub-collect` binary is installed ([installation guide](./install.mdx))
32+
- The `infrahub-collect` binary is installed ([installation guide](./install-collect.mdx))
3333
- `kubectl` is configured with access to the cluster running Infrahub
3434
- Your role can read pod logs and execute commands in pods (`pods/log` and `pods/exec`); no write or scale permissions are needed
3535

3636
</TabItem>
3737
</Tabs>
3838

39-
The `infrahub-collect` binary is included in the same release packages as `infrahub-backup`, and the [installation guide](./install.mdx) steps apply to it unchanged.
40-
4139
The binary is self-contained and collection works fully offline: it uses your existing Docker or kubectl access and performs no network access beyond your deployment itself.
4240

4341
## Step 1: Verify environment detection
@@ -262,7 +260,7 @@ Confirm your collection works:
262260

263261
## Related resources
264262

263+
- [Install Infrahub Collect](./install-collect.mdx)
265264
- [Back up your Infrahub instance](./backup-instance.mdx)
266-
- [Install Infrahub Backup](./install.mdx)
267265
- [CLI command reference](../reference/commands.mdx)
268266
- [Configuration reference](../reference/configuration.mdx)
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
title: Install Infrahub Collect
3+
---
4+
5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
7+
8+
This guide shows you how to install Infrahub Collect on your system.
9+
10+
## Prerequisites
11+
12+
Before installing Infrahub Collect, ensure you have:
13+
14+
**For Docker deployments:**
15+
16+
- Administrative or sudo access on your system
17+
- Docker with Docker Compose installed
18+
19+
**For Kubernetes deployments:**
20+
21+
- Administrative or sudo access on your system
22+
- kubectl configured with permissions to read pod logs and execute commands in pods (`pods/log` and `pods/exec`) in the Infrahub namespace
23+
24+
**If building from source:**
25+
26+
- Git and network access to clone the repository
27+
- Go 1.21 or later installed
28+
29+
## Installation methods
30+
31+
<Tabs>
32+
<TabItem value="direct" label="Direct Download" default>
33+
34+
### Download the pre-built binary
35+
36+
Download the pre-built binary directly:
37+
38+
```bash
39+
# Download the appropriate binary for your system
40+
curl https://infrahub.opsmill.io/ops/$(uname -s)/$(uname -m)/infrahub-collect -o infrahub-collect
41+
42+
# Make it executable
43+
chmod +x infrahub-collect
44+
45+
# Move to a directory in your PATH (optional)
46+
sudo mv infrahub-collect /usr/local/bin/
47+
```
48+
49+
</TabItem>
50+
<TabItem value="manual" label="Manual Selection">
51+
52+
### Select and download a specific version
53+
54+
If you need a specific version or architecture, manually select the appropriate binary:
55+
56+
1. Identify your system architecture:
57+
58+
```bash
59+
uname -s # Operating system (Linux/Darwin)
60+
uname -m # Architecture (x86_64/aarch64)
61+
```
62+
63+
2. Download the matching binary:
64+
- **Linux AMD64**: `curl -L https://infrahub.opsmill.io/ops/Linux/x86_64/infrahub-collect -o infrahub-collect`
65+
- **Linux ARM64**: `curl -L https://infrahub.opsmill.io/ops/Linux/aarch64/infrahub-collect -o infrahub-collect`
66+
- **macOS AMD64**: `curl -L https://infrahub.opsmill.io/ops/Darwin/x86_64/infrahub-collect -o infrahub-collect`
67+
- **macOS ARM64**: `curl -L https://infrahub.opsmill.io/ops/Darwin/arm64/infrahub-collect -o infrahub-collect`
68+
69+
3. Make executable and optionally install system-wide:
70+
71+
```bash
72+
chmod +x infrahub-collect
73+
sudo mv infrahub-collect /usr/local/bin/ # Optional
74+
```
75+
76+
</TabItem>
77+
<TabItem value="source" label="Build from Source">
78+
79+
### Build from source code
80+
81+
To install Infrahub Collect, build from source:
82+
83+
1. Install Go 1.21 or later:
84+
85+
```bash
86+
# Check if Go is installed
87+
go version
88+
```
89+
90+
2. Clone the repository:
91+
92+
```bash
93+
git clone https://github.com/opsmill/infrahub-ops-cli.git
94+
cd infrahub-ops-cli
95+
```
96+
97+
3. Build the binaries:
98+
99+
```bash
100+
make build
101+
```
102+
103+
4. Install to your PATH:
104+
105+
```bash
106+
sudo cp bin/infrahub-collect /usr/local/bin/
107+
```
108+
109+
</TabItem>
110+
</Tabs>
111+
112+
The same binary collects from Docker Compose and Kubernetes deployments — there is no separate in-cluster installation. On Kubernetes, the tool runs from your workstation (or a CI runner) and reaches the cluster through kubectl.
113+
114+
## Verify installation
115+
116+
After installing the CLI, verify it is working correctly:
117+
118+
```bash
119+
# Check versions
120+
infrahub-collect version
121+
122+
# Verify environment detection
123+
infrahub-collect environment detect
124+
125+
# Display help
126+
infrahub-collect --help
127+
```
128+
129+
Expected output:
130+
131+
```bash
132+
Version: [git ref]
133+
```
134+
135+
## Configure environment
136+
137+
Infrahub Collect uses environment variables for configuration. Set these based on your deployment:
138+
139+
### Docker Compose deployments
140+
141+
```bash
142+
# Optional: Target a specific project
143+
export INFRAHUB_PROJECT=infrahub-production
144+
145+
# Optional: Custom bundle location
146+
export INFRAHUB_OUTPUT_DIR=/data/bundles/infrahub
147+
```
148+
149+
### Kubernetes deployments
150+
151+
```bash
152+
# Set the namespace
153+
export INFRAHUB_K8S_NAMESPACE=infrahub
154+
155+
# Set kubeconfig if not default
156+
export KUBECONFIG=/path/to/kubeconfig
157+
```
158+
159+
## Validation
160+
161+
Confirm the CLI can connect to your Infrahub instance:
162+
163+
```bash
164+
# List available deployments
165+
infrahub-collect environment list
166+
167+
# Test environment detection
168+
infrahub-collect environment detect
169+
```
170+
171+
If these commands succeed, installation is complete.
172+
173+
## Related resources
174+
175+
- [Collect a troubleshooting bundle](./collect-troubleshooting-bundle.mdx)
176+
- [CLI command reference](../reference/commands.mdx)
177+
- [Configuration reference](../reference/configuration.mdx)

docs/docs/readme.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ Learn the fundamentals through hands-on exercises:
5959

6060
Accomplish specific tasks:
6161

62-
- [Install Infrahub Backup](./guides/install.mdx) - Install the tools on your system
63-
6462
#### Infrahub Backup
6563

64+
- [Install Infrahub Backup](./guides/install.mdx) - Install the backup tool on your system
6665
- [Back up your Infrahub instance](./guides/backup-instance.mdx) - Create comprehensive backups
6766
- [Restore from a backup](./guides/restore-backup.mdx) - Restore your instance from a backup file
6867
- [Back up Infrahub on Kubernetes](./guides/kubernetes-backup.mdx) - Back up using the Helm chart
6968
- [Restore Infrahub on Kubernetes](./guides/kubernetes-restore.mdx) - Restore using the Helm chart
7069

7170
#### Infrahub Collect
7271

72+
- [Install Infrahub Collect](./guides/install-collect.mdx) - Install the collect tool on your system
7373
- [Collect a troubleshooting bundle](./guides/collect-troubleshooting-bundle.mdx) - Gather logs and diagnostics for OpsMill support
7474

7575
### Reference

docs/docs/reference/configuration.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,4 @@ infrahub-backup create --neo4jmetadata=all
169169

170170
- [CLI command reference](./commands.mdx)
171171
- [Install Infrahub Backup](../guides/install.mdx)
172+
- [Install Infrahub Collect](../guides/install-collect.mdx)

docs/sidebars.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ const sidebars: SidebarsConfig = {
1414
type: 'category',
1515
label: 'How-to Guides',
1616
items: [
17-
'guides/install',
1817
{
1918
type: 'category',
2019
label: 'Infrahub Backup',
2120
items: [
21+
'guides/install',
2222
'guides/backup-instance',
2323
'guides/restore-backup',
2424
'guides/kubernetes-backup',
@@ -29,6 +29,7 @@ const sidebars: SidebarsConfig = {
2929
type: 'category',
3030
label: 'Infrahub Collect',
3131
items: [
32+
'guides/install-collect',
3233
'guides/collect-troubleshooting-bundle',
3334
],
3435
},

0 commit comments

Comments
 (0)