waku-org / waku-simulator

Tool to simulate a waku network with multiple nodes, traffic and users
https://simulator.waku.org
2 stars 6 forks source link

Update waku-simulator instance on every nwaku nightly release #19

Closed alrevuelta closed 9 months ago

alrevuelta commented 9 months ago

Currently, we update waku-simulator on every new commit to nwaku master. Perhaps it would be better to do it on every nightly release (once a day) instead. Since each commit reboots the setup, that can affect the metrics, so frequent commits to master will leave some difficult to interpret metrics (crash? normal reboot due to new commit?, etc)

DoD

jakubgs commented 9 months ago

The current image looks new:

jakubgs@metal-01.he-eu-hel1.wakusim.misc:~ % d inspect wakuorg/nwaku:latest | grep -e created -e commit
        "Created": "2024-02-17T19:54:07.036907223Z",
                "commit": "ce151efc",

Did you do that?

alrevuelta commented 9 months ago

cc @gabrielmer

Did you do that?

gabrielmer commented 9 months ago

Do what exactly? I personally haven't touched anything lately.

My understanding is that Dockerhub's latest image gets updated regularly and that it gets updated in the simulator by https://github.com/waku-org/waku-simulator/blob/909bc425fc7b72eac83ca0f950640404f6dfb250/wakusim.env#L11-L12

jakubgs commented 9 months ago

Right, so is there anything more you need? It does seem to work as far as I can tell:

jakubgs@metal-01.he-eu-hel1.wakusim.misc:/docker/waku-simulator % j -o cat -u watchtower --since '1 days ago' --grep Creating | tail -n5
time="2024-02-18T17:50:20Z" level=info msg="Creating /waku-simulator_nwaku_78"
time="2024-02-18T17:50:21Z" level=info msg="Creating /waku-simulator_nwaku_29"
time="2024-02-18T17:50:22Z" level=info msg="Creating /waku-simulator_nwaku_93"
time="2024-02-18T17:50:23Z" level=info msg="Creating /waku-simulator_nwaku_1"
time="2024-02-18T17:50:24Z" level=info msg="Creating /waku-simulator_nwaku_85"
jakubgs commented 9 months ago

BTW, Docker Hub images are synced with a delay, if you want the newest images faster you should use https://harbor.status.im/.

So harbor.status.im/wakuorg/nwaku and not just wakuorg/nwaku.

jakubgs commented 9 months ago

I don't really see anything to do here, watchtower already updates images from the latest tag.

But just for good measure I added this pull to the compose for when the compose service is restarted:

gabrielmer commented 9 months ago

BTW, Docker Hub images are synced with a delay, if you want the newest images faster you should use https://harbor.status.im/.

So harbor.status.im/wakuorg/nwaku and not just wakuorg/nwaku.

How often are images synced in Dockerhub?

What we want to do here is to update the simulator's image only once a day. The issue isn't just to have an updated image, it's also about not restarting the simulator too often with every new commit

jakubgs commented 9 months ago

I checked and the Docker Hub sync is event-based, so the delay should be minimal:

image

jakubgs commented 9 months ago

If you want the updates to happen less frequently we can simply not use latest image and instead build a special image for wakusim host on a different schedule from master. Every other day or whatever other option you prefer.

jakubgs commented 9 months ago

Oh, and latest image is updated daily:

image

https://ci.infra.status.im/job/nim-waku/job/docker-latest/configure

Is that really too frequent?

gabrielmer commented 9 months ago

Oh, an latest image is updated daily:

https://ci.infra.status.im/job/nim-waku/job/docker-latest/configure

Is that really too frequent?

I think daily is what we were looking for, if so there's no issue and everything works perfectly.

@alrevuelta please confirm if there's anything else to do or we can close the issue

jakubgs commented 9 months ago

I'm just going to close this, feel free to reopen.