-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add quick start guide #602
Conversation
71e4ae3
to
53d3d84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check my comments.
### [Quick Start Guide](#quick-start-guide-1) | ||
|
||
1. [Setting up your project to interact with _LPVS_](#1-setting-up-your-project-to-interact-with-lpvs) | ||
2. [Using pre-built _LPVS_ Docker images](#2-using-pre-built-lpvs-docker-images) | ||
3. [Setting up your project to interact with _LPVS_](#3-setting-up-your-project-to-interact-with-lpvs) | ||
|
||
--- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the style of other documentation files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
> [!NOTE] | ||
> Pay attention that the token must be copied immediately after creation, because you will not be able to see it later!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use note style like in other pages of the guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
1.1 Create a personal github access token (`personal-token`): | ||
|
||
- Follow the instructions [here](#https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to create a personal access token with the necessary permissions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is already presented in the guide. Just give a link to the correct page.
1.2 Get a personal ngrok auth token to expose your local service (`auth-token`): | ||
|
||
- The ngrok agent authenticates with an authtoken. Your authtoken is available on the ngrok [dashboard](https://dashboard.ngrok.com/get-started/your-authtoken). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This information should be placed on the page where the webhook configuration is described. Please update those page and remove this description from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of ngrok installation, we use different approach: installing token to system, and run command without auth token. If this service included in docker, we require auth token to set.
|
||
2.1.1 Open `docker-compose.yml` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed the name of the file.
### 3. Setting up your project to interact with _LPVS_ | ||
|
||
3.1 Configure the [webhook](/doc/docs/user-guide/service/webhook.md#configure-the-webhook-in-your-github-repository-settings) in your GitHub repository settings: | ||
|
||
- Go to `Settings` -> `Webhooks`. | ||
- Click on `Add webhook`. | ||
- Fill in the `Payload URL` with: `<Tunnel URL>:7896/webhooks`. | ||
> The `Tunnel URL` can be found on localhost: `http://127.0.0.1:4040/`. | ||
- Specify the content type as `application/json`. | ||
- Fill in the `Secret` field with the passphrase: `LPVS`. | ||
- Select `Let me select individual events` -> `Pull requests` (make sure only `Pull requests` is selected). | ||
- Set the webhook to `Active`. | ||
- Click `Add Webhook`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description is presented in the documentation. Just place a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docker-compose-quick.yml
Outdated
## Required if frontend and backend are different | ||
#- frontend.main-page.url=http://localhost:3000 | ||
#- cors.allowed-origin=http://localhost:3000 | ||
## Database Configuration | ||
- spring.datasource.url=jdbc:mysql://mysqldb:3306/lpvs | ||
- spring.datasource.username=root | ||
- spring.datasource.password= | ||
- spring.jpa.properties.hibernate.default_schema=lpvs | ||
## Github data for fetching code | ||
- github.login= | ||
- github.token= | ||
- github.api.url=https://api.github.com | ||
- github.secret=LPVS | ||
## Google OAuth Login | ||
- spring.security.oauth2.client.registration.google.client-id=GOOGLE_CLIENT_ID | ||
- spring.security.oauth2.client.registration.google.client-secret=GOOGLE_CLIENT_SECRET | ||
- spring.security.oauth2.client.registration.google.redirect-uri=http://localhost:7896/login/oauth2/code/google | ||
- spring.security.oauth2.client.registration.google.scope=profile, email | ||
## Github OAuth Login | ||
- spring.security.oauth2.client.registration.github.client-id=GITHUB_CLIENT_ID | ||
- spring.security.oauth2.client.registration.github.client-secret=GITHUB_CLIENT_SECRET | ||
- spring.security.oauth2.client.registration.github.redirect-uri=http://localhost:7896/login/oauth2/code/github | ||
- spring.security.oauth2.client.registration.github.scope=user | ||
## Github Enterprise Configuration if necessary | ||
#- spring.security.oauth2.client.provider.github.authorization-uri=https://HOSTNAME/login/oauth/authorize | ||
#- spring.security.oauth2.client.provider.github.token-uri=https://HOSTNAME/login/oauth/access_token | ||
#- spring.security.oauth2.client.provider.github.user-info-uri=https://HOSTNAME/api/v3/user | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all unnecessary lines that are not used in quick start guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #602 +/- ##
=========================================
Coverage 93.89% 93.89%
Complexity 611 611
=========================================
Files 51 51
Lines 2112 2112
Branches 244 244
=========================================
Hits 1983 1983
Misses 57 57
Partials 72 72 ☔ View full report in Codecov by Sentry. |
e2ed1fd
to
852ebaa
Compare
# Quick Start Guide | ||
|
||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the template, after the name of the section, we have to write a short sentence (brief) of the page. It will be placed at the center.
doc/mkdocs.yml
Outdated
@@ -34,6 +34,7 @@ nav: | |||
- Service mode: | |||
- GitHub webhook configuration: user-guide/service/webhook.md | |||
- Run service using pre-built Docker image: user-guide/service/docker.md | |||
- Quick Start Guide: user-guide/service/quick-start-guide.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect place. Check line 31 and replace Getting Started with Quick Start Guide.
## Google OAuth Login | ||
- spring.security.oauth2.client.registration.google.client-id=GOOGLE_CLIENT_ID | ||
- spring.security.oauth2.client.registration.google.client-secret=GOOGLE_CLIENT_SECRET | ||
- spring.security.oauth2.client.registration.google.redirect-uri=http://localhost:7896/login/oauth2/code/google | ||
- spring.security.oauth2.client.registration.google.scope=profile, email | ||
## Github OAuth Login | ||
- spring.security.oauth2.client.registration.github.client-id=GITHUB_CLIENT_ID | ||
- spring.security.oauth2.client.registration.github.client-secret=GITHUB_CLIENT_SECRET | ||
- spring.security.oauth2.client.registration.github.redirect-uri=http://localhost:7896/login/oauth2/code/github | ||
- spring.security.oauth2.client.registration.github.scope=user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this for the default profile? These options are used in Web profile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested solution without this part and we got error like below:
Exception in thread "main" java.lang.ClassNotFoundException: org.springframework.boot.loader.thin.ThinJarLauncher at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) at org.springframework.boot.loader.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:138) at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:107)
I am not sure how to remove this part properly, so I tend to keep it
@@ -18,6 +18,16 @@ to create a personal access token (`personal-token`) with the necessary permissi | |||
|
|||
--- | |||
|
|||
## (Optional) Configure Ngrok reverse proxy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ":"
|
||
--- | ||
|
||
## 1. Setting up your project to interact with _LPVS_ service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to remove numbers.
|
||
To enable _LPVS_ license scanning for your project, you need to set up GitHub Webhooks. | ||
|
||
* Create a personal github access token (`personal-token`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub
|
||
- Follow the instructions [here](/doc/docs/user-guide/service/webhook.md#create-a-personal-github-access-token) to create a personal access token with the necessary permissions. | ||
|
||
!!! note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!!! warning
|
||
* Get a personal ngrok auth token to expose your local service (`auth-token`): | ||
|
||
- The ngrok agent authenticates with an authtoken. Your authtoken is available on the ngrok [dashboard](https://dashboard.ngrok.com/get-started/your-authtoken). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use [Ngrok portal]
|
||
## 3. Setting up your project to interact with _LPVS_ | ||
|
||
Configure the [webhook](/doc/docs/user-guide/service/webhook.md#configure-the-webhook-in-your-github-repository-settings) in your GitHub repository settings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ":"
Configure the [webhook](/doc/docs/user-guide/service/webhook.md#configure-the-webhook-in-your-github-repository-settings) in your GitHub repository settings: | ||
|
||
Configuration from your project side is now complete! | ||
You can now create a new pull request or update an existing one with commits. _LPVS_ will automatically start scanning and provide comments about the licenses found in the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add screenshot with the results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please use white color theme
- Hide your account name
- Use new format of LPVS output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
To configure GitHub access to a personal server, you need to expose the URL to an external API. If the server has a dedicated IP address or domain, this step can be omitted. | ||
|
||
- Install ngrok and connect your account from [here](https://ngrok.com/docs/getting-started/#step-2-install-the-ngrok-agent) (follow steps 1 and 2). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here -> Ngrok guide
|
||
- If ngrok included in docker compose, auth token can be found on [Ngrok portal](https://dashboard.ngrok.com/get-started/your-authtoken). | ||
|
||
- Run ngrok using the command: `ngrok http 7896`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
ngrok http 7896
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in here need clarification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the same style of command line commands as previously.
```bash
command
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check my comments
852ebaa
to
2286214
Compare
2286214
to
8c1e73f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Mykola Rudyk <m.rudyk@samsung.com>
Signed-off-by: Mykola Rudyk <m.rudyk@samsung.com>
Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
b6631fa
to
58b2e31
Compare
Pull Request
Description
Create separate 'docker compose' for quick start with minimal setup. Update corresponding instruction easy setup and first try.
Type of change
Please delete options that are not relevant.
Testing
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test Configuration:
Checklist: