Skip to content

Commit

Permalink
Add new dependency and step in README.md
Browse files Browse the repository at this point in the history
- Add dependency for `krb5-devel` package
- Correct the typo in Step 8 for invoking the service application
- Add new Step for correctly setting up W2FM_CONFIG environment variable

Signed-off-by: Shounak Dey <[email protected]>
  • Loading branch information
sdglitched authored and abompard committed Dec 6, 2024
1 parent 82d31c3 commit d1b7849
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### For development

1. Install the supported version of Python, Virtualenv, Git and Poetry on your Fedora Linux installation.
1. Install the supported version of Python, Virtualenv, Git, Poetry and krb5-devel package on your Fedora Linux installation.
```
$ sudo dnf install python3
```
Expand All @@ -17,6 +17,9 @@
```
$ sudo dnf install poetry
```
```
$ sudo dnf install krb5-devel
```
2. Clone the repository to your local storage and make it your present working directory.
```
Expand Down Expand Up @@ -67,7 +70,8 @@
```
(venv) $ nano config
```
4. Start the application with the `--help` flag to understand how the application command line works.
4. Ensure that the W2FM_CONFIG environment variable points towards the correct configuration file (e.g., `/home/user/webhook-to-fedora-messaging/config`).
5. Start the application with the `--help` flag to understand how the application command line works.
```
(venv) $ w2fm --help
```
Expand All @@ -83,20 +87,20 @@
Commands:
setup Setup the database schema in the specified environment
```
5. While pointing towards the edited config file, run the `setup` command to initialize the database.
6. While pointing towards the edited config file, run the `setup` command to initialize the database.
```
(venv) $ w2fm --conf config setup
```
Example output
```
The database has been created
```
6. Note that the same command can be used to upgrade and downgrade through database schema revisions.
7. Once the database is created, run the following command to invoke the service application.
7. Note that the same command can be used to upgrade and downgrade through database schema revisions.
8. Once the database is created, run the following command to invoke the service application.
```
$ (venv) uvicorn \
--factory "webhook_to_fedora_messaging.main:create_app" \
--log-config logging.yaml
--log-config logging.yaml \
--host 0.0.0.0 \
--port 8080 \
--workers 4
Expand All @@ -119,7 +123,7 @@
[W2FM] [2024-08-14 01:56:49 +0530] [INFO] Application startup complete.
```
This command will make `4 workers` processes of the service available on `all interfaces` and on `port 8080`, while logging according to the configuration available in the newly created `logging.yaml` file.
8. To stop the service application processes, invoke a keyboard interrupt by pressing `Ctrl` + `C`.
9. To stop the service application processes, invoke a keyboard interrupt by pressing `Ctrl` + `C`.
```
Ctrl + C
```
Expand Down Expand Up @@ -153,7 +157,7 @@
[W2FM] [2024-08-14 01:58:43 +0530] [INFO] Waiting for child process [11081]
[W2FM] [2024-08-14 01:58:43 +0530] [INFO] Stopping parent process [11076]
```
9. For more utility options on running the service, start `uvicorn` with the `--help` flag.
10. For more utility options on running the service, start `uvicorn` with the `--help` flag.
```
(venv) $ uvicorn --help
```
Expand All @@ -170,7 +174,7 @@
--fd INTEGER Bind to socket from this file descriptor.
...
```
10. Deactivate the virtual environment by running the following command.
11. Deactivate the virtual environment by running the following command.
```
(venv) $ deactivate
```
Expand Down

0 comments on commit d1b7849

Please sign in to comment.