status-im / infra-shards

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

Rename shards fleets to status fleet, including tests to prod #33

Open fryorcraken opened 2 weeks ago

fryorcraken commented 2 weeks ago

The present shards fleets (shards.test and shards.staging) are now the sole Waku (v2) fleets used by Status applications.

Their names should be changed to reflect their usage.

shards.test

shards.test fleet is used as the default setting for Status Desktop and Status Mobile beta releases. Status teams has asked to consider this fleet as an end user facing fleet. Hence, proposed new name is status.prod

shards.staging

shards.staging is used for staging purposes for Status application. Hence, proposed new name is status.staging

Process

Proposed process to proceed with renaming with minimal effort and disruption.

  1. Setup new DNS entries for existing hosts (e.g. boot-01.gc-us-central1-a.shards.test.status.im gets additional DNS boot-01.gc-us-central1-a.status.prod.status.im)
  2. Generate new SSL cert for 1 store node
  3. Change websocket-secure* parameters to new cert for this one store node
  4. Change Status web app to only use the store node with the new SSL cert (Status web team)
  5. Generate new SSL cert for all nodes
  6. Change Status web app to use new DNS TXT for DNS discovery (Status web team)
  7. Setup new DNS TXT record including ENR tree with new domain names (new domain in both wss and dns4 fields of the ENRs)
  8. Update dns4-domain-name to new domain name
  9. Replace hardcoded domain for DNS discovery in Status Mobile & Desktop apps (Waku chat team) (e.g. from enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.test.shards.nodes.status.im to enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.prod.status.nodes.status.im)
  10. Wait until latest Status release with old domain name can be considered unsupported (3 months?)
  11. Deregister old DNS TXT and old domain names

Note: steps 3-4, 6 can be skipped for shards.staging

Potential Risks

Steps 3-4, 6: Status web apps

I believe Status web apps only use store services, @prichodko please confirm.

Step 8: dns4-domain-name behaviour

Need to ensure that clients (Status application) can still connect to nwaku node when:

@Ivansete-status please confirm/schedule test

jakubgs commented 2 weeks ago

Some questions:

Ivansete-status commented 2 weeks ago

@Ivansete-status please confirm/schedule test

Thanks for that! The naming makes sense to me. I'm happy to help with the tests.

I think we will need to have the following additional steps as well:

  1. Rename the infra-shards repo to infra-status ( https://github.com/status-im/infra-status-legacy could serve as a reference of what we had .)
  2. Review all the current opened GitHub issues that refer to status.test and indicate that the fleet is now status.prod.

( cc @jakubgs )

jakubgs commented 2 days ago

Great, apparently IP addresses on Google Cloud cannot be renamed: https://stackoverflow.com/questions/22687968/rename-reserved-ip-address-in-gce

jakubgs commented 2 days ago

It appears renaming Google Cloud instances also will not work:

"store-01-gc-us-central1-a-shards-staging" -> "store-01-gc-us-central1-a-status-staging" # forces replacement
jakubgs commented 1 day ago

I have renamed shards.staging to status.staging as a test run:

It's visible at https://fleets.waku.org/ :

image

jakubgs commented 1 day ago

Also created the new ENR records:

 > ./dnsdisc.py --domain boot.staging.status.nodes.status.im --query-service-name=nim-waku-enr --query-service-id=nim-waku-boot-enr --query-env=status --query-stage=staging   
[INFO] Service found: boot-01.do-ams3.status.staging:nim-waku-boot-enr
[INFO] Service found: boot-01.gc-us-central1-a.status.staging:nim-waku-boot-enr
[INFO] Service found: boot-01.ac-cn-hongkong-c.status.staging:nim-waku-boot-enr
[INFO] Creating record: boot.staging.status.nodes.status.im
[INFO] Creating record: e3d5eet4vapo4tmlywqt2ximhe.boot.staging.status.nodes.status.im
[INFO] Creating record: fdxn3sn67na5dka4j2gok7bvqi.boot.staging.status.nodes.status.im
[INFO] Creating record: hi4d7nhzkwqouqrmn3nr7sjwiy.boot.staging.status.nodes.status.im
[INFO] Creating record: odkcy7sc2ij6dvgfd3rojse2c4.boot.staging.status.nodes.status.im
[INFO] Creating record: wrgrhlrn5c5njfit6tora7finu.boot.staging.status.nodes.status.im
[INFO] URL: enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.status.nodes.status.im
 > ./dnsdisc.py --domain store.staging.status.nodes.status.im --query-service-name=nim-waku-enr --query-service-id=nim-waku-store-enr --query-env=status --query-stage=staging   
[INFO] Service found: store-01.do-ams3.status.staging:nim-waku-store-enr
[INFO] Service found: store-02.do-ams3.status.staging:nim-waku-store-enr
[INFO] Service found: store-01.gc-us-central1-a.status.staging:nim-waku-store-enr
[INFO] Service found: store-02.gc-us-central1-a.status.staging:nim-waku-store-enr
[INFO] Service found: store-01.ac-cn-hongkong-c.status.staging:nim-waku-store-enr
[INFO] Service found: store-02.ac-cn-hongkong-c.status.staging:nim-waku-store-enr
[INFO] Creating record: 2nm67iglh6ppy4aynir3imkorm.store.staging.status.nodes.status.im
[INFO] Creating record: 7pitefne2vhtt3wkpetgpoubna.store.staging.status.nodes.status.im
[INFO] Creating record: eembrblqz4pry4bfsbmzqs234u.store.staging.status.nodes.status.im
[INFO] Creating record: fdxn3sn67na5dka4j2gok7bvqi.store.staging.status.nodes.status.im
[INFO] Creating record: peojb44fwdfxs5u2g3jivdwabu.store.staging.status.nodes.status.im
[INFO] Creating record: siuuicuqtrgjkmskhp4mmpzk2q.store.staging.status.nodes.status.im
[INFO] Creating record: store.staging.status.nodes.status.im
[INFO] Creating record: v6wvb5dykwjfkfnkhyiancrnjm.store.staging.status.nodes.status.im
[INFO] Creating record: zxqvul4dly53drx7l74r7ckvfq.store.staging.status.nodes.status.im
[INFO] URL: enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@store.staging.status.nodes.status.im