GithubHelp home page GithubHelp logo

ansible-project_deploy's Issues

ansible galaxy page not found

Hi,
I don't know, how this can happen, but even though I can find the role on ansible galaxy (it shows up in the list), when I try to proceed to the role page, I'm getting "page not found".

Ansible warnings

Ansible geeft veel van de volgende warnings:
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ X }}

accept_hostkey=yes

Hi,

are you open to add the accept_hostkey option to the git task?
e.g.

git: "repo={{ project_git_repo }} dest={{ project_source_path }} version={{ project_version }} accept_hostkey={{ project_git_accept_hostkey }}"

Copy vendor dir to speed up composer install

Hi there,

first of all, great role. Helps me a ton.

I would like to be able to speed up my composer install by copying the vendor dir from the old release (like: http://capifony.org/cookbook/speeding-up-deploy.html).

I was not able to put the cp command in project_pre_build_commands because this will break on the first deployment when current/vendor is not available yet.

Currently I am patching the role with the following tasks:

- name: Check if vendor dir exists
  stat: path={{ project_root }}/current/vendor
  register: check_vendor_path

- name: Copy vendor dir if exists to speed up composer
  command: /bin/cp -rp {{ project_root }}/current/vendor {{ deploy_helper.new_release_path }}
  when: check_vendor_path.stat.exists

It speeds up the deployment process quite drastically.

What do you think? Worth a PR? Any other solutions.

Cheers

Protect deploy state=cleanup against failed deploys

Just an idea, currently the cleanup part is pretty rude:

releases = os.listdir(facts['releases_path'])
releases.sort(reverse=True)
obsoletes = releases[deploy.keep_releases:]
for obsolete in obsoletes:
    changes += deploy.delete_path(os.path.join(facts['releases_path'],obsolete))

If you have keep_releases amount of failures, the next time you deploy the current release will be removed. I have two suggestions:

  1. Basic: check if obsolete is symlinked by current. If so: do not remove this directory and quit with a failure message
  2. Advanced: check to what directory the current is symlinked and then remove only the directories which are "older" than the linked directory. Possibly also remove all directories "later" than the linked dir, as these are probably failed builds.

I can do a little python so eventually solution 1 is feasible to implement for me. No 2 is little more complex I need some more time to implement, if I am the one who will do the work ;)

Ansible warnings in 2.3.0

Hi Guys,

It seems latest ansible (since 2.3?) has changed the requirements for the when parameters:

[WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ project_copy_previous_composer_vendors }}

Tested on 3.2.0 of f500.project_deploy

Not sure if the change for this would be backwards compatible?

/shared/system is a "system_path"?

What is the reason to automatically create a system directory in the /shared folder? It isn't used in the role anymore, is it a left-over of a development version?

Rollback functionality

Hi there,

Has anyone found an easy way to do a rollback? My problem is that timestamps are different from server to server , so it's impossible to just change the -current- symlink.

Capistrano for example is creating the same timestamp on all servers.

Current example:

lrwxrwxrwx  1 root root   53 Feb  5 02:44 current -> /.../releases/20150205024358
lrwxrwxrwx  1 root root   53 Feb  5 02:44 current -> /.../releases/20150205024359
lrwxrwxrwx  1 root root   53 Feb  5 02:44 current -> /.../releases/20150205024358

Is anyone interested in that functionality?

Move to package manager's modules?

Hi Ramon :)

Just checking again to update with composer/npm/bower: there are modules in Ansible for composer and npm. This changes the composer/npm tasks to these very simple ones:

- name: Do composer install
  composer: command=install working_dir={{ deploy.new_release_path }}
  environment: project_environment
  when: project_has_composer

- name: Do npm install
  npm: path={{ deploy.new_release_path }} production=yes
  environment: project_environment
  when: project_has_npm

These modules are maintained by the complete Ansible community, so it is easier to keep up to date with new changes in composer/npm or their respective modules. The disadvantage now is you don't have the ease of use to tune the command parameters or its binary location. For feature flags you have several options, so you have to copy/paste them over into your defaults + task yaml, but e.g. it is not possible (yet) to change the binary location of composer. Unfortunately, there is no such module for bower yet.

Change the task or not?

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.