• How to set up Wowza Streaming Engine on Google Cloud Platform

    Wowza Media Systems™ provides Google Cloud Platform with pre-configured and tuned Wowza Streaming Engine images that are ready to start using with Google Compute Engine. This guide describes the minimum requirements for launching Wowza Streaming Engine media server software on Google Cloud Platform with a default startup package that supports live and on demand (VOD) streaming. Other startup packages available from Wowza Media Systems are live-only or VOD-only.

    Notes:

    Contents


    Introduction
    Get a license key for Wowza Streaming Engine software
    Pick a Wowza Streaming Engine startup package
    Create a Google account
    Install using Google Cloud Platform Console and command-line tools
    Test the instance
    Terminate the instance

    Introduction


    This guide describes how to install and configure 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 provides Google Cloud Platform with pre-configured and tuned Wowza Streaming Engine images that are ready to run on Google Compute Engine.

    This guide assumes basic familiarity with Wowza Streaming Engine media server software. If you're not familiar with Wowza Streaming Engine, you can get a free Trial license for the software after you complete a Wowza Streaming Engine Trial request form. The Wowza Streaming Engine Trial download includes the Wowza Streaming Engine software, documentation, and examples. The Wowza Streaming Engine User's Guide contains comprehensive documentation about how to install and use the software.

    Developer documentation for Google Compute Engine is available on the Google Cloud Platform website.

    Get a license key for Wowza Streaming Engine software


    With Google Cloud Platform, you must use your own license for the Wowza Streaming Engine software (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 usage of the Streaming Engine software. Subscription users have access to all Wowza Streaming Engine functionality and features, including Wowza 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 streaming live video. The default streaming types are Apple HLS, Adobe HDS, and Microsoft Smooth Streaming.

    • VOD Configuration for streaming on demand video files. 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, a default package that provides both live and on demand streaming capabilities is loaded. This package is a combination of the two packages described above.

    Create a Google account


    To get started using Wowza Streaming Engine for Compute Engine, you must first Create your Google account. A Google account gives you 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 and command-line tools


    The Google Cloud Platform Console is a web interface that enables you to manage your Compute Engine resources from a web browser. Many users find it easier to use the console instead of the command-line tools, but some tasks currently require use of these tools, so this guide assumes their use.


    Create a project

    After you sign in to 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, the Project Dashboard is displayed for your new project. On the dashboard, you can create Compute Engine virtual machine instances, manage Cloud Storage, and much more. Be sure to keep track of your Project ID, which is displayed at the top of the dashboard.

    Install the Google Cloud SDK and authenticate

    The Google Cloud SDK includes the gcloud command-line tool, which is required 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 your Google account 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 the console


    In the Google Cloud Platform Console, do the following:

    1. In your project dashboard page contents panel, click the Products & Services menu icon, under Compute click 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, and then complete the following options:

      1. Give your image a name and a description. The image name must be unique in your project's collection of images. The description is optional.

      2. In Source, select Cloud Storage file.

      3. In Cloud Storage file, enter wowzamediasystems/wse/WowzaStreamingEngine-4.6.0.image.tar.gz

    4. Click Create. The Wowza Streaming Engine image is available in your project.

    Add the image using the command-line tool


    This section describes how to use the gcloud command-line tool on your local computer to add the Wowza Streaming Engine image to your project's collection of images. Use the following scheme to add the image to your project:
    $ gcloud --project=<project-id> addimage <image-name> <image-uri>

    Description of flags and parameters


    <project-id> (required) The project ID where this image should live.
    --project=<project-id>
    <image-name> (required) A name for the new image. Your <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.
    addimage <image-name>
    <image-uri> (required) The Wowza Streaming Engine image URI in Google Cloud Platform storage:
    http://storage.googleapis.com/wowzamediasystems/wse/WowzaStreamingEngine-4.6.0.image.tar.gz

    Add a firewall rule

    To enable streaming and access to Wowza Streaming Engine Manager, you must create a firewall rule. The easiest way to do this is to modify your default project network to allow access. You can create a firewall rule by using either the Google Cloud Platform Console or the gcloud command-line tool. For more information, see Firewalls.

    Add the firewall rule using the the console


    In the Google Cloud Platform Console, do the following:

    1. In your project dashboard page contents panel, click the Products & Services menu icon, and then under Compute click Networking.

    2. In the Networks list, click default.

    3. On the Network details page, under Firewall rules, click Add firewall rule, and then complete the following options:

      1. Give your firewall rule a name and description. The firewall rule name must be unique in your project's collection of firewall rules. The description is optional.

      2. Specify the sources that will be allowed 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.

        • To specify that all sources can connect, in Source filter, select Allow from any source (0.0.0.0/0).

      3. In Allowed protocols and ports, enter tcp:554,1935,8084-8089.

        Note: To include support for RTP and MPEG-TS UDP streaming, in Allowed protocols and ports, enter this instead: tcp:554,1935,8084-8089;udp:0-65535.
    4. Click Create. The new firewall rule is available in your project.

    Add the firewall rule using the command-line tool


    The following code adds a firewall named "streaming" to your default network:
    $ gcloud addfirewall streaming --allowed="tcp:554,1935" 
    --project=<project-id>
    Note: To include support for RTP and MPEG-TS UDP streaming, add the following firewall rule instead:
    $ gcloud addfirewall streaming --allowed="tcp:554,1935;udp:0-65535" 
    --project=<project-id>
    The following code adds a firewall named "manager" to your default network:
    $ gcloud addfirewall manager --allowed="tcp:8084-8089" 
    --project=<project-id>

    Create and launch 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.

    Start the instance using the console


    In the Google Cloud Platform Console, do the following:

    1. In your project dashboard page contents panel, click the Products & Services menu icon, under Compute click Compute Engine, and then click Images.

    2. In the Images list, select the name of the Wowza Streaming Engine image that you added, and then click Create Instance.

    3. On the Create an instance page, complete the following options:

      1. Give your instance a name. The name must start with a lowercase letter, followed by 1-62 lowercase letters, numbers, or hyphens, and can't end with a hyphen.

      2. Select a Zone. The zone determines what computing resources are available and where your data is stored and used.

      3. 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 1 vCPU (n1-standard-1) machine type is selected by default, which is the minimum machine type that we recommend. To select a different machine type, select a different machine type in the list.

        Notes:
        • For more information about available machine types, see Machine Types. Wowza Streaming Engine works with most of the Google Compute Engine machine types, with the exception of the Shared-core machine types.

        • Each machine type is billed differently. For more information, see Machine type pricing.
      4. In Boot disk, change the disk used to boot the instance (if desired). To select a different disk type:

        1. Click Change.

        2. On the Your image tab, click the name of the Wowza Streaming Engine image that you added.

        3. In Boot disk type, select either SSD persistent disk (the default value) or Standard persistent disk. For more information, see Adding Persistent Disks.

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

      5. Enter key:value pairs for your Wowza Streaming Engine software license key (or license keys), startup package, and a user name and password that enables you to sign in to Wowza Streaming Engine Manager:

        1. Click Management, disk, networking, access & security options .

        2. On the Management tab, in Metadata, enter the following key:value pairs. After you enter a key:value pair, the console will enable you to enter another one.

          To enter a license key (required):

          • In Key, enter WZA_serverLicenseKey, and then in Value, enter <your valid Wowza media server software license key>.

          To specify a startup package (optional):

          • Click Add item, and then in Key, enter WZA_startupPackageURL, and in Value, enter <URL to your startup package>. Remember that if you don't specify a startup package, the Default startup package is used.

          To specify Wowza Streaming Engine Manager user name (optional, but recommended):

          • Click Add item, and then in Key, enter WZA_managerUsername, and in Value, enter <a valid user name>.

          To specify Wowza Streaming Engine Manager password (optional, but recommended):

          • Click Add item, and then in Key, enter WZA_managerPassword, and in Value, enter <a valid password>.

      6. Click Create. The new instance is available in your project. Be sure to note the External IP address for your new instance in the console's VM instances page.

        Note: If you're configuring a load balancer, we recommend that you use a static IP address for your instance. To set a static IP address:

        1. In your project dashboard page contents panel, click the Products & Services menu icon, under Compute click Networking, and then click External IP addresses.

        2. On the External IP addresses page, click Reserve Static Address.

        3. Give your static address a name and a description (the description is optional), and then click Reserve.

        Make sure to note the External IP address for your new instance. You'll need it when configuring the Wowza Load Balancer. For more information about configuring load balancing, see How to load balance between servers on Google Cloud Platform.

    Start the instance using the command-line tool


    To use gcloud to start an instance, run a command that uses the following scheme:
    $ 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>

    Description of flags and parameters


    <project-id> (required) The ID of the project in which to add the instance. This flag is required for every gcloud compute command except help, unless you have previously specified the --cache_flag_values flag to store your project ID information.
    --project=<project-id>
    <instance-name> (required 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-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?, which means the first character must be a lowercase letter, and all following characters must be dashes, lowercase letters, or digits, except the last character, which can't be a dash.
    addinstance <instance-name>
    <image-name> (required) The name of the Wowza Streaming Engine image to use.
    --image=<image-name>
    <license key> (optional) The license key for your Wowza Streaming Engine software 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 edit your Server.license manually to add the key value.
    --metadata=WZA_serverLicenseKey:<one or more pipe-delimited key values>
    <startup package url> (optional) The startup package that you want to associate with this instance. If you don't specify a startup package, the Default startup package is used.
    --metadata=WZA_startupPackageURL: http://storage.googleapis.com/wowzamediasystems/com/wowza/startup/4.0.0/live.zip
    <external-ip> (optional) 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.
    --external_ip_address=<external-ip>
    <machine-type> (optional 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.
    --machine_type=<machine-type>
    <fully-qualified-image-name> (optional) The name of the Wowza Streaming Engine image that you added to your project.
    --image=<fully-qualified-image-name>
    For more details about how to add instances, see Creating and starting an instance.

    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 didn't enter key:value pairs for a user name and password to sign in to the 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 the playback instructions to play the installed sample.mp4 video file using the test players in Streaming Engine Manager.

    Note: Wowza Streaming Engine Manager enables you to easily configure, manage, and monitor the Wowza Streaming Engine software. The browser-based manager enables sources with a diverse range of technical abilities to have greater control and confidence when streaming video. To learn about the different parts of the Streaming Engine Manager user interface, see How to find your way around Wowza Streaming Engine Manager.

    Terminate the instance


    When you terminate an instance, you'll lose all changes or files on the server. If there's anything you don't want to lose, be sure to save it to a persistent drive before terminating the instance or you'll lose your data. After you've saved your data, you can 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 console


    In the Google Cloud Platform Console, do the following:

    1. In your project dashboard page contents panel, click the Products & Services menu icon, under Compute 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 command line tool


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

    Originally Published: 12-03-2013.
    Updated: For Wowza Streaming Engine 4.6.0 on 11-29-2016.

    If you're having problems or want to discuss this article, post in our forum.