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

Feat/actions crawler #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

meowsbits
Copy link

@meowsbits meowsbits commented Mar 4, 2020

Hey, We're running a downstream iteration of this at https://github.com/etclabscore/discv4-dns-lists, and have the crawler running on the Github Actions CI there. This frees up a devops task and makes the provenance of the lists transparent.

Here's a start at adding the same functionality here if you're interested.

The config currently uses Actions' schedule: cron config with what I thought is a sufficient time span. There are other ways to handle this, but this seemed the simplest to me.


TODO

Repo Secrets

The Action config depends on a few Secrets being set at the Github repo level.

  • CLOUDFLARE_API_TOKEN
  • ETH_DNS_CLOUDFLARE_ZONEID (This isn't necessary if you can get get the devp2p to-xxx to work without it.... I couldn't.)
  • ETH_DNS_DISCV4_KEY: The full content of the signing key file, eg. cat key.json | pbcopy or whatever.
  • ETH_DNS_DISCV4_KEYPASS: The key's password.
  • maybe a GITHUB_USER_PERSONAL_ACCESS_TOKEN (PAT). If you can get the git push to work without explicit user authentication (see comment below) then you won't need this.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Comment on lines +65 to +66
git remote set-url origin https://${GITHUB_USER}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git
git push origin master
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically actions/checkout@v2 should make it as easy as git push, but I just couldn't get that to work.

[[ ! -d ${p}.${network}.${ETH_DNS_DISCV4_PARENT_DOMAIN} ]] || [[ ! -f ${p}.${network}.${ETH_DNS_DISCV4_PARENT_DOMAIN}/nodes.json ]] && { echo " | DNE, skipping"; continue; }

echo
devp2p dns to-cloudflare --zoneid "$ETH_DNS_CLOUDFLARE_ZONEID" "${p}.${network}.${ETH_DNS_DISCV4_PARENT_DOMAIN}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be changed if you're not using Cloudflare. Also, I was hitting a quota exceeded error when I had more than 1000 records, so some kind of error handling here might be needed.

@fjl
Copy link
Contributor

fjl commented Apr 29, 2020

Hi, this looks nice, but we prefer running the crawler on our own infrastructure because that makes it easier to monitor it. Really appreciate the effort though.

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

Successfully merging this pull request may close these issues.

None yet

2 participants