diff --git a/README.md b/README.md index 55fba95..ad654d3 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,14 @@ The auth settings file will look like: Follow the steps above to find your authSettings.json file. In authSettings.json, set ```"hasInitialized":false,```. After restarting handyhost you can now set your new password. +### v0.5.4 Changelog + +DVPN Has released their own official release fixing the hnsd issue in their Dockerfile we patched in v0.5.3. This build reverts our fix on dvpn rebuild and uses the DVPN latest tagged release. + +### v0.5.3 Changelog + +We added a button for users to rebuild the DVPN Docker container from the UI. We found an issue within DVPN Dockerfile which was causing the Handshake service within DVPN to fall over on startup. For now we ship a modified Dockerfile to rebuild with until DVPN team has time to validate/patch. + ### v0.5.2 Changelog This release is mostly Akash focused. Akash RPC queries, specifically getting provider order/bid stats, were causing a ton of issues on HandyHost client. So we basically re-architected a lot of the RPC issues at hand into an index that is fast to query. In addition, the Akash provider was having a lot of issues falling over silently (staying alive as a zombie process). We fixed this by restarting the provider every few hours to keep it alive. In addition to these major components, we did a lot of bug fixing around the Akash service, as well as some enhancements that will help providers get audited. Getting audited will likely help providers get more contracts. Read more about getting your provider audited here: [https://docs.akash.network/operations/akash-audited-attributes#attribute-auditors](https://docs.akash.network/operations/akash-audited-attributes#attribute-auditors) diff --git a/changelog.json b/changelog.json new file mode 100644 index 0000000..5e60d99 --- /dev/null +++ b/changelog.json @@ -0,0 +1,7 @@ +{ + "v0.5.4":"DVPN Has released their own official release fixing the hnsd issue in their Dockerfile we patched in v0.5.3. This build reverts our fix on dvpn rebuild and uses the DVPN latest tagged release.", + "v0.5.3":"We added a button for users to rebuild the DVPN Docker container from the UI. We found an issue within DVPN Dockerfile which was causing the Handshake service within DVPN to fall over on startup. For now we ship a modified Dockerfile to rebuild with until DVPN team has time to validate/patch.", + "v0.5.2":"This release is mostly Akash focused. Akash RPC queries, specifically getting provider order/bid stats, were causing a ton of issues on HandyHost client. So we basically re-architected a lot of the RPC issues at hand into an index that is fast to query. In addition, the Akash provider was having a lot of issues falling over silently (staying alive as a zombie process). We fixed this by restarting the provider every few hours to keep it alive. \nIn addition to these major components, we did a lot of bug fixing around the Akash service, as well as some enhancements that will help providers get audited. Getting audited will likely help providers get more contracts. Read more about getting your provider audited here: [https://docs.akash.network/operations/akash-audited-attributes#attribute-auditors](https://docs.akash.network/operations/akash-audited-attributes#attribute-auditors)", + "v0.5.1":"1. DVPN/AKT: Support 12-word Mnemonic Keys\n2. SC: Healthcheck for zombie siad. Auto-restarts siad within 20 minutes of an untimely death\n3. AKT: 20-minute refresh cycle for dashboard stats\n4. AKT: use handyhost rpc node for aggregates query. Prep env for a db-backed stats page as rpc is slow for aggregates\n5. AKT: Zombie checker/restart provider every 4 hours. Also clean kill zombie akash provider.\n6. ALL: Enable authentication by default versus previously disabled by default.", + "v0.5.0":"1. Add support for MacOS M1 Processor\n2. Add support for MacOS zsh environment\n3. MacOS: require python3.9 for kubespray in Akash. \n4. UI: Dark Mode overhaul to use color palette versus filter:invert\n5. Akash: Add better logging to provider startup script\n6. Akash: Add configurator for new setups to reduce any setup friction\n7. Akash: Add gas fees and tx fees estimates to registration forms\n8. Akash: Add \"Lost\" category of bids to Dashboard and Marketplace UIs\n9. DVPN: Tweak dashboard display logic for donut charts\n10. DVPN: Reduce processing cycles for streamgraph modeling\n11. Ubuntu: Open HandyHost splash page in browser after installation" +} \ No newline at end of file diff --git a/dvpnAPI/Setup.js b/dvpnAPI/Setup.js index 1c9594c..b6aa1a7 100644 --- a/dvpnAPI/Setup.js +++ b/dvpnAPI/Setup.js @@ -4,12 +4,14 @@ import https from 'https'; import http from 'http'; import generator from 'project-name-generator'; import {CommonUtils} from '../CommonUtils.js'; +import {UpdateHelper} from './UpdateHelper.js'; export class DVPNSetup{ constructor(){ this.isRebuildingDVPN = false; this.redlistPortsPath = process.env.HOME+'/.HandyHost/ports.json'; this.utils = new CommonUtils(); + this.updateHelper = new UpdateHelper(); } initWallet(pw,walletName){ @@ -755,51 +757,69 @@ export class DVPNSetup{ let hasReturned = false; this.isRebuildingDVPN = true; //rebuild dvpn docker container - const args = ['./rebuildDockerContainer.sh']; - const s = spawn('bash',args,{shell:true,env:process.env,cwd:process.env.PWD+'/dvpnAPI',detached:true}); - s.stdout.on('data',d=>{ - Object.keys(socketIONamespaces).map(serverName=>{ - socketIONamespaces[serverName].namespace.to('dvpn').emit('logs',d.toString()); - }) - //socketIONamespace.to('dvpn').emit('logs',d.toString()); - output += d.toString(); - lineCount++; - if(lineCount >= 100){ - //truncate - output = output.split('\n').slice(-20).join('\n'); - } - fs.writeFileSync(`${process.env.HOME}/.HandyHost/sentinelData/hostLogs`,output,'utf8') - }); - s.stderr.on('data',d=>{ - //hasFailed = true; - output += d.toString(); - - //console.log('stderr',d.toString()); - lineCount++; - if(lineCount >= 100){ - //truncate - output = output.split('\n').slice(-20).join('\n'); + this.updateHelper.checkForUpdates().then(versionData=>{ + let status = {latest:'v0.3.0'}; + if(Object.keys(versionData).length > 0){ + status.current = versionData.current; + status.latest = versionData.all[versionData.all.length-1]; } - fs.writeFileSync(`${process.env.HOME}/.HandyHost/sentinelData/hostLogs`,output,'utf8') - Object.keys(socketIONamespaces).map(serverName=>{ - socketIONamespaces[serverName].namespace.to('dvpn').emit('logs',d.toString()); - }) - //socketIONamespace.to('dvpn').emit('logs',d.toString()); - //reject({'error':d.toString()}) - }); - s.on('close',d=>{ + console.log('version status',status); + const args = ['./rebuildDockerContainer.sh',status.latest]; + const s = spawn('bash',args,{shell:true,env:process.env,cwd:process.env.PWD+'/dvpnAPI',detached:true}); + s.stdout.on('data',d=>{ + Object.keys(socketIONamespaces).map(serverName=>{ + socketIONamespaces[serverName].namespace.to('dvpn').emit('logs',d.toString()); + }) + //socketIONamespace.to('dvpn').emit('logs',d.toString()); + output += d.toString(); + lineCount++; + if(lineCount >= 100){ + //truncate + output = output.split('\n').slice(-20).join('\n'); + } + fs.writeFileSync(`${process.env.HOME}/.HandyHost/sentinelData/hostLogs`,output,'utf8') + }); + s.stderr.on('data',d=>{ + //hasFailed = true; + output += d.toString(); + + //console.log('stderr',d.toString()); + lineCount++; + if(lineCount >= 100){ + //truncate + output = output.split('\n').slice(-20).join('\n'); + } + fs.writeFileSync(`${process.env.HOME}/.HandyHost/sentinelData/hostLogs`,output,'utf8') + Object.keys(socketIONamespaces).map(serverName=>{ + socketIONamespaces[serverName].namespace.to('dvpn').emit('logs',d.toString()); + }) + //socketIONamespace.to('dvpn').emit('logs',d.toString()); + //reject({'error':d.toString()}) + }); + s.on('close',d=>{ + this.isRebuildingDVPN = false; + //hasFailed = true; + //console.log('closed',output); + Object.keys(socketIONamespaces).map(serverName=>{ + socketIONamespaces[serverName].namespace.to('dvpn').emit('logs',"\nDVPN NODE WAS REBUILT\n"); + }) + //socketIONamespace.to('dvpn').emit('logs',"\nDVPN NODE STOPPED\n"); + //socketIONamespace.to('dvpn').emit('status','disconnected'); + if(!hasReturned){ + resolve({closed:output}); + } + }); + }).catch(e=>{ this.isRebuildingDVPN = false; - //hasFailed = true; - //console.log('closed',output); + console.log('err',e); + let errout = e; + if(typeof e == 'object'){ + errout = JSON.stringify(e); + } Object.keys(socketIONamespaces).map(serverName=>{ - socketIONamespaces[serverName].namespace.to('dvpn').emit('logs',"\nDVPN NODE WAS REBUILT\n"); + socketIONamespaces[serverName].namespace.to('dvpn').emit('logs','error '+errout); }) - //socketIONamespace.to('dvpn').emit('logs',"\nDVPN NODE STOPPED\n"); - //socketIONamespace.to('dvpn').emit('status','disconnected'); - if(!hasReturned){ - resolve({closed:output}); - } - }); + }) }); }) } diff --git a/dvpnAPI/rebuildDockerContainer.sh b/dvpnAPI/rebuildDockerContainer.sh index 40b2b5b..a5bc73a 100755 --- a/dvpnAPI/rebuildDockerContainer.sh +++ b/dvpnAPI/rebuildDockerContainer.sh @@ -2,8 +2,11 @@ USERNAME="$USER" USERHOME="$(eval echo ~$USERNAME)" -cp ./Dockerfile-hnsdfix ${USERHOME}/.HandyHost/sentinelData/dvpn-node/Dockerfile && \ +#cp ./Dockerfile-hnsdfix ${USERHOME}/.HandyHost/sentinelData/dvpn-node/Dockerfile && \ cd ${USERHOME}/.HandyHost/sentinelData/dvpn-node && \ +git stash && \ +git fetch --all && \ +git checkout "$1" && \ docker build --file ${USERHOME}/.HandyHost/sentinelData/dvpn-node/Dockerfile \ --tag sentinel-dvpn-node \ --force-rm \ diff --git a/dvpnAPI/updateDVPN.sh b/dvpnAPI/updateDVPN.sh index ac315fc..8d01e64 100755 --- a/dvpnAPI/updateDVPN.sh +++ b/dvpnAPI/updateDVPN.sh @@ -1,6 +1,7 @@ #!/bin/bash #udpate dvpn-node cd ${HOME}/.HandyHost/sentinelData/dvpn-node && \ +git stash && \ git fetch --all && \ git checkout "$1" && \ docker build --file Dockerfile \