Skip to content

Commit

Permalink
feat(azure): add cli installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Nov 6, 2024
1 parent 8245b7e commit e272c68
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vale/Custom/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cronjob
# E
ecr
eks
Entra

# F

Expand Down
1 change: 1 addition & 0 deletions docs/azure/partials/common/_dns-resource-group.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The `dns-azure-resource-group` is only required if using Azure as your DNS provider. This is the name of the resource group where the [DNS Zone](https://learn.microsoft.com/en-us/azure/dns/dns-zones-records) resource is provisioned.
18 changes: 18 additions & 0 deletions docs/azure/partials/common/_prerequisites.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Azure Prerequisites

For kubefirst to be able to provision your Azure cloud resources:

- An [Azure account](https://portal.azure.com) in which you are an account owner.
- A publicly routable [DNS zone](https://learn.microsoft.com/en-us/azure/dns/dns-zones-records).
- A [Microsoft Entra app and service principal](https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-service-principal-portal) with `Owner` permissions on your subscription.

#### Environment variables

Azure authentication requires the following environment variables to be set:

| Variable | Description |
| --- | --- |
| `ARM_CLIENT_ID` | The unique ID for your [service principal](https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-service-principal-portal#sign-in-to-the-application) |
| `ARM_CLIENT_SECRET` | The secret for your [service principal](https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-service-principal-portal#option-3-create-a-new-client-secret) |
| `ARM_SUBSCRIPTION_ID` | The unique ID for your [Azure subscription](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription) |
| `ARM_TENANT_ID` | The unique ID for your [Microsoft Entra tenant](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant) |
24 changes: 24 additions & 0 deletions docs/azure/partials/github/_cluster-create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import CloudflareDNS from "../../../common/partials/common/_cloudflare-dns.mdx";
import DNSResourceGroup from "../../partials/common/_dns-resource-group.mdx"

## Create your new kubefirst cluster

Adjust the following command with your GitHub and Azure tokens in addition to the appropriate values for your new platform.

```shell
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxx
export ARM_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export ARM_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export ARM_SUBSCRIPTION_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export ARM_TENANT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

kubefirst beta azure create \
--alerts-email [email protected] \
--github-org your-github-org \
--domain-name your-domain.io \
--cluster-name kubefirst \
--dns-azure-resource-group <dns-resource-group>
```

<DNSResourceGroup />
<CloudflareDNS />
25 changes: 25 additions & 0 deletions docs/azure/partials/gitlab/_cluster-create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import CloudflareDNS from "../../../common/partials/common/_cloudflare-dns.mdx";
import DNSResourceGroup from "../../partials/common/_dns-resource-group.mdx"

## Create your new kubefirst cluster

Adjust the following command with your GitHub and Azure tokens in addition to the appropriate values for your new platform.

```shell
export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxx
export ARM_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export ARM_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export ARM_SUBSCRIPTION_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export ARM_TENANT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

kubefirst beta azure create \
--alerts-email [email protected] \
--git-provider gitlab \
--gitlab-group your-fully-qualified-gitlab-group/or-sub-group \
--domain-name your-domain.io \
--cluster-name kubefirst \
--dns-azure-resource-group <dns-resource-group>
```

<DNSResourceGroup />
<CloudflareDNS />
42 changes: 42 additions & 0 deletions docs/azure/quick-start/install/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
hide_title: true
sidebar_label: CLI Installer
sidebar_position: 3
image: "https://kubefirst.konstruct.io/docs/img/kubefirst.svg"
---

import CLI from "../../../common/partials/common/_cli.mdx";
import CommonCloudPrerequisites from "../../../common/partials/common/_prerequisites.mdx";
import AzureCloudPrerequisites from "../../partials/common/_prerequisites.mdx";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import GitHubPrerequisites from "../../../common/partials/github/_prerequisites.mdx";
import GitHubClusterCreateCmd from "../../partials/github/_cluster-create.mdx";
import GitLabPrerequisites from "../../../common/partials/gitlab/_prerequisites.mdx";
import GitLabClusterCreateCmd from "../../partials/gitlab/_cluster-create.mdx";
import CommonTerminalOutput from "../../../common/partials/common/_terminal-output.mdx";
import GitHubLogo from '../../../common/components/GitHubLogo.jsx'
import GitLabLogo from '../../../common/components/GitLabLogo.jsx'
import styles from "../../../stylesheets/tabs.module.css";
import GitHubHandoffScreen from "../../../img/civo/github/handoff-screen.png";
import GitLabHandoffScreen from "../../../img/civo/gitlab/handoff-screen.png";

<CLI />
<CommonCloudPrerequisites />
<AzureCloudPrerequisites />

<Tabs groupId="git_provider" defaultValue="github" queryString>

<TabItem attributes={{ className: styles.github }} value="github" label={ <GitHubLogo /> }>
<GitHubPrerequisites />
<GitHubClusterCreateCmd />
<CommonTerminalOutput cloud="Azure" minutes="20" handoffScreen={GitHubHandoffScreen} />
</TabItem>

<TabItem attributes={{ className: styles.gitlab }} value="gitlab" label={ <GitLabLogo /> }>
<GitLabPrerequisites />
<GitLabClusterCreateCmd />
<CommonTerminalOutput cloud="Azure" minutes="20" handoffScreen={GitLabHandoffScreen} />
</TabItem>

</Tabs>
12 changes: 12 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ const sidebars = {
],
azure: [
'azure/overview',
{
'Quick Start': [
{
Install: [
{
type: 'autogenerated',
dirName: 'azure/quick-start/install',
},
],
},
]
},
'azure/gitops-catalog',
'azure/deprovision',
'azure/faq',
Expand Down

0 comments on commit e272c68

Please sign in to comment.