-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: apply changes after review comments
Signed-off-by: Mykola Rudyk <m.rudyk@samsung.com>
- Loading branch information
Showing
4 changed files
with
38 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,67 @@ | ||
# Quick Start Guide & Build | ||
# Quick Start Guide | ||
|
||
## Contents | ||
|
||
### [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) | ||
Minimal configuration to set up and run the LPVS GitHub service locally. | ||
|
||
--- | ||
|
||
## Quick Start Guide | ||
## Setting up your project to interact with _LPVS_ service | ||
|
||
### 1. Setting up your project to interact with _LPVS_ | ||
To enable _LPVS_ license scanning for your project, you need to set up GitHub Webhooks. | ||
|
||
To enable _LPVS_ license scanning for your project, you need to set up GitHub Webhooks: | ||
* Create a personal Github access token (`personal-token`): | ||
|
||
1.1 Create a personal github access token (`personal-token`): | ||
- 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. | ||
|
||
- 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. | ||
!!! warning | ||
|
||
> [!NOTE] | ||
> Pay attention that the token must be copied immediately after creation, because you will not be able to see it later!! | ||
Pay attention that the token must be copied immediately after creation, because you will not be able to see it later!! | ||
|
||
1.2 Get a personal ngrok auth token to expose your local service (`auth-token`): | ||
* 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). | ||
- The ngrok agent authenticates with an authtoken. Your authtoken is available on the ngrok [portal](https://dashboard.ngrok.com/get-started/your-authtoken). | ||
|
||
--- | ||
|
||
### 2. Using pre-built _LPVS_ Docker images | ||
## Using pre-built _LPVS_ Docker images | ||
|
||
This section explains how to download and run pre-built _LPVS_ Docker image with ngrok reverse proxy. | ||
|
||
For the Docker deployment scenario, you may need to set additional parameters described in [docker section](/doc/docs/user-guide/service/docker.md). | ||
|
||
#### 2.1 Setting up _LPVS_ Docker environment variables | ||
### Setting up _LPVS_ Docker environment variables | ||
|
||
2.1.1 Open `docker-compose.yml` file. | ||
* Open `docker-compose-quick.yml` file. | ||
|
||
2.1.2 In the `environment` part of the `lpvs` service, find `## Github data for fetching code` and fill in the github `login` and personal `token` that was generated earlier | ||
* In the `environment` part of the `lpvs` service, find `## Github data for fetching code` and fill in the github `login` and personal `token` that was generated earlier | ||
|
||
```yaml | ||
- github.login=<github-login> | ||
- github.token=<personal-token> | ||
``` | ||
2.1.3 In the `environment` part of the `ngrok` service, find `## Ngrok Auth token` and fill personal `token` from [Ngrok portal](https://dashboard.ngrok.com/get-started/your-authtoken). | ||
* In the `environment` part of the `ngrok` service, find `## Ngrok Auth token` and fill personal `token` from [Ngrok portal](https://dashboard.ngrok.com/get-started/your-authtoken). | ||
|
||
```yaml | ||
- NGROK_AUTHTOKEN=<auth-token> | ||
``` | ||
|
||
#### 2.2 Running _LPVS_ and MySQL Docker images with Docker Compose | ||
### Running _LPVS_ and MySQL Docker images with Docker Compose | ||
|
||
2.2.1 Start the _LPVS_ services: | ||
* Start the _LPVS_ services: | ||
|
||
```bash | ||
docker compose -f docker-compose-quick.yml up -d | ||
``` | ||
|
||
To stop the _LPVS_ services, use next command: | ||
* To stop the _LPVS_ services, use next command: | ||
|
||
```bash | ||
docker compose -f docker-compose-quick.yml down | ||
``` | ||
|
||
### 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: | ||
## Setting up your project to interact with _LPVS_ | ||
|
||
- 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`. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters