Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPeloton committed Dec 5, 2024
1 parent 614ab34 commit c87d3e7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pip install -r requirements.txt

Follow instructions in the [fink-cutout-api](https://github.com/astrolabsoftware/fink-cutout-api/blob/main/install/README.md).

## Client installation
## Client installation and Fink gateway

To access HBase tables, we use a client based on [Lomikel](https://github.com/hrivnac/Lomikel). To download the latest version of the client, go to `bin` and execute:

Expand All @@ -23,7 +23,7 @@ cd bin
./download_client.sh
```

Do not forget to update the version in the `config.yml` file. Then install a new unit for systemd under `/etc/systemd/system/fink_gateway.service` (check the correct version numbers for JARs):
Do not forget to update the version in the `config.yml` file. Then install (as sudo) a new unit for systemd under `/etc/systemd/system/fink_gateway.service` (check the correct version numbers for JARs):

```bash
[Unit]
Expand All @@ -44,27 +44,28 @@ WantedBy=multi-user.target
Reload daemon and start the service:

```bash
systemctl daemon-reload
systemctl start fink_gateway
sudo systemctl daemon-reload
sudo systemctl start fink_gateway
```

Check carefuly the status:

```bash
systemctl start fink_gateway
sudo systemctl start fink_gateway
```

Note that having a JVM open all the time can lead to a memory leak, so it is probably wise to restart the service from time to time.


## Systemctl and gunicorn

Install a new unit for systemd under `/etc/systemd/system/fink_object_api.service`:
Install a new unit (as sudo) for systemd under `/etc/systemd/system/fink_object_api.service`:

```bash
[Unit]
Description=gunicorn daemon for fink_object_api
After=network.target
After=network.target fink_gateway.service fink_cutout_api.service
Requires=fink_gateway.service fink_cutout_api.service

[Service]
User=almalinux
Expand All @@ -74,8 +75,7 @@ WorkingDirectory=/home/almalinux/fink-object-api
ExecStart=/bin/sh -c 'source /home/almalinux/.bashrc; exec /home/almalinux/fink-env/bin/gunicorn --log-file=/tmp/fink_object_api.log app:app -b localhost:PORT2 --workers=1 --threads=8 --timeout 180 --chdir /home/almalinux/fink-object-api --bind unix:/home/almalinux/fink_object_api.sock 2>&1 >> /tmp/fink_object_api.out'

[Install]
WantedBy=multi-user.target fink_gateway.service fink_cutout_api.service
After=fink_gateway.service fink_cutout_api.service
WantedBy=multi-user.target
```

Make sure you change `PORT2` with your actual port, and `localhost` with your domain. Make sure also to update path to `gunicorn`. Update the `config.yml`, reload units and launch the application:
Expand All @@ -85,4 +85,4 @@ sudo systemctl daemon-reload
sudo systemctl start fink_object_api
```

You are ready to use the API!
Note that this will automatically starts `fink_gateway.service` and `fink_cutout_api.service` if they were not started. You are ready to use the API!

0 comments on commit c87d3e7

Please sign in to comment.