Set Up Cluster and Extension¶
In This Section
Before You Begin¶
This section assumes that:
- You’ve previously set up a development environment for the Genvid SDK.
- You can run the Tutorial Sample in the cloud.
Before getting started, you also need:
- A Twitch Account for broadcasting your stream.
- A Twitch Developer Account for creating your extension.
- An installed copy of the Twitch Developer Rig.
- A working local bastion and cluster.
Edit the Terraform Configuration¶
Open
stream.hcl
from..\samples\twitch\config
.Edit the following variables:
Under secrets.twitch:
TWITCH_EXT_KEY = Streaming Key (Found on your Twitch dashboard.)
TWITCH_EXT_CHANNEL = Your Twitch Account Channel Name.
Under encode.stream:
channel = Your Twitch Account Channel Name.
key = Streaming Key (Found on your Twitch dashboard.)
Under config:
ssl =
false
Start the Tutorial Sample¶
Go to the
/samples/twitch
directory.Copy the Genvid files used to build the project.
py tutorial.py prepare
Build the project and the website.
py tutorial.py build
Load the tutorial.
py tutorial.py load
Launch the Cluster UI.
genvid-sdk monitor
Click the Jobs tab.
Click START ALL.
Create a Twitch Extension¶
Note
This information is dependent upon systems maintained by Twitch. We do our best to keep it updated, but you should see the Twitch developer documentation for the latest information.
Open your Twitch Developer Account.
Click Your Dashboard.
Click Create Extension.
Choose a name for your extension. (It can be anything.)
Click Continue.
Under Create an Extension Version select Panel and Video - Fullscreen.
Enter something in Summary.
Click Create Extension Version.
The Genvid SDK uses the Twitch Extension Configuration Service, so you need to activate it.
Select the Capabilities tab.
Under Select how you will configure your extension select Extension Configuration Service.
Click Save Changes.
Associate the Twitch Developer Rig with Your Extension¶
Open your Twitch Developer Rig.
Log in using your Twitch Account Credentials, if necessary.
Click Add Project.
Note: If this is the first project you’ve created, click Create Your First Project and skip the next step.
Click Create Project.
In the first drop-down menu under Select Existing or Create New Extension, select the Twitch Extension you just created.
Note: If you don’t see it, click the Refresh button.
Click Next.
Select the folder for your Twitch Extension project.
Note: In this case, it is
samples\twitch
. In general, it has to be the parent of the folder where your files are served.Select None - I’ll use my own code as your template.
Click Next.
Click Get Started.
This creates a JSON file in your project folder with all information related to the dev rig and project.
Now your Twitch Developer Rig is ready to stream the Tutorial Sample.