Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/docker branch tagging #52

Merged
merged 54 commits into from Mar 21, 2023

Conversation

akoerner1
Copy link
Contributor

@akoerner1 akoerner1 commented Dec 1, 2022

This PR contains several major changes to the build system.

  1. File system path normalization working towards the goal of enabling catkin build to also work the e.g., catkin build .
  • All paths referenced within the entire project need to be relative and identical weather inside a docker context or outside a docker context.
  • This is specifically important for CMake related paths
  • The basic structure is package/package with the first level containing docker build or runtime context when necessary.
  1. Due to concurrency issues with the catkin workspace the "create_catkin_workspace" target/recipe was split into two targets namely, initialize_catkin_workspace and create_catkin_workspace
  • The distinction between both targets is that the initialize_catkin_workspace target only calls the catkin workspace creation script if there is not already a workspace. This speeds up subsequent runs of adore-cli
  1. Splitting each module's makefiles into two separate files. As an example in adore_if_ros there is a Makefile and adore_if_ros.mk. All modules follow this pattern.
  • The Makefile within each module acts as an internal interface e.g. you can navigate to the module and run any make target/recipe directly on the module
  • The .mk file with the same name as the module itself, adore_if_ros.mk for example, acts as the external interface to the module. This file can be imported into and downstream project to gain access to relevant module interfaces such as build and clean et cetera.
  • To consume a given module you include it into downstream Makefiles:
...
include adore_if_ros/adore_if_ros.mk
...
test_target: build_adore_if_ros
  1. Most modules inherit the make_gadgets(git) project which means 'make help' works on every module.
  • Every module provided the 'help' target
    image
  • every module provides the 'image_&ltmodule name&gt' target which provides the docker repository and tag that was used when running docker build
    image
  1. The major feature of this PR is Docker branch tagging
  • Each docker context build by a given project uses a docker normalized (the character set permitted in git branches is larger then what is permitted in git hashes) git hash or branch as the docker tag as shown in the attached figure:
    image
    -Any downstream docker context that needs to consume a given image can then provide the tag as a build argument as follows:
    image
  • In the case of adore_if_ros this variable is provided by adore_if_ros.mk
  1. Added a help command for the adore cli:
    image
  2. Simplified getting started. To get a running system now you can simply clone the repository and run the cli:
git clone --recurse-submodules -j8 git@github.com:eclipse/adore.git 
cd adore && make cli
  • The whole system will be built, the runtime contexts will be built as well as the adore-cli context
  1. adore-cli user within the adore-cli context can run sudo for apt, apt-get and aptitude.

This was referenced Dec 1, 2022
- "ROS_HOME=${ADORE_SOURCE_DIRECTORY}/.log/.ros"
- "ADORE_SOURCE_DIRECTORY=${ADORE_SOURCE_DIRECTORY}"
- "HISTFILE=${ADORE_SOURCE_DIRECTORY}/.zsh_history"
- "ROS_MASTER_URI=http://127.0.0.1:11311"
Copy link
Contributor Author

@akoerner1 akoerner1 Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be modified to change the ross master to another host. I recommend somehting such as:

      - ROS_MASTER_HOST=${ROS_MASTER_HOST:-127.0.0.1}
      - "ROS_MASTER_URI=http://${ROS_MASTER_HOST}:11311"
      - "ROS_HOSTNAME=${ROS_MASTER_HOST}"

Then the ros master host can be arbitrarily set as an environment variable or it defaults to 127.0.0.1 during docker compose run aka adore-cli.

@tlobig tlobig merged commit 81560d8 into eclipse:dev_v0.3.2_bs Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants