Skip to content

Commit

Permalink
[PROTO-1411] Add standalone uptime check container with BoltDB (#6610)
Browse files Browse the repository at this point in the history
  • Loading branch information
theoilie authored Nov 8, 2023
1 parent 2778bbe commit 82b0ce9
Show file tree
Hide file tree
Showing 22 changed files with 438 additions and 485 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ steps:
OLD_VERSION=$(echo ${NEW_VERSION} | awk -F. '{$NF = $NF - 1;} 1' | sed 's/ /./g')
# Generate diff for audius-protocol repo commits from last release to HEAD (we're on the new release branch thanks to the checkout step)
GIT_DIFF=$(git log --pretty=format:'%an - %s [<https://github.com/AudiusProject/audius-protocol/commit/%H|%h>]' --abbrev-commit origin/release-v$OLD_VERSION..HEAD -- mediorum packages/discovery-provider packages/identity-service comms monitoring/healthz protocol-dashboard | sed 's/"/\\"/g' | tr -d '\r' | sed ':a;N;$!ba;s/\n/=DELIM@/g')
GIT_DIFF=$(git log --pretty=format:'%an - %s [<https://github.com/AudiusProject/audius-protocol/commit/%H|%h>]' --abbrev-commit origin/release-v$OLD_VERSION..HEAD -- mediorum packages/discovery-provider packages/identity-service comms monitoring/healthz monitoring/uptime protocol-dashboard | sed 's/"/\\"/g' | tr -d '\r' | sed ':a;N;$!ba;s/\n/=DELIM@/g')
json_content="{ \"blocks\": ["
json_content+="{ \"type\": \"header\", \"text\": { \"type\": \"plain_text\", \"text\": \"New Protocol Release (v$NEW_VERSION)\n\" } },"
audius_protocol_commit_blocks=$(generate_json_content "$GIT_DIFF")
Expand Down
7 changes: 7 additions & 0 deletions .circleci/src/workflows/discovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ jobs:
filters:
branches:
only: main
- push-docker-image:
name: push-uptime
context: [Vercel, dockerhub]
service: uptime
filters:
branches:
only: main

- lint-discovery-provider:
name: lint-discovery-provider
Expand Down
1 change: 1 addition & 0 deletions dev-tools/audius-compose
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def build(
"--profile=libs",
"--profile=solana",
"--profile=block-explorer",
"--profile=uptime",
"build",
*args,
*services,
Expand Down
28 changes: 28 additions & 0 deletions dev-tools/compose/docker-compose.uptime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3.9'

services:
uptime:
build:
context: ${PROJECT_ROOT}/monitoring/uptime
dockerfile: Dockerfile
restart: unless-stopped
environment:
- dirTemplate=/data/bolt_%d
- hostNameTemplate=http://audius-protocol-creator-node-%d
env_file: .env
ports:
- 1996:1996
volumes:
- mediorum:/data
profiles:
- uptime
healthcheck:
test:
[
'CMD-SHELL',
'curl --fail http://localhost:1996/health_check || exit 1'
]
interval: 10s
start_period: 60s
timeout: 5s
retries: 20
8 changes: 8 additions & 0 deletions dev-tools/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ services:
service: dashboard
<<: *common

# Uptime (standalone container used by Discovery and Content)

uptime:
extends:
file: docker-compose.uptime.yml
service: uptime
<<: *common

# Discovery

discovery-provider-notifications:
Expand Down
25 changes: 0 additions & 25 deletions monitoring/peer_health/go.mod

This file was deleted.

53 changes: 0 additions & 53 deletions monitoring/peer_health/go.sum

This file was deleted.

Binary file removed monitoring/peer_health/peer_health
Binary file not shown.
Loading

0 comments on commit 82b0ce9

Please sign in to comment.