Skip to content
Snippets Groups Projects
Verified Commit 384562d6 authored by David Hoese's avatar David Hoese
Browse files

Add environment.yaml for operational environment

parent 9e764bae
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,54 @@ This is a flask application that is served at `metobs.ssec.wisc.edu/api`.
See https://metobs.ssec.wisc.edu/api for documentation.
## Operational conda environment
These instructions assume the operational "standard practice" that is current
at the time of writing. This practice is to create a conda environment using
the "root" user under `/opt/metobs/metobs_api`.
1. Get and install the conda environment:
```bash
cd /tmp
curl -O "https://gitlab.ssec.wisc.edu/metobs/MetObsAPI/-/raw/master/environment.yaml"
sudo /opt/miniconda3/condabin/conda env create --file environment.yaml --prefix /opt/metobs/metobs_api
```
2. Clone the git repository into the environment and other setup:
```bash
cd /opt/metobs/metobs_api
sudo mkdir -p repos/git log lock
sudo chown metobs:metobsgrp log lock
sudo git clone "https://gitlab.ssec.wisc.edu/metobs/MetObsAPI.git" repos/git/MetObsAPI
```
3. Install the metobsapi python package:
```bash
sudo /opt/metobs/metobs_api/bin/pip install -e repos/git/MetObsAPI/
```
4. Copy systemd files if necessary:
```bash
sudo cp repos/git/MetObsAPI/etc/systemd/system/metobs_api* /etc/systemd/system/
```
5. Enable service:
```bash
sudo systemctl enable metobs_api
sudo systemctl start metobs_api
```
6. Start service:
```bash
sudo systemctl start metobs_api
```
## Developer Installation
Install the package in "development" mode:
......
name: metobs_api
channels:
- conda-forge
dependencies:
- numpy
- pandas
- influxdb-client
- flask
- flask_json
- flask_cors
- gunicorn
- python=3.11
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment