Deploying YOUnite with Docker and Docker Compose



TODO:

  • Create a repo with just the containers, compose and any scripts needed to get a base configuration running. Call the repo younite-compose (it shouldn't contain any YOUnite source)
    • Should have some scripts to reset the DBs
    • Run a sample curl to create a zone, domain, post a data record and get a data record
  • Include steps to launch the UI
  • Validate the steps outlined below


Follow these steps to get a YOUnite deployment up and running as quickly as possible. The steps below make reasonable assumptions about the reader's understanding of YOUnite and MDM. If greater detail is desired, please see the Knowledge Base documentation.

Requirements

  • Access to the younite-compose repository in Bitbucket TODO - Create a repo with the latest docker images and docker compose only - no source.
  • Docker 1.13 or later installed on the system(s) you plan to run YOUnite-api and its required services on.
  • System Requirements:

If you plan to run the entire stack of services on a single system, it most be configured with the following minimums:

    • RAM: 16 GB. Running this with 8GB of RAM or less works but intermittent performance issues under moderate load are likely.
    • Storage: Make sure you have at least 75GB free space (anticipate swapping).
    • CPU: Quad Core i7
    • Available Ports:

      ServiceIPPort
      Postgres127.0.0.15432
      Active MQ127.0.0.11883, 5672, 8161, 61614, 61616 (broker)
      ELK127.0.0.15000, 5044, 5601 (Kibana), 9200, 9300
  • In Docker Preferences increase the CPUs and Memory to the highest values you can. Suggested configurations:
Available RAMConfigure Docker
8GB4GB
16GB or above12GB
Available CPUsConfigure Docker
42
86
16 or more12

1. Clone the Latest YOUnite Compose Repo and Run the Stack

The following compose stack includes an OAuth server that has a UI and you can create Resource Servers and Clients. There should be no need to interact with this component of the stack. All the data that needs to be populated to serve the API is populated via the compose.sh script, which calls populateOauthDB.sh:

Clone the latest:

> git clone https://<your-username>@bitbucket.org/younite/younite-compose.git

> cd younite-compose

> git submodule update --init --recursive

Bring up the Docker containers (append -d to the following command and the containers will run in detached mode and with minimal console output):

> ./compose.sh up

2. Manage the Docker Compose Stack

See the Docker Compose documentation for more detail, but a list of additional useful commands include:

> ./compose.sh ps - see the running state of your compose stack

> ./compose.sh stop - stop all the containers in the stack

> ./compose.sh logs openmdm-db - view the logs for the database.

> ./compose.sh exec container bash - log into a container

3. Reset the Databases

Run the following commands to reset YOUnite to its initial state:

> cd younite-compose

> ./compose.sh stop

> ./resetMdmDb.sh

> ./resetOauthDb.sh

> ./compose.sh up -d

See the implementation guides in the Knowledge Base.