Skip to content
Snippets Groups Projects
DevOps_README.md 5.42 KiB
Newer Older
# Accessing the Unreal Engine Source Code and Container Registry
With your Github Account join the Epic Games Organization to access the Unreal Engine source code by following the steps at [ue-on-github](https://www.unrealengine.com/en-US/ue-on-github).

1. Get a GitHub account
2. Open your Unreal Engine account dashboard
3. Connect GitHub
4. Link the accounts
5. Authorize
6. Accept the email invitation

- [Overview of Containers in Unreal Engine](https://docs.unrealengine.com/5.0/en-US/overview-of-containers-in-unreal-engine/) 
- [Unreal Containers by Adam Rehn (Creator)](https://unrealcontainers.com/docs/use-cases/)

# Copying the UE4 images to gitlab-registry.nrp-nautilus.io

The Nautilus Cluster is hooked up in such a way to allow [faster image downloading](https://ucsd-prp.gitlab.io/userdocs/running/fast-img-download/). Thus, we create and upload images of our Unreal Projects to the gitlab container registry for quicker deployments and Continuous Integration Continous Development (CI/CD) pipelines.

## Authentication

_Method 1:_

Navigate to Github Account Settings > Developer Settings > Personal Access Tokens

Generate new token

For "Note" enter "UE4-YOURINITIALFIRSTLASTNAME" (i.e UE4-GV) or whataver alias you'd like. Make sure the following scopes are checked true as well.
<img src="/uploads/01cc89bfadfa7c4f8c29cfbc7a621ea0/image.png" width="50%" height="50%">

Save the token somewhere as you won't be able to recover it and will have to generate a new one.

It should look something like `ghp_PqZZV52LLeFGiPAJOT1xr4cFtOUDjS4O9xMS`.

Now you should be able to authenticate your terminal to communicate with the Private Github Registry.

`echo "ghp_PqZZV52LLeFGiPAJOT1xr4cFtOUDjS4O9xMS" | docker login ghcr.io --username USERNAME --password-stdin`

_Method 2:_

docker login ghcr.io -u USERNAME

You should now be able to view and pull images from [https://github.com/orgs/EpicGames/packages](https://github.com/orgs/EpicGames/packages)

## Download the latest UE images locally

docker pull ghcr.io/epicgames/unreal-engine:dev-4.27

docker tag ghcr.io/epicgames/unreal-engine:dev-4.27 gitlab-registry.nrp-nautilus.io/ar-noc/arnoc-alpha/unreal-engine:dev-4.27.2

docker login gitlab-registry.nrp-nautilus.io -u USERNAME

docker push gitlab-registry.nrp-nautilus.io/ar-noc/arnoc-alpha/unreal-engine:dev-4.27.2

# Building ARNO images locally

SET WORKING DIRECTORY to ~/.../PATH_TO_ARNoc/ARNoc-Alpha/ (i.e illustrated below)

docker build -t gitlab-registry.nrp-nautilus.io/ar-noc/arnoc-alpha/arnolinuxpixelstreamingclient:latest -f .\Docker\ARNocAlphaLinuxPixelStreamingClientLocal .

docker push gitlab-registry.nrp-nautilus.io/ar-noc/arnoc-alpha/arnolinuxpixelstreamingclient:latest

docker build -t gitlab-registry.nrp-nautilus.io/ar-noc/arnoc-alpha/arnolinuxserver:latest -f .\Docker\ARNocAlphaLinuxServerLocal .

docker push gitlab-registry.nrp-nautilus.io/ar-noc/arnoc-alpha/arnolinuxserver:latest

# Deploying ARNO Content to the Nautilus Cluster

kubectl apply -f .\ARNoc-Alpha-HeadlessServer.yml

kubectl apply -f .\PixelStreaming-ARNoc-Alpha-deployment.yml

kubectl apply -f .\PixelStreaming-ARNoc-Alpha-ingress.yml

kubectl apply -f .\PixelStreaming-ARNoc-Alpha-service.yml

# Deploying ARNO GameServer Fleet to Ludo Cluster
nautilus@ludo:~/arno$ sudo kubectl get fleets -n ar-noc
NAME                         SCHEDULING   DESIRED   CURRENT   ALLOCATED   READY   AGE
eos-dedicated-server-c87hb   Packed       2         2         0           0       6m57s

nautilus@ludo:~/arno$ sudo kubectl get gameservers -n ar-noc
NAME                                     STATE       ADDRESS        PORT   NODE                               AGE
eos-dedicated-server-c87hb-bh4bm-8pfq4   Scheduled   67.58.53.203   7134   k8s-gen4-03.calit2.optiputer.net   3m19s
eos-dedicated-server-c87hb-bh4bm-xtrrv   Scheduled   67.58.53.203   7038   k8s-gen4-03.calit2.optiputer.net   3m19s

nautilus@ludo:~/arno$ sudo kubectl get pods -n ar-noc
NAME                                     READY   STATUS             RESTARTS   AGE
eos-dedicated-server-c87hb-bh4bm-8pfq4   1/2     ErrImagePull       0          3m25s
eos-dedicated-server-c87hb-bh4bm-xtrrv   1/2     ImagePullBackOff   0          3m25s


sudo kubectl scale fleet eos-dedicated-server-949ww -n ar-noc --replicas=0

[K9s](https://k9scli.io/) 

: - Trigger Command Entry Box

:KEYWORD - Navigate to other Kubernetes Resource dashboards. (e.g :namespace, :deployment, :ingress, :service)

/<regex> - Search through current list for all occurences of specified regular expression. (e.g /libr returns librareome & librems)


# Generate a client key and certficate for HTTPS Pixel Streaming

openssl genrsa -out client-key.pem 2048

openssl req -new -key client-key.pem -out client-csr.pem

openssl x509 -req -in client-csr.pem -signkey client-key.pem -out client-cert.pem



<pre>

    |-- ARNoc-Alpha
    |   |-- Binaries
    |   |   |-- Linux
    |   |   |-- Win64
    |   |-- Content
    |   |   |-- ArnocGame
    |   |   |-- CollaborativeViewer
    |   |   |-- G2Visualization
    |   |   |-- Hololens_BP
    |   |   |-- inGame_browser
    |   |   |-- ProjectAnywhereXR
    |   |-- Docker
    |   |   |-- ARNocAlphaLinuxPixelStreamingClientLocal
    |   |   |-- ARNocAlphaLinuxServerLocal
    |   |-- k8s
    |   |   |-- PixelStreaming-ARNoc-Alpha-deployment
    |   |   |-- PixelStreaming-ARNoc-Alpha-ingress
    |   |   |-- PixelStreaming-ARNoc-Alpha-service
    |   |   |-- ARNoc-Alpha-HeadlessServer
    |   |-- Linux
    |   |-- LinuxServer
    |   |-- Source

</pre>