Skip to content

Commit 1e9fa3a

Browse files
authored
feat(split): split AKS, use configuration, switch to function (#48)
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
1 parent 473ebcd commit 1e9fa3a

File tree

6 files changed

+205
-358
lines changed

6 files changed

+205
-358
lines changed

README.md

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,25 @@ This repository contains a reference Azure Platform Configuration for
55
internal cloud platforms with Azure and offer a self-service API to your internal
66
development teams.
77

8-
This platform provides APIs to provision fully configured AKS clusters, with
9-
secure networking, and stateful cloud services (Azure PostgreSQL) designed to securely
10-
connect to the nodes in each AKS cluster — all composed using cloud service
11-
primitives from the [Official Upbound Azure
12-
Provider](https://marketplace.upbound.io/providers/upbound/provider-azure). App
13-
deployments can securely connect to the infrastructure they need using secrets
8+
This platform offers APIs for setting up fully configured AKS clusters
9+
with secure networking, stateful cloud services (Database) that can securely
10+
connect to the AKS clusters, an Observability Stack, and a GitOps
11+
System. All these components are built using cloud service tools from
12+
the [Official Upbound Family Azure Provider](https://marketplace.upbound.io/providers/upbound/provider-family-azure).
13+
App deployments can securely connect to the infrastructure they need using secrets
1414
distributed directly to the app namespace.
1515

1616
## Overview
1717

18-
This reference platform defines a custom API for creating an AKS cluster
19-
([XCluster](package/cluster/definition.yaml)) which includes the actual AKS
20-
cluster, a network fabric and Prometheus and other cluster services
21-
([XServices](package/cluster/composition.yaml)). Additionally it defines a
22-
custom API for provisioning Postgres Databases
23-
([XPostgreSQLInstance](package/database/postgres/definition.yaml)).
18+
This reference platform outlines a specialized API for generating an AKS cluster
19+
([XCluster](apis/cluster/definition.yaml)) that incorporates XRs from the specified configurations:
2420

21+
* [upbound-configuration-app](https://github.com/upbound/configuration-app)
22+
* [upbound-configuration-azure-database](https://github.com/upbound/configuration-azure-database)
23+
* [upbound-configuration-azure-aks](https://github.com/upbound/configuration-azure-aks)
24+
* [upbound-configuration-azure-network](https://github.com/upbound/configuration-azure-network)
25+
* [upbound-configuration-gitops-flux](https://github.com/upbound/configuration-gitops-flux)
26+
* [upbound-configuration-observability-oss](https://github.com/upbound/configuration-observability-oss)
2527

2628
```mermaid
2729
graph LR;
@@ -55,7 +57,7 @@ style Postgres.MRs color:#000,fill:#81CABB,stroke:#000,stroke-width:2px
5557
```
5658

5759
Learn more about Composite Resources in the [Crossplane
58-
Docs](https://crossplane.io/docs/v1.9/concepts/composition.html).
60+
Docs](https://docs.crossplane.io/latest/concepts/compositions/).
5961

6062
## Quickstart
6163

@@ -73,11 +75,10 @@ curl -sL https://cli.upbound.io | sh
7375
```
7476
See [up docs](https://docs.upbound.io/cli/) for more install options.
7577

76-
For installing the platform we need a running Crossplane control plane. We are
77-
using [Universal Crossplane (UXP)
78-
](https://github.com/upbound/universal-crossplane). Ensure that your kubectl
79-
context is pointing to the correct Kubernetes cluster or for example create a
80-
[kind](https://kind.sigs.k8s.io) cluster:
78+
We need a running Crossplane control plane to install our instance. We are
79+
using [Universal Crossplane (UXP)](https://github.com/upbound/universal-crossplane).
80+
Ensure that your kubectl context points to the correct Kubernetes cluster or
81+
create a new [kind](https://kind.sigs.k8s.io) cluster:
8182

8283
```console
8384
kind create cluster
@@ -98,11 +99,11 @@ kubectl get all -n upbound-system
9899
### Install the Azure Reference Platform
99100

100101
Now you can install this reference platform. It's packaged as a [Crossplane
101-
configuration package](https://crossplane.io/docs/v1.9/concepts/packages.html)
102-
so there is a single command to install this package:
102+
configuration package](https://docs.crossplane.io/latest/concepts/packages/)
103+
so there is a single command to install it:
103104

104105
```console
105-
up ctp configuration install xpkg.upbound.io/upbound/platform-ref-azure:v0.4.1
106+
up ctp configuration install xpkg.upbound.io/upbound/platform-ref-azure:v0.8.0
106107
```
107108

108109
Validate the install by inspecting the provider and configuration packages:
@@ -134,7 +135,7 @@ kubectl create secret generic azure-creds -n upbound-system --from-file=credenti
134135
kubectl apply -f examples/azure-default-provider.yaml
135136
```
136137

137-
See [provider-azure docs](https://marketplace.upbound.io/providers/upbound/provider-azure/latest/docs/configuration) for more detailed configuration options
138+
See [provider-azure docs](https://docs.upbound.io/providers/provider-azure/authentication/) for more detailed configuration options
138139

139140
## Using the Azure reference platform
140141

@@ -155,6 +156,12 @@ Create a custom defined database:
155156
kubectl apply -f examples/postgres-claim.yaml
156157
```
157158

159+
Now deploy the sample application:
160+
161+
```
162+
kubectl apply -f examples/app-claim.yaml
163+
```
164+
158165
You can verify status by inspecting the claims, composites and managed
159166
resources:
160167

@@ -165,23 +172,34 @@ kubectl get claim,composite,managed
165172
To delete the provisioned resources you would simply delete the claims again:
166173

167174
```console
168-
kubectl delete -f examples/cluster-claim.yaml,examples/postgres-claim.yaml
175+
kubectl delete -f examples/cluster-claim.yaml,examples/postgres-claim.yaml,examples/app-claim.yaml
169176
```
170177

171178
To uninstall the provider & platform configuration:
172179

173180
```console
174181
kubectl delete configurations.pkg.crossplane.io upbound-platform-ref-azure
175-
kubectl delete providers.pkg.crossplane.io upbound-provider-azure
182+
kubectl delete configurations.pkg.crossplane.io upbound-configuration-app
183+
kubectl delete configurations.pkg.crossplane.io upbound-configuration-azure-database
184+
kubectl delete configurations.pkg.crossplane.io upbound-configuration-azure-aks
185+
kubectl delete configurations.pkg.crossplane.io upbound-configuration-azure-network
186+
kubectl delete configurations.pkg.crossplane.io upbound-configuration-gitops-flux
187+
kubectl delete configurations.pkg.crossplane.io upbound-configuration-observability-oss
188+
176189
kubectl delete providers.pkg.crossplane.io crossplane-contrib-provider-helm
190+
kubectl delete providers.pkg.crossplane.io crossplane-contrib-provider-kubernetes
191+
kubectl delete providers.pkg.crossplane.io grafana-provider-grafana
192+
kubectl delete providers.pkg.crossplane.io upbound-provider-azure-containerservice
193+
kubectl delete providers.pkg.crossplane.io upbound-provider-azure-dbformariadb
194+
kubectl delete providers.pkg.crossplane.io upbound-provider-azure-dbforpostgresql
195+
kubectl delete providers.pkg.crossplane.io upbound-provider-azure-network
196+
kubectl delete providers.pkg.crossplane.io upbound-provider-family-azure
177197
```
178198

179199
## Customize for your Organization
180200

181201
So far we have used the existing reference platform but haven't made any
182-
changes. Lets change this and customize the platform by ensuring that AKS
183-
Cluster is deployed to Frankfurt (eu-central-1) and that clusters are limitted
184-
to 10 nodes.
202+
changes.
185203

186204
For the following examples we are using `my-org` and `my-platform`:
187205

@@ -207,10 +225,6 @@ To make your changes clone this repository:
207225
git clone https://github.com/upbound/platform-ref-azure.git $PLATFORM && cd $PLATFORM
208226
```
209227

210-
In the [AKS composition](package/cluster/aks/composition.yaml) find the
211-
`location` definitions and change them from `West US 2` to `West Europe`. Also find the
212-
`defaultNodePool[0].nodeCount` and change it from `1` to `3`.
213-
214228
### Build and push your platform
215229

216230
To share your new platform you need to build and distribute this package.

apis/cluster/aks/composition.yaml

Lines changed: 0 additions & 116 deletions
This file was deleted.

apis/cluster/aks/definition.yaml

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)