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

Issue #KN-585 feat: Single click local installation of knowledge plat… #883

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,32 @@

Repository for Knowledge Platform - 2.0

## Knowledge-platform local setup
## Knowledge-platform local setup
This readme file contains the instruction to set up and run the content-service in local machine.

### System Requirements:

### Prerequisites:
* Java 11
* Docker, Docker Compose


## One step installation

1. Go to Root folder (knowledge-platform)
2. Run "local-setup.sh" file
``` shell
sh ./local-setup.md
```

This will install all the requied dcoker images & local folders for DB mounting.
3. Follow the below manual setps of running content service
refer: [Running Content Service:](#running-content-service)



## Manual steps to install all the dependents
Please follow the manual steps in [One step installation](#one-step-installation) is failed.

### Prepare folders for database data and logs

Expand Down
61 changes: 61 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: "3.0"
services:
sunbird-neo4j:
image: neo4j:3.3.0
container_name: "sunbird_neo4j"
ports:
- 7473:7473
- 7474:7474
- 7687:7687
volumes:
- $sunbird_dbs_path/neo4j/data:/var/lib/neo4j/data
- $sunbird_dbs_path/neo4j/logs:/var/lib/neo4j/logs
- $sunbird_dbs_path/neo4j/plugins:/var/lib/neo4j/plugins
environment:
NEO4J_AUTH: none
NEO4J_dbms_connector_https_advertised__address: "localhost:7473"
NEO4J_dbms_connector_http_advertised__address: "localhost:7474"
NEO4J_dbms_connector_bolt_advertised__address: "localhost:7687"

sunbird-cassandra:
image: cassandra:3.11.11
container_name: "sunbird_cassandra"
ports:
- 9042:9042
depends_on:
- sunbird-neo4j
volumes:
- $sunbird_dbs_path/cassandra/data:/var/lib/cassandra
- $sunbird_dbs_path/cassandra/logs:/opt/cassandra/logs
- $sunbird_dbs_path/cassandra/backups:/mnt/backups

sunbird-redis:
image: redis:6.0.8
container_name: "sunbird_redis"
ports:
- 6379:6379
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- $sunbird_dbs_path/redis/redis.conf:/usr/local/etc/redis/redis.conf

zookeeper:
image: 'wurstmeister/zookeeper:latest'
container_name: zookeeper
ports:
- "2181:2181"
environment:
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:2181

kafka:
image: 'wurstmeister/kafka:2.11-1.0.1'
container_name: kafka
ports:
- "9092:9092"
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
6 changes: 6 additions & 0 deletions local-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

mkdir -p ~/sunbird-dbs/neo4j ~/sunbird-dbs/cassandra ~/sunbird-dbs/redis ~/sunbird-dbs/es ~/sunbird-dbs/kafka
export sunbird_dbs_path=~/sunbird-dbs

docker compose up