This is the first pass through the updating to the latest ruby on rails framework.
This is currently only covering the data catalog.
The cms portion will be added in 3.1
testing concourse, another change
- Ruby 2.1+
- Bundler
- ChefDK
- PhantomJS (for running integration tests)
- GVM (https://github.com/gina-alaska/gvm)
- NodeJS
- VirtualBox (5.0.2+)
- Vagrant
vagrant plugins install vagrant-berkshelf
vagrant plugins install vagrant-omnibus
If you are trying to run this on OSX you will also need to do the following steps
- Download and install Postgres.APP: https://postgresapp.com/
- Follow these instructions: https://postgresapp.com/documentation/cli-tools.html
If you currently have been using GVM to run the development vm it is recommended that you shutdown and delete the currently running vm. And then to make sure that you have the latest version of VirtualBox installed (5.0.2) as well as the ChefDK installed and configured to be in your path.
After checkout out the code repository use the following steps to setup the development vm.
# install latest version of vagrant, virtualbox and chefdk!
$ bundle
$ bundle exec rake dev:rebuild
$ bundle exec rails server
$ open http://localhost:9292
# click manager login at the bottom of the page
$ rake "admin:set[YOUREMAIL]"
# refresh the page
It should be noted that while the vm is setup and configured to run nginx and puma internally it is currently not recommended that you use that for accessing the application. It will perform very poorly due to the way vm uses shared folders to access the development code, accessing the database and all other services installed into the vm will behave fine though.
From the root of the gina-catalog repo directory run the following commands.
hab studio enter
build
# create docker image for local testing
hab pkg export docker uafgina/glynx
You can examine the results/last_build.env
file to see the details about the build package
Resulting hart
packages will be created as results/uafgina-glynx-VERSION-PKGIDENT.hart
TODO: Convert this to use a postgresql with postgis docker container instead of trying to use an instance on the host machine.
This requires a few things to work.
- Locally running postgresql that docker containers can connect to.
- Updating the docker-compose.yml file with the details needed to connect to the postgresql server
db={user='postgres',password='',port='5432',host='10.19.16.195'}
- Run the
docker-compose up
- If there is no
glynx_production
database created you may need to rundocker exec DOCKERINSTANCEID hab pkg exec uafgina/glynx glynx-rake db:create
- After a short delay you should see the pumas start
- Run
docker ps
to see the port that9292
is mapped to on the localhost, in the example below that would be32771
b5ea6ceaf806 uafgina/glynx "/init.sh start ua..." 22 seconds ago Up 21 seconds 9631/tcp, 0.0.0.0:32771->9292/tcp ginacatalog_glynx_1
- Open a browser and point to
localhost:PORT