GithubHelp home page GithubHelp logo

yottabit42 / plex-jail Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 10 KB

Plex Media Server for video management, containerized in a FreeBSD Jail

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%

plex-jail's Introduction

Scenario 4 of Reproducible FreeBSD Jail Setup Project

by Jacob McDonald

Revision 170505a-yottabit

All scenarios are also available in an easy-to-read Google Doc.

Problem Statement

As with any operating system, when used interactively, it is possible for a FreeBSD Jail to become misconfigured, crufty, outdated, and not work as expected. Additionally, FreeBSD kernel upgrades can affect the package compatibility that are installed in the Jail, and reverting the Jail dataset to an earlier snapshot would not alleviate this problem.

Assumptions

  • User has basic-to-intermediate UNIX experience

  • User knows how to use the referenced applications

  • User knows how to create a standard FreeBSD Jail from an OS shell or FreeNAS UI

  • User knows how to enter the Jail from an OS shell or FreeNAS UI

  • User knows how to create ZFS datasets from an OS shell or FreeNAS UI

  • User knows how to link ZFS datasets into Jails from an OS shell or FreeNAS UI

  • User knows how to create ZFS dataset snapshots, if needed, from an OS shell or FreeNAS UI

Solution

Create configuration scripts for Jails in a similar fashion to Docker Containers, so that a Jail can be destroyed and recreated quickly in order to fix or upgrade the Jail environment.

Rather than keep configuration data directly in the Jail filesystem, link in a dataset where the configuration script, and any required configuration data, can reside. Link in datasets that are required for the purpose of the Jail.

One could fully automate the creation of the Jail itself, but in this scenario we will rely on the FreeNAS UI to manage the Jails, and use configuration scripts inside the Jail itself to complete the setup.

It’s also possible to take this methodology a couple steps further. Namely:

  • Remove unnecessary packages from the default Jail environment, and

  • Run applications directly from init so that the Jail will shutdown when the application finishes. The user could therefore schedule applications to run as needed from the host OS cron, even more like a Docker Container environment.

  • Left as an exercise for the reader.

(Side note: scripting in Bourne sh is much easier when one realizes it isn’t csh. 😐 Also, this is 1979 Bourne shell, sh—not that newfangled 1989 Bourne-again shell, bash. It should be compatible with dash, the default /bin/sh in GNU/Linux, but ymmv as I have not tested it.)

Scenario 4: Plex Media Server for video management

Create a standard FreeBSD jail. Link in the persistent configuration dataset, /config in this case. Run the configuration script, install-plex.sh in this case.

License:

Licensed under BSD-3-Clause, the Modified BSD License.

plex-jail's People

Contributors

yottabit42 avatar

Stargazers

Steven Selph avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.