Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    2.  Tiller service should be updated to expose a nodeport

You can let K8S assign unused random port by changing the "type" from "ClusterIP" to "NodePort"  in the service definition.

Code Block
languagebash
themeMidnight
kubectl edit svc -n kube-system tiller-deploy -o yaml
# Assign an unused nodeport available in cluster

#After update K8S svc definition should reflect the node port assigned
#verify node port assignment 

kubectl get svc --all-namespaces | grep tiller
kube-system   tiller-deploy             ClusterIP      10.43.218.97   <none>                                44134/TCP                       5d

Installation

...

languagebash
themeMidnight

...


...


...

Example 

...

below 

...

of 

...

modified 

...

Note: Explanation of parameters are documented under CCSDK wiki page : Introduction of Helm Plugin.

...

Code Block
languagebash
themeMidnight
cfy blueprints validate  
cfy blueprints upload -b k8s-helm-test /blueprints/k8s-helm.yaml

...

languagebash
themeMidnight

...

tiller service with nodeport assigned to 32764

apiVersion: v1
kind: Service
metadata:
  creationTimestamp: "2019-11-12T17:48:22Z"
  labels:
    app: helm
    name: tiller
  name: tiller-deploy
  namespace: kube-system
  resourceVersion: "12675524"
  selfLink: /api/v1/namespaces/kube-system/services/tiller-deploy
  uid: 9ee66cde-0574-11ea-baf9-fa163e7033c0
spec:
  clusterIP: 10.43.128.185
  externalTrafficPolicy: Cluster
  ports:
  - name: tiller
    nodePort: 32764
    port: 44134
    protocol: TCP
    targetPort: tiller
  selector:
    app: helm
    name: tiller
  sessionAffinity: None
  type: NodePort
status:
  loadBalancer: {}



Installation


  1. Modify the blueprint templates 


    Code Block
    languagebash
    themeMidnight
    kubectl exec -it -n onap <dcae-bootstrap pod> /bin/bash
    cd blueprints
    ls k8s-helm.yaml k8s-helm-override.yaml
    # Helm Blueprint templates are available under this directory
    # Verify and update the blueprint parameters if required 
    # Create a corresponding input files 
    
    

    Note: Explanation of parameters are documented under CCSDK wiki page : Introduction of Helm Plugin.

  2. Create an input file with below parameters - /blueprints/k8s-helm-inputs.yaml

    Code Block
    themeMidnight
    firstline
    titleinput file
    tiller-server-ip: 10.12.7.116
    tiller-server-port: 32764
    namespace: onap
    chart-repo-url: https://nexus.onap.org/content/sites/oom-helm-staging
    chart-version : 3.0.0
    config-url: ''
    config-format: 'yaml'
    component-name: robot


  3. Validate blueprint into CM


    Code Block
    languagebash
    themeMidnight
    cfy blueprints validate  
    


  4. Deploy the blueprint


    Code Block
    languagebash
    themeMidnight
    cfy blueprints upload -b k8s-helm-test /blueprints/k8s-helm.yaml
    cfy deployments create -b k8s-helm-test k8s-helm-test
    cfy executions start -d k8s-helm-test install
    
    OR (do upload, create deploy and install on single command as below)
    
    cfy install -b k8s-helm-test -d k8s-helm-test -i /blueprints/k8s-helm-inputs.yaml /blueprints/k8s-helm.yaml
    
    Deployment Output
    
    [root@dev-dcaegen2-dcae-bootstrap-869957c7dc-kswcz /]# cfy install -b k8s-helm-test -d k8s-helm-test -i /blueprints/k8s-helm-inputs.yaml /blueprints/k8s-helm.yaml
    Uploading blueprint /blueprints/k8s-helm.yaml...
     k8s-helm.yaml |#######################################################| 100.0%
    Blueprint uploaded. The blueprint's id is k8s-helm-test
    Creating new deployment from blueprint k8s-helm-test...
    Deployment created. The deployment's id is k8s-helm-test
    Executing workflow install on deployment k8s-helm-test [timeout=900 seconds]
    Deployment environment creation is pending...
    2020-02-14 15:45:43.958  CFY <k8s-helm-test> Starting 'create_deployment_environment' workflow execution
    2020-02-14 15:45:44.553  CFY <k8s-helm-test> Installing deployment plugins
    2020-02-14 15:45:44.553  CFY <k8s-helm-test> Sending task 'cloudify_agent.operations.install_plugins'
    2020-02-14 15:45:44.553  CFY <k8s-helm-test> Task started 'cloudify_agent.operations.install_plugins'
    2020-02-14 15:45:45.196  LOG <k8s-helm-test> INFO: Installing plugin: helm-plugin
    2020-02-14 15:45:45.196  LOG <k8s-helm-test> INFO: Using existing installation of managed plugin: f827178d-d100-4129-a309-55a2939863b6 [package_name: helm, package_version: 4.0.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
    2020-02-14 15:45:45.196  CFY <k8s-helm-test> Task succeeded 'cloudify_agent.operations.install_plugins'
    2020-02-14 15:45:45.196  CFY <k8s-helm-test> Skipping starting deployment policy engine core - no policies defined
    2020-02-14 15:45:45.196  CFY <k8s-helm-test> Creating deployment work directory
    2020-02-14 15:45:45.863  CFY <k8s-helm-test> 'create_deployment_environment' workflow execution succeeded
    2020-02-14 15:45:48.029  CFY <k8s-helm-test> Starting 'install' workflow execution
    2020-02-14 15:45:48.608  CFY <k8s-helm-test> [dcaecomponent_kbvx8d] Creating node instance: nothing to do
    2020-02-14 15:45:48.608  CFY <k8s-helm-test> [dcaecomponent_kbvx8d] Configuring node instance
    2020-02-14 15:45:49.324  CFY <k8s-helm-test> [dcaecomponent_kbvx8d.configure] Sending task 'plugin.tasks.config'
    2020-02-14 15:45:53.638  CFY <k8s-helm-test> [dcaecomponent_kbvx8d.configure] Task succeeded 'plugin.tasks.config'
    2020-02-14 15:45:53.638  CFY <k8s-helm-test> [dcaecomponent_kbvx8d] Node instance configured
    2020-02-14 15:45:54.267  CFY <k8s-helm-test> [dcaecomponent_kbvx8d] Starting node instance
    2020-02-14 15:45:54.267  CFY <k8s-helm-test> [dcaecomponent_kbvx8d.start] Sending task 'plugin.tasks.start'
    2020-02-14 15:45:58.230  CFY <k8s-helm-test> [dcaecomponent_kbvx8d.start] Task succeeded 'plugin.tasks.start'
    2020-02-14 15:45:58.230  CFY <k8s-helm-test> [dcaecomponent_kbvx8d] Node instance started
    2020-02-14 15:45:58.946  CFY <k8s-helm-test> 'install' workflow execution succeeded
    Finished executing workflow install on deployment k8s-helm-test
    * Run 'cfy events list -e 74187dc8-480c-4b99-8ad9-10d8a5864bf3' to retrieve the execution's events/logs


  5. Validation


    Code Block
    languagebash
    themeMidnight
    # Verify if new NS identified in blueprint configuration is created
    kubectl get ns
    
    # Verify if required component was deployed 
    kubectl get pods -n <ns specified> 


...