-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testnet Node Deployment (testnet.polykey.io) #194
Comments
@joshuakarp we need to agree on the right wording/name for this concept in both code and the URL.
If we use We may not even need the seed certificates if we just hardcode the seed into kademlia with both the seed Node IDs and seed domains instead of IPs. Oh and importantly we must be able to have kademlia refer to NodeAddresses through a domain name instead of an IP. A domain name can resolve to an IP or a list of IP addresses. That's going to be important for after MVP, since we our domain seed.polykey.io may point to other IPs in the future or globally distributed set of IPs. |
Agreed - Can you clarify this a bit more?
|
To solve this issue, we're going to have to deploy a test-net for the PK network. We can use the nixpkgs development style. The The Additional branches can be marked for releasing to production net. I wonder if this is best done with a separate |
The testnet will require its own domain:
This should allow us to maintain an incremental working system, and invite others to join in testing on the testnet. |
The This gives a few advantages:
|
We can reuse the terminology from blockchains and use:
I like this as this captures the intent and intuition of P2P and blockchain devs. |
There's probably code changes necessary when we hit problem:
|
Scheduled for after merge of https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/184 to master. Then we start from @joshuakarp please notify here when ready! |
@joshuakarp please start on a component diagram here as well. |
Meeting with @tegefaulkes yesterday indicated that This would be what we would want to do inside our container image as well when launching via the task definition. To make this deterministic and automatic (un-attended) the Right now pk bootstrap && pk agent start Where with the node state is already bootstrapped, it would have to be ignored. However these commands are also used by end users so we have to balance UX concerns for users of the CLI itself as well. I prefer the separation of responsibilities here. The Whichever style we go for, we're going to need some environment variables. In #269 we already talked about the addition of For this, we're going to need env variables for:
Network architecture diagram reposted here: @tegefaulkes @joshuakarp can you review and address my questions above with snippets pointing to the code where relevant |
I'm currently using |
If we don't have any other kind of password, perhaps `PK_PASSWORD` is better.
|
Are you specifically referring to the seed node state here? If so, perhaps this doesn't need to be persisted. In-memory would be satisfactory for this case. It would mean that you can't "discover" the seed nodes as part of the kademlia process. If you're referring to the global node state here (i.e. all known nodes from Kademlia) then this needs to be persisted. Otherwise, we completely reset our known nodes each time a keynode is restarted. |
Start date changed from Thursday Nov 18th to Wednesday Dec 1 (delayed from refactoring work in #283). |
This is scheduled to be done as soon as #310 is merged into master. Then the |
The PR that addresses this issue should also split the nodes agent service tests( |
Not split tests, no tests have been written there, so this PR should introduce new tests.
|
Make sure that #326 has the task list updated. |
My mistake - I misinterpreted this as only |
The latest pipeline for master (6 days ago when #321 was merged): https://gitlab.com/MatrixAI/open-source/js-polykey/-/commit/a54598eca29a9b89d1d169e2fd9326c469139dc4 It is a working build, but some test failures are apparent (presumably will be fixed once #310 and #320 are merged into master). |
We only nodes tests to be passing to proceed. The vaults and discovery stuff won't block testnet deployment. So you should continue reviewing the docs. You should start on AWS (you have the login?) once #310 is merged. |
Our most recent pipeline now that #310 and #320 have been merged: https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/470214101 Only a few test failures that will be handled in external PRs. So can push ahead with this. |
I'm going to start by simply attempting to deploy TypeScript-Demo-Lib on AWS and playing around with it. Will spin it down once it's finished. |
Previous TD had a EFS attached here. However some things are different now:
@joshuakarp you should make the modification to the task definition now that we have successfully tested contacting the remote agent. |
Testnet fully deployed... but ongoing tests are needed. |
Initial AWS architecture diagram: This is not fully comprehensive simply because the cloudcraft doesn't sufficiently capture all the VPC and subnet architecture and the association with 3 NLBs and availability zones. We won't do that until we have moved to using Pulumi, and then we can get a better auto generated architecture. For now the intermediate diagram is sufficient for us to close this issue. |
A summary... Relay/Seed/Bootstrap/Testnet Deployment (it's taken at least 4 attempts):
|
|
Specification
It is now time for our second attempt at testnet deployment.
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.
mainnet.polykey.io
andtestnet.polykey.io
. Themainnet
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.1314
UDP and1315
TCP for the ingress port and the client port respectively.Additional context
Tasks
docker run
, we will need the same parameterspk agent start
andpk bootstrap
withPK_RECOVERY_CODE
andPK_PASSWORD
#202 - bootstrappingpk agent start
#286 - portsPK_PORT
.testnet.polykey.io
domain to the NLBtestnet.polykey.io
and they are randomised, cloudflare supports this https://www.cloudflare.com/en-au/learning/performance/what-is-dns-load-balancing/ resolve this in Update testnet.polykey.io to point to the list of IPs running seed keynodes #1775. [ ] - Update reference documentation with testnet architecture including AWS, use a component diagram with relevant AWS resources- waiting on Pulumi... intermediate diagram available Testnet Node Deployment (testnet.polykey.io) #194 (comment)The text was updated successfully, but these errors were encountered: