-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Vagrant related files/instructions and clean up setup process #364
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9322363
Remove Vagrant instructions and clean up setup process
spilth 29fd992
Remove Vargrantfile and Vagrant references
spilth c08482a
Be less aggressive with asdf but provide a .tool-versions file for it
spilth 07c1c23
Best not to assume folks are using zsh
spilth 59470e3
dynamic versions from .tool-versions, re-order documentation
mnyrop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,65 +2,82 @@ | |
|
||
[![CI](https://github.com/NYULibraries/spatial_data_repository/actions/workflows/ci.yml/badge.svg)](https://github.com/NYULibraries/spatial_data_repository/actions/workflows/ci.yml) | ||
|
||
This repository tracks the implementation of GeoBlacklight used to power the front-end of NYU Libraries [Spatial Data Repository](https://geo.nyu.edu) | ||
This repository tracks the implementation of GeoBlacklight used to power the front-end of NYU Libraries' [Spatial Data Repository](https://geo.nyu.edu) | ||
|
||
## Links | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved Links & Archive into a Resources section below. Let's get folks up and running with the app, then possibly send them off to other documentation. |
||
## Local Development Quickstart | ||
|
||
- [Documentation Repo](https://github.com/NYULibraries/sdr-documentation) | ||
### Prerequisites | ||
|
||
## Archive | ||
You will need the following installed: | ||
|
||
- [Wiki for GBL 0.12.1](https://github.com/NYULibraries/spatial_data_repository/wiki); some info obsolete but contains some supporting doc and application change tracking | ||
- Git | ||
- MySQL | ||
- Ruby 3.2.2 | ||
- NodeJS 20+ | ||
- Java 11+ | ||
|
||
## Local Development Quickstart | ||
On macOS you can use [Homebrew](https://brew.sh) and [asdf](https://asdf-vm.com) to install everything you need: | ||
|
||
```bash | ||
$ brew install git | ||
$ brew install mysql | ||
$ brew install asdf | ||
$ echo '. "$HOME/.asdf/asdf.sh"' >> ~/.zshrc | ||
$ source ~/.zshrc | ||
$ asdf plugin add ruby | ||
$ asdf install ruby 3.2.2 | ||
$ asdf global ruby 3.2.2 | ||
$ asdf plugin add java | ||
$ asdf install java openjdk-17 | ||
$ asdf global java openjdk-17 | ||
$ asdf plugin add nodejs | ||
$ asdf install nodejs 22.6.0 | ||
$ asdf global nodejs 22.6.0 | ||
``` | ||
|
||
Below are barebones steps for getting started in development for the SDR. | ||
### Running a Development Server | ||
|
||
### Using Vagrant | ||
To checkout the project and standup a development server: | ||
|
||
#### Prerequisites | ||
- Git | ||
- Vagrant | ||
- VirtualBox | ||
```bash | ||
$ git clone https://github.com/NYULibraries/spatial_data_repository.git | ||
$ cd spatial_data_repository | ||
$ bundle install | ||
$ npm install | ||
$ bundle exec rake db:schema:load | ||
$ bundle exec rake sdr:server | ||
``` | ||
|
||
The development SDR web application will be available at <http://localhost:3000> | ||
|
||
#### Steps | ||
The development Solr instance will be available at <http://localhost:8989/solr> | ||
|
||
1. Run the commands below in order specified: | ||
- `git clone https://github.com/NYULibraries/spatial_data_repository.git && cd spatial_data_repository` | ||
- `vagrant up` | ||
- `vagrant ssh` | ||
- `cd /vagrant/sdr` | ||
- `bundle exec rake db:schema:load` | ||
- `bundle exec rake sdr:server` | ||
2. View to test environment Solr admin panel: http://localhost:8983/ | ||
3. View the operating GeoBlacklight Rails app: http://localhost:3000 | ||
#### Setup Gotchas | ||
|
||
### On Mac, including M1-3 (no virtualization) | ||
If the `mysql2` gem fails to install and complains about not finding `zstd` you may need to do the following: | ||
|
||
#### Prerequisites | ||
- Git (`brew install git`) | ||
- Ruby 3.2.2 (not 3.3.1) + Rails (many options; GBL recommends this [Go Rails install list](https://gorails.com/setup/macos/14-sonoma#ruby), especially for Apple M1, M2; use `asdf` install manager and install Ruby + Nodejs + Rails) | ||
- Mysql (`brew install mysql`) | ||
- Java (`brew install openjdk@11`); if needing help to add Java to PATH, see [this help](https://stackoverflow.com/questions/71059252/mac-the-operation-couldn-t-be-completed-unable-to-locate-a-java-runtime-that-su)) | ||
```bash | ||
$ gem install mysql2 -v '0.5.6' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/opt/zstd/lib | ||
``` | ||
|
||
#### Steps | ||
### Loading NYU Data in Development | ||
|
||
1. Run the commands below in order specified: | ||
- `git clone https://github.com/NYULibraries/spatial_data_repository.git && cd- spatial_data_repository` | ||
- `bundle install` | ||
- `bundle exec rake db:schema:load` | ||
- `bundle exec rake sdr:server` | ||
2. View to test environment Solr admin panel: http://localhost:8989/solr | ||
3. View the operating GeoBlacklight Rails app: http://localhost:3000 | ||
First, start up the Rails app if it's not already running: | ||
|
||
### Setup Gotchas | ||
```bash | ||
$ bundle exec rake sdr:server | ||
``` | ||
|
||
If the `mysql2` gem fails to install and complains about not finding `zstd` you may need to do the following: | ||
Then in another terminal run the following Rake task: | ||
|
||
```bash | ||
gem install mysql2 -v '0.5.6' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/opt/zstd/lib | ||
$ bundle exec rake sdr:load_nyu_data | ||
``` | ||
|
||
Once completed, head to <http://localhost:3000/?search_field=all_fields> and you should have a lot more data to work with. | ||
|
||
The Solr instance does not persist its data between runs so you will need to reload the data if you ever restart the web application. | ||
|
||
### Running the Test Suite | ||
|
||
To run the full test suite use the following command: | ||
|
@@ -87,20 +104,8 @@ Note: You'll know this step is necessary if an individual spec fails with an err | |
Blacklight::Exceptions::ECONNREFUSED: Connection refused - Unable to connect to Solr instance using #<RSolr::Client:0x0000000117d5e1a8 @uri=#<URI::HTTP http://127.0.0.1:8983/solr/sdr-core-test/> | ||
``` | ||
|
||
### Loading NYU Data Locally | ||
|
||
First, start up the Rails app if it's not already running: | ||
|
||
```bash | ||
$ bundle exec rake sdr:server | ||
``` | ||
|
||
This will ensure Solr is up and running. | ||
|
||
Then in another terminal run the following Rake task: | ||
|
||
```bash | ||
$ bundle exec rake sdr:load_nyu_data | ||
``` | ||
## Resources | ||
|
||
Once completed, head to <http://localhost:3000/?search_field=all_fields> and you should have a lot more data to work with. | ||
- [Documentation Repo](https://github.com/NYULibraries/sdr-documentation) | ||
- [Wiki for GBL 0.12.1](https://github.com/NYULibraries/spatial_data_repository/wiki) | ||
- some info obsolete but contains some supporting doc and application change tracking |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the Development Guide since it's a duplication of what's in the main README.