Get started | 5 - Upload the test project

To upload the test project to the zeuz orchestration service, you need to use:

  • The zeuz control panel, which you logged into earlier.
  • The zeuz tool CLI, which you downloaded in the SDK download.

The instructions below show you how to upload the test project. There are six steps:

  • Set up an API key.
  • Locate the project ID and environment ID.
  • Locate and prepare zeuz tool (the CLI).
  • Authenticate (auth_login).
  • Upload (push).
  • Containerize (push_publish).
TIP: Use a text editor to keep notes
  • You are going to need to keep note of some IDs and an API key.
  • You might find that copy-pasting this information into a text editor makes it easier.

Step 1: Set up an API key

To do this:

  1. In the zeuz control panel, click your login name (or the three dots, if they appear instead) at the top right to open the drop-down menu, then click API Keys. This takes you to the API Keys page.

Image: The API Keys page of the zeuz control panel

  1. On this page, click CREATE. This takes you to the API Keys : Create page.

  2. On this page, enter an API key title using alpha-numeric characters. The API key title is your choice.

    • For this tutorial, for Title, enter: Test project API key 1
  3. On the same page, enter an API key password using alpha-numeric or special characters. The API key password is your choice and can be different to your account password.

    • Enter your password in the Password and Repeat Password fields and then click SAVE.
      This generates an API key hash of 40 characters.
  4. Make a note of the API key hash.
    You are going to use the API key and the API key password with zeuz tool which you got as part of the zeuz SDK download in an earlier step.

Troubleshooting

Already have an API key? Create a new API key for this test project

  • If this is not the first time you have set up a project in zeuz, you will see an API key on this page already.
  • You need to make sure you do not re-use the existing API key for your existing project. Make sure that you create a new API key for this tutorial’s test project.

Step 2: Locate the project ID and environment ID

To do this:

  1. On the zeuz control panel’s left panel, locate your unique zeuz PROJECT ID and unique zeuz ENVIRONMENT ID.
  2. Make a note of both IDs, ready to use them with zeuz tool.

Image: The zeuz control panel showing your PROJECT ID and ENVIRONMENT ID

Step 3: Locate and prepare zeuz tool

  1. On your local development machine, from a terminal window (or in File Explorer or Finder) locate zeuz tool in the unzipped zeuz SDK download. The filepath and file name are listed below.

    • Windows: bin/windows_amd64/zeuztool.exe
    • macOS: bin/darwin_amd64/zeuztool
    • Linux: bin/linux_arm64/zeuztool or bin/linux_amd64/zeuztool

Note: You must use a terminal window to run zeuz tool CLI.

TIP: Make file paths easier
Move the zeuz tool file and the whole of the get_started_test_project directory and its contents into the same parent directory (see below for guidance).
INFO: Move the zeuz tool file and the get_started_test_project directory - what do I move?

To make using file paths easier, you could move the zeuz tool file (zeuztool.exe or zeuztool) and the whole of the get_started_test_project directory and its contents into the same parent directory.

If the zeuz tool file and the get_started_test_project directory are in the same parent directory, you don’t need to think about file paths between zeuz tool and the game image when you run zeuz tool in later steps.

The directory structure should look like this:

~/parent-directory/zeuztool.exe or ~/my-directory/zeuztool
~/parent-directory/get_started_test_project/
~/parent-directory/get_started_test_project/favico.ico
~/parent-directory/get_started_test_project/index.html
~/parent-directory/get_started_test_project/server.sh

The parent directory (parent-directory in this example) can be any name you choose. Do not rename any of the files or the get_started_test_project directory.



2. If you are using macOS or Linux, make sure the zeuz tool is an executable file. (If you are using Windows, skip this step.)

INFO: How do I make sure it’s an executable file?
  • Windows: zeuz tool is already executable, no action required.

  • macOS: See support.apple.com.

  • Linux: In a terminal window, enter sudo chmod +x /path/to/zeuztool (replacing path/to with the correct path to the file).


Troubleshooting

(macOS only) my computer says this application is from an unidentified developer

Step 4: Authenticate

Use zeuz tool CLI to authenticate yourself. To do this:

In a terminal window, from the directory containing zeuz tool, use the auth_login command with the API key and the API key password, as shown below, making sure you follow the instructions in the Auth login command usage guide.

  • Windows:
    zeuztool.exe auth_login login="your API key" password="your API key password" isapi=true endpoint="https://zcp.zeuz.io/api/v1"

  • macOS and Linux:
    ./zeuztool auth_login login="your API key" password="your API key password" isapi=true endpoint="https://zcp.zeuz.io/api/v1"

Auth login command usage guide
Replace your API key and your API key password with your own API key and password.

Troubleshooting

Getting a 400 error

  • You might be using directional (curly) quotes. Replace them with non-directional (straight) quotes ( " ) (ASCII 34).
  • You might have special characters (not alpha-numeric) in your API key password. Put an escape ( \ ) (backslash) before any special characters.

(macOS only) My computer says this application is from an unidentified developer


Success
You know it worked correctly when you see the following output in your terminal window (where `xxxhashxxx` is a hash string):

Zeuz Tool development version login: https://zcp.zeuz.io/api/x xxxhashxxx

Login Session: xxxhashxxx

Load LocalConfig: /Users/yourusername/Library/ApplicationSupport/zeuz.io/zeuzcmd.json

Step 5: Upload the game assembly

Use zeuz tool to upload the test project’s game assembly with the push command as shown below.

Its assembly is the get_started_test_project directory, containing the test project’s server.sh executable file. (It also contains the two client-related files, which you are going to upload with the game server.) To do this:

In a terminal window, from the directory containing zeuz tool, run the following commands, making sure you follow the instructions in the Push command usage guide and Push command notes.

  • Windows:
    zeuztool.exe push proj="your zeuz PROJECT ID" env="your zeuz ENVIRONMENT ID" directory="path/to/get_started_test_project"

  • macOS and Linux:
    ./zeuztool push proj="your zeuz PROJECT ID hash" env="your zeuz ENVIRONMENT ID hash" directory="path/to/get_started_test_project"

Push command usage guide

  • Replace your zeuz PROJECT ID and your zeuz ENVIRONMENT ID with the IDs you located on the zeuz control panel’s left panel.
  • Replace path/to/get_started_test_project with the relevant path to the get_started_test_project directory from zeuz tool. Keep the double quotes (") around it.
  • Use non-directional (straight) quotes ( " ) (ASCII 34) with this command. Do not use directional (curly) double quotes.

Push command notes

  • This might take a little time to upload, depending on your internet access speed.
  • zeuz tool might output some text. It compares the hash of each file with its database of file hashes representing files already uploaded. It then uploads each file that isn’t already present in the database.
Troubleshooting

Getting an error?

  • Make sure you specify the directory get_started_test_project and not the executable file inside it, server.sh.
  • If you have renamed the get_started_test_project directory, you might have spaces in the new name. If so, make sure you’ve put non-directional (straight) quotes ( " ) (ASCII 34) around the directory name. For example: "test project".
  • Make sure you have no trailing spaces in the command (spaces or line returns).

Success
You know it worked correctly when you see the following output in your terminal window (where `xxxhashxxx` is a hash string):

Finished uploading server.sh (xxxhashxxx)

Finished uploading index.html(xxxhashxxx)

Finished uploading favicon.ico (xxxhashxxx)

WARNING: Do not continue until you see the `Finished uploading` messages
  • Do not continue to the next step until you have seen the three Finished uploading <name of file> messages in your terminal and zeuz has stopped outputting text.
  • It might take a little time to upload, depending on your internet access speed and zeuz may output some text while it uploads.

Step 6: Containerize the game assembly

Use zeuz tool to containerize the game assembly that you uploaded in the previous step.

Use the push_publish command as shown below. Instances of the containerized game image that the zeuz orchestration service creates from your game assembly are your game’s payload.

In a terminal window, from the directory containing zeuz tool, run:

  • Windows:
    zeuztool.exe push_publish description="zeuz test project" version="0.0.1"

  • macOS and Linux:
    ./zeuztool push_publish description="zeuz test project" version="0.0.1"

The description for this tutorial is “zeuz test project” and the version is “0.0.1” because you reference them later in this tutorial. You can enter any alpha-numeric characters for the description and any numbers for the version.

Push_publish command notes

  • Depending on the size of your game, this may take some time.
  • You know it’s working if it’s outputting strings like the example below to your terminal window: YYYY/MM/DD HH:MM:SS State: running.
TIP
You don’t need to re-enter your proj and env IDs from the previous step. zeuz tool CLI appends them automatically in your subsequent commands.
Troubleshooting
Getting an error? Make sure you have no trailing spaces in the command.

Success
You know it worked correctly when you see the following output in your terminal window (where `xxxhashxxx` is a hash string):

YYYY/MM/DD HH:MM:SS Image published: xxxhashxxx

INFO: Tell me more about payloads and containerized game images

A containerized game image consists of the following:

  • Your game’s server-side executable file and its dependencies (the game assembly). (Instances of this become a game server when zeuz spins them up on bare-metal machines or cloud servers.)
  • The commands that describe how to run it.

When you set up zeuz orchestration, you specify your game’s containerized game image as the “payload definition” of the game. The payload definition is the template zeuz uses to start up instances of your game server, so a game server instance runs as part of a payload instance.

In zeuz, the terms “game server” and “payload” are often used interchangeably within the documentation to mean “the server software which runs the game”.

Find out more:



Now go to 6 - Create an allocation.


2021-jun-30 Page updated: updated url for ZCP.
2021-may-19 Page updated with editorial review: clarification of zeuz terms.
2021-apr-16 Page updated with editorial review: hotfix broken link.


Last edited on: October 21, 2021 (adcfeaae)