Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
59abe15
Set up weekly/automatic sync from Intel gprofiler-performance-studio …
ashokbytebytego Jul 2, 2025
636b22d
Updated base branch name
ashokbytebytego Jul 2, 2025
34d46ce
Merge remote-tracking branch 'intel/master' into intel-sync
ashokbytebytego Jul 2, 2025
0886d5a
Merge branch 'intel:master' into master
ashokbytebytego Jul 7, 2025
5713c4d
Merge pull request #5 from pinterest/intel-sync
ashokbytebytego Jul 7, 2025
51bd967
gProfiler command control
prashantbytesyntax Jul 7, 2025
981ae45
Add documentation for creating and configuring the development enviro…
artursarlo Jul 22, 2025
6b37f78
Remove vscode folder from git
mouralucas Jul 11, 2025
bef76c7
Adjust command id in profile command create or update
mouralucas Jul 11, 2025
8890e59
Adjust the status update for profiling command and profiling request …
mouralucas Jul 14, 2025
9df4a72
Improve pydantic validations
mouralucas Jul 14, 2025
03a6ff3
Refactor profiling request pydantic models to its correct file
mouralucas Jul 14, 2025
b6064ef
Improved validation and documentation
mouralucas Jul 15, 2025
dcde0c0
code skeleton for gProfiler command control
prashantbytesyntax Jul 7, 2025
a64256f
Removed unused code
mouralucas Jul 15, 2025
9ba117c
Modify python requirements for gprofiler-dev[postgres] to resolve pip…
artursarlo Jul 16, 2025
68001bf
Resolve merge conflicts introduced from latest merge
artursarlo Jul 16, 2025
42a54b8
Fix updates to ProfilingRequests table
artursarlo Jul 16, 2025
fd7a69a
Add test framework skeleton
artursarlo Jul 18, 2025
8089137
Add backend unit tests for POST /api/metrics/heartbeat endpoint
artursarlo Jul 18, 2025
07203cc
Add backend unit tests for POST /api/metrics/command_completion endpoint
artursarlo Jul 18, 2025
3c096f5
Add integration tests for backend and DB: create profile requests
artursarlo Jul 18, 2025
6cf0b37
Add integration tests for backend and DB: create profile requests for…
artursarlo Jul 18, 2025
d79975b
Add integration tests for backend and DB: create profile requests for…
artursarlo Jul 18, 2025
55d416a
Add docker configuration for the test container
artursarlo Jul 18, 2025
ac7b9a7
Add configuration and instructions for test environment: how to run t…
artursarlo Jul 21, 2025
fa88de1
Enhance configuration files for test environment: better profile opti…
artursarlo Jul 22, 2025
7236976
Add better instructions for running tests
artursarlo Jul 22, 2025
b436ce3
update pydantic version
mouralucas Jul 18, 2025
002da24
Add relation between hastname and PID
mouralucas Jul 22, 2025
83013e0
Add validation to not add status failed or completed to commands that…
mouralucas Jul 22, 2025
7433afc
Removed unused code
mouralucas Jul 22, 2025
932c915
Adjust mark_profiling_request_assigned method
mouralucas Jul 22, 2025
9b7ac43
Removed duplicate sql files
mouralucas Jul 22, 2025
3b830f2
Removed duplicate sql files
mouralucas Jul 22, 2025
788696b
Fix rabase problems
mouralucas Jul 23, 2025
54ed839
Merge remote-tracking branch 'origin/create_profile_request_n_test_fr…
mouralucas Jul 23, 2025
4ce542e
Add missing stop_level param and improved combined_config
mouralucas Jul 23, 2025
0c6830a
Resolve conflicts from previous merges on db_manager
artursarlo Jul 23, 2025
4561806
Removed request_type default from class ProfilingRequest
mouralucas Jul 23, 2025
42dd203
Merge remote-tracking branch 'origin/create_profile_request_n_test_fr…
mouralucas Jul 23, 2025
57ee272
Modify tests to conform with most recent payload of backend API
artursarlo Jul 23, 2025
58fd66a
Refactored host/pid relation
mouralucas Jul 23, 2025
bfe939a
Merge remote-tracking branch 'origin/create_profile_request_n_test_fr…
mouralucas Jul 23, 2025
5af2616
Modify tests to conform with most recent payload of backend API
artursarlo Jul 23, 2025
26a7067
Add stop_level check in profile request model
mouralucas Jul 24, 2025
c7f5d11
Merge remote-tracking branch 'origin/create_profile_request_n_test_fr…
mouralucas Jul 24, 2025
af77b63
Fix integration tests for new create profile request payload
artursarlo Jul 24, 2025
ee9e6c4
Fix POST /api/metrics/profile_request for command restarts
artursarlo Jul 24, 2025
ce0ef0c
Update integration tests for creating profiling requests
artursarlo Jul 24, 2025
5b86e19
Add new integration tests for creating profiling requests to cover pa…
artursarlo Jul 24, 2025
dd6c565
Add new integration tests for creating profiling requests to cover re…
artursarlo Jul 24, 2025
d62856c
Handle request_ids list in get_pending_profiling_command
mouralucas Jul 25, 2025
89f4eb5
Merge remote-tracking branch 'origin/create_profile_request_n_test_fr…
mouralucas Jul 25, 2025
c27978a
Fixed update status for request when command is completed
mouralucas Jul 25, 2025
cfd02d7
Rollback pydantic to V1
mouralucas Jul 25, 2025
f1390bf
Add continous profiling to command control logic
artursarlo Jul 29, 2025
081135c
Fix command completion logic to correctly handle command 'restart' an…
artursarlo Jul 30, 2025
e9d9ff7
Remove 'stopped' status from the command control logic
artursarlo Aug 1, 2025
121c6b2
Add better descritption to dev environment setup
artursarlo Aug 1, 2025
cf090f8
Merge pull request #10 from pinterest/add_dev_env_tutorial
artursarlo Aug 4, 2025
a224b67
Merge pull request #12 from pinterest/add_continuous_profiling
artursarlo Aug 4, 2025
f825845
Merge pull request #11 from pinterest/create_profile_request_n_test_f…
artursarlo Aug 4, 2025
955c67e
UI support to start/stop profiling
prashantbytesyntax Aug 6, 2025
ccb26d1
Add status list to get_profiling_host_status() in backend
mouralucas Aug 7, 2025
0865334
Fix failed update after a action is done
mouralucas Aug 8, 2025
85cbd8f
Added header to the page and sidebar icon
mouralucas Aug 8, 2025
53b5f56
Keep status names as is in database for the host_status endpoint
mouralucas Aug 11, 2025
2856b5b
Merge pull request #13 from pinterest/command-control-ui
mouralucas Aug 11, 2025
469033d
Lint fixes
mouralucas Aug 14, 2025
da6652a
Merge branch 'master' into command-control-ui_lint_fixes
mouralucas Aug 14, 2025
fefb7e2
Added continuous true to profiling request payload in the UI
mouralucas Aug 18, 2025
febc8ad
Added continuous param to request profiling payload in the ui
mouralucas Aug 18, 2025
81b46ac
Merge pull request #14 from pinterest/add_new_ui_param
mouralucas Aug 18, 2025
085b009
Added heartbeat_timestamp to host_status reponse
mouralucas Aug 27, 2025
a67d7e7
Merge branch 'master' into command-control-ui_lint_fixes
mouralucas Aug 27, 2025
55607bb
Merge pull request #16 from pinterest/CE3587
mouralucas Aug 27, 2025
3ddbce1
Merge branch 'command-control-ui_lint_fixes' into CE3587
mouralucas Aug 27, 2025
77833c7
Lint fixes
mouralucas Aug 27, 2025
a2d00cc
Merge pull request #17 from pinterest/lint_fixes
mouralucas Aug 27, 2025
ecbaf6c
temp: save untracked optimization files
prashantbytesyntax Aug 20, 2025
cd0bd1b
resolve time issue
prashantbytesyntax Aug 28, 2025
ce39750
Modify backend /metrics/heartbeat endpoint to always send last command
artursarlo Aug 29, 2025
3c742cd
Merge pull request #19 from pinterest/modify_heartbeat_always_send_la…
artursarlo Aug 29, 2025
2887898
Fix heartbeat logic to correclty handle request_ids array
artursarlo Sep 2, 2025
1a5c847
Merge pull request #20 from pinterest/fix_heartbeat_always_send_last_…
artursarlo Sep 2, 2025
425eac1
adding env vars
prashantbytesyntax Aug 28, 2025
fb0372a
Merge pull request #18 from pinterest/hourly_snapshot
prashantbytesyntax Sep 3, 2025
0a39c1e
Added Dynamic Filtering Logic with service name
ashokbytebytego Sep 16, 2025
68cd5d8
Fixed review comments
ashokbytebytego Sep 17, 2025
bb240a7
Added class for slack integration
mouralucas Sep 17, 2025
988f0b7
Fixed formating issue
ashokbytebytego Sep 17, 2025
4c2c2c1
Added basic information to the slack message using rich text
mouralucas Sep 17, 2025
59df541
Created separated method to create slack message blocks
mouralucas Sep 17, 2025
d1f290c
Merge pull request #21 from pinterest/search_by_service_name
ashokbytebytego Sep 17, 2025
9c9f677
Merge branch 'master' into CE3618_b
mouralucas Sep 18, 2025
4cc21f6
Added filtering logic for all the fields
ashokbytebytego Sep 18, 2025
339ff80
fixed formatting issue
ashokbytebytego Sep 19, 2025
cfab068
Merge pull request #24 from pinterest/search_by_service_name
ashokbytebytego Sep 19, 2025
1e02ec0
added filter logic in UI
ashokbytebytego Sep 23, 2025
ddb99a8
Added configurable channel names using env
mouralucas Sep 23, 2025
626f38e
Filter components now have white backgrounds and modern styling match…
ashokbytebytego Sep 23, 2025
ca05923
fixed review comment
ashokbytebytego Sep 23, 2025
c67f622
extended display of filters to match with profiles page and more time…
ashokbytebytego Sep 24, 2025
a824905
increased time delay
ashokbytebytego Sep 25, 2025
a4f804a
adding missing files
ashokbytebytego Sep 26, 2025
478964f
clickhouse cluster mode
prashantbytesyntax Sep 29, 2025
a94bca8
Merge pull request #25 from pinterest/UI_Changes_Filtering
ashokbytebytego Sep 30, 2025
602f334
Merge pull request #27 from pinterest/clickhouse_09_29
prashantbytesyntax Sep 30, 2025
c9f36da
Added Icon for dynamic profiling, filters to apply , clear
ashokbytebytego Sep 30, 2025
de989d5
added refresh functionality
ashokbytebytego Sep 30, 2025
cd5d6fc
Merge pull request #28 from pinterest/Dynamic_Profiling_Icon_Change
ashokbytebytego Oct 1, 2025
c769580
performance changes
ashokbytebytego Oct 6, 2025
bb72cbe
fixed lint issues
ashokbytebytego Oct 6, 2025
a7a4951
Merge pull request #30 from pinterest/profiling-status-performance-op…
ashokbytebytego Oct 6, 2025
4858af1
Merge pull request #23 from pinterest/CE3618_b
mouralucas Oct 10, 2025
8ca8a8a
Update documentation for DEV environment setup: add ENV variables con…
artursarlo Oct 13, 2025
8aa8ca2
Merge pull request #31 from pinterest/update_documentation_dev_enviro…
artursarlo Oct 13, 2025
c8833c1
Fix for Mixed Content Error on Flame Graph Download
dkorlovs Oct 21, 2025
272b6ca
Fix nginx and gunicorn configuration for gprofiler service to account…
artursarlo Oct 22, 2025
34b6cbb
Add minimal fix to gprofiler service to fix flamegraph download error
artursarlo Oct 24, 2025
54b83e8
initial changes for SLI metric for webapp
ashokbytebytego Oct 28, 2025
525d44e
for local testing
ashokbytebytego Oct 28, 2025
7b8f33a
updated caller
ashokbytebytego Oct 28, 2025
708ae84
removed un unsed code
ashokbytebytego Oct 28, 2025
f7cca50
updated SLI metrics properly
ashokbytebytego Oct 28, 2025
9a6457b
added documentation
ashokbytebytego Oct 29, 2025
f8e7311
Add documentation for 'Mixed Content Error Resolution'
artursarlo Oct 30, 2025
2adbfec
Merge pull request #33 from pinterest/intel_fix_https
artursarlo Oct 30, 2025
94f2452
feat: Add metrics publisher to indexer with S3 endpoint configuration
ashokbytebytego Oct 30, 2025
3eeefee
Add a 'Profile' column to the dynamic profiling view for the webapp f…
artursarlo Nov 4, 2025
ce54bae
added auto-refresh every 30 sec
ashokbytebytego Nov 4, 2025
62aea99
Merge pull request #36 from pinterest/asarlo/add_webapp_frontend_link…
artursarlo Nov 4, 2025
5c287c4
Merge pull request #37 from pinterest/auto-refresh
ashokbytebytego Nov 4, 2025
cf61b9e
Fix Profile colummn behaviour for dynamic profiling view of webapp-fr…
artursarlo Nov 4, 2025
a596d17
adding auto sort by default hostname
ashokbytebytego Nov 4, 2025
32b3a67
Merge pull request #39 from pinterest/sort_by_hostname
ashokbytebytego Nov 4, 2025
dc6087a
add logging for perfspect
prashantbytesyntax Nov 5, 2025
1cf20f1
Add explicit handlers for s3 upload and sqs publish to webapp-backend…
artursarlo Nov 5, 2025
963a513
Merge pull request #34 from pinterest/metrics_publish_backend
ashokbytebytego Nov 5, 2025
c9041de
Improve indexer SLI metrics publishing strategy and SQS event handling
artursarlo Nov 5, 2025
24ad246
Remove LOCAL_TESTING_GUIDE.md per review
ashokbytebytego Nov 6, 2025
9316d78
Address review feedback: move documentation to docs folder
ashokbytebytego Nov 6, 2025
56063e9
Merge pull request #40 from pinterest/perfspect_11_05
prashantbytesyntax Nov 6, 2025
92dc169
perfspect - dynamic profiling
prashantbytesyntax Nov 6, 2025
0e306e7
Add LocalStack configuration for local development and testing
ashokbytebytego Nov 6, 2025
1226775
Merge pull request #41 from pinterest/perfspect_11_06
prashantbytesyntax Nov 6, 2025
a0f4fc2
Merge master into metrics_publisher_indexer
ashokbytebytego Nov 7, 2025
bbb3b16
Fix GetLastHTML method on clickhouse-rest to properly parse parameter…
artursarlo Nov 11, 2025
64152bf
Fix indexer logic to correctly delete events from SQS upon failures a…
artursarlo Nov 13, 2025
719ecae
Code cleanup for indexer
artursarlo Nov 13, 2025
07f9524
Merge pull request #35 from pinterest/metrics_publisher_indexer
ashokbytebytego Nov 13, 2025
e616baf
adding profiling frequency
prashantbytesyntax Nov 16, 2025
4d458c7
profilers options
prashantbytesyntax Nov 16, 2025
ebf5e61
addind max_processes
prashantbytesyntax Nov 16, 2025
3da6906
confirmation dialog
prashantbytesyntax Nov 16, 2025
3ab1769
Merge pull request #45 from pinterest/arg_11_15_2025
prashantbytesyntax Nov 17, 2025
712af0a
Merge Intel's dynamic_profiling branch
ashokbytebytego Nov 19, 2025
eb4cc45
feat: Add complete dynamic profiling implementation
ashokbytebytego Nov 19, 2025
aabbf7d
chore: Remove Pinterest-specific files
ashokbytebytego Nov 19, 2025
5cb3000
chore: Remove MetricsPublisher code from Python backend
ashokbytebytego Nov 19, 2025
62c7ef4
chore: Remove MetricsPublisher code from Go indexer
ashokbytebytego Nov 19, 2025
e9d0665
fix: Remove MetricsPublisher references from Go indexer
ashokbytebytego Dec 6, 2025
8152721
fix: Fix Python syntax errors in profiles_routes.py
ashokbytebytego Dec 6, 2025
e55dedf
fixed review comments
ashokbytebytego Dec 10, 2025
941bb73
Address PR #78 review comments
ashokbytebytego Dec 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ venv*
*.egg-info/

.idea/

.vscode/

# File-based project format
*.iws
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ as ClickHouse needs to rewrite TTL information for all involved partitions.
This operation is synchronous.

## Local running and development
For more detailed instructions (already partially covered on at the [usage](#usage) section) on how to setup a development environment, please refer to [this guide](deploy/README.md)

To develop the project, it may be useful to run each component locally, see relevant README in each service
- [webapp (backend and frontend)](src/gprofiler/README.md)
Expand Down
9 changes: 5 additions & 4 deletions deploy/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ DOMAIN=http://localhost

# AWS:

AWS_REGION=us-east-1
# AWS region is required to set for service
AWS_REGION=

# AWS credentials, can be empty if running on EC2 with IAM role
AWS_ACCESS_KEY_ID=
Expand Down Expand Up @@ -32,9 +33,9 @@ REST_USERNAME=user
REST_PASSWORD=pass

# webapp:

BUCKET_NAME=performance_studio_bucket
SQS_INDEXER_QUEUE_URL=performance_studio_queue
# BUCKET_NAME and SQS_INDEXER_QUEUE_URL are required for service up running
BUCKET_NAME=
SQS_INDEXER_QUEUE_URL=
WEBAPP_APP_LOG_FILE_PATH="webapp.log"

# agents-logs:
Expand Down
223 changes: 223 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
# Info
This guide aims to help users setup a local development environment for **Gprofiler Performance Studio**.

The end goal being:
* Have all services running locally as containers;
* Have the ability to orchestrate dev containers using **Docker Compose**;
* Have the ability to correctly expose and forward service ports to local development tools (in case the test environment needs to be run on remote host machine);

Some steps present here are already part of the [general guides of the project](../README.md#usage).

## 1. Pre-requisites
Before using the Continuous Profiler, ensure the following:
- You have an AWS account and configure your credentials, as the project utilizes AWS SQS and S3.
- You'll also need to create an SQS queue and an S3 bucket.
- You have Docker and docker-compose installed on your machine.


### 1.1 Security
By default, the system is required to set a basic auth username and password;
you can generate it by running the following command:
```shell
# assuming that you located in the deploy directory
htpasswd -B -C 12 -c .htpasswd <your username>
# the prompt will ask you to set a password
```
This file is required to run the stack

Also, a TLS certificate is required to run the stack,
see [Securing Connections with SSL/TLS](#securing-connections-with-ssltls) for more details.

### 1.2 Securing Connections with SSL/TLS
When accessing the Continuous Profiler UI through the web,
it is important to set up HTTPS to ensure the communication between Continuous Profiler and the end user is encrypted.
As well as communication between webapp and ch-rest-service expected to be encrypted.

Besides the security aspect, this is also required
for the browser to allow the use of some UI features that are blocked by browsers for non-HTTPS connections.


The TLS is enabled by default, but it requires you to provide a certificates:

Main nginx certificates location
- `deploy/tls/cert.pem` - TLS certificate
- `deploy/tls/key.pem` - TLS key

CH REST service certificates location:
- `deploy/tls/ch_rest_cert.pem` - TLS certificate
- `deploy/tls/ch_rest_key.pem` - TLS key

_See [Self-signed certificate](#self-signed-certificate) for more details._

#### 1.2.1 Self-signed certificate
If you don't have a certificate, you can generate a self-signed certificate using the following command:
```shell
cd deploy
mkdir -p tls
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls/key.pem -out tls/cert.pem
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls/ch_rest_key.pem -out tls/ch_rest_cert.pem
```
Pay attention, self-signed certificates are not trusted by browsers and will require you to add an exception.

:bangbang: IMPORTANT: If you are using a self-signed certificate,
you need the agent to trust it,
or to disable the TLS verification by adding `--no-verify` flag to the agent configuration.

For example,
that will run a docker installation agent with self-signed certificate
(that will communicate from docker network to host network):
```shell
docker run --name granulate-gprofiler --restart=always -d --pid=host --userns=host --privileged intel/gprofiler:latest -cu --token="<token from api or ui>" --service-name="my-super-service" --server-host "https://host.docker.internal" --glogger-server "https://host.docker.internal" --no-verify
```

### 1.3 Port exposure for local development tools
Make sure to uncomment the "ports" definition for each service you want to expose on [docker-compose.yml](./docker-compose.yml).

Also, make sure to correctly configure the port on your host machine that you want to bind to the port on the container. Ex:
```Dockerfile
#...
ports:
- "<your-host-machine-port>:<container-port>"
#...
```

### 1.4 [Optional] Port forwarding via SSH for remote dev environment
**This step should only be completed in case your dev environment is running on a remote machine, but your dev tools (i.e postman, db client, browser) are running on you local machine.**

Also, this technique is particularly useful for cases where you don't want to (or can't) open ports on your remote machine for debugging.

#### 1.4.1 [Optional] Configure SSH client to forward specific ports for specific host
1- Open the configuration file for your SSH client:
```sh
vim ~/.ssh/config
```
2- Modify or include port forwarding options tho the remote host
```configfile
Host <remote-host-alias-for-ssh-client>
User <remote-host-user>
ForwardAgent yes
HostName <remote-host-address>
# This port forwarding config intends to forward the 443 port used by the load balancer service to the local host
LocalForward 443 127.0.0.1:443
# This port forwarding config intends to forward the 5432 port used by the postgres service to the local host
LocalForward 5432 127.0.0.1:5432
```
3- Reconnect to the remote host with the new config
```sh
ssh <remote-host-alias-for-ssh-client>
```

### 1.5 Environment Configuration
Before running the stack, you need to configure the environment variables in the `.env` file located in the `deploy` directory. This file contains all the necessary configuration for the services to communicate with each other and external dependencies.

#### 1.5.1 Required AWS Configuration
```bash
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=<your-aws-access-key>
AWS_SECRET_ACCESS_KEY=<your-aws-secret-key>
AWS_SESSION_TOKEN=<your-session-token> # Optional, only if using temporary credentials

# S3 and SQS resources
BUCKET_NAME=<your-s3-bucket-name>
SQS_INDEXER_QUEUE_URL=<your-sqs-queue-url>
```

#### 1.5.2 Database Configuration
```bash
# PostgreSQL (main application database)
POSTGRES_USER=<postgres-username>
POSTGRES_PASSWORD=<postgres-password>
POSTGRES_DB=<postgres-database-name>
POSTGRES_PORT=5432
POSTGRES_HOST=db_postgres # Docker service name for local development

# ClickHouse (analytics database)
CLICKHOUSE_USER=<clickhouse-username>
CLICKHOUSE_PASSWORD=<clickhouse-password>
CLICKHOUSE_HOST=db_clickhouse # Docker service name for local development
```

#### 1.5.3 Service Authentication
```bash
# REST API service credentials
REST_USERNAME=<rest-api-username>
REST_PASSWORD=<rest-api-password>

# Domain configuration
DOMAIN=http://localhost # Used in agent installation templates
```

#### 1.5.4 Slack Integration (New)
The gProfiler service now supports Slack notifications for profiling activities:

```bash
# Slack Bot Token - obtain from your Slack app configuration
SLACK_BOT_TOKEN=<your-slack-bot-token>

# Slack Channels - comma-separated list of channels for notifications
SLACK_CHANNELS="<#channel1>,<#channel2>"
```

**Setting up Slack Integration:**
1. Create a Slack App in your workspace or use an existing one
2. Add the following OAuth scopes to your bot: `chat:write`, `channels:read`, `groups:read`
3. Install the app to your workspace and copy the Bot User OAuth Token
4. Set the `SLACK_BOT_TOKEN` with your token (starts with `xoxb-`)
5. Configure `SLACK_CHANNELS` with the channels where you want notifications (use comma-separated format)

#### 1.5.5 Logging Configuration
```bash
# Common logging directory for all services
COMMON_LOGS_DIR=/logs

# Service-specific log file paths
WEBAPP_APP_LOG_FILE_PATH="webapp.log"
AGENTS_LOGS_APP_LOG_FILE_PATH="${COMMON_LOGS_DIR}/agents-logs-app.log"
AGENTS_LOGS_LOG_FILE_PATH="${COMMON_LOGS_DIR}/agents-logs.log"
```

**Note:** The `.env` file comes with sensible defaults for local development. You primarily need to:
1. Configure your AWS credentials and resources
2. Set up Slack integration (if desired)
3. Adjust database passwords for production environments

## 2. Running the stack
To run the entire stack built from source, use the docker-compose project located in the `deploy` directory.

The `deploy` directory contains:
- `docker-compose.yml` - The Docker compose file.
- `.env` - The environment file where you set your AWS credentials, SQS/S3 names, and AWS region.
- `https_nginx.conf` - Nginx configuration file used as an entrypoint load balancer.
- `diagnostics.sh`- A script for testing connectivity between services and printing useful information.
- `tls` - A directory for storing TLS certificates (see [Securing Connections with SSL/TLS](#securing-connections-with-ssltls)).
- `.htpasswd` - A file for storing basic auth credentials (see above).

To launch the stack, run the following commands in the `deploy` directory:
```shell
cd deploy
docker-compose --profile with-clickhouse up -d --build
```

Check that all services are running:
```shell
docker-compose ps
```

You should see the following containers with the prefix 'gprofiler-ps*':
* gprofiler-ps-agents-logs-backend
* gprofiler-ps-ch-indexer
* gprofiler-ps-ch-rest-service
* gprofiler-ps-clickhouse
* gprofiler-ps-nginx-load-balancer
* gprofiler-ps-periodic-tasks
* gprofiler-ps-postgres
* gprofiler-ps-webapp

Now You can access the UI by navigating to https://localhost:4433 in your browser
(4433 is the default port, configurable in the docker-compose.yml file).

## 3. Destroying the stack
```shell
docker-compose --profile with-clickhouse down -v
```
The `-v` option deletes also the volumes that mens that all data will be truncated
3 changes: 0 additions & 3 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ services:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
# for debug
# ports:
# - "54321:5432"
volumes:
- db_postgres:/var/lib/postgresql/data
- ../scripts/setup/postgres/gprofiler_recreate.sql:/docker-entrypoint-initdb.d/create_scheme.sql
Expand Down
14 changes: 13 additions & 1 deletion deploy/https_nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ http {
listen 80;
server_name your_domain.com www.your_domain.com; # Replace with your domain

location /api/v2/profiles {
proxy_pass http://webapp;
}

location ~ ^/api/v(1|2)/health_check$ {
proxy_pass http://webapp;
}

location /api/v1/logs {
proxy_pass http://agents-logs-backend;
}

location / {
return 301 https://$host$request_uri;
proxy_pass http://webapp;
}
}

Expand Down
Loading
Loading