diff --git a/.env.dev b/.env.dev index 84a3ae6..8aa1f0f 100644 --- a/.env.dev +++ b/.env.dev @@ -10,4 +10,6 @@ GH_TOKEN_URL='https://github.com/login/oauth/access_token' GH_FETCH_MEMBERSHIP_URL='https://api.github.com/user/memberships/orgs/ceph' #Session Related Stuff -SESSION_SECRET_KEY= \ No newline at end of file +## SESSION_SECRET_KEY is used to encrypt session data +## and it's prod value should be kept secret. +SESSION_SECRET_KEY=my-secret-key \ No newline at end of file diff --git a/README.md b/README.md index 6de2513..13e864b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,16 @@ A REST API to execute [teuthology commands](https://docs.ceph.com/projects/teuth #### Option 1: (teuthology docker setup) 1. Clone [teuthology](https://github.com/ceph/teuthology) and [teuthology-api](https://github.com/VallariAg/teuthology-api). -2. Add the following to [teuthology's docker-compose](https://github.com/ceph/teuthology/blob/main/docs/docker-compose/docker-compose.yml) services. +2. Rename `.env.dev` file to `.env`. +3. Configure secrets: + + 3.1. Create a Github OAuth Application by following [these](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) instructions. Set "Homepage URL" as `http://localhost:8082/` and "Authorization callback URL" as `http://localhost:8082/login/callback/`. + + 3.2. Ensure [ceph](https://github.com/ceph) belongs in your public list of organizations[[ref](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/about-organization-membership)]. By default your membership is set private, change that to public by following [these](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership) steps. + + 3.3. Save `CLIENT_ID` and `CLIENT_SECRET` from your Github OAuth App to your local `.env` file as `GH_CLIENT_ID` and `GH_CLIENT_SECRET`. + +4. Add the following to [teuthology's docker-compose](https://github.com/ceph/teuthology/blob/main/docs/docker-compose/docker-compose.yml) services. ``` teuthology_api: build: @@ -21,7 +30,7 @@ A REST API to execute [teuthology commands](https://docs.ceph.com/projects/teuth - teuthology - paddles ``` -3. Follow teuthology development setup instructions from [here](https://github.com/ceph/teuthology/tree/main/docs/docker-compose). +5. Follow teuthology development setup instructions from [here](https://github.com/ceph/teuthology/tree/main/docs/docker-compose). ## Documentation