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 4 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
46 changes: 41 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,51 @@ This section describes how to download, install and run the application.
(1). Clone the repo:

```bash
$ git clone https://github.com/prebid/prebid-cache-java.git
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
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 don't have one.

(2.1) Redis via Docker
1. Pull [Redis docker image](https://hub.docker.com/_/redis) of an appropriate version
```bash
docker pull redis:<version>
VeryExtraordinaryUsername marked this conversation as resolved.
Show resolved Hide resolved
```
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 <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 <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 All @@ -54,7 +90,7 @@ $ mvn clean package
(4). Run Spring Boot JAR (_from project root_)

```bash
$ java -jar target/prebid-cache.jar
java -jar target/prebid-cache.jar
```

### _Spring Profiles_
Expand All @@ -65,7 +101,7 @@ This section shows examples of the various runtime environment configuration(s).

_VM Options:_
```bash
$ java -jar prebid-cache.jar -Dspring.profiles.active=manage,local -Dlog.dir=/app/prebid-cache-java/log/
java -jar prebid-cache.jar -Dspring.profiles.active=manage,local -Dlog.dir=/app/prebid-cache-java/log/
```

(2). Production with log4j and management endpoints disabled:
Expand Down