Overview of InfoShare 2024 - Part 2: Data Quality, LLMs and Data Copilot
Welcome back to our comprehensive coverage of InfoShare 2024! If you missed our first part, click here to catch up on demystifying AI buzzwords and…
Read moreCommunication. Respect. Integrity. Innovation. Strive for greatness. Passion. People.
Stirring words, right? Let me share a tale with you about how we can truly integrate these values into a company structure, and it involves gaming, not another uninspired trip to the go-kart track.
Anno Domini 2019, my very first day at GetInData. I was stationed in a room equipped with a large TV screen with a Compute Stick – of course for “monitoring purposes” like viewing Grafana Dashboards. Highly impractical, so we wanted to use it for Netflix. Unfortunately, the Compute Stick couldn't handle Netflix's system requirements, so we explored what it could support. That's how we ended up playing Heroes 3. Mouse, keyboard, $5 on GOG, and we were good to go. For those of you who didn't have the undeniable pleasure of growing up in a post-Soviet country, Heroes of Might and Magic III (Heroes 3 for short) is a turn-based strategy game where players control an assortment of characters, leading armies across fantasy landscapes, capturing resources and battling enemies. The objective is to manage your towns and heroes effectively to outmaneuver and defeat your opponents, whether through force or strategic diplomacy. Ideal for a group of nerds. Being a turn-based game, everyone who came into the office could regularly participate. They'd simply stroll over to the TV, play their turn, and then call the next person in the rotation. This led to the creation of the “heroes” Slack channel, an essential element of our story that will come into play later. For now I'll just mention that it was a place for us to share memes and strategies.
Naturally, it didn't take long for the in-office gaming system to show its flaws. If even one person could not take their turn, the entire game was stalled until they managed to make it into the office. On a few occasions, people would visit the office solely to play their turns (or were pressured to, because the rest couldn’t play). Soon, we conceived an idea to use a remote desktop, allowing us to play from the comfort of our homes. Our first choice was Team Viewer, but its gaming performance left much to be desired, leading us to switch to AnyDesk. The process was straightforward: play your turn, log out, ping the next player in the #heroes Slack channel, and the cycle repeats. If a battle ensued, ping your opponent. This method served us well for a couple of weeks, providing a more seamless gaming experience than our initial on-site system. However, we still faced a few challenges:
As an IT company, I was confident that we could do better...
As the ninja/rockstar DevOps expert that I am, it dawned on me that I had private servers at my disposal, so why were we still playing on a TV in the office like some wild animals? Thus, I embarked on a journey to create a fully cloud-based solution. Installing Heroes 3 on Linux proved to be astoundingly... easy. A few of my colleagues had already installed Heroes 3 on their Macs and Linux systems with the help of Wine, thanks to this helpful blog post: https://rogulski.it/blog/heroes-3-on-wine/. A massive shoutout to a fellow Pole and Heroes 3 enthusiast.
Surprisingly, the more challenging aspect was establishing a connection with the remote screen. As a diehard Linux administrator, I despise any form of GUI on servers, so headless remote play was the only acceptable solution for me. In my search for ready-made solutions, I stumbled upon an old Docker image featuring VNC and a Heroes 3 demo: https://github.com/bmustiata/docker-heroes3-demo. It functioned superbly, and I had a soft spot for VNC from my high school days, so I enthusiastically got to work... only to fail spectacularly. Through a convoluted series of forks and double forks, VNC had become a relic of the past - a lost technology, once in humanity's grasp, but discarded due to our own folly and hubris. No matter what I tried, I simply couldn't get it to work. And NO, I WAS NOT ABOUT TO INSTALL A GRAPHICAL INTERFACE ON MY SERVER. However, as a seasoned tech pro, I had more tricks up my sleeve. I recalled another handy remote access tool with which I had enterprise experience working headless - NoMachine. It's a commercial product, so I approached it with some hesitation (Free/Libre and Open Source Software is the way to go). However, it worked flawlessly. So flawlessly, in fact, that we continued gaming this way for almost four years! The only downside was that the free version limited us to one connection at a time, making battles a bit tedious. The enterprise version offered a 30-day evaluation, after which a fresh install was required (they even acknowledge this on their site https://www.nomachine.com/faq). To this day, the game remains hosted on my private server. For maintaining a surprisingly reliable SLA (including one instance when I resolved an issue within minutes while on a ski lift), the players kindly gifted me a custom hoodie for my birthday.
One day, my server provider contacted me with suspicions of cryptocurrency mining. They were alarmed because one CPU was consistently running at 100% capacity. This was not due to any illicit mining activity, but rather because old games running on Wine are poorly optimized and tend to throttle the CPU. Initially, the provider was skeptical of my explanation, prompting me to permit a server inspection by one of their technicians.
But here's the twist. When I first set up Heroes 3 on my private server, I knew I was granting access to a bunch of relative strangers (I was new at the company). Consequently, I put a great deal of effort into ensuring robust security hardening of accounts and SSH. In fact, my security measures were so stringent that the provider's technician was unable to log into the root account via the hypervisor (the VPN server in KVM). I had to temporarily relax the security protocols to allow their access. In the end, everything turned out fine. No cryptominers were found; the culprit was simply a venerable old game.
As our gaming sessions grew more intense and players honed their skills, it became clear that rules were necessary to keep the game running smoothly. Vacations, days off and national holidays were no longer considered valid excuses to stall the game. We established a system on Slack where any anticipated absence should be reported prior to one's turn as 'OOH' (Out Of Heroes), a twist on the common 'OOO' (Out Of Office). We even instituted what we called 'PP time' (named after the initials of one of the players) to accommodate sudden calls or events that could potentially stall the game. For some time there was even a Slack Bot on the channel, whose job it was to ping players, reminding them it was their turn. And yes, we've had instances of players taking their turns at airports (on multiple occasions), on boats during vacations, and even at one wedding.
The aforementioned OOH was something we came up with to let other people know in advance that they won’t be playing but it only made sense if you used it… in advance. We had numerous instances where players would declare OOH after already being pinged for their turn, disrupting the day's play dynamics. At one point, one of our players humorously mentioned that declaring OOH when it's already your turn is 'bad practise' and should be shamed. Naturally, this statement was screenshotted for posterity. When this player inevitably did the same thing, the screenshot was quickly shared. The next time it happened to the original screenshotter, someone took a screenshot of that screenshot, adding another layer to our inside joke. Now “the image” evolved into something like this:
Our company has seen significant growth over the last few years, necessitating changes in our management structures. One of these adaptations was the role of a 'Guardian' - someone who guides you through the ins and outs of the company, providing you with the necessary knowledge and support. Around that time, few people became proficient at playing Heroes 3, causing a notable skill gap between seasoned players and those new to the game. To address this issue, we introduced the role of a 'Heroes Guardian'. New players could just ask for a guardian, an experienced player who would guide them through the game, helping them understand the nuances of gameplay.
Are you interested in playing in the cloud like us? If so, spin up a private server with Linux Debian, purchase Heroes 3 on GOG, and simply follow these steps:
apt-get install -y wget xauth xvfb
mkdir -pm755 /etc/apt/keyrings
wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources
dpkg --add-architecture i386 \
&& apt-get update -y \
&& apt-get install -y --install-recommends winehq-stable
wget -O nomachine.deb "https://www.nomachine.com/free/linux/64/deb"
dpkg -i nomachine.deb
rm nomachine.deb
COOKIE=`ps -ef | md5sum | cut -f 1 -d " "`
AUTHFILE=$HOME/Xvfb-0.auth
xauth -f $AUTHFILE add :0 MIT-MAGIC-COOKIE-1 $COOKIE
xauth add :0 MIT-MAGIC-COOKIE-1 $COOKIE
Xvfb :0 -auth $AUTHFILE -screen 0 1280x720x24 &
export DISPLAY=:0
cd /home/${USER}/.wine/drive_c/GOG\ Games/HoMM\ 3\ Complete/
DISPLAY=:0 /opt/wine-stable/bin/wine HD_Launcher.exe &
And voilà! Now you're ready to enjoy Heroes 3 right from your private server. Happy gaming!
I'll be honest, I've been itching to write this blog post for over a year. But I first wanted to accomplish my Magnum Opus—creating Heroes 3 in Docker. This idea had been simmering in my mind ever since I discovered the Docker image I mentioned earlier. Unfortunately, a simple swap of the demo for the full version wasn't enough—the image was based on a dated version of Ubuntu, posing a security risk. Additionally, we needed to include addons like HeroesHD, which presented further challenges for Docker.
My dream was to seamlessly spin up a machine on Google Cloud, generate a domain and play directly from a browser with authentication, all without requiring players to install any client software like NoMachine on their machines. I knew this was possible using noHTML and VNC on the server, but I ended up spending more evenings on this endeavor than I care to admit, and VNC was still not working (and yes, I continue to reject the idea of installing a Graphical Interface, even in Docker).
Eventually, though, I managed to replicate the NoMachine solution. This too was a time-consuming process due to complications with Wine and the X server in Docker. However, I'm proud to finally unveil my creation—Heroes 3 in Docker.
Unfortunately, if you, dear reader, are interested in trying it out, there are a few complications. To avoid any legal problems, I cannot provide a Docker image with Heroes 3 itself. Therefore, a significant portion of the setup process, including building the Docker image, must be manual. Please consider purchasing the game on GOG, then install it on any x64 Linux host (you can use the one from the NoMachine section above).
Below, you'll find the Dockerfile and scripts that you need to include when building the Docker image:
Dockerfile
FROM debian:bullseye
ENV DEBIAN_FRONTEND=noninteractive
ENV USER heroes
ENV PASSWORD P@ssword123
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y wget xauth xvfb procps ssh policykit-1
RUN mkdir -pm755 /etc/apt/keyrings
RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources
RUN dpkg --add-architecture i386 \
&& apt-get update -y \
&& apt-get install -y --install-recommends winehq-stable
RUN wget -O nomachine.deb "https://www.nomachine.com/free/linux/64/deb"
RUN dpkg -i nomachine.deb
RUN rm nomachine.deb
RUN useradd -m ${USER}
EXPOSE 4000
ADD startup.sh /startup.sh
ADD start-h3.sh /start-h3.sh
# Install Heroes 3 Complete from GOG manually inside docker or move .wine folder from another Linux machine via command below
ADD .wine /home/${USER}/.wine
RUN chown -R ${USER}:${USER} /home/${USER}
RUN chmod a+x /start-h3.sh /startup.sh
RUN echo "${USER}:${PASSWORD}" | chpasswd
CMD ["/startup.sh"]
start-h3.sh
\#!/bin/sh
COOKIE=\`ps -ef | md5sum | cut -f 1 -d " "\`
AUTHFILE=$HOME/Xvfb-0.auth
xauth -f $AUTHFILE add :0 MIT-MAGIC-COOKIE-1 $COOKIE
xauth add :0 MIT-MAGIC-COOKIE-1 $COOKIE
Xvfb :0 -auth $AUTHFILE -screen 0 1280x720x24 &
cd /home/${USER}/.wine/drive_c/GOG\ Games/HoMM\ 3\ Complete/
DISPLAY=:0 /opt/wine-stable/bin/wine HD_Launcher.exe &
startup.sh
#!/bin/bash
/etc/NX/nxserver --startup &
su -c "/start-h3.sh" ${USER}
tail -f /usr/NX/var/log/nxserver.log
Once you've copied all these files into the home directory (where the .wine folder from the previous section is located), simply run the following command to build the image in your local repository:
sudo docker build -t heroes/heroes3:1.0.0 .
After building the image, you can initiate it using the following command:
sudo docker run -d -p 4001:4000 --cap-add=SYS_PTRACE heroes/heroes3:1.0.0
The image should subsequently run NoMachine on port 4001 and Heroes 3 on an X server, under user heroes specified in the Dockerfile.
Happy playing!
Psst... Last but not least, if you are a DevOps enthusiast like me or a Data Engineer, Data Analyst, Data Scientist, or maybe just a great fan of Heroes 3 like us, do not hesitate to check out our job offers and follow us on LinkedIn, where we regularly share the latest openings in our "Hiring Friday" series!
Welcome back to our comprehensive coverage of InfoShare 2024! If you missed our first part, click here to catch up on demystifying AI buzzwords and…
Read moreWe are excited to announce that we recently hit the 1,000+ followers on our profile on Linkedin. We would like to send a special THANK YOU :) to…
Read moreDuring my 6-year Hadoop adventure, I had an opportunity to work with Big Data technologies at several companies ranging from fast-growing startups (e…
Read moreThe need for a unified format for geospatial data In recent years, a lot of geospatial frameworks have been created to process and analyze big…
Read moreSnowflake has officially entered the world of Data Lakehouses! What is a data lakehouse, where would such solutions be a perfect fit and how could…
Read moreOne of the biggest challenges of today’s Machine Learning world is the lack of standardization when it comes to models training. We all know that data…
Read moreTogether, we will select the best Big Data solutions for your organization and build a project that will have a real impact on your organization.
What did you find most impressive about GetInData?