Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/_constants.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[//] # (This file stores the constants used across the documentation.)

export const versions = {
dockerTag: 'v0.3.0',
// TODO: Update this to the latest release version after v0.3.1 is released.
githubRef: 'release-v0.3', // Used for the GitHub Raw URL references. Example: main, latest, v0.1.0
helmChart: '0.3.0',
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Deploy Your First Component
---

import CodeBlock from '@theme/CodeBlock';
import {versions} from '../_constants.mdx';

# Deploy Your First Component

This guide walks you through deploying your first component on OpenChoreo. By the end of this tutorial, you'll have a running web service accessible through the platform, complete with monitoring and security configured automatically.
Expand All @@ -10,24 +13,24 @@ This guide walks you through deploying your first component on OpenChoreo. By th

Before you begin, ensure you have:

- ✅ **OpenChoreo installed** in your Kubernetes cluster ([Single Cluster Setup](./single-cluster.md))
- ✅ **OpenChoreo installed** in your Kubernetes cluster ([Single Cluster Setup](single-cluster.mdx))
- ✅ **kubectl** configured to access your cluster
- ✅ **OpenChoreo context** set to your cluster (should be `kind-openchoreo` if following the setup guide)

## Step 1: Verify Your Setup

First, make sure you have setup choreo on your local cluster following the [guide](./single-cluster.md)
First, make sure you have setup choreo on your local cluster following the [guide](single-cluster.mdx)

You should see all OpenChoreo components running with the control plane and data plane pods in `Running` status.

## Step 2: Deploy the Go Greeter Service

For this tutorial, we'll use the Go Greeter Service sample that comes with OpenChoreo. This is a simple web service that demonstrates OpenChoreo's core capabilities.

```bash
# Deploy the greeter service (Component, Workload, Service)
kubectl apply -f https://raw.githubusercontent.com/openchoreo/openchoreo/main/samples/from-image/go-greeter-service/greeter-service.yaml
```
<CodeBlock language="bash">
{`# Deploy the greeter service (Component, Workload, Service)
kubectl apply -f https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/samples/from-image/go-greeter-service/greeter-service.yaml`}
</CodeBlock>

This single command creates:
- **Component**: Defines the application and its requirements
Expand Down Expand Up @@ -128,10 +131,10 @@ Your application is now running in a production-ready environment with enterpris

To remove the sample application:

```bash
# Remove the greeter service
kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/main/samples/from-image/go-greeter-service/greeter-service.yaml
<CodeBlock language="bash">
{`# Remove the greeter service
kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/samples/from-image/go-greeter-service/greeter-service.yaml

# Remove the build sample (if deployed)
kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/main/samples/from-source/services/go-google-buildpack-reading-list/reading-list-service.yaml
```
kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/samples/from-source/services/go-google-buildpack-reading-list/reading-list-service.yaml`}
</CodeBlock>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
title: Quick Start Guide
---


import CodeBlock from '@theme/CodeBlock';
import Link from '@docusaurus/Link';
import {versions} from '../_constants.mdx';

# Quick Start Guide

Setting up OpenChoreo in a Kubernetes cluster involves multiple steps and tools. This guide provides a fast and simple way to install a fully functional OpenChoreo instance on your local machine with minimal prerequisites and effort by using a pre-configured dev container.
Expand All @@ -20,25 +25,25 @@ To get started, you’ll need:

Run the following command to start the dev container and launch a terminal session within it:

```shell
docker run --rm -it --name openchoreo-quick-start \
<CodeBlock language="bash">
{String.raw`docker run --rm -it --name openchoreo-quick-start \
--pull always \
-v /var/run/docker.sock:/var/run/docker.sock \
--network bridge \
-p 8443:8443 \
-p 7007:7007 \
ghcr.io/openchoreo/quick-start:latest-dev
ghcr.io/openchoreo/quick-start:`}{versions.dockerTag}
</CodeBlock>

```

### Install OpenChoreo
This process sets up a [KinD](https://kind.sigs.k8s.io/) (Kubernetes-in-Docker) cluster in your Docker environment and installs OpenChoreo along with its dependencies.

To begin the installation, run:

```shell
./install.sh --openchoreo-version 0.0.0-latest-dev
```
<CodeBlock language="bash">
{`./install.sh --openchoreo-version ${versions.helmChart}`}
</CodeBlock>

**💡 Tip:** If you previously used this setup and encounter errors during installation, ensure you perform the proper cleanup as outlined in the [Cleaning up](#cleaning-up) section before starting again.

Expand Down Expand Up @@ -90,7 +95,7 @@ Once the installation is complete, you will see the following confirmation messa
```

**📝 Note:** If you see any components are still in the `pending` state, you can check the status again in few minutes. Run the following command to check the installation status of components:
```shell
```bash
./check-status.sh
```

Expand All @@ -113,7 +118,7 @@ The portal will automatically discover and display any components you deploy thr
You now have OpenChoreo fully setup in your docker environment.
Next, lets deploy a sample Web Application by running the following command:

```shell
```bash
./deploy_web_application.sh
```

Expand Down Expand Up @@ -147,21 +152,21 @@ To access the artifacts created in OpenChoreo you can use choreoctl as shown in

You can check each resource type

```shell
```bash
kubectl get organizations
```
```shell
```bash
kubectl get dataplanes
```
```shell
```bash
kubectl get environments
```
```shell
```bash
kubectl get projects
```
To get more details on any of these abstractions, you can use a similar command to the following command:

```shell
```bash
kubectl get project default -oyaml
```

Expand All @@ -170,27 +175,25 @@ The deploy script creates a sample Web Application Component, along with a Deplo

To inspect these resources in more detail, run the following commands:

```shell
```bash
kubectl get components
```

**💡 Tip:** You can try out more samples on this setup. Check out our [Samples](https://github.com/openchoreo/openchoreo/tree/main/samples) for more details. The samples are also available in the dev container at `/samples`.
**💡 Tip:** You can try out more samples on this setup. Check out our <Link to={`https://github.com/openchoreo/openchoreo/tree/${versions.githubRef}/samples`}>Samples</Link> for more details. The samples are also available in the dev container at `/samples`.

**⚠️ Important:** If you try out samples in the dev container, you don't need to expose the OpenChoreo Gateway to your host machine. The OpenChoreo gateway is already exposed to host machine via dev container port 8443.

### Cleaning up
After finishing your work, you have two options:

1. **Exit and return later**: If you plan to return, simply exit the dev container by running:
```shell
exit
```bash
exit
```
2. **Full cleanup**: To remove all resources and clean up the environment completely, run:
```shell
./uninstall.sh
```
```shell
exit
```bash
./uninstall.sh
exit
```

That's it!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: Single Cluster
description: Try OpenChoreo locally with a single Kind cluster setup.
---

import CodeBlock from '@theme/CodeBlock';
import Link from '@docusaurus/Link';
import {versions} from '../_constants.mdx';

# Single Cluster Setup

This guide provides step-by-step instructions for setting up a local development environment for OpenChoreo using Kind (Kubernetes in Docker).
Expand Down Expand Up @@ -47,9 +51,9 @@ This setup uses pre-built images and Helm charts from the OpenChoreo registry.

Create a new Kind cluster using the provided configuration:

```bash
curl -s https://raw.githubusercontent.com/openchoreo/openchoreo/main/install/kind/kind-config.yaml | kind create cluster --config=-
```
<CodeBlock language="bash">
{`curl -s https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/install/kind/kind-config.yaml | kind create cluster --config=-`}
</CodeBlock>

This will:
- Create a cluster named "openchoreo"
Expand All @@ -61,9 +65,9 @@ This will:

Install Cilium as the Container Network Interface (CNI). This will create the `cilium` namespace automatically:

```bash
helm install cilium oci://ghcr.io/openchoreo/helm-charts/cilium --create-namespace --namespace cilium --wait
```
<CodeBlock language="bash">
{`helm install cilium oci://ghcr.io/openchoreo/helm-charts/cilium --version ${versions.helmChart} --create-namespace --namespace cilium --wait`}
</CodeBlock>

Wait for Cilium pods to be ready:

Expand All @@ -83,11 +87,12 @@ You should see both nodes in `Ready` status.

Install the OpenChoreo control plane using the following helm install command. This will create the `openchoreo-control-plane` namespace automatically:

```bash
helm install control-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-control-plane \
--create-namespace --namespace openchoreo-control-plane \
--timeout=10m
```
<CodeBlock language="bash">
{`helm install control-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-control-plane \\
--version ${versions.helmChart} \\
--create-namespace --namespace openchoreo-control-plane \\
--timeout=10m`}
</CodeBlock>

Wait for the installation to complete and verify all pods are running:

Expand All @@ -104,13 +109,14 @@ You should see pods for:

Install the OpenChoreo data plane using the following helm install command. This will create the `openchoreo-data-plane` namespace automatically:

```bash
helm install data-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-data-plane \
--create-namespace --namespace openchoreo-data-plane \
--timeout=10m \
--set cert-manager.enabled=false \
--set cert-manager.crds.enabled=false
```
<CodeBlock language="bash">
{`helm install data-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-data-plane \\
--version ${versions.helmChart} \\
--create-namespace --namespace openchoreo-data-plane \\
--timeout=10m \\
--set cert-manager.enabled=false \\
--set cert-manager.crds.enabled=false`}
</CodeBlock>

Note: We disable cert-manager since it's already installed by the control plane.

Expand All @@ -136,10 +142,11 @@ The Build Plane is required if you plan to use OpenChoreo’s internal CI capabi

Install the OpenChoreo build plane using the following helm install command for CI/CD capabilities using Argo Workflows. This will create the `openchoreo-build-plane` namespace automatically:

```bash
helm install build-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-build-plane \
--create-namespace --namespace openchoreo-build-plane --timeout=10m
```
<CodeBlock language="bash">
{`helm install build-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-build-plane \\
--version ${versions.helmChart} \\
--create-namespace --namespace openchoreo-build-plane --timeout=10m`}
</CodeBlock>

Wait for the build plane components to be ready:

Expand All @@ -154,9 +161,9 @@ You should see pods for:

Register the build plane with the control plane by running:

```bash
curl -s https://raw.githubusercontent.com/openchoreo/openchoreo/main/install/add-build-plane.sh | bash
```
<CodeBlock language="bash">
{`curl -s https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/install/add-build-plane.sh | bash`}
</CodeBlock>

This script will:
- Detect single-cluster mode automatically
Expand All @@ -174,9 +181,9 @@ kubectl get buildplane -n default

Register the data plane with the control plane by running:

```bash
curl -s https://raw.githubusercontent.com/openchoreo/openchoreo/main/install/add-default-dataplane.sh | bash
```
<CodeBlock language="bash">
{`curl -s https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/install/add-default-dataplane.sh | bash`}
</CodeBlock>

This script will:
- Detect single-cluster mode automatically
Expand All @@ -194,11 +201,12 @@ kubectl get dataplane -n default

Install the OpenChoreo observability plane using the following helm install command for monitoring and logging capabilities. This will create the `openchoreo-observability-plane` namespace automatically:

```bash
helm install observability-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-observability-plane \
--create-namespace --namespace openchoreo-observability-plane \
--timeout=10m
```
<CodeBlock language="bash">
{`helm install observability-plane oci://ghcr.io/openchoreo/helm-charts/openchoreo-observability-plane \\
--version ${versions.helmChart} \\
--create-namespace --namespace openchoreo-observability-plane \\
--timeout=10m`}
</CodeBlock>

Wait for the observability plane components to be ready:

Expand Down Expand Up @@ -270,10 +278,11 @@ The Backstage portal provides:
- **Logs**: View runtime logs and build logs of each component
- **Configure and Deploy**: Configure, deploy and promote web applications and services through environments

```bash
helm install openchoreo-backstage-demo oci://ghcr.io/openchoreo/helm-charts/backstage-demo \
--namespace openchoreo-control-plane
```
<CodeBlock language="bash">
{`helm install openchoreo-backstage-demo oci://ghcr.io/openchoreo/helm-charts/backstage-demo \\
--version ${versions.helmChart} \\
--namespace openchoreo-control-plane`}
</CodeBlock>

Wait for the Backstage pod to be ready:

Expand Down Expand Up @@ -377,9 +386,9 @@ kubectl get nodes
After completing this setup you can:

1. **Explore the Backstage portal** (if instal- Direct links to source code and documentationled) at `http://localhost:7007` to get familiar with the developer interface
2. [Deploy your first component](./deploy-first-component.md) and see it appear automatically in Backstage
3. Test the [GCP microservices demo](https://github.com/openchoreo/openchoreo/tree/main/samples/gcp-microservices-demo) to see multi-component applications in action
4. Deploy additional sample applications from the [OpenChoreo samples](https://github.com/openchoreo/openchoreo/tree/main/samples)
2. [Deploy your first component](./deploy-first-component.mdx) and see it appear automatically in Backstage
3. Test the <Link to={`https://github.com/openchoreo/openchoreo/tree/${versions.githubRef}/samples/gcp-microservices-demo`}>GCP microservices demo</Link> to see multi-component applications in action
4. Deploy additional sample applications from the <Link to={`https://github.com/openchoreo/openchoreo/tree/${versions.githubRef}/samples`}>OpenChoreo samples</Link>
5. Use Backstage to monitor component health, view logs, and manage your application portfolio
6. Develop and test new OpenChoreo features

Expand Down
Loading