DCAE MOD Flow for Helm Flow (Jakarta)
- 1 Helm Flow Pre-requisite
- 2 MOD Updates
- 2.1 Specification Schema Change
- 2.2 MOD/RuntimeAPI
- 2.2.1 Build Updates
- 2.2.2 Chart Updates
- 2.2.3 Deployment
- 3 DEMO STEPS
- 3.1 1. Chartmuseum Installation
- 3.1.1 Chartmuseum Deployment
- 3.1.2 Nodeport Enablelment
- 3.2 2. Chartmuseum initialization
- 3.3 3. MOD Deployments and Configuration
- 3.3.1 Deploy MOD
- 3.3.2 Configuring DCAE mod
- 3.4 4. Load V3 specs (and data-formats) via Onboarding API
- 3.5 5. Create flow Design using using VES and TCAgen2
- 3.6 6. Distribute the flow to RuntimeAPI
- 3.7 7. Validation and Deployment
- 3.8 8. Environment Cleanup
- 3.8.1 Demo Env Cleanup
- 3.1 1. Chartmuseum Installation
Demo recording and slides are availabe at : 2022-02-22 DCAE Meeting Notes
Helm Flow Pre-requisite
An accessible ChartMuseum registry (internal or external)
As the prrovided registry is used both to pull required dependencies and push new generated charts, all common charts used by DCAE components must be available in this registry.
ONAP deployments (gating) will include Chartmuseum installation within ONAP cluster (charts hosted here - https://github.com/onap/oom/tree/master/kubernetes/platform/components/chartmuseum).
Dependent charts such as - dcaegen2-services-common, readinessCheck, common, repositoryGenerator, postgres, mongo, serviceAccount, certInitializer should be preloaded into this registry as MOD retrieves them during new MS helm charts creation and linting. To support the registry initialization, following scripts has been introduced.
https://github.com/onap/oom/blob/master/kubernetes/contrib/tools/registry-initialize.sh
https://github.com/onap/oom/blob/master/kubernetes/robot/demo-k8s.sh
Note: Chartmuseum being a platform component, it has to be enabled on-demand and not available with generic ONAP installation. To setup chartmuseum and pre-load required charts, follow the ommands listed below in this page)
MOD Updates
To support the Helm chart generation, following changes were introduced for MOD in Jakarta release
Specification Schema Change
New V3 version of component spec schema introduced - https://github.com/onap/dcaegen2-platform/blob/master/mod/component-json-schemas/component-specification/dcae-cli-v3/component-spec-schema.json
Added new “helm” object under “auxilary_docker” properties
Includes “applicationEnv”
Includes “service” definition
Readiness Configuration support
docker_healthcheck_http
Added HTTP/HTTPS for supported protocol enum list
Added “port”
Added “initialDelaySeconds”
docker_healthcheck_script
Added “initialDelaySeconds”
MOD/RuntimeAPI
Build Updates
New Java module - Helmgenerator-core was introduced for Helm charts generation. MOD/Runtime has been enhanced to include this new dependency (inaddition to Bp-generator for supporting cloudify blueprints flows).
Below is snippet from - https://github.com/onap/dcaegen2-platform/blob/master/mod/runtimeapi/runtime-core/pom.xml
Chart Updates
MOD/Runtime Charts has been modified to include under resources, common base templates, Charts.yaml, add-on templates and Values.yaml with placeholder.
The Helmgenerator-core modules uses these template to pull the required dependencies and generate new chart for MS onboarded. The parameters in component-spec provided during onboarding is used for final Values.yaml file generation.
Deployment
The MOD/RuntimeAPI introduces new configuration to identify distribution mechanism. Supported artifactType are BLUEPRINT or HELM.
Blueprint – Distribution to Inventory/Dashboard
Helm – Distribution to ChartMuseum
For Jakarta release, the charts configuration has been set to support HELM distribution by default and configured for ONAP-internal chart-museum registry. RuntimeAPI Chart updates https://github.com/onap/oom/blob/master/kubernetes/dcaemod/components/dcaemod-runtime-api/values.yaml
DEMO STEPS
Below is summary of the steps involved.
Chartmuseum Installation
Chartmuseum initialization (pre-load required dependencies)
Deploy MOD and define registry/target on UI
Load v3 specs via OnboardingAPI
Create flow on MOD Designer tool using VES and TCAgen2
Distribution to Runtime
Validation and Deployment
1. Chartmuseum Installation
Clone OOM repository and deploy optional Chartmuseum component
Chartmuseum Deployment
# git clone -b <BRANCH> http://gerrit.onap.org/r/oom --recurse-submodules
cd ~/oom/kubernetes/platform/components/chartmuseum
helm install -name dev-chartmuseum -n onap . --set global.masterPassword=test1 --set global.pullPolicy=IfNotPresent
For easier validation of the charts in registry, you may enable the Nodeport for the chartmuseum service via kubectl (kubectl edit svc -n onap chart-museum) and provide Nodeport
Nodeport Enablelment
ports:
- name: http
nodePort: 30192
port: 80
protocol: TCP
targetPort: http
selector:
app.kubernetes.io/instance: chartmuseum
app.kubernetes.io/name: chartmuseum
sessionAffinity: None
type: NodePort
Once enabled, you can view the registry via browser - http://<k8snodeip>:30192/api/charts
Note: This chartmuseum registry is deployed internal to ONAP cluster and is different from the registry setup done part OOM (https://docs.onap.org/projects/onap-oom/en/latest/oom_quickstart_guide.html : step 6) to setup local helm server for serving chart and to push the charts generated from local make/build.