Best Way to Package and Deploy Tiled Applications

I want to combine Mojolicious

, perlbrew

and carton

, to deploy my application in a live environment. Access Jenkins , so you can rpm package your app or update your codebase with git pull.

Really looking for deployment strategies that make the process as easy as possible.

Does anyone have any experience using these tools together?

We run the mojo through hypnotoad and can place it behind the apiaxle proxy.

+3


source to share


1 answer


We have a system that automates this; I cannot share this code, but I can summarize.

  • We maintain our projects in git and our deployable components in a separate git repository (one per jenkins job, for example project-dev

    , project-qa

    etc.).
  • We keep our list of dependencies in cpanfile

    and keep them up to date in our checks with carton install

    .
  • After creating the project and changing the dependencies, we are done cpanfile.snapshot

    .
  • Jenkins job checks out the original repo and runs carton install --deployment

    (it actually runs a script in every repo that does this, as well as any other required build tasks for that project).
  • Tests are carried out, etc.
  • If this is the first build of jenkins, it copies the entire tree (including the directory local

    created by the cardboard box, but excluding .git

    ) to a new directory, git init

    it creates a new commit and pushes that to deploy the repo.
  • Otherwise, it checks the last successful build from the deployment repository in the new directory, the rsync

    contents of the build tree (excluding .git

    ) in the deployment tree, does git add --all

    and commits, and pushes it as a new build.


In all cases, the assembly is transferred to the deployment repository as a named branch after the build number. The deployment tool can then query Jenkins for a list of successful builds and deploy the build by running the server git fetch ; git reset --hard origin/$BUILDNUMBER

while checking the deployment repository.

+6


source







All Articles