Skip to content

Testnet Node Deployment (testnet.polykey.io) #194

@Zachaccino

Description

@Zachaccino

Specification

It is now time for our second attempt at testnet deployment.

image

We had previously already done a PK deployment on AWS using ECS back when PK was 0.0.41. While the AWS deployment worked, we hit a lot of problems which meant we had to go through an 8 month long refactoring process over the entire codebase.

Now that the codebase is finally refactored, we're ready for the second attempt.

The AWS architecture is basically the same as before, but our configuration should be a lot more simpler. There are some changes though.

  • Before we had to deal with Node root certificates, now root certificates are no longer relevant to the testnet/mainnet deployment
  • We are now separating into 2 clusters of PK seed nodes: mainnet.polykey.io and testnet.polykey.io. The mainnet is intended for production use, and we will first prototype our testnet deployment and testnet will be where new versions of PK are tested before being released on production.
  • Both mainnet and testnet seed nodes will be trusted by default, but the PK releases should default to use the mainnet and have a switch to use the testnet.
  • We don't know yet whether we should be using NLB or not, we may decide not to use a NLB at all. But there shouldn't be any sort of session state that is required for P2P functionality
  • NLBs cannot be used with PK clients that are debugging the testnet/mainnet nodes, because they would resolve any possible node, and in this case there is in fact network session state. Instead PK client debugging has to be done with the container IPs.
  • We know that IPv6 isn't supported yet so we will have IPv4 and DNS support.
  • We should be using well known ports here of 1314 UDP and 1315 TCP for the ingress port and the client port respectively.
  • The PK nodes are not stateless, they do require node state. However this node state is not important to us to persist. So any EBS volume mounted into the ECS container should work. Basically we just need a mutable temporary directory. What kind of mutations are there? Well the kademlia node graph is persisted atm and is not in-memory.

Additional context

Tasks

  1. - Upload image to ECR "elastic container registry"
  2. - Create ECS "elastic container service" Task Definition for the new image uploaded to ECR
  3. - Start the ECS service, just cluster of 1, test that it is working by using the PK CLI and directly contacting the ECS IP address and port for PK_PORT.
  4. - Integrate firewall (security group), NLB and elastic IP to the NLB and then attach the testnet.polykey.io domain to the NLB

Metadata

Metadata

Assignees

Labels

epicBig issue with multiple subissuesopsOperations and administrationprocedureAction that must be executedproductionAffects a production deployment that involves customersr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicessecuritySecurity risk

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions