Skip to content

Commit 451c5a5

Browse files
authored
docs: add Enterprise docs (#9600)
This brings the Enterprise installation into the regular docs. This is not indexed nor linked from the product docs.
1 parent 5f39933 commit 451c5a5

21 files changed

+1111
-4
lines changed

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default defineConfig({
5252
// To be iso with gatsby's sitemap, not sure it's usefull
5353
changefreq: 'daily',
5454
priority: 0.7,
55+
exclude: ['/enterprise', '/enterprise/**'],
5556
}),
5657
ScalarApiReference(),
5758
AlgoliaUpdateIndex(),

integrations/algolia-update-index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ interface Heading {
1212
html: string;
1313
headingPath: string[];
1414
}
15+
16+
const HIDDEN_PATH_PREFIXES = ['enterprise'];
17+
18+
const isHiddenPath = (path: string): boolean => {
19+
return HIDDEN_PATH_PREFIXES.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
20+
};
21+
1522
export function AlgoliaUpdateIndex(): AstroIntegration {
1623
return {
1724
name: 'algolia-update-index',
@@ -54,6 +61,10 @@ async function collectPagesFromDist(distRoot: string): Promise<AlgoliaRecord[]>
5461
const baseUrl =
5562
toObjectIdFromCanonical(canonicalHref) || toObjectIdFromPath(distRoot, filePath);
5663

64+
if (isHiddenPath(baseUrl)) {
65+
continue;
66+
}
67+
5768
const pageTitle = $('meta[property="og:title"]').attr('content') || $('title').text() || '';
5869
const pageDescription =
5970
$('meta[name="description"]').attr('content') ||

public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
User-agent: *
2+
Disallow: /enterprise
3+
Disallow: /enterprise/
4+
Disallow: /enterprise/*
25
Allow: /

src/components/Header/Header.astro

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
---
22
import { AiOutlineDashboard } from 'react-icons/ai';
33
import { FaGithub } from 'react-icons/fa';
4-
import { HiOutlineDocumentArrowUp } from 'react-icons/hi2';
4+
import { HiOutlineBookOpen, HiOutlineDocumentArrowUp } from 'react-icons/hi2';
55
import { SiSlack, SiStatuspage } from 'react-icons/si';
66
import Search from '../Search/Search.astro';
77
import HeaderLink from './HeaderLink.astro';
88
import SidebarToggle from './SidebarToggle';
99
import ThemeToggleButton from './ThemeToggleButton';
10+
11+
const pathname = Astro.url.pathname;
12+
const isEnterpriseSection = pathname.startsWith('/enterprise');
13+
const primaryLink = isEnterpriseSection
14+
? {
15+
label: 'Mergify Docs',
16+
href: '/',
17+
icon: HiOutlineBookOpen,
18+
target: '_blank',
19+
}
20+
: {
21+
label: 'Dashboard',
22+
href: 'https://dashboard.mergify.com',
23+
icon: AiOutlineDashboard,
24+
target: undefined,
25+
};
1026
---
1127

1228
<header>
@@ -81,8 +97,8 @@ import ThemeToggleButton from './ThemeToggleButton';
8197
</ul>
8298
</div>
8399
<div class="nav-buttons">
84-
<HeaderLink href="https://dashboard.mergify.com" icon={AiOutlineDashboard}>
85-
Dashboard
100+
<HeaderLink href={primaryLink.href} icon={primaryLink.icon} target={primaryLink.target}>
101+
{primaryLink.label}
86102
</HeaderLink>
87103
<HeaderLink href="https://slack.mergify.com" icon={SiSlack}>Slack Community</HeaderLink>
88104
<HeaderLink href="https://github.com/Mergifyio/mergify/discussions" icon={FaGithub}>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
import enterpriseNavItems from '../../content/enterpriseNavItems';
3+
import NavGroup from './NavGroup.astro';
4+
import NavLink from './NavLink.astro';
5+
6+
export interface Props {
7+
currentPageMatch: string;
8+
}
9+
10+
const { currentPageMatch } = Astro.props as Props;
11+
---
12+
13+
{
14+
enterpriseNavItems.map((item) =>
15+
item.children ? (
16+
<NavGroup navGroup={item} currentPageMatch={currentPageMatch} />
17+
) : (
18+
<NavLink currentPageMatch={currentPageMatch} navItem={item} />
19+
)
20+
)
21+
}

src/components/LeftSidebar/LeftSidebar.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import { removeLeadingSlash, removeTrailingSlash } from '../../util';
33
import ThemeToggleButton from '../Header/ThemeToggleButton';
4+
import EnterpriseSidebarContent from './EnterpriseSidebarContent.astro';
45
import SidebarContent from './SidebarContent.astro';
56
67
export interface Props {
@@ -9,11 +10,16 @@ export interface Props {
910
1011
const { currentPage } = Astro.props as Props;
1112
const currentPageMatch = removeLeadingSlash(removeTrailingSlash(currentPage));
13+
const isEnterprisePage = currentPage === '/enterprise' || currentPage.startsWith('/enterprise/');
1214
---
1315

1416
<nav aria-label={'Primary'}>
1517
<ul class={`nav-groups`}>
16-
<SidebarContent currentPageMatch={currentPageMatch} />
18+
{isEnterprisePage ? (
19+
<EnterpriseSidebarContent currentPageMatch={currentPageMatch} />
20+
) : (
21+
<SidebarContent currentPageMatch={currentPageMatch} />
22+
)}
1723
<li style="text-align: center;">
1824
<ThemeToggleButton
1925
client:visible

src/content/docs/enterprise.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: 'Mergify Enterprise'
3+
description: 'Self-hosted / on-premise documentation for Mergify Enterprise.'
4+
---
5+
6+
Welcome to the Mergify Enterprise resource center. Here you will find everything needed to deploy
7+
and run the on-premise edition—from requirements to installation, integrations, maintenance, and
8+
troubleshooting.
9+
10+
- Review the [Requirements](/enterprise/requirements) before provisioning infrastructure.
11+
12+
- Follow the [Installation guide](/enterprise/installation).
13+
14+
- Explore [Advanced features](/enterprise/advanced-features) such as Datadog telemetry, CI Insights,
15+
and Slack integrations.
16+
17+
- Keep your deployment healthy with the [Troubleshooting](/enterprise/troubleshooting) and
18+
[Maintenance](/enterprise/maintenance) guides.
19+
20+
> 🚩 Need help? Contact Mergify support at [[email protected]](mailto:[email protected]).
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
title: 'Advanced Features'
3+
description: 'Optional integrations such as Datadog telemetry and CI Insights object storage.'
4+
---
5+
6+
## Mergify Instance Datadog Integration
7+
8+
You can monitor your Mergify Enterprise instance using Datadog for metrics and logs.
9+
10+
### Enabling metrics
11+
12+
Mergify can emit metrics to Datadog via StatsD. Set the following environment variables on the
13+
engine container:
14+
15+
```ini
16+
DD_TRACE_ENABLED=1
17+
DD_DOGSTATSD_DISABLE=0
18+
DD_AGENT_HOST=<my-datadog-agent-host>
19+
DD_DOGSTATSD_PORT=8125
20+
GUNICORN_CMD_ARGS="--statsd-host=<my-datadog-agent-host>:8125"
21+
```
22+
23+
### Enabling logging
24+
25+
Configure the Datadog Agent to accept UDP logs by creating
26+
`/etc/datadog-agent/mergify-engine.d/conf.yaml`:
27+
28+
```yaml
29+
init_config:
30+
31+
instances:
32+
33+
logs:
34+
- type: udp
35+
port: 10518
36+
source: python
37+
service: mergify-engine
38+
sourcecategory: sourcecode
39+
```
40+
41+
Then instruct Mergify to ship its logs:
42+
43+
```ini
44+
MERGIFYENGINE_LOG_DATADOG=udp://<my-datadog-agent-host>:10518
45+
```
46+
47+
## CI Insights Object Storage
48+
49+
CI test traces can be exported to Mergify CI Insights by backing the feature with object storage.
50+
Set `MERGIFYENGINE_CI_TRACES_BACKEND` and bucket credentials according to your provider.
51+
52+
### Google Cloud Storage
53+
54+
Requirements:
55+
56+
- Two buckets: `<mycompany>-mergify-ci-traces-incoming` and
57+
`<mycompany>-mergify-ci-traces-done`
58+
59+
- Service Account with read/write/delete access (`Object Storage User` role scoped to these buckets)
60+
61+
- JSON key for that Service Account
62+
63+
Base64-encode the JSON key:
64+
65+
```sh
66+
cat credentials.json | base64 -w0
67+
```
68+
69+
Configure the engine:
70+
71+
```ini
72+
MERGIFYENGINE_CI_TRACES_BACKEND="gcs"
73+
MERGIFYENGINE_CI_TRACES_INCOMING_BUCKET="<mycompany>-mergify-ci-traces-incoming"
74+
MERGIFYENGINE_CI_TRACES_DONE_BUCKET="<mycompany>-mergify-ci-traces-done"
75+
MERGIFYENGINE_GCS_CREDENTIALS="base64-encoded-credentials-json"
76+
```
77+
78+
### Amazon S3
79+
80+
Requirements:
81+
82+
- Two buckets named `<mycompany>-mergify-ci-traces-incoming` and
83+
`<mycompany>-mergify-ci-traces-done`
84+
85+
- IAM credentials with read/write/delete rights on those buckets
86+
87+
Environment variables:
88+
89+
```ini
90+
MERGIFYENGINE_CI_TRACES_BACKEND="s3"
91+
MERGIFYENGINE_CI_TRACES_INCOMING_BUCKET="<mycompany>-mergify-ci-traces-incoming"
92+
MERGIFYENGINE_CI_TRACES_DONE_BUCKET="<mycompany>-mergify-ci-traces-done"
93+
MERGIFYENGINE_AWS_ACCOUNT_ID=1234567
94+
MERGIFYENGINE_AWS_ACCESS_KEY_ID=123567
95+
MERGIFYENGINE_AWS_SECRET_ACCESS_KEY=<secret>
96+
# Optional
97+
MERGIFYENGINE_AWS_REGION_NAME=us-west-2
98+
# Custom S3 implementation endpoint
99+
MERGIFYENGINE_AWS_ENDPOINT_URL_S3=s3://my-s3-domain.example.com:1234/
100+
```
101+
102+
## Slack Integration
103+
104+
Mergify Enterprise 8.6.0+ can post notifications directly to Slack. These steps assume your
105+
self-hosted dashboard lives at `https://mergify.mycompany.com`—adjust URLs as needed.
106+
107+
### 1. Create a Slack App
108+
109+
Visit [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App**. Once created,
110+
configure the app:
111+
112+
#### OAuth & Permissions
113+
114+
- Add redirect URL: `https://mergify.mycompany.com/front/integrations/callback/slack`.
115+
- Add the scopes required for channel messaging and metadata (reuse your existing scope list).
116+
117+
#### Incoming Webhooks
118+
119+
- Enable Incoming Webhooks so Mergify can send messages.
120+
121+
#### Event Subscriptions
122+
123+
- Enable events and set the request URL to `https://mergify.mycompany.com/slack-event`.
124+
- Subscribe the bot to the `channel_rename` event so channel names stay in sync.
125+
126+
### 2. Set Environment Variables
127+
128+
In your engine container, provide the Slack credentials (under **Basic Information** in the Slack
129+
app):
130+
131+
```ini
132+
MERGIFYENGINE_SLACK_CLIENT_ID=<Slack client ID>
133+
MERGIFYENGINE_SLACK_CLIENT_SECRET=<Slack client secret>
134+
MERGIFYENGINE_SLACK_SIGNING_SECRET=<Slack signing secret>
135+
```
136+
137+
### 3. Allow URLs
138+
139+
Permit outbound calls from Mergify to Slack:
140+
141+
- `https://slack.com/oauth/v2/authorize`
142+
- `https://slack.com/api/oauth.v2.access`
143+
- `https://hooks.slack.com/*`
144+
- `https://slack.com/api/conversations.info`
145+
146+
Also ensure Slack can reach these endpoints on your deployment:
147+
148+
- `https://mergify.mycompany.com/front/integrations/callback/slack`
149+
- `https://mergify.mycompany.com/slack-event`
150+
- `https://mergify.mycompany.com/slack-interaction`
151+
152+
### 4. Connect via the Dashboard
153+
154+
From the Mergify dashboard (`Integrations → Slack`), initiate the OAuth flow and select the channels
155+
you want to notify. Each integration can post to multiple channels for different event types.

0 commit comments

Comments
 (0)