dropshell release 2025.0514.2222
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-14 22:22:15 +12:00
parent 283b88effc
commit 47dcfca5f2
5 changed files with 52 additions and 32 deletions

View File

@@ -290,15 +290,43 @@ namespace dropshell
if (rval != 0)
return rval;
std::cout << "Installation complete." << std::endl;
return 0;
}
int install_server(const std::string &server)
{
#pragma WARNING "Need to implement install_server"
// install the dropshell agent on the given server.
return 1; // NOTIMPL
std::cout << "Installing dropshell agent on " << server << std::endl;
std::string agent_path = remotepath::agent(server);
if (agent_path.empty())
{
std::cerr << "Failed to get agent path for " << server << std::endl;
return 1;
}
// first install bb64.
std::string remote_cmd =
"curl -fsSL https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh | bash -s -- " + agent_path;
server_env_manager server_env(server);
if (!server_env.is_valid()) {
std::cerr << "Invalid server environment for " << server << std::endl;
return 1;
}
std::string fullcmd = "ssh -p " + server_env.get_SSH_INFO().port + " " + server_env.get_SSH_INFO().user + "@" + server_env.get_SSH_INFO().host;
fullcmd += " bash -c '" + remote_cmd + "'";
std::cout << "Executing: " << fullcmd << std::endl;
if (!execute_local_command(fullcmd, nullptr, cMode::Silent)) {
std::cerr << "Failed to download bb64 to " << agent_path << " on remote server." << std::endl;
} else {
std::cout << "Downloaded bb64 to " << agent_path << " on remote server." << std::endl;
}
return 0; // NOTIMPL
}
// ------------------------------------------------------------------------------------------------

View File

@@ -9,7 +9,7 @@
#include "utils/assert.hpp"
#pragma TODO("Fix issues with Nuke below.")
#pragma message ("TODO: Fix issues with Nuke below.")
/*