I am looking to keep my config in source control by using --root
but some of the directories are clearly data directories and some look like they might be docker-compose files that may or may not need to be controlled by tutor. Does anyone have a .gitignore that works?
The current directory tree is as follows.
.
βββ Pipfile
βββ Pipfile.lock
βββ config.yml
βββ data
β βββ cms
β β βββ logs
β βββ elasticsearch
β β βββ nodes
β βββ lms
β β βββ logs
β β βββ modulestore
β β βββ ora2
β βββ mongodb
β β βββ WiredTiger
β β βββ WiredTiger.lock
β β βββ WiredTiger.turtle
β β βββ WiredTiger.wt
β β βββ WiredTigerLAS.wt
β β βββ _mdb_catalog.wt
β β βββ collection-0-1665046703606725615.wt
β β βββ collection-2-1665046703606725615.wt
β β βββ collection-4-1665046703606725615.wt
β β βββ diagnostic.data
β β βββ index-1-1665046703606725615.wt
β β βββ index-3-1665046703606725615.wt
β β βββ index-5-1665046703606725615.wt
β β βββ index-6-1665046703606725615.wt
β β βββ mongod.lock
β β βββ sizeStorer.wt
β β βββ storage.bson
β βββ mysql
β β βββ auto.cnf
β β βββ ca-key.pem
β β βββ ca.pem
β β βββ client-cert.pem
β β βββ client-key.pem
β β βββ ib_buffer_pool
β β βββ ib_logfile0
β β βββ ib_logfile1
β β βββ ibdata1
β β βββ mysql
β β βββ openedx
β β βββ performance_schema
β β βββ private_key.pem
β β βββ public_key.pem
β β βββ server-cert.pem
β β βββ server-key.pem
β β βββ sys
β βββ openedx-media
β βββ redis
β βββ appendonly.aof
β βββ dump.rdb
βββ env
βββ apps
β βββ caddy
β βββ openedx
β βββ redis
βββ build
β βββ openedx
β βββ permissions
βββ dev
β βββ docker-compose.jobs.tmp.yml
β βββ docker-compose.jobs.yml
β βββ docker-compose.tmp.yml
β βββ docker-compose.yml
βββ k8s
β βββ deployments.yml
β βββ jobs.yml
β βββ namespace.yml
β βββ override.yml
β βββ services.yml
β βββ volumes.yml
βββ kustomization.yml
βββ local
β βββ docker-compose.jobs.tmp.yml
β βββ docker-compose.jobs.yml
β βββ docker-compose.prod.yml
β βββ docker-compose.tmp.yml
β βββ docker-compose.yml
βββ plugins
β βββ mfe
βββ version
The configuration is all contained in the env
folder so thatβs only one you would need to replicate your deployment.
However, the simplest solution is to keep config.yml
file and your custom plugin(s) and you should be able to recreate whatβs in the env
folder. Thatβs the approach Iβm currently using.
I think with the v2 interface of tutor plugins, you can add settings to config.yml
from plugins. So in theory, you can have your entire deployment configuration in a single plugin and version control that plugin.
Would the plugin also hold the extra requirements such as the custom-theme and the any xblocks?
I prefer to create the git repo on the parent directory to include tutor
and tutor-plugins
together.
Then, I add the following directories to .gitignore
since they contain the dev environment and the platform data.
- tutor/volumes
- tutor/data
It would be best if you kept all of tutor/env
since you can track what tutor config save
actually does.
If you choose to go minimal, here are my preferences.
You have two options for the custom theme.
- You can run a command with the
Actions
functionality to download the plugin to the
"$(tutor config printroot)/env/build/openedx/themes/myopenedxtheme"
location. - You can add it to your git repository alongside the
plugin.py
file at the above location.
The xblocks can be added with the OPENEDX_EXTRA_PIP_REQUIREMENTS
patch.
https://docs.tutor.overhang.io/configuration.html?highlight=xblock#installing-extra-xblocks-and-requirements
+1 for the options @uetuluk listed.
For the your custom theme, you can also create a tutor plugin (Beware of handling templates tags).
I turned my custom-them into a plugin recently because I realised it allows me to add/remove production specific js scripts using patches. For example I donβt need a chat widget when running locally.
I think I prefer the idea of having a parent repo that takes care of the build tools.
.gitignore
tutor/volumes
tutor/data
This should allow us to keep the project and dependencies included with the project and allow other devs to build the project as needed. Thank you.