This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.getQuestionDetails = (event, context, callback) => { | |
var keys = event.pathParameters.questionId.split("-"); | |
console.log("keys: ", keys); | |
var result = {}; | |
// Let first query the question table and retrive the question | |
let params = { | |
TableName: tableName, | |
Key: { | |
category: keys[0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// snippets in index.js (where everything gets started) | |
// .... | |
render( | |
( | |
<BrowserRouter> | |
<div> | |
<Navbar/> | |
<Route exact path="/" component={Feeds}/> | |
<Route path="/repo" component={Repos}/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// index.js (where everything gets started) | |
// ... | |
render( | |
( | |
<BrowserRouter> | |
<Route path="/" component={App}> | |
<IndexRoute component={Feeds} /> | |
<Route path="/repos" component={Repos}/> | |
<Route path="/about" component={About}/> | |
</Route> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shuoy$ ansible-playbook playbook.yml -vvvv | |
PLAY [all] ******************************************************************** | |
GATHERING FACTS *************************************************************** | |
<ec2-54-69-200-11.us-west-2.compute.amazonaws.com> | |
<ec2-54-186-137-176.us-west-2.compute.amazonaws.com> | |
<ec2-54-148-175-129.us-west-2.compute.amazonaws.com> | |
<ec2-54-186-66-105.us-west-2.compute.amazonaws.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 }}" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 | |
----------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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" |
NewerOlder