-
Ensure Ruby version as specified in
.ruby-version
is installed -
PostgreSQL 9+ installed and running. The following should achieve this for a CentOS machine:
Tested using v9.2 on CentOS 7
2.1. Install using
yum install postgresql
2.2. Configure PostgreSQL like the following:
postgresql-setup initdb sudoedit `/var/lib/pgsql/data/pg_hba.conf` # Change entries in `METHOD` column to 'trust' and then save the file systemctl start postgresql
-
Ensure Node.js v8.12 is installed
-
Install directly
-
Install using Node Version Manager
-
-
Yarn installed
4.1. Install repo using
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
4.2. Install
yarn
itself usingyum install yarn
-
Install and configure
Flight Terminal Service
as described here -
Clone this repo using
git clone https://github.com/alces-software/overware.git
-
Copy the example environment variables file using
cp '.env.example' '.env'
-
Edit
.env
as required to use valid environment variables. Some of these are only important for specific environments. -
Install gems with
bundle install
-
Prepare the database
10.1. Create DB
RAILS_ENV=production bin/rails db:create
10.2. Load schema
RAILS_ENV=production bin/rails db:schema:load
10.3. Run database migrations
RAILS_ENV=production bin/rails db:migrate
10.4. Run data migrations
RAILS_ENV=production bin/rails data:migrate
-
Create an initial user
11.1. Enter the rails console using
RAILS_ENV=production rails c
11.2. Create the user with
User.create(username: '<USERNAME HERE>', password: '<PASSWORD HERE>')
-
Precompile assets using
rake assets:precompile
-
Launch server using
bin/rails -s -p 80 -e production
-
Access the application at its public IP and use the details for the user you created in step 7 to log in
A Bolt-On is an optional part of the web interface configuration. These can be enabled on an individual basis in one of two ways:
-
Within the
rails-admin
interface1.1. Navigate to the
Bolt ons
sectionFor each Bolt-On you wish to enable:
1.2. Click the edit icon next to the database entry
1.3. Click the
Enabled
checkbox1.4. Save the entry
-
Via the rails console
2.1. Enter the rails console using
RAILS_ENV=production rails c
For each Bolt-On you wish to enable:
2.2. Enable using:
bolt_on = BoltOn.find_by(name: '<NAME_OF_BOLT_ON>') bolt_on.enabled = true bolt_on.save!
Prerequisites:
-
Flight Inventory installed
-
Flight Inventory Diagrams plugin installed
-
Template moved to the
templates
directory of theFlight Inventory
install -
Within
Flight Inventory
add the following to theetc/templates.yml
file:overware: default: server.md.erb server: server.md.erb switch: switchOW.md.erb