Description: Packages for Debian
Current behaviour: People need to compile themselves
Proposed behaviour: People can install packages from a repository
Hi Guys,
First of all, thanks for all the great work! Me and my friends are having loads of fun using your amazing piece of work! Which brings me to the point of this issue.
I would like to contribute to the project, but I'm no programmer (although I would like to learn ^^), I do have the possibility to make packages for Debian. Is this anything that's desirable for this project? If so, I propose the following:
Where the packages make a split between the servers and the tools, built as follows:
server: cmake ../ -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DSERVERS=1 -DTOOLS=0 -DWITH_WARNINGS=0 -DSCRIPTS=static
tools: cmake ../ -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DSERVERS=0 -DTOOLS=1 -DWITH_WARNINGS=0 -DSCRIPTS=static
Where INSTALLPREFIX=/opt/trinitycore
I will also provide systemd unit files and a slightly modified config to support it (pid files) and logging to /opt/trinitycore/logs
Please note that a setup like this makes it harder for multiple configurations to run on the same server, unless support is built-in for commandline flags like:
./worldserver -c $configfile
I haven't found any leads in the wiki that suggests this is possible, but I'm also not sure how big of a problem it is.
If this is desirable I plan to run the script I use (which might appear on github in the Near Future(TM), but my friend needs some time to make that happen) once a day and publish it's result to a public repository.
For now I'm still setting it up and it running solely on internally available resources. Should this come to life, I will create a complete instruction on how to install and setup a TrinityCore server on Debian Jessie.
Ultimate goal? Make TrinityCore more accessible to the world by removing some complexity of the installation process. While also providing a steady stream updates to existing environments.
Thoughts, remarks and/or emotions? :-)
Branch(es): initially only 3.3.5
TC hash/commit: Whichever is available when the script runs
Operating system: Debian Jessie
I really doub debian guys will allow to include this on their repo.
It wasn't intented to be included in the Debian repo's. There are multiple software projects that have their own repositories:
The main problem is, that we don't have anybody who really knows this kind of stuff.
Maybe this helps. I use Gitlab CI to compile the latest binaries (Ubuntu). I does a git clone of the repo and installs the dependencies. Afterwards it commit them back to another repo. (This is free)
This is for example the Dockerfile which I use to compile the binaries.
Dockerfile:
FROM ubuntu:16.04
# Install Dependencies
RUN apt-get update \
&& apt-get -qq install \
git \
cmake \
make \
gcc \
g++ \
libmysqlclient-dev \
libssl-dev \
libbz2-dev \
libreadline-dev \
libncurses-dev \
libboost-dev \
libboost-thread-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-iostreams-dev \
&& mkdir ~/.ssh
# Copy private key (using priv/public key so I do not need to pass username/password)
COPY key/id_rsa /root/.ssh/
COPY key/known_hosts /root/.ssh/ #(need to know Gitlab hosts)
# Clone own repo & TrinityCore repo
RUN chmod 0600 /root/.ssh/id_rsa \
&& cd / \
&& git clone [email protected]:<own repo location> \
&& cd ~ \
&& git clone -b 6.x git://github.com/TrinityCore/TrinityCore.git
RUN cd ~/TrinityCore \
&& rm -rf sql \
&& mkdir build \
&& cd build \
&& cmake ../ -DCMAKE_INSTALL_PREFIX=/Trinity/server \
-DWITH_DYNAMIC_LINKING=ON \
-DTOOLS=1 \
&& make install
# Test executables
RUN ./Trinity/server/bin/bnetserver --version \
&& ./Trinity/server/bin/worldserver --version
# Remove TrinityCore Repo and upload binaries to Local repo
RUN rm -rf ~/TrinityCore \
&& cd /Trinity \
&& git config --global user.email "<your email>" \
&& git config --global user.name "<your username>t" \
&& git config --global push.default simple \
&& git add -A \
&& git commit -m "new version of binaries" \
&& git push \
&& rm -rf /Trinity \
&& rm -rf /root/.ssh/id_rsa
Gitlab CI yaml file
# This file is a template, and might need editing before it works on your project.
# Official docker image.
image: docker:latest
services:
- docker:dind
before_script:
- docker info
build:
stage: build
script:
- docker build -t test .
To run it I have an Linux server with Docker installed. I created a Dockerfile/Image with pre installed dependencies. I link the container to the local repo with the binaries & Trinitycore SQL's and as entrypoint I start the bnetserver or worldserver.
This way I only need to update the local TrinityCore and own repo with the latest binaries.
Like I said, I can make packages for you on a daily basis, I am running tests for this now, because I want to have regular updates without compiling them by hand.
And I rather not have compilers on internet facing systems. :-)
But the main question remains, do you want a public available repository?
If anyone is still interested, I have the packages done. With the following instructions, one can install their own TrinityCore server using precompiled packages.
The packages come with a default configuration to support service control by SystemD. A few details:
These packages will be recompiled everyday at midnight, compiling/uploading takes about an hour, so expect fresh versions around 01:30 AM CEST.
If there are any changes with the configuration files (new options added etc.) I will add them as soon as I can. Same goes for the base database (TDB), if there is a new version, I will update A.S.A.P.
If you have any feedback, please let me know :-)
Also, I did not make a package for the maps etc, should I?
The installation instructions I promised:
== Instructions ==
This instruction will help you setup a TrinityCore server on a Debian Jessie server with it's own local MySQL server. If you require a seperate MySQL server, please adjust where needed.
This command will install the TrinityCore server and all it's dependencies (including a MariaDB server)
NOTE: If you want to run a seperate database server, run this command with '--no-install-recommends' to skip the installation of the database package.
The default username and password are:
username: admin
password: ChangeMeNOW!
a. You can create new accounts with:
.account create USERNAME PASSWORD
Press enter again to log out
Note: enUS could also be enGB if you have a European version of the client
Nice guide, I recommend posting it in the forums as well for higher visibility.
Posted on the forums :-) https://community.trinitycore.org/topic/13013-how-to-install-using-pre-compiled-packages/
Most helpful comment
If anyone is still interested, I have the packages done. With the following instructions, one can install their own TrinityCore server using precompiled packages.
The packages come with a default configuration to support service control by SystemD. A few details:
The server recommends the database (so you can install the parts on different machines), but any default install will install it. The database package will also install MariaDB from the default Debian Repository
These packages will be recompiled everyday at midnight, compiling/uploading takes about an hour, so expect fresh versions around 01:30 AM CEST.
If there are any changes with the configuration files (new options added etc.) I will add them as soon as I can. Same goes for the base database (TDB), if there is a new version, I will update A.S.A.P.
If you have any feedback, please let me know :-)
Also, I did not make a package for the maps etc, should I?
The installation instructions I promised:
== Instructions ==
This instruction will help you setup a TrinityCore server on a Debian Jessie server with it's own local MySQL server. If you require a seperate MySQL server, please adjust where needed.
a. You don't need anything except the basic install!
deb http://repo.element-networks.nl/ custom main
1a. Add the repository key for package verification
wget http://repo.element-networks.nl/public.gpg -O - | apt-key add -
apt-get update
apt-get install trinitycore-server3.3.5
This command will install the TrinityCore server and all it's dependencies (including a MariaDB server)
NOTE: If you want to run a seperate database server, run this command with '--no-install-recommends' to skip the installation of the database package.
setup_database.sh
4a. If you run the database on a different server, run the script on that server. Also, change worldserver.conf and authserver.conf accordingly!
systemctl start trinitycore-authserver.service
systemctl start trinitycore-worldserver.service
telnet localhost 3443
The default username and password are:
username: admin
password: ChangeMeNOW!
.account set password admin NEWPASSWORD NEWPASSWORD
a. You can create new accounts with:
.account create USERNAME PASSWORD
Press enter again to log out
GameClientDir/Data/enUS/realmlist.wtf
Note: enUS could also be enGB if you have a European version of the client