[FOLIO-1139] Add EKB configuration script to Vagrant build Created: 16/Mar/18  Updated: 15/Jul/20

Status: Open
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Wayne Schneider Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: ci
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint:
Development Team: FOLIO DevOps

 Description   

...so that users can configure EKB with something like vagrant ssh – configure_eds.sh --key=mysecretkey



 Comments   
Comment by Julian Ladisch [ 19/Mar/18 ]

I use a Vagrantfile that looks similar to this:

Vagrant.configure("2") do |config|
  config.vm.box = "folio/testing"

  config.vm.provision "shell", env: {
    "URL" => "https://folio-demo.gbv.de",
  }, inline: <<-SHELL
    set -e
    TOKEN=$( curl --silent -D - -H "X-Okapi-Tenant: diku" -H "Content-type: application/json" -H "Accept: application/json" -d '{"tenant":"diku","username":"diku_admin","password":"admin"}' $URL/authn/login | grep -i "^x-okapi-token: " )
    for config in  \
      '{"module":"ORG","configName":"locale","value":"de-DE"}' \
      '{"module":"KB_EBSCO", "configName":"api_credentials", "code":"kb.ebsco.credentials", "description":"EBSCO RM-API Credentials", "enabled":true, "value":"customer-id=…&api-key=…"}' \
      '{"module":"EKB", "configName":"api_access", "code":"kb.ebsco.customerId", "description":"EBSCO RM-API Customer ID", "enabled":true, "value":"…"}' \
      '{"module":"EKB", "configName":"api_access", "code":"kb.ebsco.apiKey", "description":"EBSCO RM-API API Key", "enabled":true, "value":"…"}' \
      '{"module":"EKB", "configName":"api_access", "code":"kb.ebsco.url", "description":"EBSCO RM-API URL", "enabled":true, "value":"…"}'
    do
      curl --silent -H "$TOKEN" -H "x-okapi-tenant: diku" -H "Content-type: application/json" -X POST -d "$config" $URL/configurations/entries
    done
  SHELL
end
Comment by Mike Taylor [ 19/Mar/18 ]

Now, that's clever.

Generated at Thu Feb 08 23:11:07 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.