Skip to content

Commit

Permalink
refactor: assign package to command everywhere else
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed Mar 18, 2024
1 parent 729320e commit ccf8305
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nix/apache-kafka.nix
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ with lib;
};
in
{
command = "${startScript}/bin/start-kafka";
command = startScript;

readiness_probe = {
# TODO: need to find a better way to check if kafka is ready. Maybe use one of the scripts in bin?
Expand Down
2 changes: 1 addition & 1 deletion nix/clickhouse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ in
};
in
{
command = "${lib.getExe startScript}";
command = startScript;

readiness_probe = {
# FIXME: revert back to clickhouse-client readiness_probe once CI is moved out of github public runners
Expand Down
2 changes: 1 addition & 1 deletion nix/elasticsearch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ in

in
{
command = "${startScript}";
command = startScript;

readiness_probe = {
exec.command = "${pkgs.curl}/bin/curl -f -k http://${config.listenAddress}:${toString config.port}";
Expand Down
4 changes: 2 additions & 2 deletions nix/mysql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ in
{
"${name}" =
{
command = "${startScript}/bin/start-mysql";
command = startScript;

readiness_probe = {
# Turns out using `--defaults-file` alone doesn't make the readiness_probe work unless `MYSQL_UNIX_PORT` is set.
Expand All @@ -296,7 +296,7 @@ in
availability.restart = "on_failure";
};
"${name}-configure" = {
command = "${configureScript}/bin/configure-mysql";
command = configureScript;
namespace = name;
depends_on."${name}".condition = "process_healthy";
};
Expand Down
2 changes: 1 addition & 1 deletion nix/nginx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ in
in
{
processes."${name}" = {
command = "${startScript}/bin/start-nginx";
command = startScript;
readiness_probe = {
# FIXME need a better health check
exec.command = "[ -e ${config.dataDir}/nginx/nginx.pid ]";
Expand Down
2 changes: 1 addition & 1 deletion nix/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ in
};
in
{
command = "${startScript}/bin/start-prometheus";
command = startScript;
readiness_probe = {
http_get = {
host = config.listenAddress;
Expand Down
2 changes: 1 addition & 1 deletion nix/redis-cluster.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ in
};
in
lib.nameValuePair "${name}-${nodeName}" {
command = "${startScript}/bin/start-redis";
command = startScript;
shutdown.command = "${config.package}/bin/redis-cli -p ${port} shutdown nosave";

readiness_probe = {
Expand Down
2 changes: 1 addition & 1 deletion nix/zookeeper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ with lib;
};
in
{
command = "${startScript}/bin/start-zookeeper";
command = startScript;

readiness_probe = {
exec.command = "echo stat | ${pkgs.netcat.nc}/bin/nc localhost ${toString config.port}";
Expand Down

0 comments on commit ccf8305

Please sign in to comment.