What have you found for these years?


roodo-rc (3)

Let's get back to work now...

`roodo-rc' should control all resources for
all other projects, a central resource control.
Here we say resource means a config, an image,
an installing script, and all other things do not
directly relate to the containing project.

The structure of this repository should be
something like the following:
(Demoed projects are `cas' and `photo')

| +-authorized_keys # Contains all public keys of devs
| +-id_rsa
| +-id_rsa.pub
| +-known_hosts # github...
| +-cas/
| | +-remote_install.sh
| | +-remote_update.sh
| +-photo/
| | +-remote_install.sh
| | +-remote_update.sh
| +-install.sh
| +-start.sh
| +-update.sh
| +-cas/
| | +-cas.yaml
| | +-nginx.conf
| +-photo/
| | +-database.yml
| | +-facebooker.yml
| | +-mogilefs.yaml
| | +-nginx.conf
| | +-stomp.yaml
| | +-style.yaml
| +-memcache.yaml
| +-mime.types

And the containing project's structure should be
something like the following:

To build a fresh service project,
get a fresh cloned `roodo-rc' repository first.
Your developing computer should consist of following:
| +-.gitconfig
| +-.ssh/
| | +-id_rsa
| | +-id_rsa.pub
| | +-known_hosts
| +-project/
| +-cas/*
| +-photo/*
| +-roodo-rc/*

Let's suppose you are creating a project named
`warm_fuzzy_thing', you have to do the following:
~> cd ~/project
~/project> mkdir warm_fuzzy_thing
~/project> cd warm_fuzzy_thing
~/p/warm_fuzzy_thing> git init

~/p/w> git submodule add ../roodo-rc roodo-rc
# Note: Perhaps you have to fix repo path yourself
# by editing .gitmodules' path to file://../roodo-rc
# I don't know why git cannot work with this properly

~/p/w> git submodule init
~/p/w> git submodule update
~/p/w> cd roodo-rc
~/p/w/r> git checkout -b your_testing_config_branch \
--track your_testing_config_branch
~/p/w/r> cd ..

~/p/w> ./roodo-rc/install.rb warm_fuzzy_thing
# This should create all symbolic links for you
# according to your project name. For instance:
# ~/p/w> ln -s roodo-rc/bin/warm_fuzzy_thing bin
# ~/p/w> ln -s roodo-rc/.gemrc .gemrc
# ~/p/w> ln -s roodo-rc/.vimrc .vimrc
# and specific config file e.g. database.yml
# and cp roodo-rc/.ssh/* to .ssh/*
# This is because ssh won't work for symbolic link.
# ~/p/w> chmod 700 ssh
# ~/p/w> chmod 600 ssh/id_rsa
# Since git lacking file modes other than 644/755
~/p/w> git add .
~/p/w> git status # check if anything is ok
~/p/w> git commit

Whenever `roodo-rc' updated, you would do the following:
~/p/w> cd roodo-rc
~/p/w/roodo-rc> git pull
~/p/w/roodo-rc> cd ..
~/p/w> ./roodo-rc/install.rb # re-install again
~/p/w> git add . # update submodule and others
~/p/w> git status # check if anything is ok
~/p/w> git commit

`roodo-rc' should be maintained by release manager,
with the help with all other project developers.
As a result, application developers shall concentrate
on their projects and forget about deployment and
any releasing and versioning issue. And now we
could only use `master' branch and `stable' branches
only, without thinking about testing branch.
Create testing branch config in roodo-rc instead.
You don't have to share your local `roodo-rc'
testing branch too.

These should make releasing smoother and less-buggy,
and more controllable and manageable.

Comments welcome...

I do really hate the mess currently we have.
It is growing out of control... annoying, really.

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.

All texts are licensed under CC Attribution 3.0