Skip to content

Commit 978c79b

Browse files
committed
Update Deploy First Component guide for v0.4.0
- Update kubectl context reference to k3d-openchoreo - Update resource types to match v0.4 (ComponentType, ComponentDeployment) - Update kubectl commands to use correct resource types - Simplify curl test to use external gateway at localhost:9080 - Remove emoji checkboxes - Update explanation of created resources
1 parent 0e7dfff commit 978c79b

1 file changed

Lines changed: 27 additions & 35 deletions

File tree

docs/getting-started/deploy-first-component.mdx

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ This guide walks you through deploying your first component on OpenChoreo. By th
1313

1414
Before you begin, ensure you have:
1515

16-
- **OpenChoreo installed** in your Kubernetes cluster ([Single Cluster Setup](single-cluster.mdx))
17-
- **kubectl** configured to access your cluster
18-
- **OpenChoreo context** set to your cluster (should be `kind-openchoreo` if following the setup guide)
16+
- **OpenChoreo installed** in your Kubernetes cluster ([Single Cluster Setup](single-cluster.mdx))
17+
- **kubectl** configured to access your cluster
18+
- **OpenChoreo context** set to your cluster (should be `k3d-openchoreo` if following the setup guide)
1919

2020
## Step 1: Verify Your Setup
2121

@@ -28,28 +28,29 @@ You should see all OpenChoreo components running with the control plane and data
2828
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.
2929

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

3535
This single command creates:
36-
- **Component**: Defines the application and its requirements
37-
- **Workload**: Specifies the container image and runtime configuration
38-
- **Service**: Configures the API endpoint and network access
36+
- **Component**: Defines the application and its requirements (references the `deployment/service` ComponentType)
37+
- **Workload**: Specifies the container image and runtime configuration
38+
- **ComponentDeployment**: Deploys the component to the development environment
39+
- **SecretReference**: Manages external secrets for the component
3940

4041
## Step 3: Monitor the Deployment
4142

4243
Track your component's deployment progress:
4344

4445
```bash
4546
# Check that all resources are created
46-
kubectl get component,workload,service,api -A
47+
kubectl get component,workload,componentdeployment -A
4748

4849
# Check the component status
49-
kubectl get component greeter-service
50+
kubectl get component greeter-service
5051

51-
# Monitor the workload deployment
52-
kubectl get workload greeter-service
52+
# Monitor the component deployment
53+
kubectl get componentdeployment greeter-service-development
5354
```
5455

5556
## Step 4: Verify the Deployment
@@ -69,13 +70,11 @@ kubectl get httproute -A -o wide
6970

7071
## Step 5: Test Your Application
7172

72-
Test the greeter service from inside the cluster:
73+
Test the greeter service using curl:
7374

7475
```bash
7576
# Test the greeter service endpoint
76-
kubectl run test-curl --image=curlimages/curl --rm -i --restart=Never -- \
77-
curl -v -k https://gateway-external.openchoreo-data-plane.svc.cluster.local/default/greeter-service/greeter/greet \
78-
-H "Host: development.choreoapis.localhost"
77+
curl http://greeter-service-development-a9f97fde-development.openchoreoapis.localhost:9080/greeter-service-development-a9f97fde/greeter/greet
7978
```
8079

8180
You should receive a successful response:
@@ -84,44 +83,41 @@ Hello, Stranger!
8483
```
8584

8685
This confirms that:
87-
- Your component is deployed and running
88-
- The API gateway is properly configured
89-
- Network routing is working correctly
90-
- Security policies are applied automatically
86+
- Your component is deployed and running
87+
- The API gateway is properly configured
88+
- Network routing is working correctly
89+
- Security policies are applied automatically
9190

9291
## Step 6: Explore What OpenChoreo Created
9392

9493
Let's examine what OpenChoreo automatically created for your component:
9594

9695
```bash
9796
# View the OpenChoreo resources
98-
kubectl get component,workload,service,api -n default
97+
kubectl get component,workload,componentdeployment -n default
9998

10099
# Check the underlying Kubernetes resources
101100
kubectl get deployment,pod,svc -A | grep greeter
102101

103102
# View the HTTP routing configuration
104103
kubectl describe httproute -A | grep -A 20 greeter
105-
106-
# Check the API definition
107-
kubectl get api greeter-service -n default -o yaml
108104
```
109105

110106
OpenChoreo automatically created:
111-
- **Component** - High-level application definition
112-
- **Workload** - Container deployment specification
113-
- **Service** - API service configuration
114-
- **API** - OpenAPI specification and routing
107+
- **Component** - High-level application definition (using the `deployment/service` ComponentType)
108+
- **Workload** - Container deployment specification
109+
- **ComponentDeployment** - Environment-specific deployment configuration
115110
- **Deployment** - Kubernetes deployment managing pods
116111
- **Service** - Kubernetes service for networking
117112
- **HTTPRoute** - Gateway API routing configuration
113+
- **Secret** - External secrets synchronized from the secret store
118114

119115
## Summary
120116

121117
You've successfully:
122-
- Deployed your first OpenChoreo component from a container image
123-
- Tested API access through the OpenChoreo gateway
124-
- Explored the resources OpenChoreo created automatically
118+
- Deployed your first OpenChoreo component from a container image
119+
- Tested API access through the OpenChoreo gateway
120+
- Explored the resources OpenChoreo created automatically
125121

126122
Your application is now running in a production-ready environment with enterprise-grade security, networking, and observability—all configured automatically by OpenChoreo!
127123

@@ -132,9 +128,5 @@ Your application is now running in a production-ready environment with enterpris
132128
To remove the sample application:
133129

134130
<CodeBlock language="bash">
135-
{`# Remove the greeter service
136-
kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/samples/from-image/go-greeter-service/greeter-service.yaml
137-
138-
# Remove the build sample (if deployed)
139-
kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/samples/from-source/services/go-google-buildpack-reading-list/reading-list-service.yaml`}
131+
{`kubectl delete -f https://raw.githubusercontent.com/openchoreo/openchoreo/${versions.githubRef}/samples/from-image/go-greeter-service/greeter-service.yaml`}
140132
</CodeBlock>

0 commit comments

Comments
 (0)