Skip to content

Commit 357909e

Browse files
committed
Add getting started guides
1 parent 0ad423e commit 357909e

20 files changed

+411
-750
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Getting Started",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Getting started with Kadras Engineering Platform."
7+
}
8+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
sidebar_position: 1
3+
description: Basic installation of the platform
4+
---
5+
6+
# Installation
7+
8+
Let's discover how to install a basic version of the Kadras Engineering Platform.
9+
10+
## Prerequisites
11+
12+
* Kubernetes 1.24+
13+
* Carvel [`kctrl`](https://carvel.dev/kapp-controller/docs/latest/install/#installing-kapp-controller-cli-kctrl) CLI.
14+
* Sigstore [`cosign`](https://docs.sigstore.dev/cosign/installation/) CLI.
15+
* Carvel [kapp-controller](https://carvel.dev/kapp-controller) deployed in your Kubernetes cluster. You can install it with Carvel [`kapp`](https://carvel.dev/kapp/docs/latest/install) (recommended choice) or `kubectl`.
16+
17+
```shell
18+
kapp deploy -a kapp-controller -y \
19+
-f https://github.com/carvel-dev/kapp-controller/releases/latest/download/release.yml
20+
```
21+
22+
## Add the Kadras Repository
23+
24+
Add the Kadras repository to make all Kadras packages available to the cluster.
25+
26+
```shell
27+
kubectl create namespace kadras-packages
28+
kctrl package repository add -r kadras-packages \
29+
--url ghcr.io/kadras-io/kadras-packages \
30+
-n kadras-packages
31+
```
32+
33+
You can check the full list of available packages as follows.
34+
35+
```shell
36+
kctrl package available list -n kadras-packages
37+
```
38+
39+
## Create a Secret for the OCI Registry
40+
41+
First, create a Secret with the credentials to access your container registry in read/write mode. It will be used by the platform to publish and consume OCI artifacts.
42+
43+
```shell
44+
export SUPPLY_CHAIN_REGISTRY_HOSTNAME=<hostname>
45+
export SUPPLY_CHAIN_REGISTRY_USERNAME=<username>
46+
export SUPPLY_CHAIN_REGISTRY_TOKEN=<token>
47+
```
48+
49+
* `<hostname>` is the server hosting the OCI registry. For example, `ghcr.io`, `gcr.io`, `quay.io`, `index.docker.io`.
50+
* `<username>` is the username to access the OCI registry. Use `_json_key` if the hostname is `gcr.io`.
51+
* `<token>` is a token with read/write permissions to access the OCI registry. Use the contents of the service account key json if the hostname is `gcr.io`.
52+
53+
```shell
54+
kubectl create secret docker-registry supply-chain-registry-credentials \
55+
--docker-server="${SUPPLY_CHAIN_REGISTRY_HOSTNAME}" \
56+
--docker-username="${SUPPLY_CHAIN_REGISTRY_USERNAME}" \
57+
--docker-password="${SUPPLY_CHAIN_REGISTRY_TOKEN}" \
58+
--namespace=kadras-packages
59+
```
60+
61+
## Configure the Platform
62+
63+
The installation of the Kadras Engineering Platform can be configured via YAML. Create a `values.yml` file with any configuration you need for the platform. The following is a minimal configuration example.
64+
65+
```yaml title="values.yml"
66+
platform:
67+
ingress:
68+
domain: <domain>
69+
70+
oci_registry:
71+
server: <oci-server>
72+
repository: <oci-repository>
73+
74+
workspace_provisioner:
75+
namespaces:
76+
- name: default
77+
```
78+
79+
* `<domain>` is the base domain name the platform will use to configure the Ingress controller. It must be a valid DNS name. For example, `lab.thomasvitale.com`.
80+
* `<oci-server>` is the server of the OCI registry where the platform will publish and consume OCI images. It must be the same used in step 3 when creating a Secret with the OCI registry credentials. For example, `ghcr.io`, `gcr.io`, `quay.io`, `index.docker.io`.
81+
* `<oci-repository>` is the repository in the OCI registry where the platform will publish and consume OCI images. It must be the same used in step 3 when creating a Secret with the OCI registry credentials. For example, it might be your username or organization name depending on which OCI server you're using.
82+
83+
## Install the Platform
84+
85+
Reference the `values.yml` file you created in the previous step and install the Kadras Engineering Platform.
86+
87+
```shell
88+
kctrl package install -i engineering-platform \
89+
-p engineering-platform.packages.kadras.io \
90+
-v ${VERSION} \
91+
-n kadras-packages \
92+
--values-file values.yml
93+
```
94+
95+
You can find the `${VERSION}` value by retrieving the list of package versions available in the Kadras package repository installed on your cluster.
96+
97+
```shell
98+
kctrl package available list -p engineering-platform.packages.kadras.io -n kadras-packages
99+
```
100+
101+
## Verify the Installation
102+
103+
Verify that all the platform components have been installed and properly reconciled.
104+
105+
```shell
106+
kctrl package installed list -n kadras-packages
107+
```

docs/getting-started/workload.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
sidebar_position: 2
3+
description: Create and view an application workload
4+
---
5+
6+
# Create a Workload
7+
8+
Kadras Engineering Platform provides out-of-the-box capabilities to support application development workflows from source code to URL.
9+
10+
First, check out the sample Band Service application.
11+
12+
```shell
13+
git clone https://github.com/thomasvitale/band-service
14+
```
15+
16+
## Deploy a workload
17+
18+
The platform exposes a Workload API based on [Cartographer](https://cartographer.sh) that developers use to trigger the supply chain for a given application.
19+
20+
Deploy the Band Service application by creating a workload based on the configuration available in `config/workload.yml`.
21+
22+
```shell
23+
carto apps workload create --file config/workload.yml
24+
```
25+
26+
Alternatively, you can create a workload using the Kubernetes CLI.
27+
28+
```shell
29+
kubectl apply -f config/workload.yml
30+
```
31+
32+
The platform will check out the application source code and run it through a pre-configured supply chain that will package it as a container image, configure it and finally deploy it.
33+
34+
## View a workload
35+
36+
Using the Cartographer CLI, you can inspect the status of a workload and its supply chain.
37+
38+
```shell
39+
carto apps workload get band-service
40+
```
41+
42+
The application will be available at `https://band-service.default.<your-domain-name>`, where `<your-domain-name>` is the base domain used during the platform installation.

docs/intro.md

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

docs/introduction.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Introduction
6+
7+
Kadras Engineering Platform provides a foundation to support product teams in their activities to onboard, develop, deploy and operate application workloads.
8+
9+
The platform provides several capabilities based on open-source projects, including:
10+
11+
* Serverless deployments with Knative
12+
* Ingress controller with Contour
13+
* Certificate management with cert-manager
14+
* Paved paths to production with Cartographer
15+
* Build service with kpack and Cloud Native Buildpacks
16+
* Pipeline service with Tekton
17+
* Convention service with Cartographer Conventions
18+
* Secrets management with secretgen-controller
19+
* Policy management with Kyverno
20+
* Vulnerability and configuration scanning with Trivy
21+
* GitOps support with Flux, ArgoCD and Carvel
22+
* Air-gapped support with Carvel.
23+
24+
Get started with Kadras by [installing the platform](/docs/getting-started/installation) and [creating your first workload](/docs/getting-started/workload).

docs/tutorial-basics/_category_.json

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

docs/tutorial-basics/congratulations.md

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

docs/tutorial-basics/create-a-blog-post.md

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

docs/tutorial-basics/create-a-document.md

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

0 commit comments

Comments
 (0)