mirror of
git://f0xx.org/ac/ac-platform-edge
synced 2026-07-29 06:19:47 +03:00
3.3 KiB
3.3 KiB
FE install — Gentoo (monstro)
Repo paths: fe/ac-fe.conf, fe/ac-fe.fragment
Install as: /etc/nginx/ac-fe.conf, /etc/nginx/ac-fe.fragment
Lab cluster (acl0.f0xx.org)
- DNS —
acl0.f0xx.organdc1–c3.acl0.f0xx.org→ monstro (same asapps.f0xx.orgFE). - TLS — issue cert (example):
certbot certonly --nginx \ -d acl0.f0xx.org -d c1.acl0.f0xx.org -d c2.acl0.f0xx.org -d c3.acl0.f0xx.org - Copy configs from
ac-platform-edgecheckout:cp fe/ac-fe.conf fe/ac-fe.fragment /etc/nginx/ - Upstream — default in
ac-fe.confis lab:cast01.intra.raptor.org:80(FE_PROXY_TARGETinac-deploy/sim/cluster0/cluster.env). - Enable — in
/etc/nginx/nginx.conf(http {}), afterinclude /etc/nginx/apps.conf;:include /etc/nginx/ac-fe.conf; - Reload —
nginx -t && rc-service nginx reload - Smoke (from any host with DNS to monstro):
curl -sI https://acl0.f0xx.org/app/androidcast_project/issues/ | head -5
curl -sI https://acl0.f0xx.org/app/androidcast_project/crashes/ | head -5 # expect 301 → /issues/
curl -sI https://acl0.f0xx.org/app/androidcast_project/git/ | head -5
curl -sS https://acl0.f0xx.org/app/androidcast_project/issues/api/diag.php | head -c 200
- Cluster verify (on cast01 after FE is live):
sudo sh /shared/cluster/verify_global_setup.sh
apps.f0xx.org is unchanged until you edit apps.conf (prod still proxies /crashes/ to artc0).
Prod cutover (apps.f0xx.org → /issues/)
When artc0 BE serves /issues/ (or you proxy prod to cluster):
- In
ac-fe.conf, pointupstream ac_be_backendatartc0.intra.raptor.org:80(or keep cluster for staged test). - In
/etc/nginx/apps.conf, inside theserver { listen 443 … apps.f0xx.org; }block:- Comment out the old
location ^~ /app/androidcast_project/crashes/proxy block. - Add:
include /etc/nginx/ac-fe.fragment;
- Comment out the old
nginx -t && rc-service nginx reload- Verify:
curl -sI https://apps.f0xx.org/app/androidcast_project/crashes/→301→/issues/
Files
| File | Role |
|---|---|
ac-fe.conf |
upstream ac_be_backend + full acl0.* vhost (proxy to cluster) |
ac-fe.fragment |
/issues/ proxy + /crashes/ → 301; include inside apps.f0xx.org server when ready |
Do not edit apps.conf in git — maintain FE snippets here; PO applies on monstro.
TLS renew + smoke
Script: fe/ac-certbot-renew-smoke.sh — certbot renew (or --dry-run) then HTTPS checks for apps.f0xx.org, acl0.f0xx.org, s.f0xx.org.
sudo fe/ac-certbot-renew-smoke.sh --dry-run # safe rehearsal
sudo fe/ac-certbot-renew-smoke.sh # renew + reload nginx if certs changed
Optional cron on monstro: 0 4 * * * root /var/www/.../ac-platform-edge/fe/ac-certbot-renew-smoke.sh --quiet
| Host | Cert path (live) |
|---|---|
apps.f0xx.org |
/etc/letsencrypt/live/apps.f0xx.org/ |
acl0.f0xx.org |
/etc/letsencrypt/live/acl0.f0xx.org/ (apex; c1–c3 have separate certs today) |
s.f0xx.org |
/etc/letsencrypt/live/s.f0xx.org/ — enable include /etc/nginx/s.f0xx.org.conf; in nginx.conf |
Shortener FE snippet: symlink s.f0xx.org.conf → ac-ms-url-shortener/deploy/nginx.fe-s.f0xx.org.snippet.