Skip to content
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

Adding metrics scrapper to compose #297

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions compose-entry.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,37 @@ volumes:
o: "ro,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,local_lock=none,addr=${NFS_HOME_DIR_IP_ADDRESS}"
device: "${NFS_HOME_DIR_DEVICE}"
services:
nginx:
image: "wres/nginx"
container_name: nginx_proxy
volumes:
- ${NGINX_SERVER_CERT}:/etc/nginx/cert/wres_server_cert.pem
- ${NGINX_SERVER_KEY}:/etc/nginx/cert/wres_server_key.pem
depends_on:
- cadvisor
ports:
- 9999:9999
networks:
wres_net:
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /cgroup:/cgroup:ro
- /dev/disk:/dev/disk/:ro
command:
- --disable_metrics=network
- --docker_only=true
depends_on:
- worker
networks:
wres_net:
persister:
image: "${DOCKER_REGISTRY}/wres/wres-redis:REDIS_IMAGE"
restart: always
Expand Down
31 changes: 31 additions & 0 deletions compose-workers.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,37 @@ volumes:
o: "ro,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,local_lock=none,addr=${NFS_HOME_DIR_IP_ADDRESS}"
device: "${NFS_HOME_DIR_DEVICE}"
services:
nginx:
image: "wres/nginx"
container_name: nginx_proxy
volumes:
- ${NGINX_SERVER_CERT}:/etc/nginx/cert/wres_server_cert.pem
- ${NGINX_SERVER_KEY}:/etc/nginx/cert/wres_server_key.pem
depends_on:
- cadvisor
ports:
- 9999:9999
networks:
wres_net:
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /cgroup:/cgroup:ro
- /dev/disk:/dev/disk/:ro
command:
- --disable_metrics=network
- --docker_only=true
depends_on:
- worker
networks:
wres_net:
worker:
image: "${DOCKER_REGISTRY}/wres/wres-worker:WORKER_IMAGE"
restart: always
Expand Down
3 changes: 3 additions & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:1.18.0-alpine
WORKDIR /etc/nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
10 changes: 10 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server {
listen 9999 ssl;
server_name nginx_proxy;

ssl_certificate /etc/nginx/cert/wres_server_cert.pem;
ssl_certificate_key /etc/nginx/cert/wres_server_key.pem;
location / {
proxy_pass http://cadvisor:8080;
}
}
12 changes: 12 additions & 0 deletions scripts/dockerizeGithub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@ popd

echo "Built wres/wres-writing:$writing_version -- $writing_image_id"

# Build and tag the nginx image
echo "Building nginx image..."
pushd nginx
nginx_image_id=$( docker build --build-arg --quiet --tag wres/nginx . )
popd

echo "Built wres/nginx"

echo "Displaying most recent 20 docker images"
docker image ls | head -n 21

Expand Down Expand Up @@ -385,6 +393,10 @@ then
docker tag wres/wres-writing:$writing_version $DOCKER_REGISTRY/wres/wres-writing:$writing_version
docker push $DOCKER_REGISTRY/wres/wres-writing:$writing_version
fi

echo "Tagging and pushing wres/nginx as wres/nginx..."
docker tag wres/nginx $DOCKER_REGISTRY/wres/nginx
docker push $DOCKER_REGISTRY/wres/nginx
fi

else
Expand Down
Loading