Monday, September 26, 2011

how to push your couchapps to your couchDB on your aws ec3 server.

$ git clone git://github.com/couchone/pages.git
Initialized empty Git repository in /home/ming/couchapp/pages/.git/
remote: Counting objects: 888, done.
remote: Compressing objects: 100% (426/426), done.
remote: Total 888 (delta 375), reused 852 (delta 352)
Receiving objects: 100% (888/888), 144.51 KiB | 57 KiB/s, done.
Resolving deltas: 100% (375/375), done.
$ cd pages
$ couchapp init
$ couchapp push . http://ming:xxxxxxxx@url0.info:59840/pages
2011-09-26 20:54:16 [INFO] Visit your CouchApp here:
http://url0.info:59840/pages/_design/pages/_rewrite/page/index

Sunday, September 25, 2011

Hi, if you are not familiar to couchDB, checkout this web site for simple tutorial (http://couchtim.github.com/clubhouse/)

if you prefer to play around couchDB on couchOne, get your instance clouding couchDB from couchBase, go http://www.couchbase.com/downloads

Assume you already install your own couchDB on your EC2. let's issue some commands from your command lines.

1. Login as admin for configuration the couchdb you had insatlled, you may get some errors because your are not admin yet.

$ curl http://url0.info:59840/_config/admins
{"error":"unauthorized","reason":"You are not a server admin."}

Everything is Javascript and JSON, includes the error message.

Tuesday, September 20, 2011

how to make a git server on AWS CE2

On your aws ec2 server:

1. make an user account called "git"
2. $ su git
3. $ cd /home/git
4. $ mkdir test.git
5. $ cd test.git
6. $ git --bare init Initialized empty Git repository in /home/git/test.git/
7. $ pwd /home/git/test.git

then back to local site.

1. $ mkdir test
2. $ cd test
3. $ touch me
4. $ ls me
5. $ git init Initialized empty Git repository in /tmp3/test/.git/
6. $ git add .
7. $ git commit -m 'init' [master (root-commit) f16acd9] init Committer: ming Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly:
git config --global user.name "Your Name" git config --global user.email you@example.com
If the identity used for this commit is wrong, you can fix it with:
git commit --amend --author='Your Name '
0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 me
8. $ git log commit f16acd95a84465a9cbf7ed7f9acacb6362724a30 Author: ming Date: Tue Sep 20 23:06:07 2011 +0800
init
9. $ git branch -a * master
10. git remote add origin git@url0.info:test.git
11. $ git push origin master Counting objects: 3, done. Writing objects: 100% (3/3), 197 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To git@url0.info:test.git * [new branch] master -> master
12. $ git branch -a * master remotes/origin/master
13. $ git status # On branch master nothing to commit (working directory clean)
14. $ git pull origin master From url0.info:test * branch master -> FETCH_HEAD Already up-to-date.

Remarks: make sure you can ssh the server by the git account before hand.

how to trace and debug your git push and pull

before you get pull or push, you can set GIT_TRACE to true as follows, $ GIT_TRACE=true $ export GIT_TRACE