Adobe MEDIA SERVER User Manual page 39

Using adobe media server on amazon web services
Table of Contents

Advertisement

USING ADOBE MEDIA SERVER ON AMAZON WEB SERVICES
Using Adobe Media Server on Amazon Web Services
echo "accessKeyId:secretAccessKey" >> /etc/passwd-s3fs
chmod 640 /etc/passwd-s3fs
/usr/local/bin/s3fs ams-test-s3fs -o use_cache=/tmp -o allow_other,uid=500,gid=500
/mnt/s3fs
The amsuser:amsgroup can now read and write content to the S3 bucket "ams-test-s3fs".
Important: The "allow_other" option allows Adobe Media Server to read directly from the s3fs mounted device. If you
don't specify "allow_other", Adobe Media Server cannot access files from the s3fs mount. Also, you must specify the
full path to s3fs.
Use a shell script to manage content when you launch an instance
Note: Using a shell script is optional. You can copy and manage content manually if you choose.
When you launch an instance, there is a User Data text box on the Advanced Instance Options screen. Scripts in the
User Data text box that start with
than 16KB. To run a longer script, write it in an external file and trigger it from the User Data script. The last line of
the User Data script in this example triggers an additional script.
1
Complete steps 1-4 in the previous task.
Enter the following script into the "User Data" text box when you launch an instance from the AWS Management
2
Console. When the instance loads, it mounts the S3 bucket "ams_scripts" and executes the script "setup.sh".
#! /bin/sh
echo "accessKeyId:secretAccessKey" >> /etc/passwd-s3fs
chmod 640 /etc/passwd-s3fs
mkdir /mnt/bucket
/usr/local/bin/s3fs ams_scripts -o use_cache=/tmp -o allow_other,uid=500,gid=500
/mnt/bucket
/mnt/bucket/setup.sh
Use the full path to s3fs.
The option
-o use_cache=/tmp
option, s3fs can use local content instead of pulling it from S3 each time the content is requested.
The /mnt/bucket/setup.sh script is a file on S3 that runs additional configuration steps. For example, the script
could modify Adobe Media Server to look for streams in the /mnt/bucket directory. The script is not provided; you
must write it.
For additional information about User Data scripts, see Eric Hammond's article
with user-data
Scripts.
Using Amazon Elastic Block Store (EBS) to store and stream content
According to the
Amazon web
Amazon EC2 instances. Amazon EBS volumes are off-instance storage that persists independently from the life of an
instance. Amazon Elastic Block Store provides highly available, highly reliable storage volumes that can be attached to a
running Amazon EC2 instance and exposed as a device within the instance. Amazon EBS is particularly suited for
applications that require a database, file system, or access to raw block level storage.
Amazon EBS works exactly like a local file system. You can stream from an EBS volume and write to an EBS volume.
The main benefit of using an EBS volume is persistent storage; when you terminate an instance, the data on the EBS
volume is saved.
Important: To prevent data loss, unmount the EBS volume before you terminate the instance.
are run at runlevel 5 when an instance launches. The User Data text must be less
#!
is an s3fs feature that caches S3 content on the instance. When you specify this
site: Amazon Elastic Block Store (EBS) provides block level storage volumes for use with
Last updated 9/20/2013
Automate EC2 Instance Setup
36

Advertisement

Table of Contents
loading

Table of Contents