Skip to content

Instantly share code, notes, and snippets.

@prcleary
Created July 13, 2023 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prcleary/966f5161c3f35aeebfc7b9bdc582111b to your computer and use it in GitHub Desktop.
Save prcleary/966f5161c3f35aeebfc7b9bdc582111b to your computer and use it in GitHub Desktop.
Ozone FOSS Manual setup
# From: https://github.com/ozone-his/ozone-docker/blob/main/readme/manual-setup.md
cd ~/
# Then create the Ozone working directory and save the path:
export OZONE_DIR=$PWD/ozone && \
mkdir -p $OZONE_DIR && cd $OZONE_DIR
# Step 2. Clone the ozone-docker project
git clone https://github.com/ozone-his/ozone-docker
cd ozone-docker
# Step 3. Create the public Docker network
docker network create web
# Step 4. Destroy the running instance containers
# If you have already set up Ozone before you may need to clean up your local environment first:
./destroy-demo.sh
# Step 5. Download and extract the distribution
export VERSION=1.0.0-alpha.3&& \
./mvnw org.apache.maven.plugins:maven-dependency-plugin:3.2.0:get -DremoteRepositories=https://nexus.mekomsolutions.net/repository/maven-public -Dartifact=com.ozonehis:ozone-distro:$VERSION:zip -Dtransitive=false --legacy-local-repository && \
./mvnw org.apache.maven.plugins:maven-dependency-plugin:3.2.0:unpack -Dproject.basedir=$OZONE_DIR -Dartifact=com.ozonehis:ozone-distro:$VERSION:zip -DoutputDirectory=$OZONE_DIR/ozone-distro-$VERSION
# Step 6. Export all needed environment variables
# The Ozone Docker project relies on a number of environment variables (env vars) to document where the distro assets are expected to be found. For the sample demo you can export the following env vars:
export DISTRO_GROUP=ozone-demo; \
export DISTRO_PATH=$OZONE_DIR/ozone-distro-$VERSION; \
export OPENMRS_CONFIG_PATH=$DISTRO_PATH/openmrs_config; \
export OZONE_CONFIG_PATH=$DISTRO_PATH/ozone_config; \
export OPENMRS_CORE_PATH=$DISTRO_PATH/openmrs_core; \
export OPENMRS_MODULES_PATH=$DISTRO_PATH/openmrs_modules; \
export EIP_PATH=$DISTRO_PATH/eip_config; \
export SPA_PATH=$DISTRO_PATH/spa;\
export SENAITE_CONFIG_PATH=$DISTRO_PATH/senaite_config; \
export SUPERSET_CONFIG_PATH=$DISTRO_PATH/superset_config;\
export ODOO_EXTRA_ADDONS=$DISTRO_PATH/odoo_config/addons;\
export ODOO_CONFIG_PATH=$DISTRO_PATH/odoo_config/odoo_csv;\
export ODOO_INITIALIZER_CONFIG_FILE_PATH=$DISTRO_PATH/odoo_config/config/initializer_config.json;\
export ODOO_CONFIG_FILE_PATH=$DISTRO_PATH/odoo_config/config/odoo.conf
export O3_FRONTEND_TAG=3.0.0-beta.9
# How to activate Ozone demo data generation
# In waiting for all demo data to be managed through its own separate microservice, we manually add an ad-hoc EIP route that takes care of generating demo data 10 minutes after Ozone has started. It is for now limited to controlling the generation of OpenMRS demo data.
# To add the route:
mkdir -p $EIP_PATH/routes/demo
mkdir -p $EIP_PATH/config/demo
cp ./demo/eip/routes/generate-demo-data-route.xml $EIP_PATH/routes/demo/
cp ./demo/eip/config/application.properties $EIP_PATH/config/demo/
# To set the number of demo patients to be generated:
export NUMBER_OF_DEMO_PATIENTS=50
# Step 8. Start Ozone
# With Apache 2
docker compose -f docker-compose.yml -f docker-compose-proxy.yml -p $DISTRO_GROUP up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment