Git Product home page Git Product logo

opendaylight-repo's Introduction

opendaylight-repo

http://OpenDaylight.org sources managed via Repo (from Android), see Using repo command reference.

Please Star and Watch this project on GitHub if it's of interest to you! Contributions most welcome.

How to use

Install the Repo tool doing something like this:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://raw.githubusercontent.com/vorburger/opendaylight-repo/master/repo > ~/bin/repo
chmod a+x ~/bin/repo

Now do this to have it git clone all of ODL's projects (in 4 parallel download threads):

repo init --config-name -u https://github.com/vorburger/opendaylight-repo
repo sync

repo start can now create branches. By default it only affects the git repo of the current project, but by being in the root directory and using * we can branch all of them:

repo start your-next-cool-cross-project-thing *

repo diff and repo status check changes across all projects' repos, not just the repo of the current working directory:

repo status
repo diff

repo sync fetches and rebases, again on all projects:

repo sync

Before we can push to Gerrit, we still git commit, as always, using repo forall from the root directory like this (or with --amend):

repo forall * -c git commit -asm "Great new stuff"

repo upload will push local changes to Gerrit:

repo upload

NB: If you run repo upload without any arguments, it will search all the projects for changes to upload. So perhaps not something you want to run on your existing ODL git clones? ;-) Not a problem if you used repo init & sync on a fresh location, of course.

Why?

As of the start of 2018, it is a huge PITA to drive change accross the many individual Git repos that comprise ODL. Git sobmodules as used in ODL's releng-autorelease don't really adequately address the challenge.

Series of changes (pseudo) "linked" through Gerrit topics, and listed on Wiki pages for Big Changes are a (very) Poor Man's solution to this problem.

Isolation of projects with separate lifecycle and releases sounds like a good idea at first, but then leads to a really slow rate of adopting change (worst for the "lowest" layered projects; not a problem in "top" projects), and much pain when you bump version to switch over to new dependencies.

A huge single git repo would be neat, but is "organizationally" challenging... but who knows, maybe we'll get (back) there eventually? ;) Part of the more social than technical problem could probably be solved, e.g. through the Gerrit OWNERS Plugin. In the short term, using this tool gives you "single Git repo like" experience.

Read these if you need more background why working like this is a Great Idea:

What else & more...

The ./repo Python script included here is the unmodified one obtained from Android. This script is a "bootstrap" kinda thing; upon the initial repo init it will clone more of itself to .repo/repo/repo, and then delegate to that.

Check out Troubleshooting network issues from Android's doc, if you have any.

opendaylight-eclipse-setup is an unrelated project you may like as well?

How to build full ODL autorelease

This isn't really directly related to Repo, but useful in this context... ;-)

sudo dnf install xmlstarlet

./releng/autorelease/scripts/fix-relativepaths.sh

rm -rf ~/.m2/repository/org/opendaylight/

mvn -Pq -T 1.5C -s ~/.m2/settings-odl-no-snapshot.xml

The settings-odl-no-snapshot.xml is a copy of the ODL settings.xml (cp ~/.m2/settings.xml ~/.m2/settings-odl-no-snapshot.xml) with line 78 for <activeProfile>opendaylight-snapshots</activeProfile> removed.

The Maven -am option (AKA --also-make) makes it possible to only build "up to" a certain artifact, but also build all projects required by -pl (without pulling from Nexus), using:

mvn -Pq -T 1.5C -s ~/.m2/settings-odl-no-snapshot.xml -am -pl controller/opendaylight/archetypes/opendaylight-startup/ clean install

The Maven option -amd (AKA --also-make-dependents) is a bit like opposite and also build projects that depend on the -pl project; that is useful to determine cross project build and test impacts, and in this case you do have/want to pull from Nexus (unless you combine it with --also-make...) so for example:

mvn -Pq -DskipTests=false -Djacoco.skip=false -Dskip.karaf.featureTest -amd -pl infrautils/testutils clean install

The -T 1.5C option for parallel multi-threaded Maven building seems to be OK with -Pq (TBC) but causes havoc if you do not use -Pq and do run ODL tests, which often are reliably concurrency safe.

How to build ODL on a fresh CentOS

This isn't really directly related to Repo, but documented here anyway... ;-)

sudo yum install -y java-1.8.0-openjdk-devel git zip unzip wget nano epel-release xmlstarlet
curl -s "https://get.sdkman.io" | bash
logout & login (or source "$HOME/.sdkman/bin/sdkman-init.sh")
sdk install maven 3.5.2
wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
echo 'MAVEN_OPTS="-Xmx4096m -Xverify:none"' >>~/.bashrc
logout & login (or export MAVEN_OPTS="-Xmx4096m -Xverify:none")

Now you can build, e.g. using as above - or also just a single ODL project.

opendaylight-repo's People

Contributors

vorburger avatar skitt avatar

Stargazers

 avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.