{"id":27998195,"url":"https://github.com/alphagov/paas-admin","last_synced_at":"2025-05-08T22:50:43.109Z","repository":{"id":37430863,"uuid":"113037599","full_name":"alphagov/paas-admin","owner":"alphagov","description":"Administration tool for GOV.UK PaaS","archived":false,"fork":false,"pushed_at":"2025-04-28T10:16:48.000Z","size":161201,"stargazers_count":18,"open_issues_count":20,"forks_count":9,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-28T10:49:47.313Z","etag":null,"topics":["cloud-foundry","node","paas","reliability-engineering","typescript","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alphagov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-04T12:07:40.000Z","updated_at":"2025-04-28T09:46:51.000Z","dependencies_parsed_at":"2023-10-12T15:31:35.968Z","dependency_job_id":"3c92350e-f480-49ad-9ff9-a63ee4e7c303","html_url":"https://github.com/alphagov/paas-admin","commit_stats":null,"previous_names":[],"tags_count":8185,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphagov","download_url":"https://codeload.github.com/alphagov/paas-admin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160827,"owners_count":21863624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-foundry","node","paas","reliability-engineering","typescript","webpack"],"created_at":"2025-05-08T22:50:42.123Z","updated_at":"2025-05-08T22:50:43.101Z","avatar_url":"https://github.com/alphagov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GOV.UK PaaS Admin\n\n⚠️\nWhen merging pull requests,\nplease use the [gds-cli](https://github.com/alphagov/gds-cli)\nor [github_merge_sign](https://rubygems.org/gems/github_merge_sign)\n⚠️\n\n## Overview\n\nA web UI for interacting with GOV.UK PaaS (CloudFoundry).\n\nIt aims to be a progressive enhanced, well tested and user researched tool that\ntenants can use to complement their use of the CLI.\n\n## Usage\n\n```sh\nnpm run build              # compile the build to ./dist\nnpm run test               # run all the tests and linters\nnpm run test:unit          # only unit tests\nnpm run lint               # run code linters\nnpm run fix                # try to autofix problems with js/css\nnpm run start              # rebuild and start the server\nnpm run push               # rebuild and push to cloudfoundry\nnpm run clean              # destroy the ./dist build dir\n```\n\n## Prerequisites\n\nYou will need to add a UAA client to your CloudFoundry deployment manifest, for example:\n\n```yaml\npaas-admin:\n  override: true\n  authorized-grant-types: authorization_code,client_credentials,refresh_token\n  autoapprove: true\n  secret: [CF_CLIENT_SECRET]\n  scope: cloud_controller.read,cloud_controller.admin_read_only,cloud_controller.global_auditor,cloud_controller.write,scim.me,openid,profile,uaa.user,cloud_controller.admincloud_controller.read,cloud_controller.admin_read_only,cloud_controller.global_auditor,cloud_controller.write,scim.me,openid,profile,uaa.user,cloud_controller.admin\n  authorities: scim.userids,scim.invite,scim.read\n  redirect-uri: \"https://[pass-admin-domain.com]/auth/login/callback\"\n```\n\nIf you get problems with \"Invalid redirect\", use uaac to modify the\nredirect-uri:\n\n```\nuaac target https://uaa.my.environment\nuaac token client get admin -s my-uaa-admin-client-secret\nuaac client update paas-admin --redirect-uri http://localhost:3000/auth/login/callback\n```\n\n## Requirements\n\n* [Node.js](https://nodejs.org/en/) version `~ 14` LTS - consider using\n  [NVM](https://github.com/creationix/nvm) (`nvm use` in this repo) for version\nmanagement\n* [npm](https://www.npmjs.com/) versions `\u003e 7.x.x`\n\n## Getting Started\n\nClone this repository and then use `npm` to install the project dependencies:\n\n```sh\nnpm install\n```\n\nExecute the unit tests to ensure everything looks good:\n\n```sh\nnpm test\n```\n\nExecuting the acceptance tests against dev environment:\n\n```sh\nexport PAAS_ADMIN_BASE_URL=https://admin.${DEPLOY_ENV}.dev.cloudpipeline.digital\nexport CF_API_BASE_URL=https://api.${DEPLOY_ENV}.dev.cloudpipeline.digital\nexport ACCOUNTS_API_BASE_URL=https://accounts.${DEPLOY_ENV}.dev.cloudpipeline.digital\nexport ACCOUNTS_USERNAME=admin\nexport ACCOUNTS_PASSWORD= # get this value from credhub using `credhub get -n /concourse/main/create-cloudfoundry/paas_accounts_password`\n\nexport ADMIN_USERNAME=admin\nexport ADMIN_PASSWORD= # get this value from credhub using `credhub get -n /${DEPLOY_ENV}/${DEPLOY_ENV}/cf_admin_password`\n\nnpm run test:acceptance\n```\n\n### Start the server pointing at stubbed APIs\n\n```sh\n# In one terminal tab\nnpm run start:stub-api\n\n# In a second terminal tab\nnpm run start:with-stub-api\n```\n\n### Start the server pointing at real APIs in development mode\n\nRun:\n\n```sh\ngds aws paas-dev-admin -- npm run start:dev:with-cf-dev-env  $DEPLOY_ENV\n```\n\nand follow on-screen instructions.\n\nYou should be able to edit files in the `./src` directory and the changes will\nautomatically be updated.\n\n## Quick local start for review/troubleshooting\n\nProvided you have logged in CF and have AWS credentials\n\n1. Update uaa user:\n\n```\nDEPLOY_ENV=...\nuaac target https://uaa.${DEPLOY_ENV}.dev.cloudpipeline.digital\nuaac token client get admin -s $(aws s3 cp s3://gds-paas-${DEPLOY_ENV}-state/cf-vars-store.yml  - | grep uaa_admin_client_secret | cut -f2 -d \" \")\nuaac client update paas-admin --redirect-uri http://localhost:3000/auth/login/callback\n```\n\n2. Get the command to start the server:\n\n```\ncf target -o admin -s public\ncf env paas-admin | awk '/User-Provided/ { printing=1; next} /^$/ { printing=0 ; next} printing  {gsub(\": \",\"=\\\"\"); gsub(\"$\", \"\\\" \\\\\"); print; next  } END { print \"npm start\"}'\n\n```\n\n3. Undo the paas-admin client change once done:\n\n\n```\nuaac client update paas-admin --redirect-uri https://admin.${DEPLOY_ENV}.dev.cloudpipeline.digital/auth/login/callback\n```\n\n## Production builds\n\nThe `NODE_ENV` environment variable alters the build process to bundle all\ndependencies into the `./dist/` directory.\n\n```\nNODE_ENV=production npm run build\n```\n\nThe `./dist` folder should now be a distributable without the need for the\nnode_modules folder and should be executable on any environment that has a\nsupported version of Node.js, e.g., `cf push`.\n\nTo push the build to CloudFoundry there is a helper script that creates a\nproduction build and calls `cf push`:\n\n```sh\nnpm run push\n```\n\n## Alternatives\n\nThis project is fairly young and may not be a right fit for different needs yet.\n\nYou may be interested in investigating other tools, such as\n[Stratos](https://github.com/cloudfoundry-incubator/stratos) which may become\nan official tool some day.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphagov%2Fpaas-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphagov%2Fpaas-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphagov%2Fpaas-admin/lists"}