diff --git a/Vagrantfile b/Vagrantfile index 9eefabb4..d18cf41b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -121,6 +121,22 @@ Vagrant.configure(2) do |config| end end + config.vm.define "build_release", autostart: false do |build_release| + build_release.vm.box = "debian/contrib-jessie64" + build_release.vm.provider "virtualbox" do |vr| + vr.memory = 10240 + end + build_release.vm.network "forwarded_port", guest: 9130, host: 9130 + build_release.vm.network "forwarded_port", guest: 3000, host: 3000 + build_release.vm.provision "ansible" do |ansible| + ansible.playbook = "folio.yml" + ansible.groups = { + "vagrant" => ["build_release"], + "release" => ["build_release"] + } + end + end + config.vm.define "build_curriculum", autostart: false do |build_curriculum| build_curriculum.vm.box = "debian/contrib-jessie64" build_curriculum.vm.network "forwarded_port", guest: 9130, host: 9130 diff --git a/folio.yml b/folio.yml index f9031440..4649b419 100644 --- a/folio.yml +++ b/folio.yml @@ -1,7 +1,7 @@ --- # Ansible playbook to deploy Okapi and FOLIO modules # Provision a host as a backend FOLIO system -- hosts: stable:stable-backend:testing:snapshot:minimal +- hosts: stable:stable-backend:testing:snapshot:release:minimal roles: - common - postgresql @@ -29,6 +29,16 @@ - create-tenant-admin - tenant-admin-permissions +- name: Configure release build + hosts: release + roles: + - docker-engine + - okapi-pull + - tenant-data + - okapi-tenant-modules + - create-tenant-admin + - tenant-admin-permissions + # Sample data for stable - name: Load sample data for stable build hosts: stable:stable-backend @@ -92,6 +102,51 @@ - { load_endpoint: /vendor, fileglob: sample-data/vendors/*.json } - mod-auth-demo-users +# Sample data for release build +# Most of the reference data is loaded from folio-install Q2-2018 release +# There is a risk that the sample data not stored in folio-install will become incompatible +- name: Load sample data for release build + hosts: release + roles: + - role: module-sample-data + module_name: folio-install + repository: "https://github.com/folio-org/folio-install" + module_version: Q2-2018 + files: + - { load_endpoint: /classification-types, fileglob: reference-data/classification-types/*.json, dup_override: 400 } + - { load_endpoint: /contributor-name-types, fileglob: reference-data/contributor-name-types/*.json, dup_override: 400 } + - { load_endpoint: /contributor-types, fileglob: reference-data/contributor-types/*.json, dup_override: 400 } + - { load_endpoint: /identifier-types, fileglob: reference-data/identifier-types/*.json, dup_override: 400 } + - { load_endpoint: /instance-formats, fileglob: reference-data/instance-formats/*.json, dup_override: 400 } + - { load_endpoint: /instance-types, fileglob: reference-data/instance-types/*.json, dup_override: 400 } + - { load_endpoint: /loan-types, fileglob: reference-data/loan-types/*.json, dup_override: 400 } + - { load_endpoint: /location-units/institutions, fileglob: reference-data/location-units/institutions/*.json } + - { load_endpoint: /location-units/campuses, fileglob: reference-data/location-units/campuses/*.json } + - { load_endpoint: /location-units/libraries, fileglob: reference-data/location-units/libraries/*.json } + - { load_endpoint: /locations, fileglob: reference-data/locations/*.json } + - { load_endpoint: /material-types, fileglob: reference-data/material-types/*.json } + - { load_endpoint: /platforms, fileglob: reference-data/platforms/*.json, dup_override: 400 } + - { load_endpoint: /service-points, fileglob: reference-data/service-points/*.json } + - { load_endpoint: /loan-policy-storage/loan-policies, fileglob: reference-data/loan-policy-storage/loan-policies/*.json, dup_override: 500 } + - { load_endpoint: /loan-rules-storage, fileglob: reference-data/loan-rules-storage/*.json, http_method: PUT, updated_code: 204 } + - role: module-sample-data + module_name: mod-inventory-storage + repository: "https://github.com/folio-org/mod-inventory-storage" + duplicate_key_error: 400 + files: + - { load_endpoint: /instance-storage/instances, fileglob: sample-data/instances/*.json } + - { load_endpoint: /instance-storage/instances, fileglob: sample-data/instances/*.json } + - { load_endpoint: /holdings-storage/holdings, fileglob: sample-data/holdingsrecords/*.json } + - { load_endpoint: /item-storage/items, fileglob: sample-data/items/*.json } + - mod-inventory-mods + - mod-circulation-sample-data + - role: module-sample-data + module_name: mod-vendors + repository: "https://github.com/folio-org/mod-vendors" + files: + - { load_endpoint: /vendor, fileglob: sample-data/vendors/*.json } + - mod-auth-demo-users + # Set up stripes - name: Build stripes webpack, assign permissions hosts: stripes-build @@ -107,7 +162,7 @@ - tenant-admin-permissions - name: Build Stripes container - hosts: snapshot + hosts: snapshot:release roles: - stripes-docker diff --git a/group_vars/release b/group_vars/release new file mode 100644 index 00000000..1bcb1d0d --- /dev/null +++ b/group_vars/release @@ -0,0 +1,21 @@ +--- +# Variables for building a FOLIO release +okapi_pull: true +okapi_pull_timeout: 600 +auth_required: true +load_mods_larger: true +enable_okapi: true +deploy_url: https://cdn.rawgit.com/folio-org/folio-testing-platform/Q2-2018/okapi-install.json +enable_url: https://cdn.rawgit.com/folio-org/folio-testing-platform/Q2-2018/stripes-install.json + +# Variables for building UI +stripes_github_project: https://github.com/folio-org/folio-testing-platform +stripes_github_version: Q2-2018 +folio_npm_repo: npm-folioci +okapi_register_modules: no +okapi_enable_modules: no +platform_remove_lock: no +with_sourcemap: no + +# Metadata for CI build +version: Q2-2018