Naming changes and added HPSH to docker image

This commit is contained in:
Dulana Peiris
2023-12-19 10:56:17 +05:30
parent a9a56420e6
commit 78d534fa2a
8 changed files with 10 additions and 10 deletions

View File

@@ -78,7 +78,7 @@ target_link_libraries(hpcore
add_custom_command(TARGET hpcore POST_BUILD
# COMMAND strip ./build/hpcore
COMMAND cp ./test/bin/hpws ./test/bin/hpfs ./test/bin/debug_shell ./build/
COMMAND cp ./test/bin/hpws ./test/bin/hpfs ./test/bin/hpsh ./build/
)
target_precompile_headers(hpcore PUBLIC src/pchheader.hpp)
@@ -88,7 +88,7 @@ target_precompile_headers(hpcore PUBLIC src/pchheader.hpp)
add_custom_target(docker
COMMAND mkdir -p ./test/local-cluster/bin
COMMAND cp ./build/hpcore ./test/local-cluster/bin/
COMMAND cp ./test/bin/libblake3.so ./test/bin/hpws ./test/bin/hpfs ./test/bin/debug_shell ./test/local-cluster/bin/
COMMAND cp ./test/bin/libblake3.so ./test/bin/hpws ./test/bin/hpfs ./test/bin/hpsh ./test/local-cluster/bin/
COMMAND docker build -t hpcore:latest -t hpcore:0.6.4 -f ./test/local-cluster/Dockerfile ./test/local-cluster/bin/
)
set_target_properties(docker PROPERTIES EXCLUDE_FROM_ALL TRUE)

View File

@@ -244,7 +244,7 @@ namespace conf
ctx.hpws_exe_path = ctx.exe_dir + "/" + "hpws";
ctx.hpfs_exe_path = ctx.exe_dir + "/" + "hpfs";
ctx.debug_shell_exe_path = ctx.exe_dir + "/" + "debug_shell";
ctx.hpsh_exe_path = ctx.exe_dir + "/" + "hpsh";
ctx.contract_dir = basedir;
ctx.config_dir = basedir + "/cfg";
@@ -771,7 +771,7 @@ namespace conf
ctx.tls_cert_file,
ctx.hpfs_exe_path,
ctx.hpws_exe_path,
ctx.debug_shell_exe_path};
ctx.hpsh_exe_path};
for (const std::string &path : paths)
{
@@ -783,7 +783,7 @@ namespace conf
<< "openssl req -newkey rsa:2048 -new -nodes -x509 -days 365 -keyout tlskey.pem -out tlscert.pem\n"
<< "and add it to " + ctx.config_dir << std::endl;
}
else if (path == ctx.hpfs_exe_path || path == ctx.hpws_exe_path || path == ctx.debug_shell_exe_path)
else if (path == ctx.hpfs_exe_path || path == ctx.hpws_exe_path || path == ctx.hpsh_exe_path)
{
std::cerr << path << " binary does not exist.\n";
}

View File

@@ -270,7 +270,7 @@ namespace conf
std::string exe_dir; // HotPocket executable dir.
std::string hpws_exe_path; // hpws executable file path.
std::string hpfs_exe_path; // hpfs executable file path.
std::string debug_shell_exe_path; // debug_shell executable path file
std::string hpsh_exe_path; // debug_shell executable path file
std::string contract_dir; // Contract base directory full path.
std::string contract_hpfs_dir; // Contract hpfs metadata dir (The location of hpfs log file).

View File

@@ -48,7 +48,7 @@ namespace debug_shell
fd_str.resize(10);
snprintf(fd_str.data(), 10, "%d", ctx.control_fds[0]);
char *argv[] = {(char *)conf::ctx.debug_shell_exe_path.data(), fd_str.data(), NULL};
char *argv[] = {(char *)conf::ctx.hpsh_exe_path.data(), fd_str.data(), NULL};
// Just before we execv the debug_shell binary, we set user execution user/group if specified in hp config.
// (Must set gid before setting uid)

View File

@@ -13,6 +13,6 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /usr/local/bin/hotpocket
COPY hpcore hpfs hpws /usr/local/bin/hotpocket/
COPY hpcore hpfs hpws hpsh /usr/local/bin/hotpocket/
ENTRYPOINT ["/usr/local/bin/hotpocket/hpcore"]

View File

@@ -8,7 +8,7 @@ njsfile="Dockerfile.ubt.20.04-njs"
# Prepare build context
tmp=$(mktemp -d)
cp $hpcoredir/build/hpcore $hpcoredir/test/bin/{hpfs,hpws,libblake3.so} $tmp/
cp $hpcoredir/build/hpcore $hpcoredir/test/bin/{hpfs,hpws,hpsh,libblake3.so} $tmp/
strip $tmp/hpcore
# Remove the revision component from hp version to make up the image version.

View File

@@ -2,7 +2,7 @@
FROM evernodedev/hotpocket:latest-ubt.20.04-njs.20
# Copy (overwrite) the local build outputs into the docker image.
COPY hpcore hpfs hpws debug_shell /usr/local/bin/hotpocket/
COPY hpcore hpfs hpws hpsh /usr/local/bin/hotpocket/
ENTRYPOINT ["/usr/local/bin/hotpocket/hpcore"]