Skip to content

hmcts/chart-ccd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

chart-ccd

Build Status

Table of Contents

Introduction

Helm product chart for Core Case Data (CCD)

This chart installs CCD as a self contained product. By default only one database is installed which will be shared between CCD services and dependent services.

Features:

  • back-ends only deployment (default)
  • back-ends and front-ends deployment
  • back-ends, front-ends and dependent services deployment
  • can be used standalone or included in other charts
  • supports deploy on multiple environment e.g. Demo, Preview
  • supports deploy of multiple instances of CCD under the same namespace or different namespaces
  • out of the box user profiles and definition setup

Default Services:

Optional Services:

(*) services owned by CCD
(**) currently disabled due to chart inconsistencies

Configurable Variables

Parameter Description Mandatory Global
idamWebUrl url of Idam Web true true
idamApiUrl url of Idam Api true true
ccdAdminWebIngress url of CCD Admin Web true true
ccdApiGatewayIngress url of CCD API Gateway true when frontend enabled true
devMode CCD backend apps require APPINSIGHTS_INSTRUMENTATIONKEY configuration property. Setting devMode to true provides this transparently. true true

Configuration

Demo - secrets

When deploying on a vault-less environment like Demo, secrets must be provided in the form of sealed secrets in the flux config. For reference, the sealed secrets required by this chart can be found at:
https://github.com/hmcts/cnp-flux-config/tree/master/k8s/demo/common/ccd/sealed-secrets

To use this chart on a certain namespace, all the required sealed secrets must be separately provided. It's currently not possible to just copy the CCD ones because the namespace we used to generate them is part of the encryption (that might change in the future).

CCD sealed secrets can be generated by using the following script:
https://github.com/hmcts/cnp-flux-config/blob/master/k8s/demo/common/ccd/bin/vault-to-sealedsecret.sh

Demo - default services

    global:
      idamApiUrl: https://idam-api.demo.platform.hmcts.net
      idamWebUrl: https://idam-web-public.demo.platform.hmcts.net
      ccdAdminWebIngress: ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
      devMode: true

    ccd-admin-web:
      nodejs:
        ingressClass: traefik-no-proxy
        ingressHost: ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
        secrets:
          IDAM_OAUTH2_AW_CLIENT_SECRET:
            disabled: false

    #importers are enabled by default. Make sure you properly configure them or else explicitly disable them           
    ccd-user-profile-importer:
      users:
       - auto.test.cnp@gmail.com|AUTOTEST1|AAT|TODO
    
    ccd-definition-importer:
      definitions:
       - https://github.com/hmcts/ccd-definition-store-api/raw/master/aat/src/resource/CCD_CNP_27.xlsx
      userRoles:
       - caseworker-autotest1 

Demo - default services and frontend

    ccd:  
      apiGatewayWeb:
        enabled: true

    global:
      idamApiUrl: https://idam-api.demo.platform.hmcts.net
      idamWebUrl: https://idam-web-public.demo.platform.hmcts.net
      ccdAdminWebIngress: ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
      ccdApiGatewayIngress: gateway-{{ .Release.Name }}.demo.platform.hmcts.net
      devMode: true
      
    ccd-admin-web:
      nodejs:
        ingressClass: traefik-no-proxy
        ingressHost: ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
        secrets:
          IDAM_OAUTH2_AW_CLIENT_SECRET:
            disabled: false
    
    ccd-api-gateway-web:
      nodejs:
        ingressClass: traefik-no-proxy
        ingressHost: gateway-{{ .Release.Name }}.demo.platform.hmcts.net
        secrets:
          IDAM_OAUTH2_CLIENT_SECRET:
            disabled: false

    #importers are enabled by default. Make sure you properly configure them or else explicitly disable them           
    ccd-user-profile-importer:
      users:
       - auto.test.cnp@gmail.com|AUTOTEST1|AAT|TODO
    
    ccd-definition-importer:
      definitions:
       - https://github.com/hmcts/ccd-definition-store-api/raw/master/aat/src/resource/CCD_CNP_27.xlsx
      userRoles:
       - caseworker-autotest1

Demo - default services, frontend and dependent services

Note: Payment API and some other services are currently disabled

    ccd:  
      apiGatewayWeb:
        enabled: true
      emAnnotation:
        enabled: true
      draftStore:
        enabled: true
      dmStore:
        enabled: true
      activityApi:
        enabled: true
      blobstorage:
        enabled: true
      printService:
        enabled: true

    global:
      idamApiUrl: https://idam-api.demo.platform.hmcts.net
      idamWebUrl: https://idam-web-public.demo.platform.hmcts.net
      ccdAdminWebIngress: ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
      ccdApiGatewayIngress: gateway-{{ .Release.Name }}.demo.platform.hmcts.net
      devMode: true
      
    ccd-admin-web:
      nodejs:
        ingressClass: traefik-no-proxy
        ingressHost: ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
        secrets:
          IDAM_OAUTH2_AW_CLIENT_SECRET:
            disabled: false
    
    ccd-api-gateway-web:
      nodejs:
        ingressClass: traefik-no-proxy
        ingressHost: gateway-{{ .Release.Name }}.demo.platform.hmcts.net
        secrets:
          IDAM_OAUTH2_CLIENT_SECRET:
            disabled: false
            
    #importers are enabled by default. Make sure you properly configure them or else explicitly disable them           
    ccd-user-profile-importer:
      users:
       - auto.test.cnp@gmail.com|AUTOTEST1|AAT|TODO
       
    ccd-definition-importer:
      definitions:
       - https://github.com/hmcts/ccd-definition-store-api/raw/master/aat/src/resource/CCD_CNP_27.xlsx
      userRoles:
       - caseworker-autotest1     
          

Enabling upload history on Admin Web

In the configurations above the history of definition uploads in CCD Admin Web, shown here, is disabled. To enable it, use the following configuration:

    blobstorage:
        enabled: true
        
    ccd-definition-store-api:
      java:
        secrets:
          STORAGE_ACCOUNT_NAME:
            disabled: false
          STORAGE_ACCOUNT_KEY:
            disabled: false
        environment:
          AZURE_STORAGE_DEFINITION_UPLOAD_ENABLED: true

Note: blobstorage is used also for other purposes so it might already be enabled on some configs

Migrating to latest version of logstash Helm chart

In the old version Image and tag are referenced as

logstash:
  image:
    repository: hmctspublic.azurecr.io/ccd/logstash
    tag: latest
    pullPolicy: IfNotPresent

In latest version they are referenced as

  logstash:
    image: hmctspublic.azurecr.io/imported/logstash/logstash
    imageTag: 8.5.1
    imagePullPolicy: "IfNotPresent"
    logstashJavaOpts: -Xmx1g -Xms512M

Note: For a full list of values that can be used, refer to logstash documentation.

Setup user profiles and ccd definitions

This chart provides two ways of setting up user profiles and importing definitions into CCD

While the importers are useful to create some initial desired setup at deploy time, the Admin Web allows to import additional definitions later on

Importers

By default the chart will deploy some helper pods called importers. These are used to setup specified definitions and user profiles at deploy time. Make sure you properly configure them or else disable them.

  • user profile importer setup example:

    ccd-user-profile-importer:
        users:
          - <USER_ID>|<JURISDICTION>|<CASE_TYPE>|<CASE_STATE>
    
  • ccd definition importer setup example:

    ccd-definition-importer:
        definitions:
          - <DEFINITIION_FILE_URL>
        userRoles:
          - <USER_ROLES>
    

For more advanced configuration refer to the importers documentation:

The configuration examples in this guide will import a simple test definition and setup a test user 'auto.test.cnp@gmail.com':

ccd-user-profile-importer:
    users:
      - auto.test.cnp@gmail.com|AUTOTEST1|AAT|TODO
ccd-definition-importer:
    definitions:
      - https://github.com/hmcts/ccd-definition-store-api/raw/master/aat/src/resource/CCD_CNP_27.xlsx
    userRoles:
      - caseworker-autotest1

Admin Web

Admin Web Definition file import

  • Open the Admin Web in a web browser, and login with the test credential (ask CCD team). You can log in to Admin Web at the following url:

    https://ccd-admin-{{ .Release.Name }}.demo.platform.hmcts.net
    
  • Click on Import Case Definition to navigate to the importer section.

Admin web import

  • Click on the Choose file button and select a definition file from the file menu.

File menu

File chosen

  • Press the Submit button.
  • The message Case Definition data successfully imported is displayed if the definition file is successfully imported.
  • A record is added to the import audit table.

Import successful

Admin Web Create User Profile

  • In admin web, click on the Manage User Profiles link.

Profile home

  • Select a jurisdiction.
  • Click on the Submit button.

Profile home

  • Click the Create User button

Profile home

  • Enter the User idam ID. Select the default jurisdiction, case type and case state.
  • Click the Create button
  • Verify that the user profile has been created.

Profile home

Ready for take-off πŸ›«

You can log in to CCD UI at the following url:

https://www-{{ .Release.Name }}.demo.platform.hmcts.net

Ask CCD team for the default test user credentials if you want to do a quick sanity check that the installation is successful. You can use the test case type installed by the importers specified in the example configurations