question

Anh Le avatar image
Anh Le asked

How to set up Dev/Production Playfab environment properly?

Hi,

I'd like to ask for the advice on how to set up Dev/Production Playfab environment properly.

I assume that I must create a new game title and sync the config/data in case?

datagame manager
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Greg Quinn avatar image Greg Quinn commented ·

@Le Giang Anh

I've posted a feature request for better dev/prod environment management.
Vote here : https://community.playfab.com/idea/55361/devstagingproduction-environment-management.html

0 Likes 0 ·
brendan avatar image
brendan answered

Edit (4/2021): The plan to provide an updated configuration management tool was postponed, making the statement below about that inaccurate. Currently, we are investigating a potential route for a newer configuration management tool - we'll post more about that in our roadmap page when we can share more info.

Your best bet is to have dev, test, and live each be a distinct environment, each with a separate Title ID. We have a CLI tool available for copying configuration between titles, and we'll be providing a more comprehensive configuration management tool by the end of this quarter.

10 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Choi Yan Lok avatar image Choi Yan Lok commented ·

Is the new configuration management tool available yet?

It seems like I could only find the CLI tool. While it is working fine and it's quite easy to extend it, we would like to see if there's a more user friendly tool avalible. Thanks

1 Like 1 ·
Choi Yan Lok avatar image Choi Yan Lok Choi Yan Lok commented ·

.

0 Likes 0 ·
Greg Quinn avatar image Greg Quinn Choi Yan Lok commented ·

@Choi Yan Lok
I've posted a feature request for better dev/prod environment management.

Vote here : https://community.playfab.com/idea/55361/devstagingproduction-environment-management.html

0 Likes 0 ·
Anh Le avatar image Anh Le commented ·

Thank you. I see that we cannot copy the Player Data. Is there any workaround?

https://api.playfab.com/docs/tutorials/landing-automation/playfab-cli-command-line-interface

0 Likes 0 ·
Andy avatar image Andy ♦♦ Anh Le commented ·

The workaround is to utilize the master player account that gets created for each of your users. This will allow you to share data about a player across any game in your studio. Some things such as statistics and inventory, however, are title-specific. In order to migrate that data you would need a few things:

  1. The player would need to have logged into the new title at least once to seed the title player account linked to the master player account.
  2. Through the admin API and a back-end tool (like the CLI tool) you can migrate important data of those players who do log into the new title (using the master player account as the "bridge")
  3. Ensure call volumes for the transfer are kept to a reasonable level, preferring about one player per second.
0 Likes 0 ·
Anh Le avatar image Anh Le commented ·

Hi. Actually I'm more about clone/copy the player data from master to dev server. I don't want them to use the same data.

0 Likes 0 ·
Andy avatar image Andy ♦♦ Anh Le commented ·

So, you want to copy live player data into your development environment? The process for that would look similar, but there can be interesting privacy considerations to take into account. Why do you need real player data in your dev environment?

0 Likes 0 ·
Anh Le avatar image Anh Le Andy ♦♦ commented ·

Because we need the real data for testing purpose since our game is an asynchronous game.

We tried to copy it but get stuck at "Getting data from Title 47F1…”

In this link, I found that there are only those following:

  • TitleData
  • TitleDataInternal
  • CloudScripts
  • Files
  • Currency
  • Catalogs
  • DropTables
  • Stores
0 Likes 0 ·
Show more comments
marcos avatar image marcos commented ·

We are planning a migration of our game backend to Playfab. We're doing R&D right now, running basic tests and everything looks great so far. This topic however, is also very relevant for us.


We also have a development/production scheme, with the usual approach: configuration and hard data that changed during the dev cycle, needs to be copied into the live environment on each update or release.

How that would work exactly?
Has anything to streamline this process has changed since the posting of this question?

0 Likes 0 ·
oskar avatar image
oskar answered

[deleted - did not add anything to the discussion]

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

natepac avatar image
natepac answered

@Brendan You said in the answer: "We have a CLI tool available for copying configuration between titles, and we'll be providing a more comprehensive configuration management tool by the end of this quarter." Is the best way to do this still: https://github.com/PlayFab/PlayFabCLI All the same, I actually like the separate title idea to separate development better.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

That was the plan at the time, but unfortunately, that plan changed. Right now, the CLI tool remains the way to copy a good bit of configuration data between Title IDs. It cannot copy all configuration info - particularly when it comes to PlayStream components, however.

0 Likes 0 ·
Greg Quinn avatar image
Greg Quinn answered

@Brendan Since this seems to be the go to thread for this discussion, I'll add my question in here

I'm also trying to figure out a good dev/production workflow.

I am using Azure Functions. I have two Azure function endpoints in Azure, one for dev Azure Functions, and one for prod Azure functions.

Once I am ready and tested in dev I deploy my Azure functions to prod.

All the 'registered' Azure functions in Playfab have a specific URL.

How would I keep all the dev specific function endpoints in my dev Playfab title, and my production function endpoints in my production Playfab title?

Is there any sort of wildcard/variable I could use in the function url?

Or would I need to literally register every dev function to the dev title, and every prod function to the prod title, and make sure never to migrate the function config over with the CLI tool?

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

I am not expert on Azure Function, but I think you may make use of "FunctionExecutionContext" in the function, where all information is stored from the callers and their title and you may differ the title and execution type through it. If the caller is from dev title, you may execute another private function. As you may store any data and refer from global configurations, you may store secret keys from titles and use it to initialize PlayFabServerInstanceAPI.

Azure Function is flexible, and you may consult Azure support team if there are better workarounds for your development.

1 Like 1 ·
Greg Quinn avatar image Greg Quinn Seth Du ♦ commented ·

@SethDu The problem is I'll still need 2 separate Azure Function instances, one for dev, one for prod, and Playfab only allows me to register one URL without being able to configure it. So looks like at this point having 2 title ID's is the way to go.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.