Skip to content

Automated CD - api, importer #29438

Closed
Closed

Description

@kialj876

The automated CD is running, but a few things need to be updated before it fully works.

Files to update (1pass will need to be updated accordingly):

  • https://github.com/bcgov/namex-search/blob/main/namex-solr-api/devops/vaults.gcp.env
    • needs values added somewhere in 1pass and reference added:
      • GUNICORN_THREADS set to 5
      • GUNICORN_THREADS set to 1
      • SOLR_SVC_NAMEX_LEADER_CORE set to name_request
      • SOLR_SVC_NAMEX_FOLLOWER_CORE set to name_request in DEV, name_request_follower in TEST/PROD
      • SOLR_SVC_NAMEX_LEADER_URL (see api in dev for value)
      • SOLR_SVC_NAMEX_FOLLOWER_URL (see api in dev for value)
      • VPC_CONNECTOR set to namex-solr-connector-dev
    • remove SOLR_SVC_BUS_... references (they will be replaced by above, I added them as placeholders)
  • https://github.com/bcgov/namex-search/blob/main/namex-solr-importer/devops/vaults.ocp.env
    • need to add the missing vaults and variables in 1pass (the ones I put in are suggestions, you can put the variables where you want in 1pass and update the references in this file)
    • everything that references the registries-search or bor vaults should be changed to 'op://solr/$APP_ENV/namex-search/...' and added in 1pass (or wherever you decide to put these variables)

Activity

  1. added
    Names Team
    on Jul 9, 2025
  2. self-assigned this
    on Jul 15, 2025
  3. ahamood1 commented on Jul 16, 2025

    @ahamood1

    Pre-Implementation Questions:

    /bcgov/namex-search

    Questions:

    1. SOLR_SVC_NAMEX_LEADER_URL not fond.
    2. SOLR_SVC_NAMEX_FOLLOWER_URL not found.
    3. What are your thoughts of adding the values required for namex-search in the ticket to namex in a namex-search category?

    /bcgov/namex-search

    Index Variable Status
    1 SOLR_API_URL=op://API/$APP_ENV/namex-solr-api/API_URL ❌
    2 INCLUDE_NAMEX_LOAD=op://solr/$APP_ENV/namex-search/INCLUDE_NAMEX_LOAD ❌
    3 INCLUDE_SYNONYM_LOAD=op://solr/$APP_ENV/namex-search/INCLUDE_SYNONYM_LOAD ❌
    4 IGNORED_LEGAL_TYPES=op://solr/$APP_ENV/namex-search/IGNORED_LEGAL_TYPES ❌
    5 DATABASE_CONNECTION_NAME=op://database/$APP_ENV/namex-db-gcp/DATABASE_CONNECTION_NAME ❌
    6 MODERNIZED_LEGAL_TYPES=op://bor/$APP_ENV/bor/MODERNIZED_LEGAL_TYPES ⚠️

    Questions:

    1. Index 6: no match found for .../bor/... but full path match if .../bor/... is replaced with .../BOR-SOLR-IMPORTER/.... Is it a typo?
    2. Index 1 - 5: no such vault ...//solr/...
      1. Should we make a solr vault? Can we consolidate other solr specific variables to this vault? or
      2. We create a solr category in namex?

    Notes:

    1. I am leaning towards putting these variables in the Namex vault because my impression is that this service is tightly coupled with the Namex API.
    2. If there are parts of this repository that are more general, then I would recommend creating a new vault.
    3. Other consideration: we can create a standalone vault if fine-grained access control is recommended for the nature of these secrets.
  4. kialj876 commented on Jul 17, 2025

    @kialj876
    CollaboratorAuthor

    1st set of questions:
    3: Yeah that works. Wherever you think will be intuitive for you and your team. I put in the paths to 'registries-search' so you can see how I split it up (all of those will need to be changed to wherever you put the namex-search ones). I would split up the solr api config vs solr config vs the importer specific config into their own sections (i.e. SOLR_SVC_LEADER_URL vs MAX_BATCH_UPDATE_NUM vs SOLR_BATCH_UPDATE_SIZE)

    2nd set of questions:

    1. yes that is a typo. Please update it accordingly (I think BOR-SOLR-IMPORTER should be lower case though not upper case)
    2. Either way works. I was thinking a solr vault would be nice because all the solr apis / importers have similar 1pass values so we could slowly move them all into there and then if we do major solr updates that require new values across all the solr services its easier. That would be rare though, so keeping them in their own projects under sections is good too
  5. ahamood1 commented on Jul 29, 2025

    @ahamood1

    Implementation:

    Make the following variables in the namex vault:
    op//namex/$APP_ENV/

    • solr-api-config/
      ↳ GUNICORN_THREADS = 5
      ↳ GUNICORN_PROCESSES = 1 # Typically I see 2 for this value.
      ↳ SOLR_SVC_NAMEX_LEADER_CORE = name_request
      ↳ SOLR_SVC_NAMEX_FOLLOWER_CORE = name_request # name_request_follower test and prod
      ↳ VPC_CONNECTOR = namex-solr-connector-dev
      ↳ SOLR_SVC_NAMEX_LEADER_URL = # Could not find this in api dev
      ↳ SOLR_SVC_NAMEX_FOLLOWER_URL = # Could not find this in api dev
      ↳ MAX_BATCH_UPDATE_NUM = see current .env
      ↳ LAST_REPLICATION_THRESHOLD = see current .env
      ↳ MAX_BULK_SEARCH_VALUES = see current .env
      ↳ SOLR_RETRY_TOTAL = see current .env
      ↳ SOLR_RETRY_BACKOFF_FACTOR = see current .env
    • solr-config/
      ↳
    • solr-importer-config/
      ↳

    No change needed for the once below:

    ✅ AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL"
    ✅ AUTH_API_VERSION="op://API/$APP_ENV/auth-api/AUTH_API_VERSION"
    ✅ DATABASE_NAME="op://database/$APP_ENV/namex-solr-db/DATABASE_NAME"
    ✅ DATABASE_USERNAME="op://database/$APP_ENV/namex-db-gcp/DATABASE_USERNAME"
    ✅ DATABASE_PASSWORD="op://database/$APP_ENV/namex-db-gcp/DATABASE_PASSWORD"
    ✅ DATABASE_PORT="op://database/$APP_ENV/namex-db-gcp/DATABASE_PORT"
    ✅ DATABASE_UNIX_SOCKET="op://database/$APP_ENV/namex-db-gcp/DATABASE_UNIX_SOCKET"
    ✅ JWT_OIDC_WELL_KNOWN_CONFIG="op://keycloak/$APP_ENV/jwt-base/JWT_OIDC_WELL_KNOWN_CONFIG"
    ✅ JWT_OIDC_ALGORITHMS="op://keycloak/$APP_ENV/jwt-base/JWT_OIDC_ALGORITHMS"
    ✅ JWT_OIDC_ISSUER="op://keycloak/$APP_ENV/jwt-base/JWT_OIDC_ISSUER"
    ✅ JWT_OIDC_AUDIENCE="op://keycloak/$APP_ENV/namex/NAMEX_SERVICE_ACCOUNT_CLIENT_ID"
    ✅ JWT_OIDC_CACHING_ENABLED="op://keycloak/$APP_ENV/jwt-base/JWT_OIDC_CACHING_ENABLED"
    ✅ JWT_OIDC_TOKEN_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_TOKEN_URL"
    ✅ JWT_OIDC_JWKS_CACHE_TIMEOUT="op://keycloak/$APP_ENV/jwt-base/JWT_OIDC_JWKS_CACHE_TIMEOUT"
    ✅ ACCOUNT_SVC_AUTH_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_TOKEN_URL"
    ✅ ACCOUNT_SVC_CLIENT_ID="op://keycloak/$APP_ENV/namex-solr-service-account/NAMEX_SOLR_SERVICE_ACCOUNT_CLIENT_ID"
    ✅ ACCOUNT_SVC_CLIENT_SECRET="op://keycloak/$APP_ENV/namex-solr-service-account/NAMEX_SOLR_SERVICE_ACCOUNT_CLIENT_SECRET"
    ✅ VPC_CONNECTOR="op://CD/$APP_ENV/base/VPC_CONNECTOR"
    
  6. ahamood1 commented on Jul 31, 2025

    @ahamood1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Names Team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions