The test docker image for Shepherd
This image is only for testing shepherd, don't use it for production deployment.
- Based on apluslms-service-base.
- Start Shepherd in one go.
- Using s6 for service supervision.
shepherd: used for run shepherd, celery, broker, etc.postgresql: used in the initialisation of database.
shepherd-celery-beat: run scheduled task, such as repo cleaning and RSA key auto-validation.shepherd-celery-beat: run other background taskshepherd-broker: run message broker.
- Set up
A+main server according to here. - Add lti service in Django admin.
This link only works after you run
A+on the localhost - Username and Password for A+:
root. - The setting should be as same as this screenshot: Consumer Key:
Bleks2FiObiMpd5CConsumer secretuf7OtOjcCclxGZBzzRoll87vledSK8cK3koL6BRCSwelICYIc8eyG56qxDJKtV6l
- Add lti service to menu, go to main page of
A+, then goDef. Course->Edit course-> ClickMenutab -> Add new menu item. Selecttest_flask_ltifromServiceand leave other empty. - Now you can see
test_flask_ltion the left sidebar of the main page.
clonethis repository.- Check if the permission of
/var/run/docker.sockallow other user to accesss, if not, change it withsudo chmod o=rwx /var/run/docker.sock, you needsudoprivilege for this. - Create
volumefor cloned files usingdocker volume create shepherd_clone. - Run server using
docker build --no-cache -t shepherd . && docker run -p 5000:5000 -p 5001:5001 -v /var/run/docker.sock:/var/run/docker.sock -v shepherd_clone:/srv/shepherd/shepherd_test_clone/ shepherd:latest. - Now you can use the system by click
test_flask_ltion the theA+mian page.LTIprotocal allowsA+user log intoShepherddirectly without passwords.
- Create a group and assign yourself into the group.
- Create a new repoistery in the GitLab, push A+ course template (the content of folder
my_new_course) into the new repo. Copy the ssh address of the repo - Create a new course in the system, prefix should be match with the prefix in your group's setting. The repo adress should be the ssh address of the repoistery you created at step 2.
- Go to "Repo" page, copy the auto generated deploy key, set it as the deploy key in your GitLab repo.
- Now, when you push any change to your GitLab repo, the
Shepherdwill start clone and build your course, you can check real-time status and log on the build page.
