Updates from April, 2015 Toggle Comment Threads | Keyboard Shortcuts

  • gio 11:30 pm on April 21, 2015 Permalink  

    CReP: IA dev workflow using git-svn 

    • WARNING:: if you are working on vm-home to avoid out-of-memory problems do:

      ulimit -v unlimited
    • Pull the last commits to the local master branch with:

      git checkout master
      git svn rebase
    • create a working branch

      git checkout -b devBranch
    • use this branch to develop your feature and fix the bugs
      and commit your work to the local git repository with

      git commit -m 'bla bla bla bla'
    • create a test branch like the master

      git checkout master
      git svn rebase
      git checkout -b sandMaster

      and merge all the commits from the devBranch branch in an atomic commit (using –squash)

      git merge --squash devBranch

      check what is going on

      git status
      git diff --staged

      if everything looks ok, commit it

      git commit
    • Now you can check if this code is working correctly
      to be sure that the commit to the SVN will work correctly…
      If everything is fine…
    • …let’s do the same commit to the master branch

      git checkout master
      git merge --squash devBranch
      git status
      git diff --staged
      git commit
      git svn rebase
    • Let’s do a dry-run and check the patches

      git svn dcommit --dry-run
      git diff-tree 25e084b618580d69f5b57d8f9c1ca37045cf65dd~1 25e084b618580d69f5b57d8f9c1ca37045cf65dd -p
    • If everything is correct it’s time to commit to the SVN remote repo
    • git svn dcommit
    • You can push the code using the pi interface
  • gio 9:29 pm on April 14, 2015 Permalink
    Tags: ,   

    CReP: run common code from your petabox tree 

    to be sure that the Cluster RePublisher is running the code on your petabox tree,
    be sure these two php variables are set:

    $_SERVER['PETABOX_HOME'] = '/home/giovanni/petabox';
    $_SERVER['DOCUMENT_ROOT'] = $_SERVER['PETABOX_HOME'] . '/www/datanode/';
    • gio 11:55 pm on May 17, 2016 Permalink

      In /etc/hosts on local machine, map `xxx-gio.archive.org` to datanode’s IP (and that’s a literal `xxx`). Then, thanks to config in `petabox/etc/nginx/archive.conf` which lives on every data node, it should use the code in your vm-home1 home directory.

  • gio 10:21 pm on March 30, 2015 Permalink  

    GitLab for the Internet Archive 

    Tips for admins:

    :: Install and configure GitLab.

    :: How to convert a SVN repository to GIT.

    :: How to add users in bulk on GitLab.

    Cookbooks for users:

    :: Pro Git. a good book with everything you need to know to use Git.

    :: Git – SVN. a crash course to switch from svn to git.

    :: Become a Git guru. a good tutorial.

  • gio 6:29 pm on March 26, 2015 Permalink
    Tags: , howto, petabox   

    Petabox: git-svn quick how-to 

    How to commit:

    • rebase: git svn rebase
    • edit files vim foo.ff
    • git add foo.ff
    • git commit -m 'note about the commit'
    • git svn rebase
    • if the rebase fails because of memory problems: ulimit -v unlimited and rebase again
    • dry commit git svn dcommit --dry-run
    • check the patch git diff-tree ea56092a94b7b0266cdfbb08f69245d7761bba09~1 ea56092a94b7b0266cdfbb08f69245d7761bba09 -p
    • git svn dcommit
  • gio 11:33 pm on March 23, 2015 Permalink  

    GitLab: Install and configure 

    Installing and configure a gitlab server on vm-gittest.us.archive.org

    For the basic requirements please check the document

    Install and configure the necessary dependencies:

    giovanni@vm-gittest:~$ sudo apt-get install openssh-server
    giovanni@vm-gittest:~$ sudo apt-get install postfix

    Download and install debian package for Ubuntu 14.04

    giovanni@vm-gittest:~$ wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.9.0-omnibus.2-1_amd64.deb
    giovanni@vm-gittest:~$ sudo dpkg -i gitlab_7.9.0-omnibus.2-1_amd64.deb

    We want to run CPU_NUM+1 uinicorn workers editing the file /etc/gitlab/gitlab.rb adding the lines:

    unicorn['worker_timeout'] = 60
    unicorn['worker_processes'] = 3

    Re-configure and start GitLab

    giovanni@vm-gittest:~$ sudo gitlab-ctl reconfigure

    Start GitLab

    giovanni@vm-gittest:~$ sudo gitlab-ctl start

    The default root credentials are:

    Username: root 
    Password: 5iveL!fe

    The servers require some minutes to be usable, before you will receive a 502 status code.

    To make sure the UI is reachable only within the IA network we have to edit the file
    adding the lines

    server {
      deny   all;

    The git test vm is reachable at: http://vm-gittest.us.archive.org/
    (the admin/root password is the usual one)

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc