etp-api is a framework for a web service that provides an API for aggregated ETP outcomes. The default setting for the server is Heroku with Heroku Postgres database. The goal is for every institution to have an easy deployment for their ETP outcomes that could be used in more sophisticated tools, analyses and downstream applications by developers.
Quick Start for Developers
/deploydirectory that matches the schema as
etp-api is available through cloning the repository and then working from the repository root.
git clone https://github.com/workforce-data-initiative/etp-api.git cd etp-api
etp-api depends on python3, so create a virtual environment using a python3 executable. Then activate the virtualenv.
virtualenv venv -p /usr/bin/python3 source venv/bin/activate
pip install -r requirements.txt
deploy.sh and enter the right information for Heroku username and password. The etp-api server will be deployed on Heroku.
Habitat helps package an app or service into containers that can be run in any infrastructure, without committing to a specific container format or platform.
To install habitat, simply download the binary.
/usr/local/bin. To do this:
cdfollowed by the file location
cd /Users/Rachel/Downloads/hab-0.28.0-20170729010833-x86_64-darwin(If you're using a Mac, you can insert the location by dragging the unzipped file into the terminal)
cp hab /usr/local/bin
sudo cp hab /usr/local/bin
sudo chmod a+x habto make it executable.
habthen press enter. You should see a list menu with all the habitat options available. Moving on swiftly!
hab setupand set the origin name to
The GitHub personal access token needs information provided from the
read:org OAuth scopes. Habitat uses the information provided through these scopes for authentication and to determine features based on team membership.
hab studio enter
This is an awesome isolated environment for building great things so that when building, it doesn't affect anything on your computer. Let's go ahead and build the etp-api!
buildcommand to execute the etp-api plan
When finished building, you should see this message
etp-api: I love it when a plan.sh comes together.
The build bundles up the etp-api source code, dependencies, runtime and other server configurations into a habitat .hart package. This package can now be exported to docker.
In linux environments, the package can then be run directly using this simple command:
$ hab start brighthive/etp-api
You can export the created .hart package into a docker container using the
hab pkg export docker command as follows:
[default:/src:0]# hab pkg export docker brighthive/etp-api
After exiting the studio by typing
exit, run the docker container as follows:
$ docker run -it -p 8080:8080 brighthive/etp-api
We're cooking with gas! 🔥 🚀
This project is licensed under the MIT License - see the
LICENSE.md file for details.