Set up Wowza Streaming Engine on Google Cloud Platform

Compute Engine is a Google Cloud Platform web service that provides resizable compute capacity in the cloud and virtualizes computing resources as virtual machines. Wowza Media Systems™ offers pre-configured and tuned images of Wowza Streaming Engine™ media server software that are ready to use with Google Compute Engine.

Notes:

About this guide


This guide describes how to install and configure a Wowza Streaming Engine image on the Google Cloud Platform. The instructions describe how to use the default startup package that supports live and video-on-demand (VOD) streaming. Other startup packages available from Wowza support live- or VOD-only streaming.

This guide assumes basic familiarity with Wowza Streaming Engine and with Google Compute Engine. Developer documentation for Google Compute Engine is available on the Google Cloud Platform website.

Get a license key for Wowza Streaming Engine 


With Google Cloud Platform, you must use your own license for Wowza Streaming Engine (a license is not embedded in the software). You can use any Wowza Streaming Engine Subscription or Perpetual license key with your Compute Engine instance. Google manages all billing for your running instance time and bandwidth consumption.

Wowza Streaming Engine Subscription users will still get a separate monthly invoice from Wowza for Wowza Streaming Engine usage. Subscription users have access to all Wowza Streaming Engine functionality and features, including Transcoder (for 64-bit instances only), Wowza nDVR, and Wowza DRM.

Pick a Wowza Streaming Engine startup package 


Before creating an instance, you can download one of the following Wowza startup packages for Google Cloud Platform. After you create the Wowza Streaming Engine virtual machine, a startup package is used to launch the Wowza Streaming Engine instance with a custom configuration.

  • Live – Configuration for live streaming. The default streaming types are Apple HLS, Adobe HDS, and Microsoft Smooth Streaming.
  • VOD – Configuration for on-demand streaming. The default streaming types are Apple HLS, Adobe HDS, and Microsoft Smooth Streaming. The content folder with your assets must be accessible to the instance, on either the instance boot volume, a scratch disk, or a mounted cloud storage volume. The package links the content folder to the boot disk by default.
  • Default – If you don't specify a startup package, the default package that provides both live and VOD streaming capabilities is loaded. This package is a combination of the two packages described above.

Create a Google account 


To use Wowza Streaming Engine for Compute Engine, you need a Google account. A Google account provides many online capabilities through the Google Cloud Platform Console, including the ability to ingest the Wowza Streaming Engine image into your project.

Install using Google Cloud Platform Console or the gcloud command-line tool


The Google Cloud Platform Console is a browser-based interface for managing Compute Engine resources. Many people find it easier to use the console instead of the gcloud command-line tool, but some tasks require the use of the gcloud tool.

Create a project

In the console, create a project by clicking Create project at the top of the page, giving your project a name, and then clicking Create. After the project is created, its dashboard is displayed. You can use the dashboard to create Compute Engine virtual machine instances, manage Cloud Storage, and much more. Be sure to keep track of your Project ID, which appears at the top of the dashboard.

Install the Google Cloud SDK and authenticate

The Google Cloud SDK includes the gcloud tool, which you can use to add the Wowza Streaming Engine image to your project and manage Google Compute Engine resources from a command line.

Authenticate to Google Cloud Platform by running gcloud auth login on your local computer. This command opens a browser window that asks you to sign in to Google and grant access to the Google Cloud Platform. If your browser doesn't automatically open, paste the displayed URL into a new browser window instead.

Add the Wowza Streaming Engine image

Before you can use the pre-built Wowza Streaming Engine image, you must add it to your project's collection of images. You can add the image by using either the Google Cloud Platform Console or the gcloud command-line tool.

Add the image using the Google Cloud Platform Console

  1. In your project dashboard, click the navigation menu icon in the upper-left corner of the page, scroll to Compute Engine, and then click Images.
     
  2. If you're adding the Wowza Streaming Engine image to a new project, click Enable billing, and then follow the steps provided.
  3. Click Create Image.
  4. On the Create Image page, do the following:
  • Enter an image Name and provide a Description. The name must be unique in your project's collection of images. The description is optional.
  • For Source, select Cloud Storage file.
  • For Cloud Storage file, enter wowzamediasystems/wse/WowzaStreamingEngine-4.7.7-byol-1542220735.image.tar.gz.
  1. Click Create.

The Wowza Streaming Engine image is available in your project.

Add the image using the gcloud command-line tool

Use a command such as the following to add the image to your project:

$ gcloud compute --project=<project-id> images create <image-name> --source-uri=<source-uri>

Where:

  • <project-id>, required, is the project ID where this image should live.
  • <image-name>, required, is the name for the new image. Required. The image name must be unique in your project's collection of images and must start with a lowercase letter, be followed by 0-62 lowercase letters, numbers, or hyphens, and can't end with a hyphen. You'll need this name when creating your instance.
  • <source-uri>, required, is the Wowza Streaming Engine source URI in Google Cloud Platform storage, for example, wowzamediasystems/wse/WowzaStreamingEngine-4.7.7-byol-1542220735.image.tar.gz.

Add a firewall rule

To enable streaming and access to Wowza Streaming Engine Manager, you must create a firewall rule, which you can do either by using either the Google Cloud Platform Console or the gcloud command-line tool. For more information, see Virtual Private Cloud (VPN) Network Overview in the Google Cloud documentation.

Add the firewall rule using the Google Cloud Platform Console

  1. In your project dashboard, click the navigation menu icon in the upper-left corner of the page, scroll to VPC Network, and click Firewall rules.
  2. Click Create firewall rule at the top of the page.
  3. On the Create a firewall rule page, do the following:
     
  • Enter a firewall rule Name and provide a Description. The name must be unique in your project's collection of firewall rules. The description is optional.
  • Specify the sources to allow to connect to your instance. You can enable inbound connections from specific IP addresses outside the Google network, and network connections from instances on the Google network.
    • To enable inbound connections from specific IP addresses, in Source filter, select IP ranges, and then in Source IP Ranges, enter the source IP addresses or IP address ranges. Separate multiple entries with commas.
       
    • To enable network connections from other instances, in Source filter, select Instance tags, and then in Source tags, enter tag values for tagged instances. Separate multiple tags by pressing Return after entering each one. For more information, see Assign instance tags in the Google Cloud docs.
       
    • To specify that all sources can connect, in Source filter, select Allow from any source (0.0.0.0/0).
  • For Allowed protocols and ports, enter tcp:554,1935,8084-8089. Or, to allow RTP and MPEG-TS UDP streaming, enter tcp:554,1935,8084-8089;udp:0-65535.
  1. Click Create.

The new firewall rule is available in your project. 

Add the firewall rule using the gcloud command-line tool

Use a command such as the following to add a firewall named streaming to your default network:

$ gcloud addfirewall streaming --allowed="tcp:554,1935" 
--project=<project-id>

To include support for RTP and MPEG-TS UDP streaming, use a command such as:

$ gcloud addfirewall streaming --allowed="tcp:554,1935;udp:0-65535" 
--project=<project-id>

Use a command such as the following to add a firewall named manager to your default network:

$ gcloud addfirewall manager --allowed="tcp:8084-8089"
--project=<project-id>

Create and start a Google Compute Engine instance

You're now ready to use the Wowza Streaming Engine image to create an instance. You can create and launch an instance by using either the Google Cloud Platform Console or the gcloud command-line tool.

Create and start the instance using the Google Cloud Platform Console

  1. In your project dashboard, click the navigation menu icon in the upper-left corner of the page, scroll to Compute Engine, and then click Images.
  2. In the Images list, select the Wowza Streaming Engine image that you added, and then click Create Instance.
     
  3. On the Create an instance page, do the following:
     
  • Enter an instance Name. The name must start with a lowercase letter, be followed by 1 to 62 lowercase letters, numbers, or hyphens, and can't end with a hyphen.
  • Select a Region and a Zone. The region and zone determine what computing resources are available and where your data is stored and used.
  • Select a Machine type. The machine type determines the CPU and memory your instance will have. Machine types with large scratch disks (or persistent storage) are recommended for on-demand streaming, nDVR, and for recording live streams.

The default, 1 vCPU (n1-standard-1), is the minimum machine type that we recommend. For more information about the types, see Machine Types in the Google Cloud docs.

Notes:
  • Wowza Streaming Engine doesn't work with shared-core machine types.
     
  • Each machine type is billed differently. For more information, see Machine type pricing in the Google Cloud docs.
  • If desired, change the Boot disk:
    1. Click Change.
    2. Select your Wowza Streaming Engine image.
    3. For Boot disk type, select either SSD persistent disk (the default value) or Standard persistent disk.
    4. Specify a Size.
    5. Click Select.

For more information, see Adding Persistent Disks in the Google Cloud docs.

After the operating system and Wowza Streaming Engine are installed, the base machine will have about 8GB of free disk space.

Still on the Create an instance page, provide your Wowza Streaming Engine license key (or keys), specify a startup package, and enter your Wowza Streaming Engine Manager user name and password.

  • Click Management, disk, networking, access & security options.
  1. On the Management tab, under Metadata, enter the following required key-value pair:
Key Value
WZA_serverLicenseKey Your valid Wowza Streaming Engine license key.
 
  1. (Optional but recommended) Click Add Item one or more times to add the following additional key-value pairs:
Key Value
WZA_startupPackageURL The URL for your startup package, which should look something like this: http://storage.googleapis.com/wowzamediasystems/com/wowza/startup/4.0.0/live.zip. Remember, if you don't specify a startup package, the default (live and VOD) package is used.
WZA_managerUsername Your valid Wowza Streaming Engine user name.
WZA_managerPassword Your valid Wowza Streaming Engine password.
 
  1. Click Create to create and start the instance.

Create and start the instance using the gcloud command-line tool

Run a command such as the following:

$ gcloud --project=<project-id> addinstance <instance name> --image=<image-name>
--metadata=WZA_serverLicenseKey:<license key> 
--metadata=WZA_startupPackageURL:<startup package url>
--metadata=WZA_managerUsername:<manager user name>
--metadata=WZA_managerPassword:<manager password>

Where:

  • <project-id>, required, is the ID of the project in which to add the instance. This flag is required for every gcloud compute command except help, unless you previously specified the --cache_flag_values flag to store your project ID information.
  • <instance-name>, required, is the name to assign to the instance. You'll use this name to sign in to the instance using Secure Shell protocol (SSH), or to attach resources. The name must be between 1 and 63 characters long; the first character must be a lowercase letter; all subsequent characters must be dashes, lowercase letters, or digits, except the last character, which can't be a dash.
  • <image-name>, required, is the name of the Wowza Streaming Engine image to use.
  • <license key>, optional, is the Wowza Streaming Engine license key that you want to associate with this instance. Separate multiple key values with the pipe (|) character. If you don't add a valid Wowza Streaming Engine license key, you must manually add the key-value pair to your Server.license.
  • <startup package url>, optional, is the URL for startup package to associate with this instance. If you don't specify a startup package, the Default startup package is used. The URL should look something like this: http://storage.googleapis.com/wowzamediasystems/com/wowza/startup/4.0.0/live.zip.
  • <external-ip>, optional, is the externally visible IP address, if any, to which this instance is assigned. If you omit this flag, an ephemeral IP address is assigned to the instance. For more information, see External Addresses in the Google Cloud docs.
  • <machine-type>, optional, is the machine type that will host the instance. Call gcloud listmachinetypes for a list and description of available host hardware, or gcloud getmachinetype for details about a specific hardware configuration. If you don't specify a machine type, gcloud prompts you to select one from a list.
  • <fully-qualified-image-name>, optional, is the name of the Wowza Streaming Engine image that you added to your project.
For more information about how to add instances, see Creating and starting an instance in the Google Cloud docs.

Test the instance


Note: If you didn't specify a startup package or chose the VOD startup package, you can play a sample VOD asset in Wowza Streaming Engine Manager to test your instance.
  1. In a new browser window, go to http://[external-ip]:8088/enginemanager.
     
  2. Sign in to Wowza Streaming Engine Manager.
     

    Note: If you don't enter key-value pairs for a user name and password to sign in to Wowza Streaming Engine Manager, the default user name is wowza and the default password is the Google Compute Engine instance ID (for example, 248889107416955973). To get your instance ID, use the SSH from the Browser feature in the console to connect to your instance, and then enter the following command line:

    curl http://metadata/computeMetadata/v1/instance/id -H "X-Google-Metadata-Request: True"
  3. Follow our playback instructions to play the installed sample.mp4 video file using the test players in Wowza Streaming Engine Manager. 

Terminate the instance 


When you terminate an instance, you lose all changes or files on the server. If there's any data you don't want to lose, be sure to save it to a persistent drive before terminating. Then, terminate the instance using either the Google Cloud Platform Console or the gcloud command-line tool.

Important: Google recommends that you confirm that the machine reaches the terminated state before you sign out. You'll continue to be charged for instances that don't shut down correctly.

Terminate the instance using the using the Google Cloud Platform Console

  1. In your project dashboard, click the navigation menu icon in the upper-left corner of the page, click Compute Engine, and then click VM instances.
     
  2. Click the instance you want to terminate, and then click Delete at the top of the page.

Terminate the instance using the gcloud command-line tool 

$ gcloud --project=<project-id> deleteinstance <instance name>