During the CAS dockerfile build process, it pulls the repository here: https://github.com/psd401/cas4-overlay
This repository is a fork of Unicorn's CAS template: https://github.com/UniconLabs/simple-cas4-overlay-template
Cloning and merging with updated code
$ git clone https://github.com/psd401/cas4-overlay $ cd cas4-overlay $ git remote add upstream https://github.com/UniconLabs/simple-cas4-overlay-template $ git merge upstream/master
There will likely be merge conflicts, especially if you have been tinkering with the repository. Git will return something like the following:
Auto-merging src/main/webapp/WEB-INF/spring-configuration/propertyFileConfigurer.xml CONFLICT (content): Merge conflict in src/main/webapp/WEB-INF/spring-configuration/propertyFileConfigurer.xml Auto-merging pom.xml CONFLICT (content): Merge conflict in pom.xml Removing etc/log4j.xml Auto-merging etc/cas.properties CONFLICT (content): Merge conflict in etc/cas.properties Removing build.xml Automatic merge failed; fix conflicts and then commit the result.
git status to check files that need modification.
On branch master Your branch is up-to-date with 'origin/master'. You have unmerged paths. (fix conflicts and run "git commit") Changes to be committed: modified: .gitignore modified: README.md deleted: build.xml new file: etc/jetty/jetty-https.xml new file: etc/jetty/jetty-ssl.xml new file: etc/jetty/jetty.xml new file: etc/jetty/web.xml deleted: etc/log4j.xml new file: etc/log4j2.xml new file: maven/maven-wrapper.jar new file: maven/maven-wrapper.properties new file: mvnw new file: mvnw.bat Unmerged paths: (use "git add <file>..." to mark resolution) both modified: etc/cas.properties both modified: pom.xml both modified: src/main/webapp/WEB-INF/spring-configuration/propertyFileConfigurer.xml
Use your favorite editor to remove the git conflicts, then:
$ git commit -m "Updated to new CAS version" $ git push
Building the new CAS version and testing
SSH to the Amazon Docker02 server as root. Find the directory, then build a new cas image without caching.
$ cd /root/docker-cas $ docker build --no-cache -t psd/cas:apr2016 .
Replace apr2016 with your current month/year. This ensures we don't loose the last working image. If the build fails with devicemapper errors, just keep trying. Unfortunately building without cache takes FOREVER! If you see devicemapper error after devicemapper error, try without the
--no-cache flag. Keep building until you see
After the build finishes, test your new CAS image. Watch the logs to ensure the server starts.
$ docker run -d -p 5142:8080 -p 5143:8443 --name casdev psd/cas:apr $ docker logs -f casdev
go to https://casdev.psd401.net in your browser. The amazon load balancer is configured to proxy that dns to point to port 5142 of the Docker02 server.
Bash into the dev container
docker exec -i -t casdev /bin/bash
A quick way to rebuild CAS and pull the repository