Skip to content

Commit f906036

Browse files
chideatCopilot
andauthored
Add Konveyor deployment and usage guide (#106)
* Add Konveyor deployment and usage guide * Update docs/en/solutions/How_to_Use_Konveyor.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/en/solutions/How_to_Use_Konveyor.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: updated violet tool url * fix: fix clean resource namespace * fix: set default cache pv size Add cache storage class and data volume size to deployment configuration. * fix: fix grammer --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b980af7 commit f906036

1 file changed

Lines changed: 266 additions & 0 deletions

File tree

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
---
2+
kind:
3+
- Solution
4+
products:
5+
- Alauda Application Services
6+
ProductsVersion:
7+
- 4.x
8+
---
9+
10+
# How to Deploy and Use Konveyor
11+
12+
## Overview
13+
14+
Konveyor is a CNCF (Cloud Native Computing Foundation) project that provides a modular platform for application modernization. It supports the entire lifecycle of modernization: discovery, assessment, analysis, and execution. This guide covers deploying the Konveyor Hub (Tackle) platform and its core components.
15+
16+
## Prerequisites
17+
18+
- Kubernetes cluster with kubectl access
19+
- StorageClass that supports ReadWriteMany (RWX) access mode
20+
- StorageClass for RWO volumes (for databases)
21+
- (Optional) LoadBalancer or Ingress Controller for external access
22+
23+
## Install Konveyor Operator
24+
25+
Download the Konveyor Operator plugin from [Alauda Cloud Console](https://cloud.alauda.io/) Marketplace, and follow the [Upload Packages](https://docs.alauda.io/container_platform/4.2/extend/upload_package.html) guide to upload the plugin to the cluster.
26+
27+
## Deploy Konveyor Hub (Tackle)
28+
29+
### Create Tackle Instance
30+
31+
Deploy the Tackle platform by creating a Tackle CR. The Tackle instance must be deployed in the same namespace as the konveyor-operator.
32+
33+
```yaml
34+
cat << EOF | kubectl create -f -
35+
apiVersion: tackle.konveyor.io/v1alpha1
36+
kind: Tackle
37+
metadata:
38+
name: tackle
39+
namespace: konveyor-tackle
40+
spec:
41+
feature_auth_required: true
42+
feature_isolate_namespace: true
43+
feature_analysis_archiver: true
44+
hub_database_volume_size: 5Gi
45+
hub_bucket_volume_size: 100Gi
46+
rwx_supported: true
47+
hub_bucket_storage_class: nfs # Replace with your RWX StorageClass
48+
rwo_storage_class: sc-topolvm # Replace with your RWO StorageClass
49+
cache_storage_class: nfs
50+
cache_data_volume_size: 100Gi
51+
EOF
52+
```
53+
54+
### Verify Deployment
55+
56+
Check the status of the pods in the `konveyor-tackle` namespace:
57+
58+
```bash
59+
kubectl get pods -n konveyor-tackle
60+
```
61+
62+
Ensure all pods are in `Running` or `Completed` state before proceeding.
63+
64+
> [!WARNING]
65+
> The Tackle instance must be deployed in the same namespace as the `konveyor-operator`. If you deploy it in a different namespace, some resources created by the operator (such as PersistentVolumeClaims, ConfigMaps, Secrets, and ServiceAccounts) might not be automatically deleted when the Tackle custom resource is removed. In that case, you must manually clean up these resources in the affected namespaces, for example:
66+
>
67+
> ```bash
68+
> # Delete common resources labeled for the Tackle instance
69+
> kubectl delete pvc,configmap,secret,sa -l app.kubernetes.io/instance=tackle -n konveyor-tackle
70+
> ```
71+
72+
### Configuration Options
73+
74+
| Name | Default | Description |
75+
| --- | --- | --- |
76+
| `spec.feature_auth_required` | `true` | Enable Keycloak authentication (set `false` for single user/no auth) |
77+
| `spec.feature_isolate_namespace` | `true` | Enable namespace isolation via network policies |
78+
| `spec.feature_analysis_archiver` | `true` | Automatically archive old analysis reports when a new one is created |
79+
| `spec.rwx_supported` | `true` | Whether RWX volumes are supported in the cluster |
80+
| `spec.hub_database_volume_size` | `5Gi` | Size requested for Hub database volume |
81+
| `spec.hub_bucket_volume_size` | `100Gi` | Size requested for Hub bucket volume |
82+
| `spec.keycloak_database_data_volume_size` | `1Gi` | Size requested for Keycloak DB volume |
83+
| `spec.cache_data_volume_size` | `100Gi` | Size requested for Tackle Cache volume |
84+
| `spec.cache_storage_class` | N/A | StorageClass requested for Tackle Cache volume |
85+
| `spec.hub_bucket_storage_class` | N/A | StorageClass requested for Tackle Hub Bucket volume (RWX) |
86+
| `spec.rwo_storage_class` | N/A | StorageClass requested for RWO database volumes |
87+
88+
## Access Tackle UI
89+
90+
### Quick Access via Port-Forward
91+
92+
1. Set up port forwarding:
93+
94+
```bash
95+
kubectl -n konveyor-tackle port-forward service/tackle-ui 8080:8080
96+
```
97+
98+
2. Open [http://127.0.0.1:8080](http://127.0.0.1:8080) in your browser.
99+
100+
### Initialize Admin Account
101+
102+
The built-in Keycloak generates a random password on startup. This is the Keycloak root password, stored in the `tackle-keycloak-sso` secret.
103+
104+
1. Retrieve Keycloak admin credentials:
105+
106+
```bash
107+
# Get username (default: admin)
108+
kubectl -n konveyor-tackle get secret tackle-keycloak-sso -o jsonpath='{.data.username}' | base64 -d
109+
110+
# Get password
111+
kubectl -n konveyor-tackle get secret tackle-keycloak-sso -o jsonpath='{.data.password}' | base64 -d
112+
```
113+
114+
2. Login to Keycloak admin console at [http://127.0.0.1:8080/auth/admin/](http://127.0.0.1:8080/auth/admin/)
115+
116+
3. Reset the Tackle admin password:
117+
- Select the **tackle** Realm from the dropdown (not Master Realm)
118+
- Click **Users** in the left menu
119+
- Find and select the **admin** user
120+
- Click the **Credentials** tab
121+
- Enter a new password (e.g., `admin@123`)
122+
- Disable **Temporary** toggle
123+
- Click **Reset Password**
124+
125+
4. Login to Tackle at [http://127.0.0.1:8080](http://127.0.0.1:8080) using the admin user and new password.
126+
127+
### Secure Access via Ingress (Production)
128+
129+
Port-forward is only for temporary access. For production, configure Ingress with TLS.
130+
131+
#### Ingress Prerequisites
132+
133+
- A domain name (e.g., `tackle.example.com`)
134+
- LoadBalancer service deployed (see [ALB deployment guide](https://docs.alauda.io/container_platform/4.1/configure/networking/how_to/alb/deploy_alb.html))
135+
- cert-manager installed
136+
137+
#### Create TLS Certificate
138+
139+
```yaml
140+
apiVersion: cert-manager.io/v1
141+
kind: Certificate
142+
metadata:
143+
name: tackle-ssl-cert
144+
namespace: konveyor-tackle
145+
spec:
146+
commonName: tackle.example.com
147+
dnsNames:
148+
- tackle.example.com
149+
issuerRef:
150+
kind: ClusterIssuer
151+
name: cpaas-ca # Replace with your Issuer
152+
secretName: tackle-tls-secret
153+
usages:
154+
- server auth
155+
- client auth
156+
```
157+
158+
#### Create Ingress
159+
160+
```yaml
161+
apiVersion: networking.k8s.io/v1
162+
kind: Ingress
163+
metadata:
164+
annotations:
165+
nginx.ingress.kubernetes.io/backend-protocol: HTTP
166+
nginx.ingress.kubernetes.io/ssl-redirect: "true"
167+
name: tackle-ui-tls-ingress
168+
namespace: konveyor-tackle
169+
spec:
170+
ingressClassName: nginx # Replace with your Ingress Class
171+
rules:
172+
- host: tackle.example.com
173+
http:
174+
paths:
175+
- backend:
176+
service:
177+
name: tackle-ui
178+
port:
179+
number: 8080
180+
path: /
181+
pathType: Prefix
182+
tls:
183+
- hosts:
184+
- tackle.example.com
185+
secretName: tackle-tls-secret
186+
```
187+
188+
> [!NOTE]
189+
> Replace `tackle.example.com` with your actual domain.
190+
191+
Access Tackle at `https://tackle.example.com`.
192+
193+
## Enable KAI (Konveyor AI)
194+
195+
KAI uses AI services to provide AI-powered code migration assistance. It supports multiple providers and models.
196+
197+
### Supported Providers and Models
198+
199+
| Provider (`kai_llm_provider`) | Model (`kai_llm_model`) |
200+
| --- | --- |
201+
| `openai` | `gpt-4`, `gpt-4o`, `gpt-4o-mini`, `gpt-3.5-turbo` |
202+
| `azure_openai` | `gpt-4`, `gpt-35-turbo` |
203+
| `bedrock` | `anthropic.claude-3-5-sonnet-20241022-v2:0`, `meta.llama3-1-70b-instruct-v1:0` |
204+
| `google` | `gemini-2.0-flash-exp`, `gemini-1.5-pro` |
205+
| `ollama` | `llama3.1`, `codellama`, `mistral` |
206+
| `groq` | `llama-3.1-70b-versatile`, `mixtral-8x7b-32768` |
207+
| `anthropic` | `claude-3-5-sonnet-20241022`, `claude-3-haiku-20240307` |
208+
209+
### Enable KAI in Tackle
210+
211+
1. Update the Tackle configuration:
212+
213+
```yaml
214+
apiVersion: tackle.konveyor.io/v1alpha1
215+
kind: Tackle
216+
metadata:
217+
name: tackle
218+
namespace: konveyor-tackle
219+
spec:
220+
kai_solution_server_enabled: true
221+
kai_llm_provider: openai # Choose your provider
222+
kai_llm_model: gpt-4o-mini # Choose your model
223+
```
224+
225+
2. Create API credentials secret:
226+
227+
**For OpenAI:**
228+
229+
```bash
230+
kubectl create secret generic kai-api-keys -n konveyor-tackle \
231+
--from-literal=OPENAI_API_BASE='https://api.openai.com/v1' \
232+
--from-literal=OPENAI_API_KEY='<YOUR_OPENAI_KEY>'
233+
```
234+
235+
**For Google:**
236+
237+
```bash
238+
kubectl create secret generic kai-api-keys -n konveyor-tackle \
239+
--from-literal=GOOGLE_API_KEY='<YOUR_GOOGLE_API_KEY>'
240+
```
241+
242+
3. Force the operator to reconcile and pick up the new credentials:
243+
244+
```bash
245+
kubectl patch tackle tackle -n konveyor-tackle --type=merge -p \
246+
'{"metadata":{"annotations":{"konveyor.io/force-reconcile":"'"$(date +%s)"'"}}}'
247+
```
248+
249+
## Konveyor Components Overview
250+
251+
Konveyor provides a modular architecture for application modernization:
252+
253+
| Component | Description |
254+
| --- | --- |
255+
| **Konveyor Hub** | Central control plane providing unified application inventory, assessment module (risk evaluation), and analysis module (static code analysis). Implements RBAC with Administrator, Architect, and Migrator roles. |
256+
| **Kantra & Analyzer-LSP** | CLI tool for offline static analysis. Analyzer-LSP integrates into IDEs (VSCode) via Language Server Protocol for real-time migration issue detection. |
257+
| **Konveyor AI (KAI)** | RAG-based AI assistant for automated code remediation. Uses Solved Incident Store for context-aware code patch generation. |
258+
| **Move2Kube** | Automates conversion from Cloud Foundry/OpenShift to Kubernetes. Three phases: Collect, Plan, Transform. Generates Dockerfiles, K8s manifests, Helm Charts, and Tekton Pipelines. |
259+
| **Forklift** | VM migration tool for moving VMs from VMware vSphere, oVirt, or OpenStack to KubeVirt. |
260+
| **Crane** | Kubernetes-to-Kubernetes migration tool for cluster upgrades or cross-distribution migrations. Handles PV data sync with Restic or VolSync. |
261+
262+
## Reference
263+
264+
- [Konveyor Official Documentation](https://konveyor.io/docs/konveyor/)
265+
- [Konveyor Admin Tasks](https://konveyor.io/docs/konveyor/admintasks/)
266+
- [Konveyor Operator Repository](https://github.com/konveyor/operator)

0 commit comments

Comments
 (0)