Skip to content

Instantly share code, notes, and snippets.

View arbabnazar's full-sized avatar
🏠
Working from home

Arbab Nazar arbabnazar

🏠
Working from home
View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# David Lutz's Multi VM Vagrantfile
# inspired from Mark Barger's https://gist.github.com/2404910
boxes = [
{ :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true },
{ :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 },
{ :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1}
]

Installing Jenkins from scratch

This is how I install Jenkins on a bare system. I'm using Ubuntu 12.04 32bit

First Steps

System Config

Always good to update the system packages after a fresh install:

@arbabnazar
arbabnazar / Vagrantfile
Last active August 29, 2015 14:18 — forked from boris/Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "instance0" do |d|
d.vm.box = "ubuntu/trusty64"
d.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
@arbabnazar
arbabnazar / README.md
Last active August 29, 2015 14:22 — forked from dryan/README.md

s3redirect

Authentication

Your AWS credentials can be set in a number of ways:

  1. In a ".boto" file in your home folder. See Boto's documentation for how to create this file.
  2. In the environment variables "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY".
  3. Passed in as arguments. -a or --access-key for the Access Key ID and -s or --access-secret for the Secret Access Key.
@arbabnazar
arbabnazar / gist:9ae40a74b5a64ee634c5
Last active August 29, 2015 14:26 — forked from analytically/gist:1a6bdcfa711474d7ba24
Ubuntu 14.04 AWS EC2 cloud-init (Kernel 3.18+NTP+ixgbevf+Docker+Route53) - to be used with ami-870a2fb7 and newer instance types (eg. t2, m3, c3, r3)
#!/bin/bash
set -e
sudo rm -f /etc/update-motd.d/10-help-text
sudo rm -f /etc/update-motd.d/51-cloudguest
sudo rm -f /etc/update-motd.d/91-release-upgrade
echo -e "[sysinfo]\nexclude_sysinfo_plugins = LandscapeLink" | sudo tee /etc/landscape/client.conf
echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
@arbabnazar
arbabnazar / README.md
Created October 9, 2015 22:56 — forked from simkimsia/README.md
How to setup Ubuntu 14.04 for Python Django

How to setup Ubuntu 14.04 server for Python Django Web App

Assuming you are in root

Make sure the locale is set to UTF-8

locale-gen UTF-8

Create a .bash_profile in the ~/ with the following entries

---
#
# Ansible playbook: Webmin for Ubuntu v201501302302
# Louis T. Getterman IV (@LTGIV)
# www.GotGetLLC.com / www.opensour.cc
#
# Example Usage:
# [user@host ~$] ansible-playbook /etc/ansible/playbooks/ubuntu-webmin.yml --extra-vars 'target=nameFromHostsFile'
#
- hosts: '{{ target }}'
@arbabnazar
arbabnazar / Vagrantfile
Created November 20, 2015 12:27 — forked from muhammad-ammar/Vagrantfile
Vagrantfile for Django 1.8 devstack
Vagrant.require_version ">= 1.6.5"
unless Vagrant.has_plugin?("vagrant-vbguest")
raise "Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`"
end
VAGRANTFILE_API_VERSION = "2"
MEMORY = 4096
CPU_COUNT = 2
@arbabnazar
arbabnazar / gist:8f36938e0adde6feb4f2
Created February 11, 2016 11:30 — forked from garnaat/gist:4111114
Set up simple lifecycle config for a bucket
from boto.s3.lifecycle import Lifecycle, Transition, Rule
import boto
c = boto.connect_s3()
b = c.lookup('mybucket')
t = Transition(days=0, storage_class='GLACIER')
r = Rule('foo rule', 'foo', 'Enabled', 1, t)
l = Lifecycle()
l.append(r)

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins