KKIMS on-site docs
Start here

How to use this site

How the pages are organised, how search and the Linux / macOS / Windows switch work, and the conventions every page follows (placeholders, folders, checks).

This site is the on-site manual for deploying KIMS v2 (the KIMS Hospitals website and its CMS) on KIMS's own AWS account: always production, and a UAT environment first if KIMS wants one (that is still undecided; ask on the day). It is written for an engineer who is competent with Linux, Kubernetes and AWS but has never seen this project, and who may have little time to search the web while on site.

If you read only one page, read The order of work. It is the master checklist and links every other page in the order you need them.

#How the site is organised

#The sections

Section What it holds When you need it
start What KIMS v2 is, the order of work, the glossary, and this page Before anything else
workstation Installing and checking every tool on your laptop, for Linux, macOS and Windows, and getting the code Before you go on site
local The full rehearsal on your laptop: the same services, apps, site build and Helm chart, with Docker Before you go on site (strongly recommended)
aws Every AWS piece (check what KIMS has; create what it does not): access, networking, EKS, ECR, RDS, S3, IAM, certificates, CloudFront On site, with KIMS's infrastructure team
jenkins The agent, plugins, credentials and the two jobs on KIMS's Jenkins On site
keycloak The CMS client in KIMS's realm, sessions, users, revocation On site
google The Google Cloud project, the Translation API key, the reviews OAuth client, Tag Manager On site, often in parallel with other work
deploy The KIMS runbook: environments, configuration, Secrets, Helm values, first deploy, content load, website, acceptance, cutover, handover On site
operate Day two: upgrades, rollback, backups, troubleshooting, the deploy.mjs helper After go-live, and whenever something breaks

#Inside a page

Most pages follow the same shape:

  1. What it gets done, in one or two sentences.
  2. Before you start: what must already be done, and the values you need.
  3. Numbered steps. One action per step. Console steps name the exact menu path and button text.
  4. Check: a command and what it should print, or what the screen should show.
  5. If it goes wrong: the failures seen on this project and their fixes.
  6. Sources: the repository files and official documentation the page was written from.

#What the search box finds

Type in the search box at the top of every page. Two searches run together and their results are merged:

  • Keyword search finds exact words: commands (kubectl rollout status), variable names (KEYCLOAK_ISSUER), error text (EBADENGINE), file names (values-uat.example.yaml).
  • Meaning search finds a section by what it is about, even when you do not know the right words. For example "user disabled but still logged in" finds the back-channel logout section, and "site build cannot reach database" finds the network and security group sections.

Both run entirely in your browser, from this site. Search works with no outside service, so it keeps working on a site network that blocks most of the internet, once the page has loaded.

#Every section is its own result

Each page is split at its ## and ### headings, and each part is a separate search result. A result opens the page at that heading. If you search for an error message, paste the most distinctive part of it (for example An Application Control policy has blocked this file or buildWithParameters 400) rather than the whole line.

#Tips for searching

  • Search for the error text first, then for the tool name plus what you were doing ("helm upgrade timeout", "psql ssl").
  • Variable names are indexed exactly, so SECRETS_KEY finds every page that mentions it.
  • If a search finds nothing useful, try the glossary for the term, or the troubleshooting index.

#Choosing your operating system

#The Linux / macOS / Windows switch

Any step that differs between systems shows three tabs: Linux, macOS and Windows. Pick yours once; a search result for a command opens with the tab for the system it matched.

A step that is the same everywhere has no tabs. Run it as written in whichever shell you use.

#Which shell each tab means

Tab Shell the commands are written for Notes
Linux bash Also fine in zsh. Tested commands assume Ubuntu or Debian (apt) or a RHEL-family system (dnf); where they differ both are given
macOS zsh (the default since macOS 10.15) or bash Homebrew is assumed. Apple silicon (M1 and later) and Intel differ only where said
Windows PowerShell, unless the code block is labelled bash A bash block on Windows means Git Bash. Which shell to use explains when and why

If you are on Windows, read Windows notes before you start: several things that work on Linux and macOS behave differently there, and every one of them was hit on this project.

#Conventions

#Placeholders

A value you must replace is written in capitals inside angle brackets, for example <RDS_ENDPOINT>. Replace the whole thing, brackets included:

text
postgres://kims:<DB_PASSWORD>@<RDS_ENDPOINT>:5432/kims?sslmode=require

becomes, for example (the password shown here as a placeholder on purpose):

text
postgres://kims:<DB_PASSWORD>@kims-prod.abc123xyz.ap-south-2.rds.amazonaws.com:5432/kims?sslmode=require

The placeholders used most often across the site:

Placeholder Meaning Example
<ACCOUNT_ID> KIMS's 12-digit AWS account number 123456789012
<REGION> The AWS region of KIMS's EKS cluster ap-south-2 (Hyderabad, recommended) or ap-south-1 (Mumbai)
<NAMESPACE> The Kubernetes namespace for KIMS v2 kims (production), kims-uat (UAT)
<EKS_CLUSTER_NAME> KIMS's EKS cluster kims-eks
<REGISTRY> The image registry host 123456789012.dkr.ecr.ap-south-2.amazonaws.com
<RDS_ENDPOINT> The environment's RDS endpoint kims-prod.abc123xyz.ap-south-2.rds.amazonaws.com
<ASSETS_BUCKET>, <WEBSITE_BUCKET> The environment's two S3 buckets kims-hospitals-assets-prod, kims-hospitals-website-prod
<DISTRIBUTION_ID> The website's CloudFront distribution E1ABCDEF234567
<CMS_HOST> The CMS's host name cms.kims.example
<SITE_HOST> The public website's host name www.kims.example
<FOLDER> The environment's Jenkins folder kims-production or kims-uat
<KEYCLOAK_ISSUER> The realm's issuer URL https://sso.kims.example/realms/kims
<JENKINS_URL> KIMS's Jenkins https://jenkins.kims.example
<KIMS_GIT_URL> KIMS's Git repository for the code https://git.kims.example/kims-v2.git
<WORK> Your working folder on the laptop (see below) ~/kims or C:\Users\you\kims

The examples are invented. The real values come from KIMS: The order of work has the table of what to collect and from whom.

#No secrets on this site

This site never shows a password, token, API key or client secret, not even a test one. Where a command needs one, it is a placeholder such as <KEYCLOAK_CLIENT_SECRET>, and the page says how to pass it without leaving it in your shell history. Do the same in your own notes: keep real values in a password manager or a file outside Git, never in a chat, a ticket or a commit.

#The working folder

Every page assumes this layout on your laptop:

text
<WORK>/                               your working folder, for example ~/kims
  repos/kims-v2/                      the code (a Git clone)
  KIMS-v2-handover-2026-11-24/        the handover, extracted from the zip
    kims-v2.bundle                    the code as a git bundle
    data-bundle/                      the content and media to load
    KIMS-v2-On-site-deployment-runbook.docx
  deployment-steps/                   the engineer's notes and scripts/deploy.mjs (optional)

"From the repo" means with <WORK>/repos/kims-v2 as the current folder. Get the code sets this up.

Note

The handover folder keeps the name KIMS-v2-handover-2026-11-24 even though the zip it comes in is now called content-latest.zip. Only the zip's name changed on 2026-11-28.

#Commands and what they print

  • Each code block is one command, or a short group that is always run together.
  • "You should see" gives the output that means it worked. Version numbers in examples are the ones current when this was written (November 2026); yours may be newer.
  • Many tools (git, kubectl, npm, the migration runner) write progress to stderr. PowerShell colours stderr red and may wrap it in NativeCommandError even when the command worked. Judge by the last line and the exit code ($LASTEXITCODE in PowerShell, $? or echo $? in bash), not by the colour.

#Callouts

Note

Background worth knowing.

Warning

Something that breaks, or cannot be undone.

Tip

A shortcut.

File paths written as kims-v2/<path> are in the KIMS v2 repository, for example kims-v2/docs/CONFIG.md. They are background: every command you need is written out on the page itself.

#When this site and the code disagree

The code wins. The pages were written from the main branch of kims-v2 (commit 535cdc7, November 2026), which is what was handed over and what goes into KIMS's Git. If you find a difference, follow the code, and note it in the hand-over so the page can be fixed.

A separate branch, windows-fixes, holds extras for running the local rehearsal on Windows (a Windows-capable site build, --from-stage, KIMS_BUILD_WORKERS, and a few others). It is not merged into main. Where a page relies on one of those extras it carries a warning saying so, and what happens on main without it. Nothing on KIMS's infrastructure needs that branch.

The engineer's earlier notes (the kims/, local/ and shared/ folders beside this site) were written against an older commit, before production-from-main, the optional uat branch, the Jenkins folders and the kims-site-env credential existed. Where they disagree with this site, this site and main are right.

#Sources

  • kims-v2/CLAUDE.md
  • kims-v2/docs/ON-SITE-DEPLOYMENT.md
  • kims-deploy-info/README.md (the engineer's notes: layout, conventions, PowerShell stderr)
  • kims-deploy-info/shared/prerequisites.md
  • kims-deploy-info/docs-site/README.md (how search and OS blocks work)
Built 2026-11-29. Commands are shown for the system picked at the top; every block has all three.