Technical manual
...
iR Engine deployment
Installing projects
8 min
local install flow to install a project locally, clone the repository you wish to install to the /packages/projects/projects/ folder you can do this with the follow commands cd packages/projects/projects/ git clone https //github com/myorg/myrepo cd myrepo code this will create a folder name myrepo which must contain an xrengine config ts file, and open the project in a new vscode window (such that git commands can be handled by the new window) all you need to do now to run this project is re run the stack (with npm run dev ) graphical install flow projects can also be installed and managed from the /admin/projects route you must be an admin and must have a linked github account, which can be attained by having your github account linked to your ir engine account by signing in via github (you do not need to have most recently signed in via github, you just have to have linked your gh account at some point) see the section 'how to set up github to install external projects' /setupgithuboauth for instructions on creating an oauth app from github, installing it into an ir engine deployment, and authorizing it to have access to your github organizations click the 'add project' button you will see text fields for entering the source and destination repositories when you click away from the text fields, the url will be checked both for the repository existing, and for whether you have sufficient permission to access that repository read permission for the source repo (public repositories are always available), and write or admin permission for the destination repo if you have never logged into github with your current account, you will not be allowed to add or update projects for the source repository, after entering the url, you will also need to select a branch to pull from your options are either the main branch for that repository, or a branch that matches the release name of the deployment, e g dev deployment for a deployment with the environment variable release name=dev if release name is not defined, then local is used; this could lead to multiple local installations of the platform conflicting, but one can set release name locally to something else in your env local file after the branch is selected, you also need to select a tagged commit from that branch, or the most recent commit as of this writing, you must manually tag project commits yourself, though tags are copied over from the source repository when installing or updating a project the backend checks that the source and destination repos have the same project the project name is the name field in the project's package json file if the destination repo's \<release name> deployment branch is empty or nonexistent, then any project can be uploaded to it if the destination deployment branch is not empty, then it can only be updated with different versions of that project for example, if the destination branch has project example1 in it, you will not be allowed to overwrite it with a project test3 , only other projects named example1 you can only install a project with a given name once, and names are case insensitive ; example1 is seen as the same name as example1 you would need to remove an existing project in order to install a different project that has the same name, or rename one of the projects when everything is valid, you will be able to click the submit button, which will install the project adding a project through this interface runs git clone in the background, same as above, but will then upload all of the repository's files to the storage provider these files will then be downloaded and installed to the deployment's file system each time the docker builder pod runs this allows full version controlled access for local development flow and version locking for production deployment the source project code will then be force pushed to the branch \<release name> deployment , so make sure that there is no work in that branch that might get overwritten, and make a backup in another branch you do want to save it the push to github button will push the current code for that project to the \<release name> deployment branch if possible; it will never push to the main branch if there are merge conflicts, it will instead make a pull request on that branch with the changes; it will not force push anything to this branch, unlike adding or updating a project the update button opens the same drawer as adding a new project, just with the destination repository locked in assuming everything matches, it will also force push to the \<release name> deployment branch in the destination repository the github repo link button also opens this drawer, but you can only select the destination repository, not the source repository, and no code is pushed anywhere the remove button will remove the folder containing that project this will not delete the deployment branch warning any uncommitted & unpushed files will be lost updating the engine version and rebuilding projects making changes to a project is not always reflected immediately in the running code as of this writing, project code is built into the client side and backend files, and changes to project code require that the codebase be updated locally, this just requires you to stop and restart the npm run dev command in a production environment, this requires that the builder process be restarted, so that it can rebuild the client and backend code with the new project code changes to scenes in projects do not require a rebuild since they are stored external to the codebase in the storage provider, and are downloaded anew by a client each time the scene is loaded, changes to scenes will always be immediately available the act of saving a project will clear any cached version of the scene's static files, so the client will get the new version additionally, if you want to update the core ir engine code, you will also need to re run the builder process with the new version of the code in a production environment, click on the button update engine/rebuild a drawer will open with a selector for the engine version you want to update with this will be an image in the builder's linked image repository after selecting an engine version, if you click submit now, you will just rebuild with the newly selected version of the main codebase, plus whatever versions of your projects are currently in your linked repositories if you click on update projects , you can select the source commits for any installed projects that have a destination repo, same as with the add/update project drawer the projects will be updated before the builder is restarted