Skip to content

Installation: Create and configure the yml files

randikathryn edited this page Feb 23, 2014 · 13 revisions

Notes

The YML files store the confidential information needed to connect the HydraDAM code to the other elements of the system, including Fedora, Solr, and Redis.

Steps

You may review the sample .yml files for MySQL, Fedora, Redis, and Solr in the/opt/$HYDRA_NAME/config directory. If you choose to edit them directly, use only the spacebar to create indentation as tabs are not allowed in YML syntax and will trigger a "found token that cannot start any token while scanning for the next token" error.

  1. Create a production database.yml file that points to your MySQL database by entering the commands below.

    cat > /opt/$HYDRA_NAME/config/database.yml <<EOF
    production:  
      adapter: mysql2
      host: localhost
      database: hd_production
      username: hdProd
      password: hdProd
      pool: 5
      timeout: 5000
    EOF
  2. Create a production fedora.yml file that points to your Fedora by entering the commands below.

    cat > /opt/$HYDRA_NAME/config/fedora.yml <<EOF
    production:
      user: fedoraAdmin
      password: fedoraAdmin
      url: http://127.0.0.1:8080/fedora
    EOF
  3. Create a production redis.yml file that points to your Redis server by entering the commands below.

    cat > /opt/$HYDRA_NAME/config/redis.yml <<EOF
    production:
      host: localhost
      port: 6379
    EOF
  4. Create a production solr.yml file that points to your Solr by entering the commands below.

    cat > /opt/$HYDRA_NAME/config/solr.yml << EOF
    production:
      url: http://127.0.0.1:8080/hydradam/
    EOF

Verification Steps

  1. Enter the command ls -la /opt/$HYDRA_NAME/config in the terminal window. This should return (among other files) database.yml, fedora.yml, redis.yml, and solr.yml. If you want to view the contents of each file, enter the command less filename.yml. To exit and return to the terminal window, type 'q'.

Next Step

Proceed to Configure the Rails Application or proceed to the Overview page.

Clone this wiki locally