Skip to content

Instantly share code, notes, and snippets.

@syang
syang / gist:9053502
Last active August 29, 2015 13:56
test and run askbot locally

(Tried following of https://gist.github.com/ligthyear/5188195, where several errors were experienced. Therefore, write down my manual try and test sequence, which led a successful testing environment.)

Target Platform Tested on

Ubuntu 12.04 Precise, x86-64

You can test your platform with the follow command lines:

$ lsb_release -a
$ uname -a
@syang
syang / gist:9057224
Last active August 29, 2015 13:56
Ansible Notes

(Placeholder for practicing Ansible Playbook Design)

Platform Tested on

Mac OS X 10.9.1

Prerequisites

  1. Having git installed on your system from the following URL
@syang
syang / Vagrantfile_to_share
Created April 3, 2014 01:53
Vagrantfile_to_share for debugging help
# -*- 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.box = "Centos65"
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"
@syang
syang / gist:9960077
Created April 3, 2014 18:30
Vagrant file -- "SATA Controller" white space splitted
# -*- 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.box = "Centos65"
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"
@syang
syang / Vagrantfile
Created April 4, 2014 00:13
Vagrantfile for CentOS 6.5
# -*- 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.box = "Centos65"
#config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"
config.vm.box = "sinergi/centos-65-x64"
@syang
syang / gist:c7b84e97988aaa63b1f9
Created March 19, 2015 22:50
Ansible can't ssh to vagrant boxes
shuoy$ ansible -m ping -i test_inventory.yml all -i test_inventory.yml -vvvv
<192.168.33.11>
<192.168.33.12>
<192.168.33.13>
<192.168.33.11>
<--->
<192.168.33.14>
<192.168.33.13>
<--->
<192.168.33.14>
@syang
syang / gist:3cba2bd7e1b74503f151
Last active August 29, 2015 14:17
error when running ansible with vagrant boxes
huoy$ ansible -m ping masters -i test_inventory.yml -vvvv
<192.168.33.12>
<192.168.33.11>
<192.168.33.12>
<192.168.33.13>
<192.168.33.11>
<192.168.33.13>
<192.168.33.12> IdentityFile=/Users/shuoy/.vagrant.d/insecure_private_key ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=no User=vagrant ControlPath=/Users/shuoy/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey StrictHostKeyChecking=no ControlMaster=auto ControlPersist=60s
<192.168.33.11> IdentityFile=/Users/shuoy/.vagrant.d/insecure_private_key ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=no User=vagrant ControlPath=/Users/shuoy/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey StrictHostKeyChecking=no ControlMaster=auto ControlPersist=60s
<192.168.33.13> IdentityFile=/Users/shuoy/.vagrant.d/insecure_private_key ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=n
- name: run zookeeper server
docker:
docker_api_version: "1.10"
name: Zookeeper
image: "{{ ZOOKEEPER_DOCKER_IMAGE_REPO }}"
#expose: "{{ ZOOKEEPER_LINKED_PORTS }}"
state: running
sudo: yes
-----------------------------
- name: run zookeeper server
command: >
docker.io rm "{{ zookeeper_container_name }}";
docker.io run -d
-p "{{ ZOOKEEPER_PORT1 }}:{{ ZOOKEEPER_PORT1 }}"
-p "{{ ZOOKEEPER_PORT2 }}:{{ ZOOKEEPER_PORT2 }}"
-p "{{ ZOOKEEPER_PORT3 }}:{{ ZOOKEEPER_PORT3 }}"
--name "{{ zookeeper_container_name }}"
"{{ ZOOKEEPER_DOCKER_IMAGE_REPO }}"
@syang
syang / gist:dfc9b4fbc0bf94568d9a
Created March 27, 2015 21:03
zookeeper client error logs
vagrant@host4:/opt/zookeeper/bin$ ./zkCli.sh -server 192.168.33.12:2181
Connecting to 192.168.33.12:2181
2015-03-27 21:01:44,786 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2015-03-27 21:01:44,791 [myid:] - INFO [main:Environment@100] - Client environment:host.name=host4.example.org
2015-03-27 21:01:44,791 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_75
2015-03-27 21:01:44,795 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2015-03-27 21:01:44,795 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
2015-03-27 21:01:44,796 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper/bin/../build/classes:/opt/zookeeper/bin/../build/lib/*.jar:/opt/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper/bin/../lib/netty-3.7.