Q100658: Creating a Flix instance in the Cloud

SUMMARY

This article is part of a series intended to show an example of how to set up Flix in the Cloud. You can find the full series in Q100655: Creating a Flix setup in the Cloud.
The steps outlined below are about how to set up Flix servers in the cloud. The article assumes some knowledge of networking and Linux administration and it is targeted toward IT administrators.



MORE INFORMATION

This guide uses Amazon (AWS) services as an example, but Flix works equally well with other cloud providers such as Google and Microsoft. This article assumes common security practices, but please ensure compliance with any studio security policies. 

  1. Create two or more CentOS 7 instances, to run the Flix servers. Each server will be identical except for their IPs and names. Each server should have ports: 22, 8080, 9091, and 9876 open to the local VPC network.
  2. Go to https://aws.amazon.com/ and Sign In to the Console (an AWS account is required).
  3. Under Build a solution, click the Launch a Virtual Machine link.

    image4.jpg


  4. Under the Name and tags section enter “Flix1” for the first server and “Flix2” for the second server in the option “Name” field. This will help you later to distinguish the servers you are creating in your AWS account (they will be named Flix1 and Flix2).
  5. Search for “CentOS 7”. Use “CentOS 7 (x86_64) - with Updates HVM”
  6. Select t2.large (2 cores 8GB) or larger as the Instance type.



  7. Change the storage size to 20GB. The Flix server might need some extra space for temporary files (especially useful for large sequences).

    20GB-storage.png


  8. If you have a key pair already, go ahead and use it. If not, click Create new key pair, enter a name for the key, and click on Create Key Pair to download a .pem file. Keep it safe as this will be the only way to access your instance.
  9. Make sure you use the same VPC and subnet you used to create your VPN server.
  10. To change the default network settings click on the Edit link next to Network Settings and:

    image8.jpg
     
    1. Make sure the Auto-assign Public IP option is Enabled.
    2. Allow access to the following ports over TCP: 22, 8080,9091, 9876. Add as source the subnet VLAN. In this example, it is 172.31.16.0/20. You can create a “New Security Group” when you set up the first server and then just reuse the security group you created for the second server.
    3. At the bottom of the Networking section click on the “Advanced Networking Configuration”

      advanced-network-config.jpg


    4. Under “Network interface 1” add a custom Primary IP. This IP will need to be in the IP range for the subnet you are using. In this example, it is 172.31.16.103 for the first server and 172.31.16.104 for the second.
  11. Check all the details are correct, then click Launch Instance.
  12. A popup will appear asking you to select a key pair. Select the key you created.
  13. Wait until the instance is done initializing.
  14. Create data storage that is accessible from all Flix servers. This example will use Amazon EFS storage.
    1. Create a security group to allow access to the storage from the Flix servers. Go to https://console.aws.amazon.com/ec2/v2/#SecurityGroups: and click on “Create security group”.

      aws-create-security-group.jpg


    2. Name the Security group, for example: ‘EFS-NFS-in’, and make sure the VPC the Flix servers reside on is selected. In the Inbound and Outbound Rules sections select NFS as type. For destination remove the default 0.0.0.0/0 and add the VLAN of the Flix servers. In this example 172.31.16.0/20. Click on “Create security group”.

      EFS-NFS-rules.jpg


    3. Go to https://console.aws.amazon.com/efs/ and click on “Create file system”.

      aws-create-screenshoot.jpg


    4. Optionally add a name to describe what the storage will be used for. Make sure it is using the same VPC and Availability Zone as the Flix servers. Click on Create.
    5. Click on the Amazon EFS storage created in the previous step and then click on the Network tab and then Manage.

      aws-EFS-Network-tab.jpg


    6. In the security groups section, remove the default group and add the group created in step 14.2 - “EFS-NFS-in”. Click save.

      EFS-NFS-rules.jpg


    7. Click on Attach and Mount via IP.  This shows the command needed to mount the shared storage to your Flix servers. This storage does not need to be mounted on the VPN server or the MySQL and Licence server.

      aws-efs-attach.jpg


    8. Connect to each Flix server using the command below where KEY is the key pair used to create the server, and IP is the elastic IP address of the Flix server you are connecting to. You can start ssh from an OSX terminal, Windows PowerShell, or use a separate program.
      $ ssh -i KEY centos@IP
    9. On each Flix server, create a directory to mount the shared storage. In this example, it is created by running sudo mkdir /mnt/flix. Test the mount command from the Mount via IP tab. In this example, the default path efs is replaced with the directory just created /mnt/flix. Here is the final command from this example:
      sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 172.31.23.114:/ /mnt/flix
    10. To make this mount command permanent, add an entry in the server’s /etc/fstab file with information for the shared storage and directory created in step 14.7. In this example the line is: 172.31.23.114:/ /mnt/flix nfs4  nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 0 0
  15. Install Flix on the two Flix servers and configure them to use the MySQL and Foundry license server for Flix licensing and MySQL. This article describes how to set up Flix servers - Q100593 Optimum Flix 6 servers setup
    1. In this example, DNS is not configured so IP addresses are used for everything. Flix is installed for all servers at /mnt/flix/flix_server_production. Here are  the changes to the Flix config.yml file for this example:
      mysql_username: root
      mysql_password: Password
      mysql_hostname: 172.31.16.102
      floating_license_hostname: 172.31.16.102
      floating_license_port: 4101
      asset_directory: /mnt/flix/assets
      shared_storage: True
      log_file: /var/log/flix_server.log
    2. The command below is used in this example to start the first Flix server:
      /mnt/foundry/flix/flix_server_production/flix_server -hostname 172.31.16.103 -config-file /mnt/foundry/flix/config.yml

NOTE: All cloud and third-party technologies mentioned in this article are reference examples only and are not supported by Foundry. The above list of steps and example setups are provided as guidance only and are not intended to be followed and used in production. Please coordinate with your IT Administrator to set up a similar network or cloud workflow that can be used by your studio.

 

NOTE: This guide is using the latest version of Amazon and Foundry technologies available in June 2022.

 

FURTHER READING 


Amazon’s guide on how to create and use EFS volumes can be found here: https://docs.aws.amazon.com/efs/latest/ug/wt1-create-efs-resources.html

Flix server installation instructions are listed in the Foundry's Learn section on Installing Flix Server.

 

This article is part of a series of articles explaining how to set up a Flix cluster in the cloud behind a VPN server. The full list can be found here: 

    We're sorry to hear that

    Please tell us why