Git Product home page Git Product logo

civil-unspecified-docker's Introduction

Unspecified civil claims customised version of CCD Docker ๐Ÿณ

Prerequisites

Memory and CPU allocations may need to be increased for successful execution of ccd applications altogether

Sync with ccd-docker

git pull [email protected]:hmcts/ccd-docker.git master

Quick start

Login to the Azure Container registry:

./ccd login

Note: if you experience any error with the above command, try az login first

Pulling latest Docker images:

./ccd compose pull

Creating and starting the containers:

./ccd compose up -d

Scripts to create test users and import CCD definitions are located in bin directory.

To add services:

 IDAM_ADMIN_USER=<enter email> IDAM_ADMIN_PASSWORD=<enter password> ./bin/add-services.sh

To add roles required to import ccd definition:

 IDAM_ADMIN_USER=<enter email> IDAM_ADMIN_PASSWORD=<enter password> ./bin/add-roles.sh

To add users:

./bin/add-users.sh

IDAM_ADMIN_USER and IDAM_ADMIN_PASSWORD details can be found on confluence.

To enable stubbing of the PROXY_PAYMENTS set the PROXY_PAYMENTS_STUB environment variable to the desired url.

Elastic search

Information

compose/elasticsearch.yml has been updated with latest image. For this to work the jursdiction will need to be added to the logstash repo: ccd-logastash.

To enable ElasticSearch compose run following:

./ccd backend dm-store sidam sidam-local sidam-local-ccd xui elasticsearch

Please see packer_images directory in the logstash repo and specific adoption files for further info.

When adding a CCD definition file elastic search indexes will be created. To verify, you can hit the elastic search api directly on localhost:9200 with the following command. It will return all stored indexes.

curl -X GET http://localhost:9200/jurisdiction_cases

The following command will return all cases currently indexed.

 curl -X GET http://localhost:9200/jurisdiction_cases/_search

Note: if you start elastic search after having existing cases, these cases will not be searchable using ES.


CoreCaseDataApi Elastic Search Endpoint

You can search on local envs using this endpoint: localhost:4452/searchCases?ctid=case_type

An example of a JSON search query which would return any cases where the reference is 1234:

{
    "query": {
        "match" : {
          "reference" : "1234"
        }
    }
}

Please see ES docs - start searching for more examples of search queries.

Example curl:

curl --location --request POST 'localhost:4452/searchCases?ctid=case_type' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth-token> \
--header 'ServiceAuthorization: <service-auth-token> \
--data-raw '{
  "query": {
    "match" : {
      "reference" : "1234"
    }
  }
}'

Example response:

{
    "total": 1,
    "cases": [
        {
            "id": 1234,
            "jurisdiction": "jurisdiction",
            "state": "Open",
            "version": null,
            "case_type_id": "case_type",
            "created_date": "2020-03-09T16:05:01.742",
            "last_modified": "2020-03-09T16:05:01.745",
            "security_classification": "PUBLIC",
            "case_data": {},
            "data_classification": {
                "creatorId": "PUBLIC"
            },
            "after_submit_callback_response": null,
            "callback_response_status_code": null,
            "callback_response_status": null,
            "delete_draft_response_status_code": null,
            "delete_draft_response_status": null,
            "security_classifications": {
                "creatorId": "PUBLIC"
            }
        }
    ]
}

Camunda

Camunda is part of defaults.conf file, so it is enabled by default.

To enable the compose file manually run the following:

./ccd enable backend dm-store sidam sidam-local sidam-local-ccd xui camunda

Camunda is available at http://localhost:9404/. To login into the cockpit application use:

username: demo

password: demo

Within Cockpit you can find information around deployed processes.

The easiest way to deploy a process is via the Camunda Modeler and setting the REST endpoint value to http://localhost:9404/engine-rest. However this can also be done via the REST API. You can find full documentation of the REST API here.


Idam Stub

Prerequisites:

Add following line to your /etc/hosts:

127.0.0.1	ccd-test-stubs-service

Enable stub

To use Idam stub instead of real service follow the steps:

  • Make sure you are in root directory (civil-unspecified-docker)
  • Run the command to enable stub and rebuild local environment:
export IDAM_STUB_ENABLED=true && ./bin/toggle-idam-stub.sh
  • Run unspec-service with profiles:
spring.profiles.active=local,idam-stub

If you want to run functional tests in new terminal tab, the env variable needs to be re-exported or added to ~/.zshrc file:

export IDAM_STUB_ENABLED=true

Switching back to real Idam

  • Run the command to disable stub and rebuild local environment:
unset IDAM_STUB_ENABLED && ./bin/toggle-idam-stub.sh
  • Run unspec-service with the following profiles:
spring.profiles.active=local

This project should aim to keep upto date with the base CCD Docker project

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.