Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Itamar Hassin ihassin

🏠
Working from home
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ihassin on github.
  • I am itamar (https://keybase.io/itamar) on keybase.
  • I have a public key ASDrmzdPARW675_0HGog-jOPjeSuvIeG39Fl9XVs54PNAAo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am ihassin on github.
  • I am itamarhassin (https://keybase.io/itamarhassin) on keybase.
  • I have a public key whose fingerprint is 6ADD D726 34EC B42A 5F5C 58D9 4F1E 1B5A F429 72E5

To claim this, I am signing this object:

@ihassin
ihassin / .my.cnf
Created Mar 6, 2014
Relevant section of the mySQL .my.cnf file
View .my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
user=root
password={{mysql_root_password}}
@ihassin
ihassin / production.rb
Created Dec 24, 2013
config/deploy/production.rb - Capistrano file to deploy
View production.rb
set :stage, :production
# Simple Role Syntax
# ==================
# Supports bulk-adding hosts to roles, the primary
# server in each group is considered to be the first
# unless any hosts have the primary property set.
role :app, %w{deploy@33.33.33.33}
role :web, %w{deploy@33.33.33.33}
role :db, %w{deploy@33.33.33.33}
@ihassin
ihassin / dbserver.yml
Created Dec 24, 2013
Ansible script to install mySQL
View dbserver.yml
- hosts: webservers
user: vagrant
sudo: true
vars_files:
- vars.yml
tasks:
- name: Install MySQL
action: apt pkg=$item state=installed
with_items:
@ihassin
ihassin / deploy.rb
Created Dec 24, 2013
Capistrano 3 script to deploy the app
View deploy.rb
set :application, '<APP_NAME>'
set :repo_url, "<git@PATH/REPO.git>"
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
set :deploy_to, "/home/deploy/rails/<APP_NAME>"
# set :scm, :git
set :format, :pretty
set :log_level, :debug
@ihassin
ihassin / project.yml
Last active Dec 31, 2015
Ansible project.yml playbook for blog post
View project.yml
- hosts: webservers
user: deploy
vars_files:
- vars.yml
tasks:
- name: Make directory for database.yml
shell: mkdir -p {{home_dir}}/rails/narui/shared/config
- name: Copy database.yml
View virtual_ruby.yml
- hosts: webservers
user: vagrant
vars_files:
- vars.yml
tasks:
- name: Download ruby
get_url: "url={{ruby_url}} dest={{ruby_dir}}/ruby-{{ project_ruby }}.tar"
- name: Extract ruby
@ihassin
ihassin / webserver.yml
Last active Dec 31, 2015
Ansible webserver.yml playbook used in the blog post
View webserver.yml
- hosts: webservers
user: vagrant
sudo: True
vars_files:
- vars.yml
vars:
deploy: deploy
home_dir: /home/deploy
tasks:
@ihassin
ihassin / vars.yml
Last active Dec 31, 2015
Vars.yml used in the blog post
View vars.yml
---
app_name: <APP_NAME>
# created with:
# python -c 'import crypt; print crypt.crypt("<PASS>", "SomeSaltedValue")'
password: SosJkZOQixRak
mysql_root_password: <PASS>
home_dir: "/home/deploy"
repo: <PATH_TO_REPO>
project_ruby: 2.0.0-p353
You can’t perform that action at this time.