Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Aerospike-related docs #122

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,46 @@ $ git clone https://github.com/prebid/prebid-cache-java.git
```

(2). Start Redis or Aerospike:
If you have installed [Redis](https://redis.io/docs/install/install-redis/) or [Aerospike](https://aerospike.com/docs/server/operations/install) locally, you may start them both (or separately, depends on your needs) via bash:
```bash
$ sudo systemctl start redis.service & sudo systemctl start aerospike
```
Alternatively, you may start DB as Docker image. But before you should install [Docker Engine](https://docs.docker.com/engine/install/), if you doesn't have one.

(2.1) Redis via Docker
1. Pull [Redis docker image](https://hub.docker.com/_/redis) of an appropriate version
```
docker pull redis:<version>
```
2. Run Redis container
- the `<version>` should correspond to the pulled image version
- the `<host_port>` should correspond to the `spring.redis.port` property values of the Prebid Cache
```bash
$ nohup redis-server &
$ docker run -d --name redis -p -p <host_port>:<container_port> redis:<version>

$ sudo service aerospike start
// Example (the host will be defined as localhost by default)
$ docker run -d --name redis -p 6379:6379 redis:7.2.4
```

(2.2) Aerospike via Docker
1. Pull [Aerospike docker image](https://hub.docker.com/_/aerospike) of an appropriate version
```bash
docker pull aerospike:<version>
```
2. Run Aerospike container (the following instruction is enough for the Community Edition only)
- the `<version>` should correspond to the pulled image version
- the `<host_port>` should correspond to the `spring.aerospike.port` property values of the Prebid Cache
- the `<namespace>` should correspond to the spring.aerospike.namespace property value of the Prebid Cache
```bash
$ docker run -d --name aerospike -e "NAMESPACE=<namespace>" -p -p <host_port>:<container_port> aerospike:<version>

// Example (the host will be defined as localhost by default)
$ docker run -d --name aerospike -e "NAMESPACE=prebid_cache" -p 3000:3000 aerospike:ce-6.4.0.2_1
```

(2.3) Make sure that the Aerospike and/or Redis is up and running
```bash
$ docker ps
```

(3). Start the Maven build
Expand Down