Skip to content
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

Allow listing of active Airnode deployments #1403

Closed
Tracked by #1605
amarthadan opened this issue Aug 29, 2022 · 19 comments · Fixed by #1462
Closed
Tracked by #1605

Allow listing of active Airnode deployments #1403

amarthadan opened this issue Aug 29, 2022 · 19 comments · Fixed by #1462

Comments

@amarthadan
Copy link
Contributor

amarthadan commented Aug 29, 2022

Allow users to list the active Airnode deployment via airnode-deployer CLI in a similar fashion as docker ps command.

airnode-deployer list

Deployment ID   Cloud provider   Airnode address   Stage       Region        Node version   Last Update
1697238d        AWS              0x1234567...      dev         us-east-1     0.7.3          2022-08-29T09:12:34+0000
ada40890        AWS              0x1234567...      prod        us-east-1     0.6.5          2022-09-29T07:34:33+0000
1c4dbc3d        GCP              0xabcdef0...      mainnet-2   eu-central1   0.6.5          2022-08-12T10:17:09+0000

The output will be ordered by the cloud provider, Airnode address, region, stage, and Airnode version in this order. There's an argument to be made about ordering the list by the last update time but I would prefer if the output didn't move around every time I redeploy an Airnode. we can add options for multiple orderings later on.

The deployment ID will be constructed as the first 8 characters of sha([cloudProvider, region, airnodeAddress, stage, airnodeVersion]). The last update time is not included so the update to the given Airnode won't change it's deployment ID.

There will be a --cloud-providers option allowing the listing of Airnodes only from the given cloud provider(s). With no option provided, the deployer will try to list all (both) the cloud providers.

@bbenligiray
Copy link
Member

Deployer would need to be able to use multiple cloud provider credentials to be able to have the cloud provider column. That would be cool though (and useful especially for multi-region/project GCP deployments).

@amarthadan
Copy link
Contributor Author

Credentials for different cloud providers come from different sources so that shouldn't be a problem (even now).

@amarthadan
Copy link
Contributor Author

@aquarat @bbenligiray I've updated the description, let me know whether it makes sense this way.

@bbenligiray
Copy link
Member

Looks good. How about this though?

airnode-deployer list

Deployment ID   Cloud provider   Airnode address   Stage       Node version   Last Update
1697238d        AWS (us-east-1)     0x1234567...      dev         0.7.3          2022-08-29T09:12:34+0000
ada40890        AWS (us-east-1)     0x1234567...      prod        0.6.5          2022-09-29T07:34:33+0000
1c4dbc3d        GCP (eu-central1)   0xabcdef0...      mainnet-2   0.6.5          2022-08-12T10:17:09+0000

@amarthadan
Copy link
Contributor Author

Also a viable option, I'm ok with that.
This is how it looks at the moment (still WIP)
Screenshot_20220920_155819

@bbenligiray
Copy link
Member

I normally view docker ps like this so I think it should be as short as possible
Screenshot from 2022-09-20 17-31-55

@amarthadan
Copy link
Contributor Author

The longest part will be the Airnode address, not sure we can do much about it. The time is just not formatted yet.

@bbenligiray
Copy link
Member

I was actually being literal with 0x1234567..., I don't see why we need the full address

@andreogle
Copy link
Member

andreogle commented Sep 20, 2022

Small thing: if we want to go with shortened addresses, I think it's more common to include the last few characters as well. e.g. Something like 0x1234...6789

@amarthadan
Copy link
Contributor Author

amarthadan commented Sep 21, 2022

I wanted to keep the full address because that's what they need to provide if they want to remove the Airnode without the receipt (with remove-with-deployment-details) and also because it's part of the path in the bucket. But I can shorten it and provide the full address only with the future info command.

@amarthadan
Copy link
Contributor Author

What about this for a final form?
Screenshot_20220921_090257

@aquarat
Copy link
Contributor

aquarat commented Sep 21, 2022

This is looking very good/polished.

@bbenligiray
Copy link
Member

Agreed. Feels like "Airnode version" could be "Version" but I don't feel too strongly.

@andreogle
Copy link
Member

I personally don't think we should be showing the "Airnode" ascii art for this. Feels like a big waste of space (although I do like it when deploying)

@amarthadan
Copy link
Contributor Author

I personally don't think we should be showing the "Airnode" ascii art for this. Feels like a big waste of space (although I do like it when deploying)

Yeah, I was thinking the same thing. I'll keep the ASCII art only for the deploying and removal then.

@amarthadan amarthadan modified the milestones: 0.11.0, 0.10.0 Sep 22, 2022
@amarthadan amarthadan removed their assignment Sep 27, 2022
@martinkolenic
Copy link
Contributor

This is working very smoothly and is a great thing user experience-wise. It detects even an old deployment without any error.

@amarthadan
Copy link
Contributor Author

It detects even an old deployment without any error.

What do you mean by an old deployment?

@amarthadan
Copy link
Contributor Author

No idea why this wasn't closed automatically when the PR was merged. Closing.

@martinkolenic
Copy link
Contributor

martinkolenic commented Sep 28, 2022

Hi @amarthadan, an old deployment = an older version of Airnode than the v0.10 branch (0.8 in this case). These were the testcases:

  • 3 AWS deployments (different stages and regions) + 1 GCP deployment
    • successfully tested displaying only the AWS part and the GCP part as well
  • Only the AWS deployments (after GCP deployment removal; 2x v0.8 and 1x vNext)
  • Only 2 GCP projects (after removing AWS deployments and deploying 2 GCP projects with different stages and regions; v0.8 and vNext)

These all were displayed correctly by the listing utility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants