GithubHelp home page GithubHelp logo

ivandokov / depy Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 3.0 74 KB

Deployment tool - simple and nearly dependency free

License: MIT License

Shell 100.00%
deploy deployment depy hooks server transfer

depy's People

Contributors

ivandokov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

depy's Issues

Shared nested directories

If the shared directory is nested it is not working because it is trying to move nested path to nested path with mv

Rename config directory

Now the config directory is called depy and it bugs the autocomplete of the depy binary. When you type depy tab tab does not autocomplete next arguments because of the collision. A space is required which us annoying.

Incremental deployment

I think the process should be like this:

  • Copy-paste the latest release on the server to be current (not linking as current)
  • Rsync the local files to this new release
  • Link it as current
    ...

Connection interruption during remote work leaves broken unreleased version

When the ssh connection fails mid-deploy it will leave the newly uploaded release unreleased and in a not working state. This is not an issue for the target server as the unfinished release is not linked as current, but it is an issue for the rollback functionality as the list of previous releases will include the broken one.

A good solution for the issue is to create a temporary file with the name of the current release before the extraction of the package and remove the file once it is linked as current release.

Tag releases

Add functionality for tagging releases.
This can be implemented with a simple plain text file on the server.

Cleanup of old releases not deleting correct releases

The recent change of the releases names introduced a but with the cleanup of old releases. The sorting is not using a natural sort but an alphabetical one and release with name 10 is considered older than 9, which is not true. Previously this was not the case as the release names were timestamps with the same length and any kind of sort was correct.

Deployment lock

At the moment multiple deployments are possible.
Introducing deployment lock will guarantee expected behaviour.
It could be based on checking of the existence of a file.

Force deploy must be available since the deploy could fail and the lock file will stay on the server.

Replace zip with .tar.gz

Currently most Linux distributions do not have installed zip by default and this is unnecessary dependency when tar.gz can be created on most/any UNIX system.

Deploy only a specific directory

Add option to deploy a specific directory, not the whole current directory because it will be easier for projects such as Angular where you get a dist directory and this is the only one which you should deploy to the server.

Verbose mode

This mode should print all of the commands/information from the process.

Remove requirement for deployment target

At the moment the code exits with error if the deployment target is missing. This does not give a chance for the pre-hook to generate the target directory. For example when deploying Angular app it has to run ng build prod and create a dist directory which will be deployed.

Combine multiple ssh calls to a single one

Most of the checks on the remote server are done with multiple ssh calls.
They can be combined in a single or fewer calls using Bash Heredoc

ssh host << EOF
  command1
  command2
  if []; then
    command3
  fi
EOF

This will increase the speed of the entire process as less calls will be done over the network.

Freeze releases

Add functionality to mark releases as frozen and ignore them when the cleanup is done.
Preferably #14 should be implemented first, but not mandatory as freezing release should be done by name or tag.

Parallel deployment

Parallel deployment to multiple servers will be really useful feature.
There should be spawned subprocesses which handle each server deployment.

Ignore regex differs for zip and rsync

At the moment we have a single ignores array with regex patterns to exclude directories and files from the release. When creating a full release the files are archived with zip but when incremental release is created the files are transferred with rsync to match the different files only. Both tools use the same ignores array with patterns but their regex parsers are different and the set of files is not the same for both releases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.