Installation

Steps to install Doctor Droid PlayBooks

In this page, we will cover how you can install and get started with Doctor Droid PlayBooks.

Build options:

(a) Publicly hosted images of the latest release

(b) Build from code

Deployment options:

(a) Docker

(b) Helm

If you are looking for a local dev environment setup to help with contribution, visit our contribution guidelines page.

Build using public docker image

via Docker Compose

Fastest way to start will be to use public docker images and run the following on your machine

docker-compose -f deploy.docker-compose.yaml up -d

Access the portal at localhost (on port 80)

via Helm

You can also deploy on a kubernetes cluster using helm.
Note: Set the right k8s cluster context before running this.

cd helm
helm install playbooks .

Run the following command to get the portal endpoint

kubectl get svc web -o custom-columns="EXTERNAL-IP:.status.loadBalancer.ingress[*].hostname"

Build from Source

You can also build docker images from source using Docker Compose

git clone [email protected]:DrDroidLab/PlayBooks.git
docker-compose -f playbooks.docker-compose.yaml up -d

Once completed, visit http://localhost to view the portal.

Getting Started

Once you have installed, you can follow our quick start guides to get off the ground.

Additional Guidelines

Setting up a custom database

In case you want to use an existing or external instance of postgres database, here are the steps you need to follow:

Docker

  1. Comment out / remove the db entry from the docker-compose file.
  2. Remove db from the dependencies of each docker container's config in the compose file.
  3. Create the .env file in the root directory with the credentials of your external DB mentioned as environment variables:
    POSTGRES_DB=
    POSTGRES_USER=
    POSTGRES_PASSWORD=
    POSTGRES_HOST=
    POSTGRES_PORT=
    
  4. Run the docker compose file. It will create the necessary tables in that DB and get your started.

Helm

  1. Delete the postgresql chart with following command
    rm -rf helm/charts/postgresql
    
  2. Create a dbservice.yaml file in the helm directory with the following content. Replace the <db_host_name> with the hostname of your external postgres DB
    apiVersion: v1
    kind: Service
    metadata:
      labels:
        app: postgresql-service
      name: postgresql-service
    spec:
      externalName: <db_host_name>
      selector:
        app: postgresql-service
      type: ExternalName
    status:
      loadBalancer: {}
    
  3. Create the external DB as a service in your cluster in your namespace
    kubectl apply -f dbservice.yaml -n <namespace>
    
  4. Replace the following variables with their respective values from the external DB in each of the values.yaml files in all the charts:
    • djangoDatabaseName
    • djangoDatabaseUsername
    • djangoDatabasePassword
  5. Redeploy the helm charts
    helm upgrade --install playbooks -n <namespace> .