Friday, January 5, 2018

Goodbye Owncloud, Hello Seafile

I had been an OwnCloud user for several years now. The En0ch team's OwnCloud VM made it easy to deploy and get setup in no time. My configuration was perhaps somewhat unique with the server being a hosted VM and the files being stored on a NTFS drive shared through a CIFS Mount to the VM. Performance was less than stellar, but it worked! For my home needs anyway.

Recently we had a power outage in my neighborhood (a new neighborhood, so this was certainly not the first) and every time this happened, OwnCloud would crash hard. I was always surprised at how much work it took for me to get the service back up and running. I was on the latest stable 9.x build for some time (I think 10.0.4 is the latest at the time of this writing). For a while I had been thinking it was time to either wipe it all and start new, or find a new solution. After this most recent power outage, I figured it was time to start fresh AND look for a new solution.

I soon discovered Seafile and thought the initial configuration looked simple to setup. It's friendly integration with Let's Encrypt and modern UI were also intriguing.

After 30 minutes I had seafile up and running on my LAN. It was extremely simple following their documentation. It wasn't until I tried to enable HTTPS over WAN that I ran into some challenges, but once that was taken care of, I've been able to explore the product more.

Over my own experience with OwnCloud, Seafile is significantly faster. From syncing, to downloading, to streaming media - the overall experience is quite pleasant. It even works well for sharing public download and upload links, which was one of the most useful features of a self-hosted cloud file share.

Here are some of the tricks to my setup I had to configure:

Environment


  • Seafile 6.2.3 on Ubuntu Server 16.04 VM in VMware Workstation (hosted on Windows 10)
  • Storage is 2TB NTFS WD Passport configured as a Shared Folder to the Guest OS via Workstation
  • MySQL DB since storage is on NTFS (per user docs)
  • Let's Encrypt SSL Cert
  • NGINX reverse proxy


The first challenge was making it so I didn't have to run the seafile.sh and seahub.sh services with sudo. Because I'm using shared folders in Workstation, I wasn't the 'owner' of the data folder that get's configured and the services would fail to start unless ran with sudo. I found that if I opened
/etc/init.d/vmware-tools
and used my own GID and UID, it would mount the HGFS share properly and I could start the services without sudo

# Mount all hgfs filesystems
vmware_mount_vmhgfs() {
  if [ "`is_vmhgfs_mounted`" = "no" ]; then
    if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then
      mkdir -p $vmhgfs_mnt
      vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \
         -o subtype=vmhgfs-fuse,allow_other,uid=1000,gid=1000 $vmhgfs_mnt"
    else
      vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=1000,gid=1000"
    fi
  fi
}

The second biggest challenge was getting my nginx configuration right. I found that when I would enter my DDNS address for the server, I would be directed to my router's login - I wasn't getting passed through to the server itself. You can read more about the symptoms in the Seafile Forums. Long story short, I was missing some information shared in the Sample configuration file from the docs. Read those buggers carefully!

Whatever your self-hosted cloud storage provider is (OwnCloud, Seafile, NextCloud, etc), we can at least all agree that we're glad to be off of the big brother alternatives!
Share:

Tuesday, November 28, 2017

Plex DVR Postprocessing Script



I've been using Plex DVR the last couple months, testing the Plex Pass and Beta capabilities, and figuring ways to make it a solid solution for my and my family. The DVR aspect works well on the latest Beta release 1.10.0.4523, and the GUI is very simple to use. Setting up recordings and having them auto-added to my library works almost like magic.



But amidst the magic, I had some requirements that took more than out-of-the-box configuration. My two requirements were

  1. Remove commercials
  2. Reduce the final file size while preserving quality
Through lots of trial and error (lots), I was able to provide Plex with a script that takes care of both of these requirements. This script is provided to Plex via its path on the server in the DVR settings of the web console. Here, you can see I have added the script plex_pp.sh






















The Plex Pass beta build mentioned above introduced commercial cutting natively within the Plex GUI. For those just starting out with Plex DVR, this is a fantastic addition they've added, and will greatly reduce the technical challenges of implementing it yourself. This newly built-in feature is still, however, in beta and may come with some unwanted bugs.

This script is a combination of information found online and tweaks for my needs (my household is mostly Apple products, hence the transcoding presets). All of this is maintained on my GitHub page, so check there for the latest bits.

My Environment (not earth shattering by ANY means)

  • PMS (latest Plex Pass Beta) running on a virtual Ubuntu 16.04
  • 4vCPU / 2GB RAM
  • AMD A-10 6800k APU in host running Windows 10 Pro
  • HDHomeRun Connect Tuner


Prerequisites

  1. Comcut
    1. Comskip
    2. ffmpeg
  2. Handbrake-CLI
This script is used to run comcut on completed Plex DVR recordings, then transcode them using handbrake with the Apple TV 1080p preset.

Shout out
Original inspiration for this script came from this post

Usage
  • Be sure to change permissions on the .sh file, something like chmod 777 or u+x
  • Edit the script to put the paths to your Comcut and Handbrake-CLI locations. I've included mine as examples within the script
--
#! /bin/bash
#
# Plex DVR Postprocessing
# Version 0.0.1
# twitter.com/thatvirtualboy
# www.thatvirtualboy.com
#

# FIRST, RUN COMCUT TO REMOVE COMMERCIALS, THEN TRANSCODE AND COMPRESS

lockFile='/tmp/dvrProcessing.lock'
inFile="$1"
tmpFile="$1.mp4"
dvrPostLog='/tmp/dvrProcessing.log'
time=`date '+%Y-%m-%d %H:%M:%S'`
handbrake=/PATH/TO/YOUR/INSTALL (mine is /usr/bin/HandBrakeCLI)
cut=/PATH/TO/YOUR/COMCUT/INSTALL (mine is /home/ryan/comchap/comcut)

echo "'$time' Plex DVR Postprocessing script started" | tee $dvrPostLog

# Check if post processing is already running
while [ -f $lockFile ]
do
    echo "'$time' $lockFile' exists, sleeping processing of '$inFile'" | tee -a $dvrPostLog
    sleep 10
done

# Create lock file to prevent other post-processing from running simultaneously
echo "'$time' Creating lock file for processing '$inFile'" | tee -a $dvrPostLog
touch $lockFile

# Run comcut
echo "'$time' Comcut started on '$inFile'" | tee -a $dvrPostLog
$cut "$inFile"

# Encode file to MP4 with handbrake-cli
echo "'$time' Transcoding started on '$inFile'" | tee -a $dvrPostLog
$handbrake -i "$inFile" -o "$tmpFile" --preset="Apple 1080p30 Surround" --encoder-preset="veryfast" -O

# Overwrite original ts file with the transcoded file
echo "'$time' File rename started" | tee -a $dvrPostLog
mv -f "$tmpFile" "$inFile"

#Remove lock file
echo "'$time' All done! Removing lock for '$inFile'" | tee -a $dvrPostLog
rm $lockFile

exit 0
--

Once the recording is complete, the script will kickoff and get to work on the file before adding it to the Plex library. While the script is running, you'll see that the recording sits at a 100% complete status until it's done.

If you have two shows recording back-to-back, this script will also process one recording at a time, to not tax your system.

I hope you find this useful. Thanks for reading!
Share:

Tuesday, November 14, 2017

Using Ubuntu 17.10 For Work

While my MacBook Pro was in the shop (that issue-riddled machine) I found myself in need of a substitute. The iPad Pro is great for quick bursts of productivity and for trips, but for work requiring 8 hours of sitting down at a desk, you just can't find a replacement for a mouse and keyboard.

I had a 2009 white MacBook in my garage running Linux Mint that was used for garage things, you know, playing classic rock, YouTube, etc. I decided to take it in, install the latest Ubuntu 17.10 on it and see how easy it would be to get by doing my day to day work.

I'm not missing macOS at all
After reading the news several months ago that Ubuntu was ditching Unity for GNOME 3, I thought, "Oh great, they're replacing a bad DE with an even worse one." However, I've been pleasantly surprised at the usability of Ubuntu 17.10, and dare I say, I've actually really enjoyed using it. I'm not missing macOS at all. The minimalist and streamlined top panel works great to show me the system info I need. Desktop notifications are front and center without getting in the way.
Once I configured a proper theme (took all of 5 minutes using GNOME Tweaks) I was ready to go. It's strange saying this, but Ubuntu 17.10 feels like the mashup of Windows 10 and macOS that I've always wanted. Between the system's Activities (mission control) screen, Application Drawer, and multi-monitor support, everything works in a way that makes sense and is a joy to use.
Ubuntu 17.10 feels like the mashup of Windows 10 and macOS that I've always wanted.
One example is having multiple Firefox windows open. In macOS, if all these windows are minimized, clicking the Firefox icon on the dock will maximize just one of the windows, causing me to have to right click the icon and figure out which window I meant to maximize. Ubuntu 17.10 handles this way better. When I click on the icon in the dock, instead of picking a random window to maximize, it shows me a preview of the open windows to ensure I open the desired one. Seems small enough, but it makes a big difference in your workflow.

Ok, I brought his thing inside to do work... Luckily, we use our very own Workspace ONE at VMware as well as an O365 subscription allowing access to the full Office suite from the browser, so almost all of my work could be done right in Firefox.
There were scenarios where the full PowerPoint exe was necessary, as well as Skype for Business, and that's where our internal Horizon View VDI came into play, again, completely accessible from Firefox.
All in all, I feel comfortable saying that Ubuntu 17.10 is the best Ubuntu yet. Now if only we can get Linux working on the latest MacBook Pros!
Share:

Thursday, August 31, 2017

VMworld US 2017 Wrap Up

Sitting at the airport waiting to board allows you time to reflect on all he awesomeness that happened at VMworld US 2017. Product Announcements, Demos and Deep Dives, networking, and of course the Appreciation Party - Las Vegas was overtaken with VM goodness. 

Day 1 and 2 General Sessions can be watched here

Top Sessions from each day can be watched here

Full conference registers have access to all on-demand sessions here
Share:

Sunday, August 27, 2017

VMworld US 2017 Day #1

Today marks the official first day of VMworld US as the Welcome Reception and Solution's Exchange opened for all 20k attendees. Everyone here is energetic and excited to get the conference started. The 110 degree weather here in Las Vegas only made the drinks and apps better at the welcome reception. Mini-Grilled cheese anyone? How about a Greek Salad Shooter?

The registration and merch lines were almost non-existent (I guess it pays to land right as the welcome reception is starting!). After running into some fun faces like Ray O'Ferrell (CTO), Jack McMichael (EUC SE), and Brian Davidson (PREM Sr. Mgr), I got to mingle with some TAM customers and discuss the SDDC Journey they're on.

VMware's booth (at the very back of Solution's Exchange) has an amazing setup with demos and experts to talk about VMware vision and to dig into the technical details of our solutions. Other than beer sleeves, the hand out of choice this year appears to be none other than the fidget spinner.

Tomorrow's General Session with Pat Gelsinger should be great. See you there!
Share:

Tuesday, August 22, 2017

Download the VMworld 2017 app now!


VMware released today the all-new VMworld 2017 mobile app. The app is free and will work on your phone and tablet. Here are a few things you can do with the app:
  • Get your QR code for express badge check-in
  • Watch breakout session recordings on-demand
  • Add sponsors, exhibitors, and speakers to your Favorites List
  • Find your way around with the interactive and searchable map
  • Access VMworld Social Visualization, Community Offerings, and Social Channels
  • Network with other conference attendees
  • Keep current with daily highlights and important notifications
  • Provide feedback through session surveys
The app is compatible with iOS, Android, and Windows devices

Find out more at https://www.vmworld.com/en/mobile-app.html
Download from the iOS App Store
Share:

Monday, August 7, 2017

Mapping VMware Updates and Tools to Build Numbers

VMware has always branded its software as GA, Update 1, Express Patch 4, etc etc. This makes it easy to discuss features and fixes among employees and customers alike. The challenge, as many of you know, is knowing the exact build numbers that correlate to these upgrades and patches. Those specific build numbers are often requested by TAMs, Support, and Engineering in order to ensure accurate recommendations when upgrade planning or troubleshooting.

Another challenge is knowing where in the stack of released versions you line up. If you're on vSphere 6.5.0b Patch 1, is that before or after Express Patch 1b? When did Update 1 come out again?

Luckily, VMware has made it easy for you to track down these build numbers, and know where you are in the greater timeline of releases. VMware Knowledge Base Article 1014508 is a hub of build numbers for most VMware products. Be sure to bookmark this page!

Table from KB1014508

You may notice a key component missing from this table, and that would be VMware Tools, VMware's guest operating system management and performance solution. VMware Tools can throw in some complexity since there are versions that come bundled with ESXi hosts, and there are separate build numbers for how ESXi sees it, vs how the Guest OS sees it. This can be overly complicated in mapping out. Here's the second page to bookmark:
https://packages.vmware.com/tools/versions 
Notice the 4 columns of information. As the page states, the columns represent the Tools Client registered build, the source ESXi build bundle, the GOS identified build, and the ESXi server build number. All in a public setting that easy to consume and report on.

Thanks for reading!

Share:

Follow by Email