shivaraj-bh
423b85482d
refactor(deprecation): replace types.string with types.str
...
see https://github.com/NixOS/nixpkgs/pull/66346
2024-03-29 21:20:23 +05:30
shivaraj-bh
ecc409436c
chore(postgres): default value for listen_addresses is already localhost
...
This is true after https://github.com/juspay/services-flake/pull/160
2024-03-27 12:43:35 +05:30
Shivaraj B H
18d5c1d168
fix(postgres): empty socketDir
by default ( #160 )
...
resolves #139
> empty `unix_socket_directories` means not listening on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server.
see: https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES
* use TCP/IP by default for health check
2024-03-26 18:44:11 +05:30
Shivaraj B H
819ab20e8e
refactor: writeShellScriptBin -> writeShellApplication ( #155 )
...
Provides us with following benefits:
- use `runtimeInputs` instead of manually exporting `PATH`
- get shellcheck by default
---------
Co-authored-by: Sridhar Ratnakumar <3998+srid@users.noreply.github.com>
2024-03-19 01:47:25 +05:30
Shivaraj B H
f158353b59
fix(mysql)!: look for *.sql
files in the top-level schema directory ( #154 )
...
* mysql service would assume that all the `*.sql` files in the directory, provided by `initialDatabases [{ schema = <directory>; … }]`, exists in a folder named [mysql-databases](291e7be83a/nix/mysql.nix (L239-L241)
), after this change it would just look for all the `*.sql` files in the top-level schema directory.
* add tests
2024-03-18 22:32:08 +05:30
Shivaraj B H
18f9decf13
refactor(postgres): replace string argument with attrset for connectionURI
( #146 )
...
for justification, see:
https://github.com/juspay/services-flake/pull/143#discussion_r1521290361
2024-03-13 00:40:13 +05:30
Shivaraj B H
8c25972cfb
feat(postgres): add connectionURI option ( #143 )
...
resolves #141
2024-03-12 14:24:28 +05:30
Abhishek Singh
e0a1074f8a
bump: update flake lock ( #117 )
...
* fix: pgadmin-init
in pgadmin-8.2, the command to setup configuration db is `setup-db`
* fix: add grafana overlay
grafana 10.3.3 from upstream nixpkgs doesn’t work in darwin
* chore: free up space in ubuntu-latest
---------
Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2024-03-06 16:55:00 +05:30
Abhishek Singh
6aeb0eafe6
cassandra: init service ( #116 )
...
* cassandra: init service
* cassandra: add cassandra/conf files
* cassandra_test: change package to cassandra_4
* update readiness_probe
* update cassandra_test
* cassandra: add doc
* cassandra_4 doesn't require python-2
---------
Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2024-03-03 16:07:36 +05:30
Abhishek Singh
5e48c5a965
add pgAdmin service ( #115 )
2024-02-29 18:10:22 +05:30
Abhishek Singh
bdd6dde41a
add prometheus service ( #114 )
...
* prometheus: init service
* prometheus: add doc
* prometheus: update doc
2024-02-28 11:00:52 +05:30
Shivaraj B H
65ebef12e5
clickhouse: fix test regression ( #109 )
2024-02-27 19:35:08 +05:30
Abhishek Singh
ef2f930e1a
clickhouse: use lib.recursiveUpdate
to deep merge extraConfig ( #110 )
2024-02-22 22:32:52 +05:30
Abhishek Singh
625f207034
add grafana service ( #108 )
2024-02-22 22:25:51 +05:30
Adrian
f8cd3fbcb5
postgres init: use -U ${config.superuser} with psql if superuser != null ( #106 )
2024-02-21 23:36:56 +05:30
Abhishek Singh
76beca31cc
change clickhouse extraConfig
type to yaml ( #99 )
...
* change clickhouse `extraConfig` type to yaml
* update clickhouse doc
2024-02-19 11:08:14 +05:30
Shivaraj B H
7593351c71
Mysql: add initialScript
option ( #98 )
...
—
Co-authored-by: rsrohitsingh682 <rsrohitsingh682@gmail.com>
2024-02-15 16:36:18 +05:30
Shivaraj B H
63ff90eed9
redis-cluster: run create cluster only if it is not already initalised ( #97 )
2024-02-13 19:24:08 +05:30
roman-bodavskiy
a0bde519ed
clickhouse init script ( #91 )
...
* clickhouse init script
* clickhouse schema test
* clickhouse folder
* docs: add initialDatabases to tips & tricks
* docs: use heading anchor
* add TODO to find an alternative to start clickhouse-server during init
---------
Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2024-02-07 22:03:06 +05:30
Shivaraj B H
9b806b53f3
postgres: always create socketDir during init if not already present ( #88 )
...
If the socketDir is in tmpfs, or if it is deleted by some other process, we would want the socketDir to be created, if not already present, on restarts.
2024-01-31 18:47:52 +05:30
Shivaraj B H
af4af40169
Add Clickhouse service ( #85 )
2024-01-24 20:54:26 +05:30
John A. Lotoski
eb8361b9ab
postgres ensure socketDir mktemp init succeeds ( #81 )
...
* fix: ensure socketDir mktemp succeeds when path does not exist yet
* postgres: test socketDir with a multi-level non-existing path
2024-01-20 00:20:08 +05:30
John A. Lotoski
1a3f2d1936
postgres: add socketDir option ( #77 )
2024-01-18 23:10:16 +05:30
Shivaraj B H
bf3a582502
[Postgres]: Fix test
process not starting ( #78 )
...
* needn't copy depends_on option, demonstrated in example/flake.nix
* postgres: test process must depend on both pg1 and pg2
2024-01-18 11:28:15 +05:30
Shivaraj B H
c7bed59b87
[apache-kafka] Fix the configuration to allow kafka to run on non-default port ( #76 )
...
Tests are inspired from: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/kafka.nix
The module is based on: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/apache-kafka.nix
2024-01-16 14:35:05 +05:30
Shivaraj B H
62e13715f8
[Postgres]: Use schemas
in-place of initialDumps
( #73 )
...
* (postgres) rename schema to schemas; rm initialDumps, use schemas instead
2024-01-13 22:48:46 +05:30
Rohit Singh
2211042f3e
Postgres: Added option depends_on ( #71 )
...
* Added option depends_on which will be useful to append extra depends_on configuration to the <name>-init process.
* more meaningful `depends_on` option's description
---------
Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2023-12-28 20:44:32 +05:30
Rohit Singh
d6b73e401e
Adding option initialDumps to Postgres ( #67 )
...
---------
Co-authored-by: Shivaraj B H <sbh69840@gmail.com>
2023-12-26 15:15:32 +05:30
Rohit Singh
22e121b246
Using psql command instead of postgres in initialScript ( #66 )
...
* Use psql instead of postgres, as a result, use `pg_ctl` to temporarily start the postgres server in `${name}-init` process.
* Avoid creating a custom `postgresPkg` with extensions by using `apply` attribute provided by `mkOption`
* Refactor setup script, use `writeShellApplication` and resolve shell-check errors
---------
Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
2023-12-25 00:35:03 +05:30
Shivaraj B H
8cd80d7a16
nginx: service init ( #69 )
2023-12-22 16:42:51 +05:30
Shivaraj B H
b9ab7fb711
Namespaces ( #57 )
2023-10-04 22:50:59 +05:30
Shivaraj B H
0f31f24754
fmt; add kafka and zk service to readme ( #54 )
2023-09-07 20:57:07 +05:30
Shivaraj B H
072fb57419
Add MySQL service ( #50 )
2023-09-07 20:36:27 +05:30
Adrian Gierakowski
14904d0b7f
feat: add lib to flake outputs exposing multiService func
...
closes #25
2023-09-06 11:57:08 -04:00
Shivaraj B H
2c1bbc1258
[Update flake.lock
; fix bugs] Test process overwrites other processes ( #52 )
2023-09-06 19:54:51 +05:30
Shivaraj B H
b93a612aa7
Kafka and Zookeeper services ( #42 )
2023-08-29 17:04:04 +05:30
Shivaraj B H
6e7c208761
Add elasticsearch service ( #37 )
2023-08-23 23:07:18 +05:30
Shivaraj B H
72a3eaacc8
Process as test (VM -> Native test) ( #38 )
...
Co-authored-by: Sridhar Ratnakumar <3998+srid@users.noreply.github.com>
2023-08-23 22:47:20 +05:30
Shivaraj B H
88a259d48e
Add Redis cluster service ( #35 )
2023-08-02 09:58:19 +05:30
Adrian
1209368ec8
feat(postgres): add superuser option ( #29 )
2023-07-22 03:42:04 +05:30
Shivaraj B H
4da1956dd8
postgres: add defaultSettings internal option ( #34 )
2023-07-22 03:38:57 +05:30
Shivaraj B H
8b8eea9230
Multiple services ( #13 )
2023-07-18 02:15:33 +05:30
Shivaraj B H
4e181b2a0c
add before
and after
options to initialScript
in postgres ( #5 )
2023-07-10 21:10:52 +05:30
Shivaraj B H
beaaca9f55
Add redis service ( #8 )
2023-07-10 20:44:26 +05:30
Shivaraj B H
9a9fc54749
util-linux breaks services-flake on macos ( #12 )
2023-07-05 17:42:33 +05:30
Shivaraj B H
09a805f859
Configure pg_hba.conf
file ( #7 )
2023-07-05 11:23:56 +05:30
Sridhar Ratnakumar
46a4ca9869
postgres: run initialScript *before* (for maximum control)
2023-06-21 18:03:47 -04:00
Sridhar Ratnakumar
20b63ecf79
postgres: readiness probe
2023-06-21 11:09:04 -04:00
Sridhar Ratnakumar
27c3221de2
postgres: make setup a bit more verbose
2023-06-21 10:49:57 -04:00
Sridhar Ratnakumar
b7c1a05eff
test: Update process-compose-flake
...
Also wrap in startScript because 'command' no longer does that.
2023-06-21 10:01:14 -04:00