Media Players Documentation Release 2.5
Total Page:16
File Type:pdf, Size:1020Kb
Media Players Documentation Release 2.5 Isuma Apr 03, 2019 Contents 1 Installation 3 1.1 BIOS configuration............................................3 1.2 Naming convention............................................3 1.3 Install Debian...............................................3 1.4 More in-depth OS installation instruction................................4 1.5 Configure Puppet.............................................5 1.6 Stretch Fixes...............................................7 1.7 Configuring and Running Git Annex..................................7 2 Old Installation Details 9 2.1 Puppet..................................................9 2.2 Git-annex................................................. 10 2.3 Git-annex configuration......................................... 12 2.4 Other configurations........................................... 18 3 Testing 21 3.1 Backend................................................. 21 3.2 CableTV................................................. 21 3.3 Git-annex sync.............................................. 21 3.4 Isuma.tv................................................. 22 4 Maintenance 23 4.1 Changing preferred content....................................... 23 4.2 Unused and deleted files......................................... 24 4.3 Metadata................................................. 24 4.4 Settings.................................................. 26 4.5 External synchronisation drives..................................... 28 4.6 Creating user accounts.......................................... 33 4.7 Upgrading git-annex........................................... 33 5 User guides 35 5.1 How to setup a playlist.......................................... 35 6 Hardware platforms 43 6.1 Rugged specification........................................... 43 6.2 Lightweight specification........................................ 44 6.3 Shuttle XPC small desktops....................................... 45 i 6.4 Logic Supply desktops (v2.5 series)................................... 45 6.5 Advantech rugged servers (1.0 series).................................. 45 7 Troubleshooting 47 7.1 Test procedure.............................................. 47 7.2 Basics................................................... 47 7.3 Git-annex................................................. 49 7.4 S3 diagnostics.............................................. 59 8 Development 61 8.1 Git-annex internals............................................ 61 8.2 Git-annex Drupal integration....................................... 62 8.3 Metadata sync script........................................... 63 8.4 Metadata purge script.......................................... 64 8.5 Debian packages............................................. 65 9 Configuration Management 69 9.1 Installing the puppet master....................................... 69 9.2 Setting up git repositories to ease up modification............................ 71 9.3 Managing modules............................................ 74 9.4 Configuring a dashboard......................................... 74 10 Design 77 10.1 Context.................................................. 77 10.2 Requirements............................................... 78 10.3 Technical decisions............................................ 79 10.4 Architecture overview.......................................... 80 10.5 Transcoding............................................... 82 10.6 Metadata................................................. 83 10.7 Schedules................................................. 84 10.8 Bandwith limits............................................. 84 10.9 File deletion and garbage collection................................... 84 10.10 Server-specific metadata......................................... 84 10.11 Remaining issues............................................. 85 10.12 Security issues.............................................. 87 11 Transition plan 89 11.1 General principles............................................ 89 11.2 Timeline................................................. 90 11.3 Metrics and communication....................................... 90 11.4 Implementation.............................................. 90 12 Similar projects 95 12.1 Commercial CDNs............................................ 95 12.2 Debian mirrors network......................................... 95 12.3 Git annex................................................. 95 12.4 Camlistore................................................ 96 13 Terminology 97 14 About this document 101 14.1 License.................................................. 101 ii Media Players Documentation, Release 2.5 The Isuma Media Players project is a fully free and open source software project to create a two-way, distributed content distribution network for communities with limited bandwidth to the larger internet. Note: This documentation covers the 3.x generation of media players. For older media players, see the 2.x branch. Contents 1 Media Players Documentation, Release 2.5 2 Contents CHAPTER 1 Installation This describes how to set up a media player from scratch. You may be able to install the components on an existing system, but this is currently not supported. 1.1 BIOS configuration The BIOS should be configured so the machines power up after a power outage instead of just staying powered off. This varies according to the device being provisionned. It could be something like: Restore on AC Power Loss and it should be set to reset or on. 1.2 Naming convention Media players should adhere to a strict naming and labeling convention. A media player’s hostname (the first part of the “fully-qualified domain name” or fqdn) should be named mpYYYYMMDD-N, where YYYY is the year, MM is the month and DD is the day the machine was installed. N designates the number of the machine, e.g. 1 for the first machine created. So mp20150508-1 designates the first machine created on may 8th 2015. -0 or lower are invalid version numbers. The remaining part of the fqdn (the domain) should always be mp.isuma.tv. So the fqdn will always be something like mp20150508-1.mp.isuma.tv. Every media player should be labeled with their fully-qualified domain name in the front and the back. 1.3 Install Debian Media players run on Debian “stable”. We are now installing new media players on Debian 9 “Stretch”. The regular Debian install manual can be followed, with those exceptions: 1. mount the largest partition as /var/isuma 3 Media Players Documentation, Release 2.5 2. use the UTC timezone 3. use an American keyboard layout 4. hostname: use the Naming convention 5. do not enter a root password (we use sudo) 6. create yourself an account for diagnostic purposes during the install (Puppet will create the other accounts as needed) 7. use the “CDN redirector” mirror, so that APT uses the mirror closest to the machine 8. On the software selection screen, select the “standard system” and “Web server” software collections. 1.4 More in-depth OS installation instruction 1.4.1 Create bootable Debian USB Download latest (stretch in 2019) small/netinst amd64 image: https://www.debian.org/distrib/netinst Write iso image to USB stick: https://www.debian.org/releases/stretch/amd64/ch04s03.html.en [b@tt43 Downloads]$ sudo cp debian-9.8.0-amd64-netinst.iso /dev/sdb [b@tt43 Downloads]$ sync 1.4.2 Installation Parameters • Localization: English, Canada, American English • No to loading non-free firmware for wifi from local media. • Choose Ethernet Controller for network interface. • A media player’s hostname (the first part of the “fully-qualified domain name” or fqdn) should be named mpYYYYMMDD-N, where YYYY is the year, MM is the month and DD is the day the machine was installed. N designates the number of the machine, e.g. 1 for the first machine created. So mp20150508-1 designates the first machine created on May 8th 2015. • The domain (the remaining part of the fqdn) should always be mp.isuma.tv. So the fqdn will always be some- thing like mp20150508-1.mp.isuma.tv. • • Leave root password empty • Initial user: nursery (give it a throwaway password you remember for the duration of this install) • Eastern time zone • UEFI installation? 1.4.3 Partition disk • Manual partitioning: • Choose 6TB HDD, yes to new partition table • Choose 6GB FREE SPACE, create a new partition, 128MB, Beginning, Use as: EFI System Partition, Done 4 Chapter 1. Installation Media Players Documentation, Release 2.5 • Configure the Logical Volume Manager, Yes, Create volume group: vgroup, select 6TB partition (/dev/sda2) w/ spacebar, Continue • Create logical volume, on vgroup, name: swap, size: 16GB, continue • Create logical volume, on vgroup, name: root, size: 64GB, continue • Create logical volume, on vgroup, name: isuma, size: remaining space (5921174MB, 5.9TB), continue, Finish • Select 5.9TB partition LV, Use as: Ext4, mount point: enter manually: /var/isuma, done • Select 64GB partition LV, Use as: Ext4, mount point: /, done • Selection 16GB partition LV, Use as: swap area, done • Scroll down to Finishing partitioning and write changes to disk, Yes 1.4.4 Install system services • Choose package manager: Canada, deb.debian.org, no proxy, no to popularity survey • Use spacebar to disable all options except “SSH server” and “standard system utilities” which should be enabled with the * symbol. • Now wait while it does the install. (~8mins) and then it automatically reboots (remove the USB stick as soon as it shuts down so that it boots from disk). 1.4.5 Initial