GithubHelp home page GithubHelp logo

folio-ansible's Introduction

folio-ansible - Sample Ansible playbook and roles for FOLIO (and Vagrant)

This repository contains some sample Ansible roles for getting a FOLIO installation up and running quickly. For more details, see the doc directory.

The primary audiences for this project are:

  1. Developers who want to take the code for a spin in a VM, without altering their own working environment.
  2. Frontend developers looking for a "black box" FOLIO backend system to code against.
  3. DevOps and others interested in automating FOLIO image builds
  4. System administrators interested in deployment down the road.

License

Copyright (C) 2016-2022 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

System Requirements

For Vagrant deployment:

For Ansible provisioning (to build a dev VM, or to build the demo or backend system from scratch)

This installation has been tested on macOS "Sierra", Ubuntu 16.04 and 18.04, and Windows 10. Note that Windows cannot serve as an Ansible control host.

Quick Start

If all you want to do is try out a prepackaged FOLIO demo Vagrant box, create a new directory, cd into it, and try:

$ vagrant init folio/release-core
$ vagrant up

Note: That is for the Juniper R2-2021 release -- subsequent flower releases do not have a release-core. Awaiting platform-minimal FOLIO-3253.

Now you can open http://localhost:3000. Admin login: diku_admin/admin

Or, if you want to try a prepackaged FOLIO backend Vagrant box with the most recent versions of all components, do:

$ vagrant init folio/snapshot
$ vagrant up

Note: The VM will require the allocation of more memory. Refer to notes.

The Vagrant Cloud page folio lists all available boxes and has detailed release notes, including which versions of the backend and frontend modules are provided.

For all Vagrant boxes, the Okapi port on the VM (9130) will be forwarded to localhost:9130 and the Stripes port and user interface will be forwarded to localhost:3000. You should see the Stripes user interface at http://localhost:3000.

For more information, see Vagrant VMs and Ansible roles.

In addition, this project includes a Vagrantfile for creating different environments.

Deployment on a server or virtual machine

Deploy host requirement

The deploy host is used to run the Ansible playbooks.

  • Linux or MacOSX
  • Ansible installed
  • ssh configured to access the server - preferred using ssh-keys

Server requirements

  • Ubuntu 16.04 for Folio Fameflower
  • Ubuntu 20.04 or Debian 10 for Folio Honeysuckle
  • Python installed
  • For SSL you need
    • Certificate file and a key file without Password
    • FQDN

Installation

To install Folio using the folio.yml Ansible playbook, you have to download and unpack the folio-ansible sources. Then create a inventory file. You also have to configure some parameters. You can put these in the inventory file, in group vars files or in host vars files. In this example we use the inventory. The contents of the inventory file inventory.yml:

all:
  hosts:
    my-host.domain.com:
  children:
    release:
      hosts:
        my-host.domain.com:
          save_dir: /etc/folio/savedir
          okapi_interface: ens3
          okapi_storage: postgres
          tenant: mytenant
          tenant_name: "My Organisation"
          tenant_description: "Description of my Organisation"
          okapi_role: dev
    stripes:
      hosts:
        my-host.domain.com:
          stripes_host_address: 0.0.0.0
          stripes_okapi_url: http://my-host.domain.com:9130
          stripes_tenant: mytenant

Next we can install Folio using the folio.yml playbook:

ansible-playbook -u ubuntu -i inventory.yml folio.yml

To learn more about the parameters, you should have a look at the playbook folio.yml, to see which roles are executed and in the documentation of the roles.

Another example includes deployment of Stripes to use https instead of http, securing okapis supertenant and the tenant admin user.

all:
  hosts:
    my-host.domain.com:
  children:
    release:
      hosts:
        my-host.domain.com:
          save_dir: /etc/folio/savedir
          okapi_interface: ens3
          okapi_storage: postgres
          tenant: mytenant
          tenant_name: "My Organisation"
          tenant_description: "Description of my Organisation"
          okapi_role: dev
          admin_user:
            username: my_admin
            password: tenantadminpassword
    stripes:
      hosts:
        my-host.domain.com:
          stripes_host_address: 0.0.0.0
          stripes_okapi_url: http://my-host.domain.com:9130
          stripes_tenant: mytenant
          stripes_enable_https: yes
          stripes_certificate_file: /path/to/certificate.pem
          stripes_certificate_key_file: /path/to/key.pem
          nginx_proxy_okapi: yes
          stripes_listen_port: 443
          stripes_server_name: my-host.domain.com
    production:
      hosts:
        my-host.domain.com:
          superuser_username: opkapi_superuser
          superuser_password: superpassword

Documentation

folio-ansible's People

Contributors

ankitasen-ubmainz avatar bekhzodkurbonboev avatar celticmask avatar craigmcnally avatar david-igbinedion avatar dcrossleyau avatar fgleixner avatar funkymalc avatar hjiebsco avatar id-jenkins avatar ihardy avatar julianladisch avatar kurtnordstrom avatar maccabeelevine avatar marcjohnson-kint avatar mbstacy avatar miketaylor avatar nikitasedyx avatar steveellis avatar taskula avatar wafschneider avatar zburke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.