With this feature, users can:
- Create an account on an Augur database frontend page.
- Organize repos and orgs into named groups in Augur, specific to their user account.
- Log in to to Augur via 8Knot and see aggregate visualizations of their named groups.
- See the groups created by the Augur user who registered the 8Knot application with the Augur frontend.
There are three personas required for this integration:
- The application owner (Admin).
- The application deployer (Dep).
- The application user (User).
The job of the application owner (Admin) is to:
- Log into the Augur front-end with credentials intended for Admin-level access
- Create repo groups in their profile for the consumption of other users logging into the Augur frontend via the same 8Knot instance
- Provide the 'client_secret' and 'application_id' values to the Dep role
In turn, the job of the application deployer (Dep) is to:
- Receive the 'client_secret' and 'application_id' credentials from the Admin
- Use those credentials to link 8Knot instance to Augur frontend as described below
Finally, the job of the application user (User) is to:
- Access the deployed application
- Click the 'Log In' button which will redirect to the Augur front end
- Create their own groups of repos
- Navigate back to the 8Knot app they were using and refresh the app
-
Clone [github.com/oss-aspen/8Knot/dev] (Dep)
- We use a docker compose multi-container application build strategy.
- Ports 8050 (Dash) and 6379 (Redis) are assumed to be available. If this isn't possible, modifications to the docker-compose.yml file may be necessary.
- Inter-pod name resolution is done with Docker network's DNS.
-
Create an application in Augur front-end (Admin)
- Navigate to Augur instance's front-end by URL.
- Create an Admin-level Augur account.
- Create an application for Admin account to get an app_id and a client_secret to register your 8Knot instance with Augur. You can use the url [http://0.0.0.0:8050/] if you're developing locally.
-
Prepare client environment (Dep)
-
App will communicate w/ Augur front-end via HTTP and w/ its database Augur instance via direct connection.
- The following environment variables will need to be available to the application at startup in an '.env' file at the same directory-level at 'app.py':
- AUGUR_DATABASE=
- AUGUR_HOST=
- AUGUR_PASSWORD=
- AUGUR_PORT=
- AUGUR_SCHEMA=
- AUGUR_USERNAME=
- AUGUR_APP_ID=
- You'll need to use the app_id from the Augur front-end here.
- AUGUR_CLIENT_SECRET=
- You'll need to use the client_secret from the Augur front-end here.
- AUGUR_SESSION_GENERATE_ENDPOINT=<!!!>/api/unstable/user/session/generate
- AUGUR_USER_GROUPS_ENDPOINT=<!!!>/api/unstable/user/groups/repos?columns=repo_id,repo_git
- AUGUR_USER_ACCOUNT_ENDPOINT=<!!!>/account/settings
- AUGUR_USER_AUTH_ENDPOINT=<!!!>/user/authorize?client_id=<AUGUR_APP_ID>&response_type=code
- You'll need to use the app_id from the Augur front-end here to fill in the "<AUGUR_APP_ID>".
- AUGUR_ADMIN_NAME_ENDPOINT=<!!!>/api/unstable/application/
- AUGUR_ADMIN_GROUP_NAMES_ENDPOINT=<!!!>/api/unstable/application/groups/name
- AUGUR_ADMIN_GROUPS_ENDPOINT=<!!!>/api/unstable/application/group/repos
- AUGUR_LOGIN_ENABLED=True
- The following environment variables will need to be available to the application at startup in an '.env' file at the same directory-level at 'app.py':
-
Any place that there is a <!!!> should be replaced by your Augur instance's URL. For example, if your application is running on port 5038 on localhost, <!!!> will be replaced by 0.0.0.0:5038
-
The first six environment variables are used to connect to database, not for front-end. Instructions to get these credentials are in the project README.md file.
-
-
Assuming that you have 8Knot booted and available.
-
Log into Augur with 'Login' button in the top right of the page.
-
You should be directed to the Augur front-end that you specified in the '.env' file, be able to create or log into your profile, and be redirected back to the index (home) page of 8Knot.
-
When you've been redirected, your Augur username should be filled-in where the 'Login' button was originally.
-
If there's a problem logging in, you should still see the login button but a popover should tell you that login has failed. Detailed logs of failure are available.
-
Augur front-end defined groups are available in the searchbar pre-fixed with your username. For example if your username is "rockiesFan" and you name a group "searchGroup", the name will be "rockiesFan_searchGroup" in 8Knot.