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: add faucet role #42

Merged
merged 5 commits into from
Mar 27, 2023
Merged

feat: add faucet role #42

merged 5 commits into from
Mar 27, 2023

Conversation

leopaul36
Copy link
Contributor

Linked issues

Changes

  • Add the ash.avalanche.faucet role and install_faucet_docker playbook

Additional comments

A few remarks:

  • The faucet is running on Docker with the ghcr.io/ashavalanche/faucet-image:disable-captcha-variable built from our disable-captcha-variable branch.
  • The way Ava Labs did things, config.json is included in the image which is not really flexible. For now we override it with a volume in the docker-compose file to make a configurable container instance.
  • The erc20tokens configuration allows to load additional ERC-20 tokens in the faucet. Referring to a something that is not an actual deployed ERC-20 smart contract makes the app fail so let's not support this for the first iteration.
  • The evmchains supports multiple chains. We only template a single chain in the config file for now to keep things simple at first.

How to test

  • Add faucet group with validator01
  • Override avalanche_faucet_config['subnet_rpc'] with a valid RPC
  • Run ansible-playbook ash.avalanche.install_faucet_docker -i inventories/local
  • The faucet should be available at http://192.168.60.11:8000/

I will write the README and tutorial for Ash docs once you validate the technical part.

@Nuttymoon
Copy link
Contributor

Looks good to me. We will just have to document that this is not compatible with enabling HTTPS on API endpoints. Or maybe we can mount the OS root certificates to the container and then it might work.

@leopaul36
Copy link
Contributor Author

roles/faucet/tasks/config-faucet.yml Outdated Show resolved Hide resolved
roles/faucet/tasks/config-faucet.yml Outdated Show resolved Hide resolved
roles/faucet/defaults/main.yml Outdated Show resolved Hide resolved
roles/faucet/defaults/main.yml Outdated Show resolved Hide resolved
roles/faucet/defaults/main.yml Outdated Show resolved Hide resolved
roles/faucet/templates/config.json.j2 Outdated Show resolved Hide resolved
roles/faucet/templates/config.json.j2 Outdated Show resolved Hide resolved
roles/faucet/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Nuttymoon Nuttymoon left a comment

Choose a reason for hiding this comment

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

I think we can use the same config name as in the faucet config.json

roles/faucet/defaults/main.yml Show resolved Hide resolved
roles/faucet/defaults/main.yml Show resolved Hide resolved
roles/faucet/templates/config.json.j2 Show resolved Hide resolved
roles/faucet/README.md Show resolved Hide resolved
@leopaul36 leopaul36 merged commit e3609d0 into main Mar 27, 2023
@leopaul36 leopaul36 deleted the 36-faucet-role branch March 27, 2023 16:14
@Nuttymoon Nuttymoon added the enhancement New feature or request label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avalanche Subnet faucet role
2 participants