Dockerizing and Lisencing

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

s1315d
Posts: 1
Joined: 11 Jun 2021, 17:42

Dockerizing and Lisencing

Postby s1315d » 11 Jun 2021, 17:49

We are currently using Smartfox2x server on aws ec2 , but thinking to dockerize it and deploy it to eks or ecs on amazon , there are two three questions that pinching my mind
1. How can we can we apply lisence to those dockers is there any way to apply through command line ?
2. Is it a good option to use smartfox in docker form , if no/yes why ?? :D
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Dockerizing and Lisencing

Postby Lapo » 12 Jun 2021, 10:44

Hi,
licenses need to be unique for each instance, and there isn't a specific way to deploy a license via command line.
The license code is a simple string stored in SFS' XML config. The target file is config/server.xml, the tag is called <licenseCode>

If you have a pool of licenses that you wish to apply dynamically to a number of virtual servers, my suggestion would be to store them on a central DB and then have a small pre-setup script that borrows one license from the pool and assigns it to the server (by modifying the xml config, before starting up the server).

Is it a good option to use smartfox in docker form , if no/yes why ?

Docker is "just" another virtualization tool and as such it doesn't interfere with SFS2X. It's neither bad nor good, it's just another way to deploy software. If it solves problems for you then I'd say it's a good solution :)

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Moonshine-ashish
Posts: 4
Joined: 21 Feb 2023, 13:07

Re: Dockerizing and Lisencing

Postby Moonshine-ashish » 22 Feb 2023, 05:27

What if we need to upgrade our licenses do we need to restart the docker env or SFS server ?
Moonshine-ashish
Posts: 4
Joined: 21 Feb 2023, 13:07

Re: Dockerizing and Lisencing

Postby Moonshine-ashish » 22 Feb 2023, 07:46

Hi Lapo,
I have the same scenario and trying to find the best solution to do this, Before this, I have a one questions regarding the licenses if I have assigned the licenses in the XML file as you suggested.
1. What if I want to upgrade the licenses CCU at run time will it be possible? I want to avoid restart of my instance.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Dockerizing and Lisencing

Postby Lapo » 22 Feb 2023, 08:31

@Moonshine-ashish
Yes, especially with Elastic Licenses you can upgrade them (e.g. set the CCU higher or lower) and reload them at runtime without the need to restart anything. It also work with standard licenses as well.

See here:
http://docs2x.smartfoxserver.com/Gettin ... nseManager

Last section of the doc

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Moonshine-ashish
Posts: 4
Joined: 21 Feb 2023, 13:07

Re: Dockerizing and Lisencing

Postby Moonshine-ashish » 22 Feb 2023, 10:52

thanks A lot :)

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 40 guests