Fix nixproc-id-assign tool, reassign IDs, add s6-rc test to the release expression
This commit is contained in:
parent
972fa2278e
commit
25d3af2cbb
|
@ -6,59 +6,8 @@ rec {
|
|||
|
||||
gids = uids;
|
||||
|
||||
httpPorts = {
|
||||
min = 8080;
|
||||
max = 8085;
|
||||
};
|
||||
|
||||
httpsPorts = {
|
||||
min = 8443;
|
||||
max = 8448;
|
||||
};
|
||||
|
||||
tomcatServerPorts = {
|
||||
min = 8005;
|
||||
max = 8008;
|
||||
};
|
||||
|
||||
tomcatAJPPorts = {
|
||||
min = 8009;
|
||||
max = 8012;
|
||||
};
|
||||
|
||||
mysqlPorts = {
|
||||
min = 3306;
|
||||
max = 3406;
|
||||
};
|
||||
|
||||
postgresqlPorts = {
|
||||
min = 5432;
|
||||
max = 5532;
|
||||
};
|
||||
|
||||
mongodbPorts = {
|
||||
min = 27017;
|
||||
max = 27117;
|
||||
};
|
||||
|
||||
inetHTTPPorts = {
|
||||
min = 9001;
|
||||
max = 9091;
|
||||
};
|
||||
|
||||
svnPorts = {
|
||||
min = 3690;
|
||||
max = 3790;
|
||||
};
|
||||
|
||||
influxdbPorts = {
|
||||
min = 8086;
|
||||
max = 8096;
|
||||
step = 3;
|
||||
};
|
||||
|
||||
sshPorts = {
|
||||
min = 1222;
|
||||
max = 1422;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,71 +1,14 @@
|
|||
{
|
||||
"ids" = {
|
||||
"gids" = {
|
||||
"apache" = 2000;
|
||||
"influxdb" = 2001;
|
||||
"mongodb" = 2002;
|
||||
"mysql" = 2003;
|
||||
"postgresql" = 2004;
|
||||
"sshd" = 2005;
|
||||
"tomcat" = 2006;
|
||||
};
|
||||
"httpPorts" = {
|
||||
"apache" = 8080;
|
||||
"tomcat" = 8081;
|
||||
};
|
||||
"httpsPorts" = {
|
||||
"tomcat" = 8443;
|
||||
};
|
||||
"inetHTTPPorts" = {
|
||||
"supervisord" = 9001;
|
||||
};
|
||||
"influxdbPorts" = {
|
||||
"influxdb" = 8086;
|
||||
};
|
||||
"mongodbPorts" = {
|
||||
"mongodb" = 27017;
|
||||
};
|
||||
"mysqlPorts" = {
|
||||
"mysql" = 3306;
|
||||
};
|
||||
"postgresqlPorts" = {
|
||||
"postgresql" = 5432;
|
||||
};
|
||||
"sshPorts" = {
|
||||
"sshd" = 1222;
|
||||
};
|
||||
"svnPorts" = {
|
||||
"svnserve" = 3690;
|
||||
};
|
||||
"tomcatAJPPorts" = {
|
||||
"tomcat" = 8009;
|
||||
};
|
||||
"tomcatServerPorts" = {
|
||||
"tomcat" = 8005;
|
||||
};
|
||||
"uids" = {
|
||||
"apache" = 2000;
|
||||
"influxdb" = 2001;
|
||||
"mongodb" = 2002;
|
||||
"mysql" = 2003;
|
||||
"postgresql" = 2004;
|
||||
"sshd" = 2005;
|
||||
"tomcat" = 2006;
|
||||
};
|
||||
};
|
||||
"lastAssignments" = {
|
||||
"gids" = 2006;
|
||||
"httpPorts" = 8081;
|
||||
"httpsPorts" = 8443;
|
||||
"inetHTTPPorts" = 9001;
|
||||
"influxdbPorts" = 8086;
|
||||
"mongodbPorts" = 27017;
|
||||
"mysqlPorts" = 3306;
|
||||
"postgresqlPorts" = 5432;
|
||||
"sshPorts" = 1222;
|
||||
"svnPorts" = 3690;
|
||||
"tomcatAJPPorts" = 8009;
|
||||
"tomcatServerPorts" = 8005;
|
||||
"uids" = 2006;
|
||||
};
|
||||
}
|
|
@ -17,60 +17,6 @@ let
|
|||
};
|
||||
in
|
||||
rec {
|
||||
apache = rec {
|
||||
port = ids.httpPorts.apache or 0;
|
||||
|
||||
pkg = constructors.simpleWebappApache {
|
||||
inherit port;
|
||||
serverAdmin = "root@localhost";
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "httpPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
mysql = rec {
|
||||
port = ids.mysqlPorts.mysql or 0;
|
||||
|
||||
pkg = constructors.mysql {
|
||||
inherit port;
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "mysqlPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
postgresql = rec {
|
||||
port = ids.postgresqlPorts.postgresql or 0;
|
||||
|
||||
pkg = constructors.postgresql {
|
||||
inherit port;
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "postgresqlPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
tomcat = rec {
|
||||
httpPort = ids.httpPorts.tomcat or 0;
|
||||
httpsPort = ids.httpsPorts.tomcat or 0;
|
||||
serverPort = ids.tomcatServerPorts.tomcat or 0;
|
||||
ajpPort = ids.tomcatAJPPorts.tomcat or 0;
|
||||
|
||||
pkg = constructors.simpleAppservingTomcat {
|
||||
inherit httpPort httpsPort serverPort ajpPort;
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "httpPorts" "httpsPorts" "tomcatServerPorts" "tomcatAJPPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
mongodb = rec {
|
||||
port = ids.mongodbPorts.mongodb or 0;
|
||||
|
||||
pkg = constructors.simpleMongodb {
|
||||
inherit port;
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "mongodbPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
supervisord = rec {
|
||||
inetHTTPServerPort = ids.inetHTTPPorts.supervisord or 0;
|
||||
|
||||
|
@ -93,27 +39,6 @@ rec {
|
|||
requiresUniqueIdsFor = [ "svnPorts" ];
|
||||
};
|
||||
|
||||
influxdb = rec {
|
||||
httpPort = ids.influxdbPorts.influxdb or 0;
|
||||
rpcPort = httpPort + 2;
|
||||
|
||||
pkg = constructors.simpleInfluxdb {
|
||||
inherit httpPort rpcPort;
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "influxdbPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
sshd = rec {
|
||||
port = ids.sshPorts.sshd or 0;
|
||||
|
||||
pkg = constructors.sshd {
|
||||
inherit port;
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "sshPorts" "uids" "gids" ];
|
||||
};
|
||||
|
||||
docker = {
|
||||
pkg = constructors.docker;
|
||||
};
|
||||
|
|
|
@ -29,6 +29,10 @@ rec {
|
|||
inherit nixpkgs;
|
||||
};
|
||||
|
||||
s6-rc = import ./tests/webapps-agnostic-s6-rc.nix {
|
||||
inherit nixpkgs;
|
||||
};
|
||||
|
||||
supervisord = import ./tests/webapps-agnostic-supervisord.nix {
|
||||
inherit nixpkgs;
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@ stdenv.mkDerivation {
|
|||
-e "s|@getopt@|${getopt}/bin/getopt|" \
|
||||
-e "s|@readlink@|$readlink|" \
|
||||
-e "s|@NIXPROC@|${../../nixproc}|" \
|
||||
-e "s|@commonchecks@|${../commonchecks}|" \
|
||||
${./nixproc-id-assign.in} > $out/bin/nixproc-id-assign
|
||||
chmod +x $out/bin/nixproc-id-assign
|
||||
'';
|
||||
|
|
Loading…
Reference in New Issue