Deploy apps from release server
I don’t like when it comes to release my projects on production server.. May be i just don’t have enough experience, nobody taught me how to do this in a right way.
For now i have several repos with scala (on top of spray). I have everything to build and run this projects on my local machine (of course, i develop them). So installed jenkins on my production server in order to sync from git, build and run. It works for now but i don’t like it, because i need to install jenkins on every machine i want to have run my projects. What if i want to show my project to my friend in cafe?
So i’ve come with idea: what if i run tests before building app, make portable build (e.q. with sbt native packager) and save it on remote server “release server”. That server just keeps these ready to be launched apps.
Then i go to production server, run bash script that downloads executables from release server and runs my project on a machine
In future i want to:
- download and run projects inside docker containers.
- keep ready to be served static files for frontend. Run docker
container with nginx and linked volume with static files
I heard about nexus (http://www.sonatype.org/nexus/), that artist use to save their songs, images, so on. I believe there should be open source projects that expose idea like mine
Any help is appreciated!
One Solution collect form web for “Deploy apps from release server”
A common anti-pattern, in my opinion, is to build the software every time you perform a deployment.You are best advised to separate the process of build from the act of deployment by introducing a binary repository manager (you’ve mentioned on such example, nexus).
- Best Practice – Using a Repository Manager
- Binary repository manager
- How can I automatically deploy a war from Nexus to Tomcat?
Only successfully tests builds get pushed to the repository, so you can treat each successful build as a mini-release. A by-product of this is that your production server does not have to have all the build software pre-installed (like, Jenkins, ANT , Maven, etc).
It should be noted that modern repository managers like Nexus and Artifactory now support Docker registries too, so that you use these for deploying docker images too.
A related chef question, a technology where there is no intermediate binary file (like a jar). In this case the software is still “released” by creating a tar distribution stored in the repo.
chef cookbook delivery – chef server vs. artifactory + berkshelf