Migrating Krateo PlatformOps from v2.4.3 to v2.5.0 (AKS example)
Krateo 2.5.0 introduces a new set of manifests to declare widgets in the portal. The difference with the previous version resides in the following:
- API orchestration has been decoupled from the data preparation for the portal. This assumption requires implementing a RESTAction that the widget will reference
- New widgets are strongly typified, meaning that there is a specific Kind for a particular widget, and properties are expressed in the dedicated CRD
The schema for widgets until the 2.4.3 version is the following:
apiVersion: templates.krateo.io/v1alpha1
kind: Collection
spec:
type: panel
propsRef:
widgetsRefs: []
---
apiVersion: templates.krateo.io/v1alpha1
kind: Widget
spec:
type:
propsRef:
app:
template:
API: []
actions: []
The schema for widget from 2.5.0 version is the following:
kind: LineChart
apiVersion: widgets.templates.krateo.io/v1beta1
spec:
widgetData:
apiRef:
widgetDataTemplate: []
resourcesRefs: []
resourcesRefsTemplate: []
Updated schemas for the new frontend are collected here: https://github.com/krateoplatformops/frontend-chart/tree/main/chart/crds
Starting point: Krateo 2.4.3, Fireworksapp compositiondefinition 1.1.15, fireworksapp-tomigrate composition
Krateo 2.4.3 has been installed on AKS in the following way:
helm upgrade installer installer \
--repo https://charts.krateo.io \
--namespace krateo-system \
--create-namespace \
--set krateoplatformops.service.type=LoadBalancer \
--set krateoplatformops.service.externalIpAvailable=true \
--install \
--version 2.4.3 \
--wait
This is the login
page of Krateo 2.4.3:
This is the dashboard
page of an empty Krateo 2.4.3 installation:
Let's apply a Fireworksapp compositiondefinition
version 1.1.15: https://github.com/krateoplatformops/krateo-v2-template-fireworksapp, follow instruction for Krateo version 2.4.3 or lower
This is the dashboard
page of Krateo 2.4.3 installation with the installed compositiondefinition
with status Ready:False
:
This is the dashboard
page of Krateo 2.4.3 installation with the install compositiondefinition
that, after a while,e has status Ready:True
:
Moving to the template
page of Krateo 2.4.3 installation, a Card is available:
Let's click on the Card to open the Drawer with the CustomForm:
Let's fill the form:
Krateo automatically opens the compositions
page once the fireworksapp-tomigrate
composition is created:
Let's navigate the fireworksapp-tomigrate
composition widgets:
This is the dashboard
page of Krateo 2.4.3 installation with the installed fireworksapp-tomigrate
composition:
Scale Krateo 2.4.3 core-provider to zero replicas
kubectl scale deployment core-provider --replicas=0 -n krateo-system
Scale Krateo 2.4.3 oasgen-provider to zero replicas
kubectl scale deployment oasgen-provider --replicas=0 -n krateo-system
Ending point: Krateo 2.5.0, Fireworksapp compositiondefinition 2.0.2 (version changed within the same compositiondefinition, previous fireworksapp-tomigrate composition
A parallel installation of Krateo 2.5.0 has been installed on AKS in the following way:
git clone --branch 249-prepare-release-250 https://github.com/krateoplatformops/installer-chart.git
cd installer-chart
helm install installer-v2 ./chart --namespace krateo-v2-system --create-namespace -f ./chart/values.yaml --wait
Scale Krateo 2.5.0 core-provider to zero replicas
kubectl scale deployment core-provider --replicas=0 -n krateo-v2-system
Scale Krateo 2.4.3 core-provider to one replica
kubectl scale deployment core-provider --replicas=1 -n krateo-system
This is the login
page of Krateo 2.5.0:
This is the dashboard
page of a Krateo 2.5.0 installation:
Let's configure Krateo 2.5.0 for Fireworksapp compositiondefinition
version 2.0.2: https://github.com/krateoplatformops/krateo-v2-template-fireworksapp, follow instruction for Krateo >= 2.5.0
Let's navigate the compositions
page of Krateo 2.5.0 - it is empty since the composition fireworksapp-tomigrate
has not been migrated yet:
Let's migrate the composition, changing the Fireworksapp compositiondefinition
version from 1.1.15 to 2.0.2:
cat <<EOF | kubectl apply -f -
apiVersion: core.krateo.io/v1alpha1
kind: CompositionDefinition
metadata:
name: fireworksapp
namespace: fireworksapp-system
spec:
chart:
repo: fireworks-app
url: https://charts.krateo.io
version: 2.0.2
EOF
Let's navigate again the compositions
page of Krateo 2.5.0 - now the composition fireworksapp-tomigrate
is migrated:
Let's navigate the fireworksapp-tomigrate
composition widgets:
The composition fireworksapp-tomigrate
has been migrated.
What has changed in the Fireworksapp helm chart from 1.1.15 to 2.0.2 version
We have changed the dependency,
- from: https://github.com/krateoplatformops/krateo-v2-template-fireworksapp/blob/1.1.15/chart/Chart.yaml#L27-L32
- to: https://github.com/krateoplatformops/krateo-v2-template-fireworksapp/blob/2.0.2/chart/Chart.yaml#L20-L24
We have released a new Helm Chart that collects Krateo 2.5.0 new portal widgets which is called composable-portal-starter
.