Skip to content

Installing Concerto 2

Brian Michalski edited this page Dec 23, 2019 · 70 revisions

Concerto 2 Digital Signage System

Choosing an Installation Method

Concerto can be installed via several methods

  • Debian Package: By far the easiest method of installation on an APT-based Linux system (such as Debian or Ubuntu). The concerto-full package will install the latest stable Concerto build and get things up and running quickly-- it includes Apache, NodeJS, Phusion Passenger, mySQL and other dependencies. The concerto-lite package includes the application and fewer dependencies and you'll need to set up and configure the stack yourself-- more details below.

  • Virtual Machine Image: A total turnkey Concerto server inside a VM image. Simply download one of the images (VirtualBox and Xen images are available, though conversion to other formats should be straightforward) and run it in any compatible VM software (such as VirtualBox) and log in via ssh to go through a simple setup procedure. All packages, configurations, and dependencies are already set up.

  • Installation from Source: Download the latest stable build of Concerto and build and install Concerto and its dependencies. Concerto requires a *nix-like operating system and has not been shown to work in any Windows environment.

  • Capistrano: Use the included capistrano script to deploy to your server. This is for experienced capistrano users. See the directions here.

  • Docker Image: coming soon.

Prerequisites

In general, Concerto 2 requires a webserver capable of serving Ruby on Rails applications and a recent version of Ruby, ImageMagick, RubyGems, and the Bundler gem to get started. Its many other requirements are satisfied through installing the gems specified in the Gemfile via Bundler. Depending on your installation method, much of this may be done for you. Some requirements of note:

  • A webserver (Apache 2 is highly recommended for this and Concerto provides VHost configurations for Apache to make this as simple as possible)

  • A Rack-compatible adapter (such as Phusion Passenger - which comes in Apache, Nginx, and other flavors). This can be installed as a gem.

  • A database (by default, SQLite is used, but this can be altered by changing config/database.yml as suggested in config/database.yml.mysql, using the install script with the MySQL option, or using the Virtual Machine Image)

  • ImageMagick is used for image processing and such and is a prerequisite for the RMagick gem that Concerto uses.

  • NodeJS is used for the Javascript engine (versions prior to 2.3.7 used therubyracer).

  • LibreOffice and Poppler-Utils are used for converting documents of various formats, including PDFs, to images. These are listed as suggestions though and not required, but if you want this feature, these are required.

  • Delayed Job is used to process certain long-running tasks asynchronously. It will be installed with all the other Concerto gems and run in the background unless disabled in the Dashboard.

Concerto Debian Packages

Full Concerto Package

The full concerto package (concerto-full) will closely replicate the setup of the server virtual image.

It includes Imagemagick, NodeJS, Ruby, the MySQL client libraries, Apache2, and Passenger. The package drops the Concerto source code in /usr/share/concerto and then performs a few post-install tasks such as creating the mySQL database concerto_production and user concerto, installation of gems, compilation of assets, migration and seeding of database, and installation of concerto service. (See http://github.com/concerto/concerto-debian repo for more specific details.)

After this package is installed, just browse to the server and you should be up and running.

Lite Concerto Package

The more lightweight Concerto package (concerto-lite) will make relatively few assumptions about a system's setup. It requires ImageMagick, NodeJS, Ruby, the MySQL client libraries and the associated ruby bindings.

Installing Concerto as a Debian Package

This is assuming you are running as a non-root user that has sudo ability, on Debian 9 (stretch) or Ubuntu (xenial) or later.

  • Install curl: sudo apt-get install curl
  • Add Concerto repository and key: curl -k get.concerto-signage.org/add_repo.sh | sh
  • Install Concerto via APT: sudo apt-get install concerto-full (or concerto-lite)

After installation of the full package, you can configure Concerto vhost in /etc/apache2/sites-available/concerto.conf as needed-- at the very least you need to make sure the ServerName entry matches your server's hostname. If you change the site configuration file you'll need to restart apache sudo apache2ctl restart. The installation already disables the default site sudo a2dissite 000-default and enables the concerto site sudo a2ensite concerto.

Virtual Server Image (VirtualBox, VMWare, et. al.)

The virtual server image contains a full-stack installation of the Concerto webserver with all components pre-configured. The default username is concerto and the password is truc9awr. Users are prompted to change this at first logon.

VirtualBox Image: http://dl.concerto-signage.org/concerto_server.ova

  • Download the appropriate VM image
  • Load it into your VM tool of choice
  • Login using the credentials mentioned above (also in the OVA file comments) and follow the initial configuration scripts - which will set a proper root password and proper database credentials for Concerto (using randomized passwords).
  • Make any network-specific changes to /etc/apache2/sites-available/concerto and restart Apache if needed

Installing from Source:

NOTE: Upon startup, Concerto will create and configure a SQLite database. If you want to change this, edit config/database.yml appropriately-- there is a section for each environment: development, test, and production. When using bundle commands at the shell prompt the environment is assumed to be development unless specified otherwise, so you may need to prefix those commands with RAILS_ENV=production. A sample MySQL database configuration file is provided in config/database.yml.mysql.

Upon its next startup, Concerto will populate whatever database you've specified.

Prerequisites: As above, make sure you have Ruby, RubyGems, Bundler, ImageMagick, NodeJS, Apache (or compatible webserver), Passenger (or compatible Rack adapter).

# install dependencies
sudo apt-get install -y build-essential apt-transport-https libapache2-mod-passenger ruby-full ruby-dev libruby imagemagick ruby-rmagick libmagickcore-dev libmagickwand-dev libssl-dev zlib1g-dev libsqlite3-dev default-mysql-server libpq-dev default-mysql-client ruby-mysql2 default-libmysqlclient-dev apache2 libxslt1-dev nodejs git

gem install bundler

# only need these three lines if you want to import various document formats to slides
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt install -y libreoffice ghostscript libgs-dev gsfonts poppler-utils

# install our application (relative to whereever you currently are)
git clone https://github.com/concerto/concerto.git
cd concerto

# remember to prepend each of these next commands with RAILS_ENV=environment, if needed
# for example:  RAILS_ENV=production bundle install --path vendor/bundle
bundle install --path vendor/bundle
bundle exec rake db:migrate
bundle exec rake db:seed
# When Concerto is started up, it will by default execute those three commands above.
# However, they may also be run manually and automatic migration and bundle installation 
# can be disabled in config/concerto.yml.

Next, set up the appropriate webserver configuration (VHosts such as the one here) (and restart for it to take effect) or simply type bundle exec rails server on the command line to get a quick development environment running (on localhost port 3000). Make sure that the permissions on the concerto directory allow the webserver user (generally www-data) access.

If in production mode (recommended), you will need to precompile static assets:

  • For most environments, run RAILS_ENV=production bundle exec rake assets:precompile
  • When deployed to a sub-url (e.g., https://example.com/concerto/), run bundle exec rake assets:precompile RAILS_ENV=production RAILS_RELATIVE_URL_ROOT="/concerto"

Next, install the service script:

sudo cp concerto-init.d /etc/init.d/concerto
sudo update-rc.d concerto defaults

Finally, browse the the Concerto URL and setup the initial admin user.

Post Installation Tasks

  1. Start (or restart) Concerto background services. Check for a ruby process owned by your web server user running clockwork.

Rotating Logs

If you like to have your logs rotated, you can add this (tweaked to your specific environment) to your /etc/logrotate.d directory. See also: https://gorails.com/guides/rotating-rails-production-logs-with-logrotate

/usr/share/concerto/log/*.log {
	create www-data www-data
	su www-data www-data
	missingok
	compress
	daily
	dateext
	rotate 30
}

Running in an Isolated Network

If you want to run your Concerto installation in a subnet isolated from the internet then you will need to do the following. Local RSS feed and IFrame content will still work (from sources inside your network), but weather obviously wont work.

  • Get your server up and working while connected to the internet. You must be running at least version 2.3.5 (PR #1413 and PR #1414).
  • Change the "notify developers of errors" setting to false/unchecked under System settings.
  • Change the automatic_bundle_installation and airbrake_enabled_initially settings to false in the concerto.yml file in the config directory.
  • Isolate your network from the internet, restart your concerto website and services.
  • If you've installed additional concerto plugins then test them to make sure they still work.
  • Add content and screens as needed. The concerto player works fine.