•  


Add vagrant by antrew · Pull Request #69 · alfonsrv/impf-botpy · GitHub
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

Add vagrant #69

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add vagrant #69

wants to merge 2 commits into from

Conversation

antrew
Copy link

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

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

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

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 ausgewahlte Termin ist nicht mehr verfugbar."). 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.

None yet

2 participants
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본