Help! Download your session as a git repo in a tgz file?

An upgrade to the way cyber-dojo stores its backend data is now live. It now uses a git repo for each individual session. This is partly so I can provide a [download] button which will give you a tgz file of your current cyber-dojo session, in git format, with a git commit for each test event. This will allow people to upload their sessions to github for example. However, I cannot get the download working though the nginx reverse proxy. Can anyone help, or know someone who could?

If you'd like to set up your own env and try to help you'll need docker installed:
  • get the saver repo
  • its README.md file tells you how to build an image and run the tests
  • when you build an image (after editing source) it finishes by printing commit-sha/image-tag information, eg
    echo CYBER_DOJO_SAVER_SHA=4a0ac7d08196d5c19eb2467e84a0e13f5c3931c4
    echo CYBER_DOJO_SAVER_TAG=4a0ac7d    
        
  • get the nginx repo
  • this has a build_test_publish.sh script which rebuilds the nginx image
  • when you run it (after editing nginx source) it finishes by printing commit-sha/image-tag information, eg
    echo CYBER_DOJO_NGINX_SHA=5c55ca0c3b88d9ba3917014ac5be6442416f762d
    echo CYBER_DOJO_NGINX_TAG=5c55ca0
        
  • get the web repo
  • its demo.sh script will bring up all services; you'll then have a cyber-dojo running on localhost
  • it uses sh/echo_versioner_env_vars.sh
  • you need to add the echo statements from a saver rebuild after each saver commit
  • you need to add the echo statements from a nginx rebuild after each nginx commit
  • for example:
    echo_versioner_env_vars()
    {
    	docker run --rm cyberdojo/versioner:latest
    	
    	echo CYBER_DOJO_WEB_SHA="$(image_sha)"
    	echo CYBER_DOJO_WEB_TAG="$(image_tag)"
        
    	#...
    	echo CYBER_DOJO_SAVER_SHA=4a0ac7d08196d5c19eb2467e84a0e13f5c3931c4
    	echo CYBER_DOJO_SAVER_TAG=4a0ac7d    
    
    	echo CYBER_DOJO_NGINX_SHA=5c55ca0c3b88d9ba3917014ac5be6442416f762d
    	echo CYBER_DOJO_NGINX_TAG=5c55ca0
    }
        
Thanks

No comments:

Post a Comment