Procedure
Quick start guide using Unity Gaming Services Command Line Interface [UGS CLI] with Cloud Content Delivery to upload content to a bucket
Sections
- Installation of UGS CLI
- Getting required data
- UGS CLI Configuration
- Setting up a service account
- Set up roles
- upload a file to your bucket
- More Information
Install CLI
*Detailed instructions can be found here
If you already have Node.js you can run this command in the terminal(MAC) or command prompt(WIN) If you don't install Node.js npm install -g ugs
Once complete you will have access to the UGS CLI.
Get ProjectID and Environment Name
- Find your project ID on the cloud.unity.com
- Get the project ID by copying the ID found after URL projects/XXYYZZ
- Find your Environment Name on cloud.unity.com
- Get the environment name by copying the name you use for your current environment. By default this is production
In Terminal(MAC/LINUX) or Command Prompt(WIN)
- Configure the CLI project
ugs config set project-id YOUR_PROJECT_ID
a green information message will confirm you successfully completed the step. - Configure the CLI environment
ugs config set environment-name YOUR_ENVIRONMENT_NAME
a green information message will confirm you successfully completed the step
Create a service Account on the dashboard
- Create a service account on the cloud.unity.com
- Go to Administration > Service Accounts > New
- Create a new Key
- Make sure to copy the KeyID, Secret, and Auth Header for future use
Service Account Roles
Set up roles for the service account so we can successfully upload files to the dashboard using the CLI
Add Organization Roles
add the following roles for the organization
- Admin > SCIM Authentication
- LiveOps > Cloud Content Delivery API Public Editor
Add Project Roles
- Admin > Unity Environment Admin
Upload a files to your bucket
Login To the Service Account
ugs login
Enter your Key ID and Secret when prompted. This will authenticate your CLI session with the service account credentials.
Set the bucket name
ugs config set bucket-name YOUR_BUCKET_NAME
(Replace YOUR_BUCKET_NAME
accordingly.)
Sync a local folder to CCD
ugs ccd entries sync /path/to/folder -b YOUR_BUCKET_NAME
(Replace /path/to/local-folder
and YOUR_BUCKET_NAME
accordingly.)
Important Links:
Detailed installation of UGS CLI on multiple platforms
https://services.docs.unity.com/guides/ugs-cli/latest/general/get-started/install-the-cli/
Installing node https://nodejs.org/en
Detailed CCD Calls with UGS CLI
https://services.docs.unity.com/guides/ugs-cli/latest/cloud-content-delivery/Cloud%20Content%20Delivery%20Command%20Line/overview/
.