Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 152f51c

Browse files
authored
chore: upgrade coursegraph's neo4j image from 3.2 to 3.5 (#824)
This coincides with our upgrade of Neo4j in edx/configuration. Other notes: * We are specifically pinning 3.5.28 (instead of simply 3.5) to ensure that we're using the exact same patch release as what's deployed from edx/configuration. * In the provisioning script, we now specifically start lms and then `exec` the management command. Before, we used the `run` command, which started lms automatically. This worked; however, it would create a *second* lms container if one was already running, which was very confusing. With this change, we will either (a) start a new lms container and use it, or (b) use the existing lms container. TNL-8386
1 parent 082b8e3 commit 152f51c

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ services:
3636
hostname: coursegraph.devstack.edx
3737
# Try to keep this in sync with the NEO4J_VERSION declared within
3838
# https://github.com/edx/configuration/blob/master/playbooks/roles/neo4j
39-
image: neo4j:3.2
39+
image: neo4j:3.5.28
4040
networks:
4141
default:
4242
aliases:

provision-coursegraph.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ set -eu -o pipefail
44
. scripts/colors.sh
55
set -x
66

7-
echo -e "${GREEN} Ensuring Coursegraph image is up to date...${NC}"
8-
97
# Pulling the image will almost always be a no-op, but will be important
108
# when we bump the version in docker-compose.yml or when Neo4j releases a patch.
119
# Also, this gives us a chance to refresh the container in case it's gotten into
1210
# a weird state.
11+
echo -e "${GREEN} Ensuring Coursegraph image is up to date...${NC}"
1312
docker-compose rm --force --stop coursegraph
1413
docker-compose pull coursegraph
15-
docker-compose up -d coursegraph
1614

15+
echo -e "${GREEN} Starting Coursegraph and LMS...${NC}"
16+
docker-compose up -d coursegraph lms
1717
sleep 10 # Give Neo4j some time to boot up.
1818

1919
echo -e "${GREEN} Updating LMS courses in Coursegraph...${NC}"
20-
21-
docker-compose run lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && ./manage.py lms dump_to_neo4j --host coursegraph.devstack.edx --user neo4j --password edx'
20+
docker-compose exec lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform/ && ./manage.py lms dump_to_neo4j --host coursegraph.devstack.edx --user neo4j --password edx'
2221

2322
echo -e "${GREEN} Coursegraph is now up-to-date with LMS!${NC}"

0 commit comments

Comments
 (0)