Giter VIP home page Giter VIP logo

search-index-service's Introduction

Search Index Service

Deploy indices

Add mapping as a file ./indices/stage-alias-v1.0.0.index.json Add version history to ./indices/alias.versions.json

Senarios

  • No index
    • Creates new index
  • Existing index but different shard count
    • Creates new index and merge indices
  • Existing index and same shard count
    • Updates index mapping

Run deploy script

export stage_ES_Deployment_ClientCloudId=stage_ES_Deployment_ClientCloudId
export stage_ES_Deployment_Username=stage_ES_Deployment_Username
export stage_ES_Deployment_Password=stage_ES_Deployment_Password

./scripts/deploy-index.sh stage alias version

API Documentation

swagger

Error Codes Reference

master source

Get Started

  • npm 8.11.1 is expected.
npm i
npm run lint
npm t

Build & Deploy

Bitbucket Pipeline definitions ./bitbucket-pipelines.yml

Deploy to all environments

  • Triggered when pull request is merged to master branch
  • Manual trigger required when deploying to UAT and Prod

Deploy feature branch to dev environment

  • Go to Bitbucket Branches page
  • Click the "..." on the right side of the feature branch you want to deploy
  • Select "Run pipeline for branch"
  • Select custom: deploy-to-dev

Run Test

npm test run unit, integration and component test
npm run test:unit run unit test
npm run test:integration run integration test
npm run test:component run component test

Smoke Test

npm run test:smoke
# ENV defaults to uat; TAG to smoke, but can be passed in

npm run test:smoke <ENV> <TAG>
# ENV = uat | prod
# TAG = smoke, end2end, featureName

Config

When request goes into Lambda service, all configs load from AWS Secret Manager and save into global.config based on fields mapping in config.json

We are using convention based config and only store the environment difference in AWS Secret Manager, for example

dev api base url: https://dev-api.accordo.io/
uat api base url: https://uat-api.accordo.io/
prod api base url: https://api.accordo.io/

we only need to store

{ "apiPrefix": "dev-" } in dev secret manager
{ "apiPrefix": "uat-" } in uat secret manager
{ "apiPrefix": "" } in prod secret manager

and add 'apiPrefix' in config.json

to access above config in code use global.config.apiPrefix

Developers have access to Dev and Uat Secret Manager, talk to the Tech Lead if you need to add new config on production Secret Manager

search-index-service's People

Contributors

stefano-pietroiusti avatar

Watchers

 avatar

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.