Skip to content

Conversation

@antrew
Copy link

@antrew antrew commented Jun 20, 2021

I have noticed that the instructions for setting up all the dependencies are pretty lengthy. I am a big fan of Vagrant and have used it in many projects to ease the setup. Hope this would be useful for impf-botpy.

@alfonsrv
Copy link
Owner

Hey @antrew, thanks for your PR! Looks interesting – what's the difference to Docker?

Not sure the Vagrant setup is shorter than the Setup Guide tbh – it appears to be the same length as for one OS and requires technical background to pull off. The length of the Setup Guide is mainly owned to being geared towards technically unexperienced users, thus being very verbose.

BR, Alfons

@antrew
Copy link
Author

antrew commented Jun 21, 2021

Hey @alfonsrv, you are right, the setup steps have probably about the same complexity for a non-technical user as the other setup options. I see Vagrant as an additional option that might have benefits for some users.

Here are some pros that I could come up with:

  • Isolated environment (VirtualBox VM):
    • Browser windows pop up in a virtual machine and do not disturb the user. The PC can be used normally, while the VM runs in background and occupies a single tab in the task bar of the host PC.
    • The host PC is not polluted with other versions of Python and Python dependencies. No issues with PATHs if the user already has Python installed (e.g., an older version or Python 2). This might be relevant for hobby developers who are not familiar with multiple parallel Python environments.
  • Reproducible environment:
    • The Vagrant environment is reproducible: every user that runs vagrant up gets the same versions of Python, Python dependencies, Chrome and Chromedriver.
    • If the prerequisites of impf-botpy change, the Vagrant box can be simply recreated with vagrant destroy and vagrant up.
  • GUI out of the box, no need for configuration or tools.
  • Prerequisites are slightly easier to install (my opinion, might not stand up to criticism) and do not require configuration:
    • (Git + VirtualBox + Vagrant) vs (Git + Python + Chrome + Chromedriver)
    • no need to select the correct version of ChromeDriver to match the installed Chrome version

Btw, thanks a lot for this project! I'm still playing the lottery for mining ⛏️ my appointment, but I hope I'll get it soon.

@antrew
Copy link
Author

antrew commented Jun 21, 2021

I have tried out the Docker setup and find it very good. 👍

The proposed Vagrant setup has only some minor improvements compared to the existing Docker setup:

  • XFCE4 - the user has a familiar desktop environment with a taskbar, which makes it easier to switch windows and keep an eye on things.
  • No issues with concurrency, although I believe the concurrency issues in Docker setup come from the usability caused by the lack of a desktop environment.

I'm also totally fine with closing this Pull Request, if you don't find it useful.

Btw, thanks again for impf-botpy, I just got my apppointments. 🙇

@alfonsrv
Copy link
Owner

Hey @antrew,

nah not at all – more options if they're useful are always appreciated. Did you book your appointment over Vagrant? Even though the points you outlined are mostly (and correct me if I'm wrong) the same benefits of Docker, the Docker-based image has issues with creating reproducible results compared to a full-on Desktop – the main issue not being but being shadow-banned quite frequently when running in a Docker-container. Not sure what's wrong here, but the deployed bot detection seems to somehow be able to pick up on it (might have something to do with the locales, but not sure)

Therefore I'd be happy to deprecate Docker in favor of a more exotic variant – in this case being Vagrant.

BR, Alfons

@antrew
Copy link
Author

antrew commented Jun 21, 2021

Hey @alfonsrv, yes, I booked my appointment in Vagrant with Chromium instead of Chrome (as in the Pull Request), with these settings:

  • telegram integration
  • personal data (to book remotely)
  • BOOK_REMOTELY: bool = True
  • CONCURRENT_ENABLED: bool = True
  • CONCURRENT_WORKERS: int = 4
  • 4 LOCATIONS with Vermittlungscodes, all on different servers

Remote booking via Telegram was crucial for me, because otherwise I never managed to enter my data fast enough. Even when I submitted the form within couple minutes after the notification, the appointment was not there anymore ("Der ausgewählte Termin ist nicht mehr verfügbar."). With remote booking via a Telegram message it worked on the second or third attempt.

With regard to shadow ban: there are some "Attempting to recover from shadow ban by waiting until" messages in my log, but most of the time the bot just keeps "Rechecking for new appointments".

With regard to Docker: I don't think that shadow ban happens more often in Docker, it is probably just a coincidence. Technically there is no way to tell if the browser runs in Docker, in Vagrant or natively - it's the same browser running on Debian Buster on x86 hardware. As far as I know (not 100% sure though), Webdriver starts a clean browser every time (cookies, local storage, etc). Probably there is some fingerprinting on the server side, but my guess would be that there are just too many people trying to get an appointment these days.

I would not deprecate Docker in favor of Vagrant, but rather have both to give users more choice. I'll have a look into the Docker setup, maybe I can simplify it, or add XFCE4 there to have a better user experience. Other than that the Docker setup is pretty neat. NoVNC was a good surprise! 👍 I did not expect to be able to use the GUI in Docker setup without having to install and configure a VNC tool, but it turned out that a browser was all I needed.

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.

2 participants