This form serves a similar purpose to the original PI Questionnaire, but is focused on the user shared metadata workflow. Before a collection gets ingested into the Pilot MAAP, the data provider is required to fill out this for. This form will be used to populate metadata fields for the data set.
This repo is a fork of /pi-questionnaire and the following Readme has not been changed.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
git clone git@github.com:MAAP-Project/user-metadata-form.git
cd user-metadata-form
Before moving into installing all the gems used, please make sure that you have ruby installed. You can do so by typing ruby -v
in your terminal. We are currently using ruby 2.7.5
as described in the .ruby-version
file. If your machine doesn't have any ruby binaries, you can follow this blog .
After ruby is installed, install bundler
using gem install bundler
in your terminal. Bundler is a package (gem) manager for ruby. You can read about it at Bundlers' website .
We use postgres as our database. If your machine doesn't have postgres installed, please do so. You can follow Postgres installation guide.
You will need a few environment variables to configure the application to call Cumulus. Create a copy of example.env
:
cp example.env .env
Update .env
with the parameters for calling the Cumulus API (CUMULUS_REST_API, EARTHDATA_USERNAME and EARTHDATA_PASSWORD).
Once ruby and postgres are properly installed, change directory into the project folder if you have not already:
cd user-metadata-form
Then we need to install the gems used in the project, prepare the database etc.
bundle install
bundle exec rails db:create
bundle exec rails db:migrate
# Wait for the migration to complete.
bundle exec rails s
This will start the server at port 2998. Go to your browser, navigate to localhost:2998
. You should be able to see the following page:
🚧 NOTE: This section is a WIP, there is currently an error connecting with a local Postgres database. 🚧
Running the application using docker is a closer approximation to how the application will run in a cloud environment. It isolates the environment used to build and run the application. The application is deployed by creating a docker image and publishing it to AWS Elastic Container Registry (ECR). Then the application is run as a docker container within an ECS Task.
docker build -f deployment/Dockerfile -t umf .
docker run --rm --env-file .env \
-it --entrypoint /bin/bash \
--env DATABASE_HOST=host.docker.internal \
-p 2998:2998 -t umf
See deployment/README.md.
To make your changes:
feature-<feature name>
, if it's a bug use bug-<name>
. (please make sure there is a corresponding issue listed at https://github.com/MAAP-Project/user-metadata-form/issues before working on the changes.)This project is licensed under the MIT License - see the LICENSE.md file for details