Skip to content

Commit

Permalink
Plays for building the Q2-2018 release.
Browse files Browse the repository at this point in the history
Towards FOLIO-1355.
  • Loading branch information
wafschneider committed Jul 20, 2018
1 parent 33c93f4 commit 181c79a
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
59 changes: 57 additions & 2 deletions folio.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -107,7 +162,7 @@
- tenant-admin-permissions

- name: Build Stripes container
hosts: snapshot
hosts: snapshot:release
roles:
- stripes-docker

Expand Down
21 changes: 21 additions & 0 deletions group_vars/release
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 181c79a

Please sign in to comment.