-
Notifications
You must be signed in to change notification settings - Fork 64
Maintaining OCLAPI's Docker containers
❗ | Warning: This page is going to be retired and this documentation will be maintained at - https://github.com/OpenConceptLab/ocl-docs/blob/main/docs/source/oclapi/admin/maintainingoclapidockercontainers.md |
---|
OclApi consists of the following containers:
- ocl_api
- ocl_mongo
- ocl_flower
- ocl_solr
- ocl_worker
- ocl_redis
When things go wrong, there are a number of ways to recycle some or all of the containers
OCL API pipeline has stages named "QA deploy", "Staging Deploy" and "Production Deploy". These re deploy a certain version of the code and restart all container except ocl_mongo and ocl_solr.
This is the safest and most non-obtrusive, therefore the recommended way of restarting the OCLAPI application. However, further steps might be needed at times
Though not recommended, this mode of operation needs SSH access to the server. Once SSH'd in:
- navigate to
oclapi/django-nonrel/ocl
- run
docker-compose down
- Redeploy using the pipeline, or run
deploy/start_docker.sh
Sometimes, docker containers mentioned hang and need to be recycled hard. In order to do this:
Go to oclapi/django-nonrel/ocl
and run docker-compose down
command. If it didn't work, use these steps.
- Run
docker ps
to find the container ID. - To terminate the container, use the following command:
docker rm -fv CONTAINER_ID
The
-f
flag is short for--force=false
, which forces the removal of a running container. The-v
flag is short for--volumes=false
, which removes the volumes associated with the container. You can use the long or short version of the flags.
- Redeploy using the pipeline, or run
deploy/start_docker.sh
Sometimes docker just needs to be restarted completely. For example, if it is not possible to close the "default network". These steps will restart docker:
- Just stop docker deamon ( sudo service docker stop )
- Start again ( sudo service docker start )
- Go to API folder ( cd /root/oclapi/django-nonrel/ocl )
- Down dockers ( docker-compose down )
- Redeploy from GoCD
To start GoCD using docker:
docker start eloquent_brown
docker start go-agent
docker start go-agent-2
Overview
Resources
Import / Export
- CSV Import
- Bulk Import
- Org/Source Import
- Export API
- Subscriptions
- Subscription Client Testing Process
- OpenMRS to OCL Mapping
Troubleshooting & Operations
- Data integrity checks
- Maintaining OCLAPI's Docker containers
- Maintaining MongoDB and Solr
- How to check logs
- NewRelic monitoring setup
- Configuration changes to make tests and import job run faster
- Accessing Solr UI Remotely
- Data Backup and Restore
- SSL Configuration
- Flower
- Switching to Maintenance Mode on Production Server
- Docker networking and Security
Other