-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from ansistrano/anon_stats
initial work on an anonymous stats feature
- Loading branch information
Showing
4 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,13 @@ Early adopters | |
|
||
If you were an early adopter, you should know we have broken BC by moving from using `ansistrano_custom_tasks_path` to individual and specific files per step. See "Role Variables". **The role displays a warning if the variable is defined and although your old playbooks may still run with no errors, you will see that your code is uploaded but custom tasks are not run.** | ||
|
||
Ansistrano anonymous usage stats | ||
-------------------------------- | ||
|
||
We have recently added an extra optional step in Ansistrano so that we can know how many people are deploying their applications with our project. Unfortunately, Ansible Galaxy does not provide any numbers on usage or downloads so this is one of the only ways we have to measure how many users we really have. | ||
|
||
You can check the code we use to store your anonyomus stats at [the ansistrano.com repo](https://github.com/ansistrano/ansistrano.com) and anyway, if you are not comfortable with this, you will always be able to disable this extra step by setting `ansistrano_allow_anonymous_stats` to false in your playbooks. | ||
|
||
Who is using Ansistrano? | ||
------------------------ | ||
|
||
|
@@ -55,7 +62,7 @@ $ ansible-galaxy install carlosbuenosvinos.ansistrano-deploy carlosbuenosvinos.a | |
Update | ||
------ | ||
|
||
If you want to update the role, you need to pass **--force** parameter when installing. Please, check the following command: | ||
If you want to update the role, you need to pass **--force** parameter when installing. Please, check the following command: | ||
|
||
``` | ||
$ ansible-galaxy install --force carlosbuenosvinos.ansistrano-deploy carlosbuenosvinos.ansistrano-rollback | ||
|
@@ -65,7 +72,7 @@ Features | |
-------- | ||
|
||
* Rollback in seconds (with ansistrano.rollback role) | ||
* Customize your deployment with hooks before and after critical steps | ||
* Customize your deployment with hooks before and after critical steps | ||
* Save disk space keeping a maximum fixed releases in your hosts | ||
* Choose between SCP (push), RSYNC (push), GIT (pull) or S3 (get) deployment strategies | ||
|
||
|
@@ -93,16 +100,17 @@ Role Variables | |
ansistrano_shared_paths: [] # Shared paths to symlink to release dir | ||
ansistrano_keep_releases: 0 # Releases to keep after a new deployment. See "Pruning old releases". | ||
ansistrano_deploy_via: "rsync" # Method used to deliver the code to the server. Options are copy, rsync, git or s3 | ||
|
||
ansistrano_allow_anonymous_stats: yes | ||
|
||
# Variables used in the rsync deployment strategy | ||
ansistrano_rsync_extra_params: "" # Extra parameters to use when deploying with rsync | ||
ansistrano_rsync_extra_params: "" # Extra parameters to use when deploying with rsync | ||
ansistrano_rsync_set_remote_user: yes # See [ansible synchronize module](http://docs.ansible.com/ansible/synchronize_module.html). Options are yes, no. | ||
|
||
# Variables used in the Git deployment strategy | ||
ansistrano_git_repo: [email protected]:USERNAME/REPO.git # Location of the git repository | ||
ansistrano_git_branch: master # What version of the repository to check out. This can be the full 40-character SHA-1 hash, the literal string HEAD, a branch name, or a tag name | ||
ansistrano_git_identity_key_path: "" # If specified this file is copied over and used as the identity key for the git commands, path is relative to the playbook in which it is used | ||
|
||
# Variables used in the S3 deployment strategy | ||
ansistrano_s3_bucket: s3bucket | ||
ansistrano_s3_object: s3object.tgz | ||
|
@@ -191,7 +199,7 @@ Variables you can tune in rollback role are less than in deploy one: | |
ansistrano_deploy_to: "/var/www/my-app" # Base path to deploy to. | ||
ansistrano_version_dir: "releases" # Releases folder name | ||
ansistrano_current_dir: "current" # Softlink name. You should rarely changed it. | ||
# Hooks: custom tasks if you need them | ||
ansistrano_before_symlink_tasks_file: "{{ playbook_dir }}/<your-deployment-config>/my-before-symlink-tasks.yml" | ||
ansistrano_after_symlink_tasks_file: "{{ playbook_dir }}/<your-deployment-config>/my-after-symlink-tasks.yml" | ||
|
@@ -293,7 +301,7 @@ Example Playbook | |
In the folder, `example` you can check an example project that shows how to deploy with Ansistrano. In order to run it, you should: | ||
|
||
``` | ||
$ cd example | ||
$ cd example | ||
$ ansible-playbook -i hosts deploy.yml | ||
``` | ||
|
||
|
@@ -304,7 +312,7 @@ We have added Ansistrano support for other projects we are working on. | |
|
||
* LastWishes: Domain-Driven Design PHP Sample App: https://github.com/dddinphp/last-wishes | ||
|
||
As an example, see the execution log of the LastWishes deployment: | ||
As an example, see the execution log of the LastWishes deployment: | ||
|
||
``` | ||
PLAY [Deploy last wishes app to my server] ************************************ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Sends anonymous stats if the user is ok with it | ||
- name: ANSISTRANO | Send anonymous stats | ||
uri: | ||
url: http://ansistrano.com/deploy | ||
method: POST | ||
timeout: 5 | ||
when: ansistrano_allow_anonymous_stats | ||
run_once: true | ||
ignore_errors: yes | ||
delegate_to: 127.0.0.1 | ||
sudo: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters