HabCtl - The Complete Tool For Habbo Retro

Jepzter

Member
May 25, 2018
38
37
HabCtl
Because having fun and connect with people shouldn't be a pain
Background
As I started to learn Golang, I was struggling with a project that would fit as a side project while learning. So I came up with an idea that would take me back 6 years in time, when I was into retro developing. HabCtl offers a way for retro owners to get started with their hotel quick and have all necessary tools and programs taken care of. HabCtl will simply automate the creation of a Habbo Retro, just like it should be!

Development
It's currently in its early stage, but it's ongoing. Currently the support is limited and will only install the necessary software for example Apache, php, phpmyadmin and MySql on the server. There's some automation in it already, the Nginx server will be configured automatically and the website (currently a template) is automatically put into the right folders and Apache is after that started, and you can access the website.

TBA
  • Download zip files with cms/emulator from internet and have them fixed into the docker container (1.1)
  • Configure emulator based on system ipaddr
  • Configure RevCMS files automatically
  • habctl theme command
Current commands
  • habctl install - Automatically installs required software, move files to webserver and starts apache
  • habctl start - Starts containers
  • habctl stop - Stops all running containers

Relase v1.0.1
  • habctl install
  • habctl start
  • habctl stop
  • Local files only (currently)
  • Local setup (not an automatic exposure yet)
  • Automated Mysql setup and database migration
 
Last edited:

LeChris

https://habbo.codes/
Sep 30, 2013
2,786
1,395
Not very confident considering you chose a 5 year old combination to go with instead of something more modern.

God speed as well since you’re building for Unix systems.
 

Jepzter

Member
May 25, 2018
38
37
Not very confident considering you chose a 5 year old combination to go with instead of something more modern.

God speed as well since you’re building for Unix systems.

I guess you're talking about it being RevCMS and PlusEmu? Well, I took them out of what I knew was used back then. The HabCtl isn't built around them it's really just a fetcher and coordinator, adding different packages is very simple. Do you have a combination that's better? Please comment then and I will add them in att the first version and prio that :)
 

Haid

Member
Dec 20, 2011
363
449
Decent idea
Pretty much every new hotel opening is using Rev/PlusEMU based on the ads section and findretros first page (can't see a sinlge new hotel using Brain & Arcturus?) so probably the best choice still.
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Can you please include some code snippets? Maybe a GitHub link to the project might be a good idea. As for combination suggestions, refrain from doing so here. Especially if you're going to suggest your own project here.
 

Jepzter

Member
May 25, 2018
38
37
Can you please include some code snippets? Maybe a GitHub link to the project might be a good idea. As for combination suggestions, refrain from doing so here. Especially if you're going to suggest your own project here.

Sure, I'll update with some code snippets when I feel like the code is where I want it to be. Most likely in a few days.

Im not sure about what you mean with combination suggestions?
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Sure, I'll update with some code snippets when I feel like the code is where I want it to be. Most likely in a few days.

Im not sure about what you mean with combination suggestions?
Some people were discussing the best combination of CMS + Emu. That's not what this thread is about. They can PM and discuss that with you in private.
 

Jepzter

Member
May 25, 2018
38
37
Great idea. PlusEmu is written in C# so how are you gonna make it run on Linux systems?

Hi, thanks for asking! HabCtl is building up docker-compose and Dockerfiles, which mean any emulator can be used on any OS. I re-thought it yesterday and rebuild it all a bit to work with this new way, which also means that it now automatically supports Windows servers anyway. Will give out some of it's core packages this weekend to show for the public how it all will work. :) There is a working version that I've told @treebeard to test whenever he can to assure its quality this far.
Post automatically merged:

I have an update, and that is that there's only really two problems left to be solved for the v1 to go and the code to be open-source. The first thing is unzipping files, I am currently having a issue where only folders are created and not the actual files. The second one is a problem with the emulator docker container not being able to connect to the mysql container at all times on startup. Other than that everything is working as intended. I also need to place the correct SQL from the emulator package into the MySQL sql init.

There will be new possibility to pass two more arguments to the install command, the first one specifies if you want to copy cms files from your pc you either start the argument with "/" or "./". You can also in the same argument instead download a zip file from the internet, that is taking care of just by you specifing a URI instead. The second argument is the same but is for any emulator. (Only java in the beginning). That means that the topics claim for PlusEmu support will now instead be any Java emulator instead. C# is upcoming (Pretty much the build of a new Dockerfile)
 
Last edited:

Jepzter

Member
May 25, 2018
38
37
Hows this going!?

Hi, sorry I have not updated this yet. The development is ongoing but has been off for a week and a half due to a lot to do at work. Im hoping to make some progress on the remaining issues this weekend and will then share the first version :) Hope you can hold on for a brief time, and sorry for the delay. :)

This is what happens when you run HabCtl with the flag "install" and afterwards "start"
1482546fd753a1d15803724609474b16.png

Accessing the localhost:8080 (apache docker image) running synced with php and mysql


PHP:
<h1>HABCTL</h1>
<h4>Attempting MySQL connection from php...</h4>
<?php
$host = 'mysql';
$user = 'root';
$pass = 'pw';
$conn = new mysqli($host, $user, $pass);

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected to MySQL successfully!";
?>
669917ec36f10129d2b8058743a06d77.png


I currently don't have a habbo cms to test with, but anyone should go.
The Habbo emulator Im testing with is facing issues with connecting to Mysql which is the current issue right now

Code snippet for either downloading or copy files locally

Code:
func HandleFiles(c *cli.Context, index int, file File) int64 {

   arg := c.Args().Get(index)

   if len(arg) > 0 && arg[0:1] == "/" || len(arg) > 0 && arg[0:2] == "./"{

      err := copyFiles(c.Args().Get(index), file)

      if err == nil {

         return 1

      }

   } else if len(arg) > 0 && arg[1:4] == "http" {

      // Go ahead and download the user-preferred downloaded file

      log.Printf("Downloading from %s", c.Args().Get(3))

      return Download(file)

   }

   return 0

}

HabCtl is also spinning up a phpMyAdmin container with no configurations needed. Hope that some enjoy that feature :)
 
Last edited:

LaPatron

Smile, because it confuses people.
Nov 23, 2017
72
155
Interesting, love the fact that you're using Docker :) you should try and use Nginx, Heroic, PlusEMU and MariaDB instead of MySQL. Goodluck!
 

Jepzter

Member
May 25, 2018
38
37
Interesting, love the fact that you're using Docker :) you should try and use Nginx, Heroic, PlusEMU and MariaDB instead of MySQL. Goodluck!

Thanks! In the future versions I’m hoping that it will be fully customizable (platform wise). But the Apache and MySQL combo will be the starting line. As of what combinations to run, there’s no limit. Just specify what you want to run together and it should work.

Again, sadly I’m falling a bit of schedule as there’s a few new problems with copying files. Seems to be a bug within the framework I'm using. I’m not going to give out another ETA. But the project is ongoing and I like it a lot, and when the new bugs are fixed, it will go live. :)

I’ve had a few to test it out and gotten some feedback that has been solved. Setting up a bare minimum retro has now gone from hours to minutes really :)
Post automatically merged:

Hello,

Im currently in the stage of cleaning up code and thinking of better resolutions to some of the code that I've written for version 1.0. I've found a bug where placing the habctl executable outside of the source code causes a problem with loading Dockerfiles and is currently solving that. I've removed from the first version possibility to Download files, but will be in the next version which I hope will come quite quick after the first one. The reason for removing that function is because of a few bugs with extracting, so I rather build the core concept first and have that more or less bugfree and how everyone wants it. By that, it is only possible to copy files from your local machine to spin them all up, and its super easy. Here's how easy it is to install your cms, emulator and the sql script to be runned at first time.

command: habctl install
Code:
Website path: /Users/test/my-cms
Backend path: /Users/test/my-emulator
SqlFile path: /Users/test/my-emulator/emulator.sql
Mysql Password: hello123
Create examplefiles? (true/false): false
Have you added /usr/local/share/habctl in File Sharing in Docker preferences?

After this, all you have to do is habctl start this is in my perspective very easy to get going, you dont have to do anything to get started with your habbo retro other than installing docker and downloading habctl. I remember when I was around 12-15 and was going to create a retro, what a mess it could be just setting the core up, so I really think this is an improvement.
Post automatically merged:

Hello everyone, removed tons of code to have this release clean and now it's out there. Remember this is the MVP so you should not all the things that I promised yet, but Im starting to work on that now. Im actually happy that I could cut a lot of messy code, though it's still messy and doesn't scale good. Everything seems to be running like it should, on OS X and Linux Windows is yet untested. The release link has been updated in the thread. Please, help me make this a great tool and report any issues and features you want on the github page or here in the thread. Contribution is highly appreciated
 
Last edited:

griimnak

You're a slave to the money then you die
Jul 20, 2013
957
800
Yeah, you know, I'm surprised nobody thought of an automated installer yet. Well, until now that is :p
Goodluck, I'll be checking out this project because I am also beginning to get into Golang
I love & prefer cli, but i think the habbo crowd would prefer a gui, something to think about
 

Jepzter

Member
May 25, 2018
38
37
Still going strong, I hope? @TheOvster

Hi, its working out well. Though after some testing with revcms I have changed my mind and will go back to Nginx I think due to a bug with white pages that doesn’t seem to occur with Nginx. I also have to create a check after some research seeing that many cms is using php5.6 and habctl is using 7.2. Should have to possibility to choose between those two.

I had the release out, in the thread but due to this I choose to hold back as it felt bad releasing something that doesn’t work as you guys would want. Hoping to improve the tool this weekend
 

Users who are viewing this thread

Top