Skip to content

Monitoring of nodes using prometheus #13

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

Merged
merged 67 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
701abbd
Refactor install command and enhance network configuration handling
dviejokfs May 10, 2025
71c065f
Refactor Fabric network service methods and enhance API functionality
dviejokfs May 10, 2025
9d87c98
Add feedback URL
dviejokfs May 11, 2025
e1c6dc6
Fix events
dviejokfs May 11, 2025
14acb18
Initial backend implementation for metrics with prometheus
dviejokfs May 11, 2025
69532bb
Implement custom Prometheus query endpoint and enhance metrics handling
dviejokfs May 12, 2025
e45304f
Checkpoint
dviejokfs May 12, 2025
aedee9b
Update
dviejokfs May 12, 2025
7bfd294
Fix tests
dviejokfs May 12, 2025
a526408
Implement audit logging functionality
dviejokfs May 13, 2025
4eb4c9f
Enhance audit logging with session ID support
dviejokfs May 13, 2025
3e6279c
Start e2e tests
dviejokfs May 14, 2025
f490433
Update
dviejokfs May 15, 2025
da41b90
Update tests
dviejokfs May 15, 2025
8fc33d3
Update
dviejokfs May 15, 2025
ba1fc38
Update
dviejokfs May 15, 2025
5d83258
Update
dviejokfs May 15, 2025
c11338e
Update
dviejokfs May 15, 2025
58cd2f6
Update
dviejokfs May 15, 2025
7584897
Update
dviejokfs May 15, 2025
a842328
Update
dviejokfs May 15, 2025
ce4a9f4
Update
dviejokfs May 15, 2025
6999f3c
Update
dviejokfs May 15, 2025
d65f8e2
Fix tests
dviejokfs May 15, 2025
82a71fa
Update
dviejokfs May 15, 2025
bfaeb88
Refactor API availability checks in workflows and update Playwright c…
dviejokfs May 15, 2025
4ce4d1e
Fix tests
dviejokfs May 16, 2025
38772a7
Update tests
dviejokfs May 16, 2025
adf4af0
Update
dviejokfs May 16, 2025
aac03bb
Update
dviejokfs May 16, 2025
f92351c
Update
dviejokfs May 16, 2025
c7020b5
Merge e2e tests
dviejokfs May 16, 2025
349bc81
Update
dviejokfs May 16, 2025
837254b
Update
dviejokfs May 16, 2025
9d492de
Update
dviejokfs May 16, 2025
8be1594
Update
dviejokfs May 16, 2025
bbcf835
Update
dviejokfs May 16, 2025
4d2e6d2
Add Playwright tests for creating Fabric nodes and user management
dviejokfs May 17, 2025
afb4ca1
Update
dviejokfs May 17, 2025
5b5d780
Update
dviejokfs May 18, 2025
704d4a8
Update
dviejokfs May 18, 2025
50a021c
Add testnet command and organization pagination support
dviejokfs May 18, 2025
8d0fdfd
Implement key management and Besu network creation in Go
dviejokfs May 18, 2025
2d372fb
Enhance Besu and Fabric testnet runners with additional configurations
dviejokfs May 18, 2025
d32dd78
Enhance E2E testing and Besu node configuration
dviejokfs May 19, 2025
330452e
Update
dviejokfs May 19, 2025
8e349a8
ci/cd
dviejokfs May 19, 2025
792d945
Cache build
dviejokfs May 19, 2025
2ebf300
Update
dviejokfs May 19, 2025
54c1039
Update
dviejokfs May 19, 2025
936f377
ci/cd
dviejokfs May 19, 2025
8ff7e24
ci/cd
dviejokfs May 19, 2025
7c90de1
ci/cd
dviejokfs May 19, 2025
012162f
ci/cd
dviejokfs May 19, 2025
51d13f7
ci/cd
dviejokfs May 19, 2025
d36ee61
ci/cd
dviejokfs May 19, 2025
b62daf0
Enhance CI/CD workflow and implement Docker support for orderer and p…
dviejokfs May 19, 2025
11c2374
ci/cd
dviejokfs May 19, 2025
94ac807
Enhance e2e-tests.yaml to improve error handling in block retrieval
dviejokfs May 19, 2025
b60b47f
Refactor logging and enhance error handling in various components
dviejokfs May 21, 2025
ebfea7e
Refactor plugin management and enhance x-source handling
dviejokfs May 21, 2025
9c9e0e6
Improve error handling and UI enhancements in plugin pages
dviejokfs May 21, 2025
4936956
Enhance Fabric network joining process and improve plugins page layout
dviejokfs May 21, 2025
dc4d426
Update
dviejokfs May 22, 2025
a4a1b0d
Merge branch 'feat/keep-going' of https://github.com/LF-Decentralized…
dviejokfs May 22, 2025
bd9e554
Update documentation structure and enhance plugin metadata
dviejokfs May 22, 2025
842669d
Add Prometheus status endpoint and chaincode retrieval for Fabric peers
dviejokfs May 22, 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
85 changes: 85 additions & 0 deletions .github/workflows/api-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: API Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
- 'docs/**'

jobs:
api-tests:
name: Run API Tests
runs-on: ubuntu-latest

services:
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025

env:
API_BASE_URL: http://localhost:8100/api/v1
CHAINLAUNCH_USER: admin
CHAINLAUNCH_PASSWORD: admin123
API_USERNAME: admin
API_PASSWORD: admin123

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.4'
cache: true

- name: Check current user
run: whoami

- name: Install dependencies
run: |
go mod download
sudo apt-get update
sudo apt-get install -y build-essential
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Build UI
run: |
cd web
bun install
bun run build

- name: Build the application
run: |
go build -v -o chainlaunch ./main.go
chmod +x chainlaunch

- name: Start the application
run: |
mkdir -p testdata
export CHAINLAUNCH_USER=admin
export CHAINLAUNCH_PASSWORD=admin123
./chainlaunch serve --port=8100 --db data.db &
sleep 10

- name: Run API tests
run: |
export API_USERNAME=${CHAINLAUNCH_USER}
export API_PASSWORD=${CHAINLAUNCH_PASSWORD}
export API_BASE_URL=http://localhost:8100/api/v1
go test -v -tags=e2e ./e2e/...

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: api-test-results
path: test-results.xml
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
bun install
export API_URL="/api"
bun run build

- name: Upload chainlaunch-ui artifact
uses: actions/upload-artifact@v4
with:
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/ui-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: UI Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
- 'docs/**'

jobs:
ui-tests:
name: Run UI Tests
runs-on: ubuntu-latest
container:
image: node:20
services:
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025
- 8025:8025

env:
CYPRESS_BASE_URL: http://localhost:8100
CYPRESS_API_URL: http://localhost:8100/api/v1
PLAYWRIGHT_USER: admin
PLAYWRIGHT_PASSWORD: admin123
CHAINLAUNCH_USER: admin
CHAINLAUNCH_PASSWORD: admin123

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Build chainlaunch-ui
run: |
cd web
bun install
export API_URL="/api"
bun run build

- name: Install Playwright Browsers
run: |
cd web
bunx playwright install --with-deps

- name: Install dependencies
run: |
go mod download
apt-get update
apt-get install -y build-essential

- name: Build the application
run: |
go build -v -o chainlaunch ./main.go
chmod +x chainlaunch

- name: Start the application
run: |
mkdir -p testdata
./chainlaunch serve --db data.db &
sleep 10


- name: Run UI tests
run: |
cd web
bun run test:e2e

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: ui-test-results
path: |
web/cypress/videos
web/cypress/screenshots
test-results.xml
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"env": {
"CHAINLAUNCH_USER": "admin",
"CHAINLAUNCH_PASSWORD": "admin123",
"JAVA_HOME": "/opt/homebrew/opt/openjdk@21"
"JAVA_HOME": "/opt/homebrew/Cellar/openjdk/23.0.2"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions cmd/common/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ func NewClientFromEnv() (*Client, error) {
apiURL = defaultAPIURL
}

username := os.Getenv("CHAINLAUNCH_USERNAME")
username := os.Getenv("CHAINLAUNCH_USER")
if username == "" {
return nil, fmt.Errorf("CHAINLAUNCH_USERNAME environment variable is not set")
return nil, fmt.Errorf("CHAINLAUNCH_USER environment variable is not set")
}

password := os.Getenv("CHAINLAUNCH_PASSWORD")
Expand Down
Loading
Loading