Skip to content

Commit

Permalink
feat!: Remove unsupported Devstack references and Docker tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Dec 16, 2024
1 parent 46948ba commit a9fec98
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 316 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ Change Log
This file loosely adheres to the structure of https://keepachangelog.com/,
but in reStructuredText instead of Markdown.
2024-12-16
**********

- Remove unsupported `Devstack references`_ and `Docker tooling`_.

.. _Devstack references: https://github.com/openedx/public-engineering/issues/247
.. _Docker tooling: https://github.com/openedx/public-engineering/issues/263

2024-05-25
**********

Expand Down
14 changes: 10 additions & 4 deletions cookiecutter-django-ida/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,23 @@ To create a project using this cookiecutter, follow the instructions found in ed

.. _readme: https://github.com/openedx/edx-cookiecutters/blob/master/README.rst

After the new folder is created, you will need to:
After the new folder is created, you will need to do something like:

1. ``cd <new_repo_folder>``
2. Create a Python 3 virtual environment and activate it
3. ``make upgrade``
4. ``make docker_build``
5. ``docker-compose up``
6. ``./provision-{project_name}.sh``
4. ``make requirements``
5. ``./manage.py migrate``
6. ``./manage.py runserver``
7. Commit and push all your changes: ``git commit …`` ``git push``
8. Connect repo to renovate(and other github tools): see `Set up Renovate to Automate JavaScript Dependency Updates`_

Please note: These steps have not been tested in a while, as the Open edX
project has generally avoided creating new independently deployable
applications in the past few years. If you successfully complete these steps,
please consider removing this note and adding any additional steps or
considerations to this section. Thank you!

.. _Set up Renovate to Automate JavaScript Dependency Updates: https://openedx.atlassian.net/wiki/spaces/AC/pages/1841791377/Set+up+Renovate+to+Automate+JavaScript+Dependency+Updates

**Note** This cookiecutter repo currently has some issues with repos that use a hyphen in their name. If this is the case, some pieces of the repo will need to be changed from ``new-repo-name`` to ``new_repo_name``, particularly the Python pieces.
Expand Down

This file was deleted.

86 changes: 0 additions & 86 deletions cookiecutter-django-ida/{{cookiecutter.repo_name}}/Dockerfile

This file was deleted.

49 changes: 0 additions & 49 deletions cookiecutter-django-ida/{{cookiecutter.repo_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,60 +145,11 @@ endif
push_translations: ## push source translation files (.po) from Transifex
tx push -s

start-devstack: ## run a local development copy of the server
docker-compose --x-networking up

open-devstack: ## open a shell on the server started by start-devstack
docker exec -it {{cookiecutter.repo_name}} /edx/app/{{cookiecutter.repo_name}}/devstack.sh open

pkg-devstack: ## build the {{cookiecutter.repo_name}} image from the latest configuration and code
docker build -t {{cookiecutter.repo_name}}:latest -f docker/build/{{cookiecutter.repo_name}}/Dockerfile git://github.com/openedx/configuration

detect_changed_source_translations: ## check if translation files are up-to-date
cd {{cookiecutter.project_name}} && i18n_tool changed

validate_translations: fake_translations detect_changed_source_translations ## install fake translations and check if translation files are up-to-date

docker_build:
docker build . -f Dockerfile -t openedx/{{cookiecutter.repo_name}}

# devstack-themed shortcuts
dev.up: # Starts all containers
docker-compose up -d

dev.up.build:
docker-compose up -d --build

dev.down: # Kills containers and all of their data that isn't in volumes
docker-compose down

dev.stop: # Stops containers so they can be restarted
docker-compose stop

app-shell: # Run the app shell as root
docker exec -u 0 -it {{cookiecutter.project_name}}.app bash

db-shell: # Run the app shell as root, enter the app's database
docker exec -u 0 -it {{cookiecutter.project_name}}.db mysql -u root {{cookiecutter.project_name}}

%-logs: # View the logs of the specified service container
docker-compose logs -f --tail=500 $*

%-restart: # Restart the specified service container
docker-compose restart $*

%-attach:
docker attach {{cookiecutter.project_name}}.$*

docker_auth:
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin

docker_tag_build_push: docker_auth
docker buildx build -t openedx/{{cookiecutter.repo_name}}:latest -t openedx/{{cookiecutter.repo_name}}:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --target prod --push .

docker_tag_build_push_dev: docker_auth
docker buildx build -t openedx/{{cookiecutter.repo_name}}-dev:latest -t openedx/{{cookiecutter.repo_name}}-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --target dev --push .

selfcheck: ## check that the Makefile is well-formed
@echo "The Makefile is well-formed."

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions cookiecutter-xblock/{{cookiecutter.repo_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ piptools: ## install pinned version of pip-compile and pip-sync
requirements: piptools ## install development environment requirements
pip-sync -q requirements/dev.txt requirements/private.*

dev.clean:
-docker rm $(REPO_NAME)-dev
-docker rmi $(REPO_NAME)-dev

dev.build:
docker build -t $(REPO_NAME)-dev $(CURDIR)

dev.run: dev.clean dev.build ## Clean, build and run test image
docker run -p 8000:8000 -v $(CURDIR):/usr/local/src/$(REPO_NAME) --name $(REPO_NAME)-dev $(REPO_NAME)-dev

## Localization targets

extract_translations: ## extract strings to be translated, outputting .po files
Expand Down

0 comments on commit a9fec98

Please sign in to comment.