Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
sevanspowell testing tutorial
Browse files Browse the repository at this point in the history
- I'm writing a tutorial and testing the commands out as I go. Feel
free to revert this commit at any time.
  • Loading branch information
sevanspowell committed Oct 13, 2020
1 parent 16d7be4 commit 1f1af75
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 27 deletions.
4 changes: 2 additions & 2 deletions clusters/mantis/testnet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ in {
autoscalingGroups = listToAttrs (forEach [
{
region = "eu-central-1";
desiredCapacity = 3;
desiredCapacity = 10;
}
{
region = "us-east-2";
desiredCapacity = 3;
desiredCapacity = 2;
}
] (args:
let
Expand Down
60 changes: 60 additions & 0 deletions clusters/mantis/testnet/ingress.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,30 @@
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-4 mantis-4.mantis-miner.service.consul
backend mantis_5
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-5 mantis-5.mantis-miner.service.consul
backend mantis_6
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-6 mantis-6.mantis-miner.service.consul
backend mantis_7
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-7 mantis-7.mantis-miner.service.consul
backend mantis_8
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-8 mantis-8.mantis-miner.service.consul
backend mantis_9
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-9 mantis-9.mantis-miner.service.consul
backend mantis_10
default-server resolve-prefer ipv4 resolvers consul resolve-opts allow-dup-ip
server mantis-10 mantis-10.mantis-miner.service.consul
frontend mantis_1
mode tcp
option tcplog
Expand All @@ -39,5 +63,41 @@
option tcplog
bind *:9004
default_backend mantis_4
frontend mantis_5
mode tcp
option tcplog
bind *:9005
default_backend mantis_5
frontend mantis_6
mode tcp
option tcplog
bind *:9006
default_backend mantis_6
frontend mantis_7
mode tcp
option tcplog
bind *:9007
default_backend mantis_7
frontend mantis_8
mode tcp
option tcplog
bind *:9008
default_backend mantis_8
frontend mantis_9
mode tcp
option tcplog
bind *:9009
default_backend mantis_9
frontend mantis_10
mode tcp
option tcplog
bind *:9010
default_backend mantis_10
'';
}
87 changes: 62 additions & 25 deletions jobs/mantis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -244,31 +244,68 @@ let
});
};

miners = [{
name = "mantis-1";
requiredPeerCount = 0;
publicPort = 9001; # Make sure to also change it in ingress.nix
instanceId = "i-0f85d80501cd0dceb";
}
# {
# name = "mantis-2";
# requiredPeerCount = 1;
# publicPort = 9002;
# instanceId = "i-0297e484326eca1ac";
# }
# {
# name = "mantis-3";
# requiredPeerCount = 2;
# publicPort = 9003;
# instanceId = "i-0917601141a6187fc";
# }
# {
# name = "mantis-4";
# requiredPeerCount = 3;
# publicPort = 9004;
# instanceId = "i-0b5ad95503d6208e2";
# }
];
miners = [
{
name = "mantis-1";
requiredPeerCount = 0;
publicPort = 9001; # Make sure to also change it in ingress.nix
instanceId = "i-016b85976830d3010";
}
{
name = "mantis-2";
requiredPeerCount = 1;
publicPort = 9002;
instanceId = "i-016ff18ce9d37055d";
}
{
name = "mantis-3";
requiredPeerCount = 2;
publicPort = 9003;
instanceId = "i-027fdf934cd365575";
}
{
name = "mantis-4";
requiredPeerCount = 3;
publicPort = 9004;
instanceId = "i-04832eb69076aef14";
}
{
name = "mantis-5";
requiredPeerCount = 4;
publicPort = 9005;
instanceId = "i-0917601141a6187fc";
}
{
name = "mantis-6";
requiredPeerCount = 5;
publicPort = 9006;
instanceId = "i-0bda1c2cb52b9ac3e";
}
{
name = "mantis-7";
requiredPeerCount = 6;
publicPort = 9007;
instanceId = "i-0d250b307a248218e";
}
{
name = "mantis-8";
requiredPeerCount = 7;
publicPort = 9008;
instanceId = "i-0df761c9a86cd3df3";
}
{
name = "mantis-9";
requiredPeerCount = 8;
publicPort = 9009;
instanceId = "i-0f85d80501cd0dceb";
}
{
name = "mantis-10";
requiredPeerCount = 9;
publicPort = 9010;
instanceId = "i-0fe5414a46df1d268";
}
];
in {
mantis = mkNomadJob "mantis" {
datacenters = [ "us-east-2" "eu-central-1" ];
Expand Down

0 comments on commit 1f1af75

Please sign in to comment.