status-im / infra-shards

Infrastructure for Status fleets
https://github.com/status-im/nim-waku
0 stars 2 forks source link

Create shards.staging fleet #29

Closed chair28980 closed 3 months ago

chair28980 commented 4 months ago

Establish a dedicated staging environment named shards.staging within the Waku Fleet infrastructure to facilitate testing and pre-production activities for the Status app.

jakubgs commented 3 months ago

What are the requirements? Configuration? What's the priority of this? Deadline?

chair28980 commented 3 months ago

@iurimatias @cammellos please add context per Jakub's comment above :pray:

cammellos commented 3 months ago

I am not very aware of the requirements are, but basically I guess we want to have a fleet that is as similar as possible to shards.test. It will be used for deploying the fleet and run e2e tests against it to validate it's behaviour, much like staging we had before. Is that helpful @jakubgs or you'd like more details?

jakubgs commented 3 months ago

Okay, so just same as shards.test, that's what I wanted to know.

jakubgs commented 3 months ago

Okay, i see, I was confused for a second by the title stating the fleet is supposed ot be status.staging, but I see now it was meant to be shards.staging.

jakubgs commented 3 months ago

Actually, lets keep it short and sweet since ENR records have length limits and call it shards.stage.

For example this hostname would be 52 characters long:

node-01.gc-us-central1-a.shards.staging.statusim.net

And the limit Anton identified while deploying waku.sandbox was 50 characters in total.

jakubgs commented 3 months ago

I've bit the bullet and migrated most of our repos to shorter status.im domain, while leaving old DNS entries as they are.

jakubgs commented 3 months ago

Now it should be fine with shards.staging:

jakubgs commented 3 months ago

Had to fix some issues with Certbot role since domains changed and we now need to handle an extra SAN:

Result:

jakubgs@store-02.gc-us-central1-a.shards.test:~ % sudo openssl x509 -noout -text -in /etc/letsencrypt/live/store-02.gc-us-central1-a.shards.test.statusim.net/cert.pem | grep DNS:
DNS:store-02.gc-us-central1-a.shards.test.status.im, DNS:store-02.gc-us-central1-a.shards.test.statusim.net
jakubgs commented 3 months ago

I've deployed the hosts and configured them:

ENR:

enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.shards.nodes.status.im

image

jakubgs commented 3 months ago

I consider this done:

 > curl -sL fleets.status.im | jq '.fleets["shards.staging"]["tcp/p2p/waku/store"]'
{
  "store-01.do-ams3.shards.staging": "/dns4/store-01.do-ams3.shards.staging.status.im/tcp/30303/p2p/16Uiu2HAm3xVDaz6SRJ6kErwC21zBJEZjavVXg7VSkoWzaV1aMA3F",
  "store-02.do-ams3.shards.staging": "/dns4/store-02.do-ams3.shards.staging.status.im/tcp/30303/p2p/16Uiu2HAmCDSnT8oNpMR9HH6uipD71KstYuDCAQGpek9XDAVmqdEr",
  "store-01.gc-us-central1-a.shards.staging": "/dns4/store-01.gc-us-central1-a.shards.staging.status.im/tcp/30303/p2p/16Uiu2HAmB7Ur9HQqo3cWDPovRQjo57fxWWDaQx27WxSzDGhN4JKg",
  "store-02.gc-us-central1-a.shards.staging": "/dns4/store-02.gc-us-central1-a.shards.staging.status.im/tcp/30303/p2p/16Uiu2HAmKBd6crqQNZ6nKCSCpHCAwUPn3DUDmkcPSWUTyVXpxKsW",
  "store-01.ac-cn-hongkong-c.shards.staging": "/dns4/store-01.ac-cn-hongkong-c.shards.staging.status.im/tcp/30303/p2p/16Uiu2HAmMU7Y29oL6DmoJfBFv8J4JhYzYgazPL7nGKJFBV3qcj2E",
  "store-02.ac-cn-hongkong-c.shards.staging": "/dns4/store-02.ac-cn-hongkong-c.shards.staging.status.im/tcp/30303/p2p/16Uiu2HAmU7xtcwytXpGpeDrfyhJkiFvTkQbLB9upL5MXPLGceG9K"
}