/categories/devops/index.xml

Add Github Issue Number to Git Commit Message

Add Github Issue Number to Git Commit Message

I have been working on a project with on Github and we are using Waffle.io to organize our issues on an agile board. One bad thing about Github is that it not always apparent what issue a commit resolved. To add context to commits I have begun appending the issue number to commit message. When viewing the commit in web interface of Github, it will automatically link to the issue. To accomplish this, I use commit that take the form of "This is my first commit [issue #123]". Obviously, this process can be automated.

Read More

Ansible [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax

Ansible [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax

If you recently upgraded Ansible and you are getting an error like:

[DEPRECATION WARNING]: Using bare variables is deprecated. Update your
playbooks so that the environment value uses the full variable syntax
('{{rbenv_plugins}}').
This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.

Read More

Ruby on Rails CORS setup for Heroku with Passenger 5.0.28

Ruby on Rails CORS setup for Heroku with Passenger 5.0.28

If you are using cloudfront with Heroku, chances are you will encounter some problems if you are using something like font-awesome. I won’t go into the details of how to setup cloudfont, but your heroku passenger should have the following. First, read the Passenger Documentation for Nginx configuration template.

These are the correct steps:

1. Copy the default ngnix config

Do this in the root directory of your Rails application.

cp $(passenger-config about resourcesdir)/templates/standalone/config.erb config/passenger_config.erb

Read More

My Heroku Cheatsheet

My Heroku Cheatsheet

You can find all this in the Heroku docs, I’m just filtering out the stuff I use very frequently. I will keep updating this so check back later. ALl of my examples include the -a myapp at the end because 95% of my apps have both staging and production environments so I have gotten in the habit of using this option.

Heroku Postgres DB

Download current database:

heroku pgbackups:capture --expire
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d myapp_development latest.dump

Read More