Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
@yuuichi-fujioka
yuuichi-fujioka / do_nsinit.sh
Last active August 29, 2015 14:03
around nsinit
cd /var/lib/docker/execdriver/native/${CONTAINER_ID}/
nsinit exec /bin/bash
@yuuichi-fujioka
yuuichi-fujioka / juju.yml
Created July 4, 2014 00:50
task for install juju to Ubuntu
---
- name: install python-software-properties
apt: name=python-software-properties
- name: add juju repository
apt_repository: repo='ppa:juju/stable'
- name: install juju
apt: update_cache=yes name=juju-core
@yuuichi-fujioka
yuuichi-fujioka / authorized_key.yml
Created July 3, 2014 07:31
task for adding authorized_key
---
- name: add master key
authorized_key: user=jenkins key="{{ lookup('file', './files/ssh-keys/jenkins_master.pub') }}"
@yuuichi-fujioka
yuuichi-fujioka / jenkins.yml
Created July 3, 2014 04:41
task for installing jenkins to ubuntu
---
- name: add jenkins apt key
apt_key: url=http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key
- name: add jenkins repo
apt_repository: repo='deb http://pkg.jenkins-ci.org/debian binary/'
- name: install jenkins
apt: update_cache=yes name=jenkins
@yuuichi-fujioka
yuuichi-fujioka / java.yml
Created July 3, 2014 04:10
install oracle java7 task to ubuntu
---
- name: install python-software-properties
apt: name=python-software-properties
- name: add java repository
apt_repository: repo='ppa:webupd8team/java'
- name: set debconf selection
debconf: name='oracle-java7-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
@yuuichi-fujioka
yuuichi-fujioka / all_hosts.yaml
Last active August 29, 2015 14:03
deploy /ets/hosts
---
- lineinfile: dest=/etc/hosts regexp='.*{{item}}$' line='{{hostvars[item]['ansible_default_ipv4']['address']}} {{item}}' state=present
with_items: '{{groups.all}}'
@yuuichi-fujioka
yuuichi-fujioka / ans_hosts
Created June 26, 2014 01:54
install salt-master, salt-minion to group. * Ubuntu only
salt-minion-001 ansible_ssh_host=192.168.0.200 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ubuntu/.ssh/id_rsa
salt-minion-002 ansible_ssh_host=192.168.0.201 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ubuntu/.ssh/id_rsa
salt ansible_ssh_host=192.168.0.100 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ubuntu/.ssh/id_rsa
[salt-minion]
salt-minion-[001:002]
[salt-master]
salt
salt-minion-001 ansible_ssh_host=192.168.0.200 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ubuntu/.ssh/id_rsa
salt-minion-002 ansible_ssh_host=192.168.0.201 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ubuntu/.ssh/id_rsa
salt ansible_ssh_host=192.168.0.100 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=/home/ubuntu/.ssh/id_rsa
[salt-minion]
salt-minion-[001:002]
[salt-master]
salt
@yuuichi-fujioka
yuuichi-fujioka / deploy.js
Created June 24, 2014 11:55
config files for deploying mongodb shard in single node
sh.addShard('localhost:30000')
sh.addShard('localhost:30001')
sh.addShard('localhost:30002')
sh.status()
sh.enableSharding("logdb")
sh.shardCollection("logdb.logs" , { uid : 1 })
@yuuichi-fujioka
yuuichi-fujioka / deploy.js
Created June 24, 2014 11:30
config files for deploying mongodb replica set in single node
cfg = {
_id : "rs0",
members : [
{ _id : 0, host : "localhost:30000" },
{ _id : 1, host : "localhost:30001" },
{ _id : 2, host : "localhost:30002" } ] }
rs.initiate(cfg)
db.getMongo().setSlaveOk()