Unreal:Perforce installation and cloud services Azure

Hello Guys,

Today we’ll install Perforce and setup Azure for home use!!. This is just a test setup to understand the process, even I don’t know most of terminologies but lets learn. Please don’t do it blindly I request, as I have updated the page while I was attempting the installation(multiple times, don’t rely on images). Please read all the notes. All the best. cheers!!

Table of Contents

P4D

P4ROOT

Disk Allocation

Install Perforce P4V

Perforce SSL Setup

P4V Initiating

Microsoft Azure

Azure CLI

Resource Group CLI

Virtual Network CLI

Some Doubts(verbose)

Credentials

Resources

Install Perforce P4D

(directly from website)

What is Helix Core (P4D) Server?

Helix Core (P4D) is version control for accelerated development. It securely versions all digital content – even large files – in a single repository. And it scales for large teams, handles thousands of daily transactions, and delivers files quickly to remote users.

Download link

https://www.perforce.com/downloads/helix-core-p4d

Provide your Family and Platform and you can proceed with download.

Installer

As per few videos, They recommend to save everything in C drive

But if you have a small C drive you can opt for any other drive.

Set P4ROOT where ever you want

P4D root directory — please read the below info from docs and choose for yourself.

Because all Helix server files are stored by default beneath the server root, the contents of the server root can grow over time.

note: P4ROOT directory should be kept in c drive it causes some issues while manually creating new servers for example Perforce2

https://www.perforce.com/manuals/p4sag/Content/P4SAG/install.unix.create_root.html

Disk Allocation

https://www.perforce.com/manuals/p4sag/Content/P4SAG/install-disk-space-allocation.html

Server- localhost:1666

User Name- ADMIN (or any name)

Text Editing Application- notepad(or any)

I had raised a ticket because i was getting an error of Typemap not changed so please keep it notepad only.

(note: Normally, with editors like Notepad, vi, or similar, the command stays ‘connected’ to the editor session)

Install Perforce P4V

once you set the localhost:1666 in the previous setup, the P4V will directly pick it up

Server- localhost:1666

User Name- ADMIN (it should be same as P4D)

Text Editing Application- (it should be same as P4D)

https://www.perforce.com/video-tutorials/vcs/how-install-your-helix-core-server-client-windows-10

Please check the below places

ctrl+R
services.msc
#look for Helix Core Server

ctrl+shift+esc
services Tab
# look for Perforce
You think its done, Perforce is just getting started

Now that everything is setup, lets secure the line.

Perforce SSL Setup

Below text is directly from perforce

https://community.perforce.com/s/article/2596

Open up a Windows command prompt by right-clicking on the Windows Command Prompt icon and selecting “Run as”; select “Administrator”. “Run as”; select “Administrator”

https://www.perforce.com/manuals/cmdref/Content/CmdRef/P4SSLDIR.html

mkdir C:\SSLKEYS

Ensure this directory is accessible by the user who runs the Perforce service:

(note: Please put double inverted commas )

p4 set P4SSLDIR="C:\SSLKEYS"
p4d -Gc
p4 set -S Perforce P4SSLDIR="C:\SSLKEYS" 
p4 set -S Perforce P4PORT=ssl::1666
p4 -p 1666 admin stop 
net start perforce
p4 set P4PORT=ssl:localhost:1666
p4 info 

look for Server encryption: encrypted in the info

P4V Initiating

Server- ssl:localhost:1666
User Name- ADMIN (it should be same as P4D)

OK the above dialog box.

This is where it gets more dirty

Microsoft Azure

At its core, Azure is a public cloud computing platform.

Microsoft Azure is a cloud platform for storing your work, you need a pack to let your perforce account recognize and sync your work to cloud.

One will receive a mail once you mention your mail id in the perforce page(download and install p4d and p4v)

You’ll have to pick a subscription it is mandatory. Please choose as per your requirement or if you are a student go for student benefits. For list of active products with subscriptions please read below page. Its a good reference page.

https://dev.to/azure/azure-free-account-is-it-really-free-53cb

after you are subscribed please go through below page, it is all that I am explaining just follow you’ll do good.

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure

or if you have more money pay-as-you-go!!

Subscription page will be displayed fill in your details its quite simple and you’ll receive 200$ roughly Rs.14000+ depending on the currency rate at the time.(just a heads up any one using HDFC debit card check if your name is mentioned on the card if not, please prefer another card). No need to worry even if the subscription is collecting your details upfront, you’ll be prompted later if you want to upgrade with payment, it wont auto deduct from your account. cheers!!(unfortunately i did not take snaps of the subscription page) for more details https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/avoid-charges-free-account

for perforce enhanced studio pack please name the resource group as

perforce-vcs-development

(Note: when you are logging in freshly second time, go to your profile symbol top right corner, click once and you’ll find Azure Portal, that is how you can go to the portal page of Azure)

Download Azure CLI

From here onwards I’ll be logging in through CLI(command line). I have few reasons.

Since i have been working in Linux for a while, I feel really comfortable in CLI(plus it looks cool if somebody is watching, lol). Azure CLI is same as the Website interface. Whatever details I’ll show you through CLI those exact details can be filled on the Website. Don’t Worry if something goes wrong, you can delete anytime you want. For people those who are not a CLI fans or inexperienced for them I’ll link the page where Azure docs have explained with Website Slides in docs. ALL THE BEST. Here it comes.

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli

Download from the above link. It will be installed in C drive for windows 10 users by default(that sucks).

you can login in azure through command line()

az login

(Note: If you use a cloud shell, it will create a resourcegroup, read about it(resource group))

Resource Group CLI

A resource group is a container that holds related resources for an Azure solution — VNet enables many types of Azure resources, such as Azure Virtual Machines (VM)

image ref_1

image_ref_2

How to Create a Resource Group — Slides

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal#create-resource-groups

Please read below — resource group reference names list

Please avoid same name. But the name mentioned in the image is the name suggested by perforce. please check the https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure

You can skip creating tags and create it. If you have reached till here be kind to your body and drink some water.

CLI

az group create --name perforce-prod-dev --location centralindia
# to delete
az group delete --name perforce-prod-dev

Virtual Network CLI

Azure Virtual Network (VNet) is the fundamental building block for your private network in Azure
to understand the network block please see the image on this link

image_ref_1

How to Create a VirtualNetwork — Slides

https://docs.microsoft.com/en-us/azure/virtual-network/quick-create-portal#create-a-virtual-network

az network vnet create -g perforce-prod-dev -n vnet-prod-centralindia-001 --address-prefix 10.0.0.0/16 \
    --subnet-name snet-prod-centralindia-001 --subnet-prefix 10.0.0.0/24

What is a NetworkWatcherRG?

https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-create#delete-a-network-watcher-in-the-portal

(Not an expert on this, but i have used while exploring git(it is a one time thing), always had a love-hate relation with it. But perforce has asked it so I’ll do it. SSH helps you communicate between remote servers)

An SSH key is an access credential for the SSH (secure shell) network protocol. This authenticated and encrypted secure network protocol is used for remote communication between machines on an unsecured open network. SSH is used for remote file transfer, network management, and remote operating system access.

How to Create a SSHKey — Slides

https://www.atlassian.com/git/tutorials/git-ssh

https://docs.microsoft.com/en-us/azure/virtual-machines/ssh-keys-portal#generate-new-keys

note: Before you select any location please check if the cloud machines(VM) are available for that location or else you’ll have to redo this step.

az group create --location centralindia --name "mySshPublicKey" 
az sshkey create --location "centralindia" --resource-group "SSHKeyRG" --name "mySshPublicKey"

Virtual Machines

Please follow the page exactly, I would recommend this part to be done on azure platform as you’ll have to see the machines you need for work/cloud.

Please provide perforce-vcs-development as your resource group for virtual machines

note: If you plan to purchase please begin working or you will lose the credits provided by azure in no time

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal

Some Doubts(verbose)

Once you complete the creation you’ll notice below image

Since i did not do all the above steps in a single day, I created and deployed the perforce-studio-pack at later stage(In case you don’t have the studio pack, please go to Microsoft Azure studio pack part above in the page). What I mean there is no hard and fast rule to deploy this pack. just for the record.

for perforce enhanced studio pack please name the resource group as

perforce-vcs-development

If you have reached till here give yourself a pat on the back. take a break drink some tea or coffee.

lets go ahead

Credentials

Everything is explained very well in the below link

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-62321

Now go ahead with this link, Its pretty self explanatory

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-61476

But if you come across this error

Connect to server failed; check $P4PORT.
connect: public or pirvate IP:1666: WSAETIMEDOUT, A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Please go to this page and look for — How do I resolve a timeout when trying to log into P4V?

https://www.perforce.com/resources/vcs/cloud-version-control-guide#deployment

But if you still have doubt’s like i had

Go to Azure Portal

Search Virtual Machines

Azure virtual machines and if you notice i did not take location-central india, as the machines were not available in that part of the country. So choose wisely.

Select First Machine

Select Networking

Check the Source Column

There might be something 1.1.1.1/32, This needs to be updated to your ip address.

Go to https://whatismyipaddress.com/

Copy the ip address, replace every value which is related to TCP, as in the above image.

Check the second machine do the same.

(note: One will have to change the ip address everyday as the ip address are dynamic)

Now attempt this once again

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-62321

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-61476

and once done Start dancing and incase if you still face the issue please raise a ticket to, and then dance.

helix-cloud-support@perforce.com

support@perforce.com

https://www.perforce.com/support/request-support

a reference video with cloud

I wanted to show a bit more about the perforce workspaces and depot but unfortunately I ran out of credits. Probably I’ll write perforce post independently. I have learnt a lot through this setup. You’ll have creative freedom for your work. Stop saving your file in an old fashioned way. Try the perforce way. Give it a try its worth it.

Configure Less. Create More. — Perforce.

Resources

Best Practice, it might show you to fill a form, please do it and go ahead it is a good read.

https://www.perforce.com/resources/vcs/version-control-best-practices-game-development#success

Helix Core with Unreal

https://www.perforce.com/blog/vcs/how-use-unreal-engine-4-perforce

How to purge the data from depot

https://community.perforce.com/s/article/6823

Types of Depots

https://github-wiki-see.page/m/codewaregames/UnrealGameSync/wiki/Creating-Perforce-Depots

https://github.com/codewaregames/UnrealGameSync/wiki/Creating-Perforce-Depots#creating-single-depot-type-local

Microsoft Azure

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure

https://www.perforce.com/blog/vcs/what-microsoft-azure-cloud

Azure-What is resource manager

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/overview

Unreal + Perforce proxy server

https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/UsingPerforce/

resource group reference names list

https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming

unreal+perforce info’s

https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/SourceControl/Perforce/

http://www.rebz.org/2012/10/perforce-in-the-cloud-free/

https://allarsblog.com/2017/04/05/populating-perforce-with-an-unreal-engine-source-build/

https://vilbeyli.github.io/How-to-Setup-a-Perforce-Workflow-Automate-Distribute-UE4-Builds/#introduction

workspaces

https://community.perforce.com/s/article/1230

https://articles.assembla.com/en/articles/748195-perforce-version-control-with-ue4-assembla

https://stackoverflow.com/questions/17356666/perforce-p4w-error-files-not-in-client-view