Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/HandyOSS/HandyHost
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsmith540 committed Apr 9, 2022
2 parents 83be752 + f5da70a commit ce507e0
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 42 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -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"
}
102 changes: 61 additions & 41 deletions dvpnAPI/Setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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});
}
});
})
});
})
}
Expand Down
5 changes: 4 additions & 1 deletion dvpnAPI/rebuildDockerContainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions dvpnAPI/updateDVPN.sh
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down

0 comments on commit ce507e0

Please sign in to comment.