Skip to content

Commit

Permalink
feat: Remove Windows support (which may have never worked) (#62)
Browse files Browse the repository at this point in the history
Devstack is only used at 2U now, and no one here uses Windows for
development. (I'm not sure the Windows support ever worked for anyone,
given the comments in the removed lines.)
  • Loading branch information
timmc-edx authored Oct 30, 2024
1 parent 56360a4 commit 5b66954
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 79 deletions.
40 changes: 11 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,6 @@ DEFAULT_SERVICES_LIST := $(subst +, ,$(DEFAULT_SERVICES))
THIRD_PARTY_SERVICES_LIST := $(subst +, ,$(THIRD_PARTY_SERVICES))
ALL_SERVICES_LIST := $(subst +, ,$(ALL_SERVICES))

# Get information on host operating system via the `uname` command.
OS := $(shell uname)

# Need to run some things under winpty in a Windows git-bash shell
# (but not when calling bash from a command shell or PowerShell).
ifneq (,$(MINGW_PREFIX))
WINPTY := winpty
else
WINPTY :=
endif

# Don't try redirecting to /dev/null in any Windows shell
ifneq (,$(findstring MINGW,$(OS)))
DEVNULL :=
else
DEVNULL := >/dev/null
endif

# Export Makefile variables to recipe shells.
export

Expand Down Expand Up @@ -153,10 +135,10 @@ selfcheck: ## Check that the Makefile is free of Make syntax errors.
########################################################################################

dev.reset-repos: ## Attempt to reset the local repo checkouts to the default branch working state.
$(WINPTY) bash ./repo.sh reset
bash ./repo.sh reset

dev.status: ## Prints the status of all git repositories.
$(WINPTY) bash ./repo.sh status
bash ./repo.sh status

dev.checkout: ## Check out "openedx-release/$OPENEDX_RELEASE" in each repo if set, use default branch otherwise.
./repo.sh checkout
Expand Down Expand Up @@ -197,12 +179,12 @@ dev.pull.%: ## Pull latest Docker images for services and their dependencies.

dev.provision: ## Provision dev environment with default services, and then stop them.
make dev.check-memory
$(WINPTY) bash ./provision.sh $(DEFAULT_SERVICES)
bash ./provision.sh $(DEFAULT_SERVICES)
make dev.stop

dev.provision.%: dev.check-memory ## Provision specified services.
echo $*
$(WINPTY) bash ./provision.sh $*
bash ./provision.sh $*

dev.backup: dev.up.mysql57+mysql80+mongo+elasticsearch710+opensearch12+coursegraph ## Write all data volumes to the host.
docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mysql57) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/mysql57.tar.gz /var/lib/mysql
Expand Down Expand Up @@ -348,10 +330,10 @@ dev.stats: ## Get per-container CPU and memory utilization data.
dev.check: dev.check.$(DEFAULT_SERVICES) ## Run checks for the default service set.

dev.check.%: # Run checks for a given service or set of services.
$(WINPTY) bash ./check.sh $*
bash ./check.sh $*

dev.wait-for.%: ## Wait for these services to become ready
$(WINPTY) bash ./wait-ready.sh $$(echo $* | tr + " ")
bash ./wait-ready.sh $$(echo $* | tr + " ")

dev.validate: ## Print effective Docker Compose config, validating files in COMPOSE_FILE.
docker compose config
Expand All @@ -362,7 +344,7 @@ dev.validate: ## Print effective Docker Compose config, validating files in COMP
########################################################################################

dev.cache-programs: ## Copy programs from Discovery to Memcached for use in LMS.
$(WINPTY) bash ./programs/provision.sh cache
bash ./programs/provision.sh cache

dev.restart-devserver: _expects-service.dev.restart-devserver

Expand Down Expand Up @@ -483,7 +465,7 @@ dev.destroy.coursegraph: dev.remove-containers.coursegraph ## Remove all courseg

# See https://github.com/openedx/devstack/issues/1113 for lack of ability to destroy data volumes
dev.destroy: ## Irreversibly remove all devstack-related containers and networks (though not data volumes)
$(WINPTY) bash ./destroy.sh
bash ./destroy.sh

########################################################################################
# Support for "prefix-form" commands:
Expand Down Expand Up @@ -589,10 +571,10 @@ hadoop-application-logs-%: ## View hadoop logs by application Id.
docker compose exec nodemanager yarn logs -applicationId $*

create-test-course: ## Provisions cms, and ecommerce with course(s) in test-course.json.
$(WINPTY) bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/test-course.json
bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/test-course.json

build-courses: ## Build course and provision cms, and ecommerce with it.
# Modify test-course.json before running this make target to generate a custom course
$(WINPTY) bash ./course-generator/build-course-json.sh course-generator/tmp-config.json
$(WINPTY) bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/tmp-config.json
bash ./course-generator/build-course-json.sh course-generator/tmp-config.json
bash ./course-generator/create-courses.sh --cms --ecommerce course-generator/tmp-config.json
rm course-generator/tmp-config.json
30 changes: 0 additions & 30 deletions README-windows.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ amount of resources. We find that `configuring Docker for Mac`_
with a minimum of **2 CPUs, 8GB of memory, and a disk image size of 96GB**
does work.

`Docker for Windows`_ may work but has not been tested and is *not* supported.

If you are using Linux, developers on Ubuntu (and Debian) should ensure
they've uninstalled docker.io and docker-compose from the main Ubuntu
repositories and instead install docker-ce and docker-compose-plugin from the
Expand All @@ -48,7 +46,6 @@ command.
.. _Docker for Mac: https://docs.docker.com/desktop/install/mac-install/
.. _licensing terms: https://www.docker.com/pricing/faq
.. _configuring Docker for Mac: https://docs.docker.com/desktop/settings/mac/#advanced
.. _Docker for Windows: https://docs.docker.com/desktop/install/windows-install/

Please note
~~~~~~~~~~~
Expand Down
17 changes: 0 additions & 17 deletions scripts/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,6 @@ Linux
"bash linux.sh". Partway through you'll be prompted for your password
to grant sudo access (to run docker commands); provide it as needed.

Windows
-------

3. If you don't already have Docker 17.06 CE or later installed, install
it from "devstack_snapshot/Docker for Windows Installer.exe".

4. Follow the instructions at
https://github.com/openedx/devstack/blob/master/README-windows.rst
(Unlike the macOS and Linux installations above, this will require
a network connection).

Open edX devstack isn't fully working on Windows yet, but if you are
running Windows 10 you can help us diagnose and fix the remaining
problems. If you're running an older version of Windows, please ask
for help choosing a task that can be completed without installing
devstack.

All Operating Systems
---------------------

Expand Down

0 comments on commit 5b66954

Please sign in to comment.