Skip to content

Commit

Permalink
Add QA
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Mar 7, 2025
1 parent e2d16c3 commit 7f6bf0d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions nomad/traefik-wall/deploy/production.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ job "traefik-wall-production" {
destination = "local/traefik-config"
}

# Pulfalight Configuration
artifact {
source = "https://raw.githubusercontent.com/pulibrary/princeton_ansible/${ var.branch_or_sha }/nomad/traefik-wall/deploy/sites/pulfalight-production.yml"
destination = "local/traefik-config"
}

resources {
cpu = 1000
memory = 512
Expand Down Expand Up @@ -181,6 +187,12 @@ job "traefik-wall-production" {
destination = "local/traefik-config"
}

# Pulfalight Configuration
artifact {
source = "https://raw.githubusercontent.com/pulibrary/princeton_ansible/${ var.branch_or_sha }/nomad/traefik-wall/deploy/sites/pulfalight-production.yml"
destination = "local/traefik-config"
}

resources {
cpu = 1000
memory = 512
Expand Down
10 changes: 9 additions & 1 deletion roles/nginxplus/files/conf/http/pulfalight-qa.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ proxy_cache_path /var/cache/nginx/pulfalight-qa/ keys_zone=pulfalight-qacache:10

upstream pulfalight-qa {
zone pulfalight-qa 64k;
server pulfalight-qa-web1.princeton.edu resolve;
# lowchallenge challenges after 20 requests from xx.xx.<>.<>.<>
server service.consul service=lowchallenge.traefik-wall-staging resolve max_fails=0;
# highchallenge challenges everyone. Comment above and uncomment
# this when you're being swarmed by bots.
# server service.consul service=highchallenge.traefik-wall-staging resolve max_fails=0;
# If Traefik crashes, fall down to the box directly.
server pulfalight-qa-web1.princeton.edu resolve backup;
sticky learn
create=$upstream_cookie_pulfalightqacookie
lookup=$cookie_pulfalightqacookie
zone=pulfalightqaclient_sessions:1m;
resolver nomad-host-prod1.lib.princeton.edu nomad-host-prod2.lib.princeton.edu nomad-host-prod3.lib.princeton.edu valid=5s;
resolver_timeout 2s;
}

server {
Expand Down

0 comments on commit 7f6bf0d

Please sign in to comment.