I'm currently thinking about various "simple" CI like deployment strategies for an internal "shiny server pro" used by only a few developers. I say a few because currently its mostly me and I dont have too much time with setting up and maintaining complicated deployment pipelines. Other developers shouldn't have the need to acces the server directly though while I dont want to deal with shiny apps thrown into my direction.
What I have:
- Shiny Server Pro
- Projects in central GIT repository (github) with packrat for dependency management
- Jenkins master and an additional slave
Currently any code change introduced into github will be downloaded on a jenkins slave (independent from shiny server) and tested with testhat. I still bundle (with packrat) projects manually though as packrat has some issues with Jenkins folders that makes it impossible to use. The bundle I then put on the server (manually) and run restore to install dependencies.
Probably I would like to skip the bundle process completely by making the Shiny Server a Jenkins slave as well and deplyoing the code directly from github to the server.
- Code commit to github
- Jenkins Slave gets new code and runs packrat restore + testhat
- If 2 succesfull, the Shiny Server Jenkins Slave will get the code from github again, puts it somwhere as defined and runs packrat restore
I would like to separate 2 and 3 to not put too much stress on the shiny server. If needed, we can make a 3a and introduce some kind of staging area to test apps in the productive environment first.
Additionally, as the Shiny Server will be a Jenkins Slave we can automate some (non-root) steps from code as well... e.g. updating the shiny-server.conf from github and such.
I know there are some other sophisticated setups like docker or with Rstudio connect but I think the first case is too complex for now and the latter locks me in too much in some very specific environment.
What do you think? Should the Shiny Server = Jenkins Slave be avoided? Should the Server have direct acces to GIT?
What other ways are there?