From ffb1e499b9c996dd1075c2b4778384f39f49101e Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Mon, 18 Oct 2021 15:25:59 +0100 Subject: [PATCH 1/3] use skynet to load our homepage --- docker/nginx/conf.d/server/server.api | 10 ++++++++++ packages/health-check/src/checks/critical.js | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index 183f9794..9f966d0d 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -26,6 +26,16 @@ rewrite ^/skynet/blacklist /skynet/blocklist permanent; location / { include /etc/nginx/conf.d/include/cors; + set $skylink "0404dsjvti046fsua4ktor9grrpe76erq9jot9cvopbhsvsu76r4r30"; + set $path $uri; + + include /etc/nginx/conf.d/include/location-skylink; + + proxy_intercept_errors on; + error_page 400 404 490 500 502 503 504 =200 @fallback; +} + +location @fallback { proxy_pass http://website:9000; } diff --git a/packages/health-check/src/checks/critical.js b/packages/health-check/src/checks/critical.js index 1344c5b3..daa261f3 100644 --- a/packages/health-check/src/checks/critical.js +++ b/packages/health-check/src/checks/critical.js @@ -58,6 +58,13 @@ async function handshakeSubdomainCheck(done) { return done(await genericAccessCheck("hns_via_subdomain", url)); } +// websiteSkylinkCheck returns the result of accessing siasky.net website through skylink +async function websiteSkylinkCheck(done) { + const websiteSkylink = "0404dsjvti046fsua4ktor9grrpe76erq9jot9cvopbhsvsu76r4r30"; + + return done(await genericAccessCheck("website_skylink", websiteSkylink)); +} + // accountWebsiteCheck returns the result of accessing account dashboard website async function accountWebsiteCheck(done) { const url = `${process.env.SKYNET_DASHBOARD_URL}/auth/login`; @@ -159,6 +166,7 @@ async function genericAccessCheck(name, url) { const checks = [ uploadCheck, websiteCheck, + websiteSkylinkCheck, downloadCheck, skylinkSubdomainCheck, handshakeSubdomainCheck, From 9e78082a438b65c7b150911337db94c22502ce5b Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Mon, 18 Oct 2021 15:46:54 -0400 Subject: [PATCH 2/3] Update changelog for v0.1.3 --- CHANGELOG.md | 10 ++++++++-- changelog/changelog-tail.md | 20 +++++++++++++++++++ .../items/bugs-fixed/expose-upload-concat.md | 1 - changelog/items/bugs-fixed/fix-caddy.md | 1 - .../fix-external-links-on-news-header.md | 1 - .../bugs-fixed/round-reporting-datetime.md | 1 - .../items/key-updates/308-redirect-code.md | 1 - .../items/key-updates/caddy-dns-ttl-limit.md | 1 - .../key-updates/enable-mongodb-for-skyd.md | 1 - .../health-check-disable-reason.md | 1 - changelog/items/key-updates/mongo-service.md | 1 - .../items/key-updates/tus-options-response.md | 1 - changelog/items/key-updates/unpin-skylink.md | 1 - changelog/items/other/remove-nebulous-labs.md | 1 - 14 files changed, 28 insertions(+), 14 deletions(-) delete mode 100644 changelog/items/bugs-fixed/expose-upload-concat.md delete mode 100644 changelog/items/bugs-fixed/fix-caddy.md delete mode 100644 changelog/items/bugs-fixed/fix-external-links-on-news-header.md delete mode 100644 changelog/items/bugs-fixed/round-reporting-datetime.md delete mode 100644 changelog/items/key-updates/308-redirect-code.md delete mode 100644 changelog/items/key-updates/caddy-dns-ttl-limit.md delete mode 100644 changelog/items/key-updates/enable-mongodb-for-skyd.md delete mode 100644 changelog/items/key-updates/health-check-disable-reason.md delete mode 100644 changelog/items/key-updates/mongo-service.md delete mode 100644 changelog/items/key-updates/tus-options-response.md delete mode 100644 changelog/items/key-updates/unpin-skylink.md delete mode 100644 changelog/items/other/remove-nebulous-labs.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b0759da5..6f5dda75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,15 +10,21 @@ Version History Latest: -## Sep 21, 2021: -### deploy-2021-09-21 +## Oct 18, 2021: +### v0.1.3 **Key Updates** - Change skyd 307 redirect code to 308 - Set caddy dns entry ttl limit to 15 minutes to remove stranded entries. +- Set skyd up to connect to the local mongodb cluster for storing TUS metadata - Update health check disable command to require reason. +- Move MongoDB to a separate service (use `PORTAL_MODULES=m` to use it without accounts) - Add proper handling for options response on /skynet/tus endpoint +- added unpinning skylinks from account dashboard **Bugs Fixed** +- include tus header upload-concat in cors requests +- fixed issue with caddy requesting new certificates instead of using existing ones from file storage +- fixed the latest news link redirect in the news header - Fix extended checks error by rounding the reported datetime. **Other** diff --git a/changelog/changelog-tail.md b/changelog/changelog-tail.md index 5bf35a67..c42922df 100644 --- a/changelog/changelog-tail.md +++ b/changelog/changelog-tail.md @@ -1,3 +1,23 @@ +## Oct 18, 2021: +### v0.1.3 +**Key Updates** +- Change skyd 307 redirect code to 308 +- Set caddy dns entry ttl limit to 15 minutes to remove stranded entries. +- Set skyd up to connect to the local mongodb cluster for storing TUS metadata +- Update health check disable command to require reason. +- Move MongoDB to a separate service (use `PORTAL_MODULES=m` to use it without accounts) +- Add proper handling for options response on /skynet/tus endpoint +- added unpinning skylinks from account dashboard + +**Bugs Fixed** +- include tus header upload-concat in cors requests +- fixed issue with caddy requesting new certificates instead of using existing ones from file storage +- fixed the latest news link redirect in the news header +- Fix extended checks error by rounding the reported datetime. + +**Other** +- Remove outdated references to NebulousLabs + ## August 9th, 2021: diff --git a/changelog/items/bugs-fixed/expose-upload-concat.md b/changelog/items/bugs-fixed/expose-upload-concat.md deleted file mode 100644 index b6466060..00000000 --- a/changelog/items/bugs-fixed/expose-upload-concat.md +++ /dev/null @@ -1 +0,0 @@ -- include tus header upload-concat in cors requests diff --git a/changelog/items/bugs-fixed/fix-caddy.md b/changelog/items/bugs-fixed/fix-caddy.md deleted file mode 100644 index 83a92989..00000000 --- a/changelog/items/bugs-fixed/fix-caddy.md +++ /dev/null @@ -1 +0,0 @@ -- fixed issue with caddy requesting new certificates instead of using existing ones from file storage diff --git a/changelog/items/bugs-fixed/fix-external-links-on-news-header.md b/changelog/items/bugs-fixed/fix-external-links-on-news-header.md deleted file mode 100644 index aa7c8c54..00000000 --- a/changelog/items/bugs-fixed/fix-external-links-on-news-header.md +++ /dev/null @@ -1 +0,0 @@ -- fixed the latest news link redirect in the news header diff --git a/changelog/items/bugs-fixed/round-reporting-datetime.md b/changelog/items/bugs-fixed/round-reporting-datetime.md deleted file mode 100644 index 731a20bc..00000000 --- a/changelog/items/bugs-fixed/round-reporting-datetime.md +++ /dev/null @@ -1 +0,0 @@ -- Fix extended checks error by rounding the reported datetime. diff --git a/changelog/items/key-updates/308-redirect-code.md b/changelog/items/key-updates/308-redirect-code.md deleted file mode 100644 index d07f0566..00000000 --- a/changelog/items/key-updates/308-redirect-code.md +++ /dev/null @@ -1 +0,0 @@ -- Change skyd 307 redirect code to 308 diff --git a/changelog/items/key-updates/caddy-dns-ttl-limit.md b/changelog/items/key-updates/caddy-dns-ttl-limit.md deleted file mode 100644 index c5d1929f..00000000 --- a/changelog/items/key-updates/caddy-dns-ttl-limit.md +++ /dev/null @@ -1 +0,0 @@ -- Set caddy dns entry ttl limit to 15 minutes to remove stranded entries. diff --git a/changelog/items/key-updates/enable-mongodb-for-skyd.md b/changelog/items/key-updates/enable-mongodb-for-skyd.md deleted file mode 100644 index cc1a399b..00000000 --- a/changelog/items/key-updates/enable-mongodb-for-skyd.md +++ /dev/null @@ -1 +0,0 @@ -- Set skyd up to connect to the local mongodb cluster for storing TUS metadata \ No newline at end of file diff --git a/changelog/items/key-updates/health-check-disable-reason.md b/changelog/items/key-updates/health-check-disable-reason.md deleted file mode 100644 index c943fb11..00000000 --- a/changelog/items/key-updates/health-check-disable-reason.md +++ /dev/null @@ -1 +0,0 @@ -- Update health check disable command to require reason. diff --git a/changelog/items/key-updates/mongo-service.md b/changelog/items/key-updates/mongo-service.md deleted file mode 100644 index 3ef3b13f..00000000 --- a/changelog/items/key-updates/mongo-service.md +++ /dev/null @@ -1 +0,0 @@ -- Move MongoDB to a separate service (use `PORTAL_MODULES=m` to use it without accounts) diff --git a/changelog/items/key-updates/tus-options-response.md b/changelog/items/key-updates/tus-options-response.md deleted file mode 100644 index f5144d81..00000000 --- a/changelog/items/key-updates/tus-options-response.md +++ /dev/null @@ -1 +0,0 @@ -- Add proper handling for options response on /skynet/tus endpoint diff --git a/changelog/items/key-updates/unpin-skylink.md b/changelog/items/key-updates/unpin-skylink.md deleted file mode 100644 index ab403ff9..00000000 --- a/changelog/items/key-updates/unpin-skylink.md +++ /dev/null @@ -1 +0,0 @@ -- added unpinning skylinks from account dashboard diff --git a/changelog/items/other/remove-nebulous-labs.md b/changelog/items/other/remove-nebulous-labs.md deleted file mode 100644 index 0e7bf671..00000000 --- a/changelog/items/other/remove-nebulous-labs.md +++ /dev/null @@ -1 +0,0 @@ -- Remove outdated references to NebulousLabs From 97b192040959a6ca8bb2d4314bc653c30f940f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wypch=C5=82o?= Date: Tue, 19 Oct 2021 15:59:23 +0100 Subject: [PATCH 3/3] fix registry tracking method (#1299) --- docker/nginx/conf.d/include/track-registry | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx/conf.d/include/track-registry b/docker/nginx/conf.d/include/track-registry index ccab959b..7811ce07 100644 --- a/docker/nginx/conf.d/include/track-registry +++ b/docker/nginx/conf.d/include/track-registry @@ -7,7 +7,7 @@ log_by_lua_block { if premature then return end local httpc = require("resty.http").new() - local method = request_method == ngx.HTTP_GET and "read" or "write" + local method = request_method == "GET" and "read" or "write" -- 10.10.10.70 points to accounts service (alias not available when using resty-http) local res, err = httpc:request_uri("http://10.10.10.70:3000/track/registry/" .. method, {