Skip to content

add concourse worker --use-houdini - #3153

Merged
vito merged 1 commit into
masterfrom
houdini-linux
Feb 5, 2019
Merged

vito merged 1 commit into
masterfrom
houdini-linux

Conversation

@vito

@vito vito commented Jan 27, 2019 •

Copy link
Copy Markdown
Contributor

This is primarily so I can run Concourse on my Pixelbook with the ChromeOS Linux stuff.

I updated Houdini to support creating containers with raw:// rootfses - it's kinda neat! With this I can run real pipelines, so long as nothing needs privileged containers. Resources work, and tasks work so long as they use the registry-image resource for fetching the image (or any other unprivileged resource).

To use this on a Pixelbook, do the following:

  • Set CONCOURSE_GARDEN_USE_HOUDINI=true to switch to the Houdini backend.
  • Set CONCOURSE_BAGGAGECLAIM_DISABLE_USER_NAMESPACES=true - Houdini doesn't support user namespaces (I couldn't get them to work on my Pixelbook), so this needs to be disabled so BaggageClaim doesn't do filesystem chowning.
  • Unset privileged: true - it straight up doesn't work and the container will fail to create. (If this worked I wouldn't have had to do all this.)
  • Set cap_add: [SYS_ADMIN] so that Houdini can create bind-mounts.
  • Unset CONCOURSE_BAGGAGECLAIM_DRIVER - ChromeOS Linux uses btrfs, so it'll actually nest cleanly without the need for any loopbacks, and overlay actually won't work.

@cirocosta cirocosta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks pretty cool! 👍 👍

I just left a comment there in houdini (vito/houdini@0c1535a#r32080775) regarding how a task that specifies an executable under run.path might end up not working in some cases

Comment thread bin/cmd/concourse/worker_nonlinux.go Resolved
Comment thread bin/cmd/concourse/worker_nonlinux.go Resolved
Comment thread bin/cmd/concourse/worker_nonlinux.go Resolved

@topherbullock topherbullock left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this idea! Could help with integration testing runtime features.

Added a suggestion for the missing err definition as an excuse to try it out 😄

@vito

vito commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

@cirocosta Good catch - I'll work on a fix in Houdini and update this PR.

@vito

vito commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

Bumped to a version of Houdini that fixes the issue @cirocosta found - tested manually with the following pipeline:

resources:
- name: booklit
  type: git
  source:
    uri: https://github.com/vito/booklit

- name: 3s
  type: time
  source: {interval: 3s}

jobs:
- name: unit
  plan:
  - get: booklit
    trigger: true
  - get: 3s
  - task: test
    file: booklit/ci/test.yml

- name: demo-busybox
  plan:
  - task: demo
    config:
      platform: linux

      image_resource:
        type: registry-image
        source: {repository: busybox}

      run:
        path: find
        args: [/bin]

This demonstrates absolute paths working (/opt/resource/check etc.), relative paths working (via the booklit unit tests task), and path lookup working (via the demo-busybox job).

@vito

vito commented Jan 31, 2019

Copy link
Copy Markdown
Contributor Author

@topherbullock @cirocosta Do either of you have time to re-review?

@cirocosta

Copy link
Copy Markdown
Contributor

Hey, did the changes suggested by @topherbullock get applied? Looking at 27833f7, the assignment to err seems to still not be there, making it not buildable 🤔

git status
HEAD detached at 27833f7b2
nothing to commit, working tree clean

go install -v ./bin/cmd/concourse/
# github.com/mattn/go-sqlite3
sqlite3-binding.c:20515:17: warning: 'OSAtomicCompareAndSwapPtrBarrier' is deprecated: first deprecated in macOS 10.12 - Use atomic_compare_exchange_strong() from <stdatomic.h> instead [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libkern/OSAtomicDeprecated.h:547:6: note: 'OSAtomicCompareAndSwapPtrBarrier' has been explicitly marked deprecated here
github.com/concourse/concourse/bin/cmd/concourse
# github.com/concourse/concourse/bin/cmd/concourse
bin/cmd/concourse/worker_nonlinux.go:27:15: undefined: err
bin/cmd/concourse/worker_nonlinux.go:28:5: undefined: err
bin/cmd/concourse/worker_nonlinux.go:29:29: undefined: err

@vito

vito commented Feb 4, 2019

Copy link
Copy Markdown
Contributor Author

@cirocosta ah maybe that got blown away by a force-push, i'll re-apply it

This is primarily so I can run Concourse on my Pixelbook.

I updated Houdini to support creating containers with raw:// rootfses -
it's kinda neat! With this I can run real pipelines, so long as nothing
needs privileged containers. Resources work, and tasks work so long as
they use the `registry-image` resource for fetching the image (or any
other unprivileged resource).

To use this on a Pixelbook, do the following:

* Set `CONCOURSE_GARDEN_USE_HOUDINI=true` to switch to the Houdini
  backend.
* Set `CONCOURSE_BAGGAGECLAIM_DISABLE_USER_NAMESPACES=true` - Houdini
  doesn't support user namespaces (I couldn't get them to work on my
  Pixelbook), so this needs to be disabled so BaggageClaim doesn't do
  filesystem `chown`ing.
* Unset `privileged: true` - it straight up doesn't work and the
  container will fail to create. (If this worked I wouldn't have had to
  do all this.)
* Set `cap_add: [SYS_ADMIN]` so that Houdini can create bind-mounts.
* Unset `CONCOURSE_BAGGAGECLAIM_DRIVER` - ChromeOS Linux uses `btrfs`,
  so it'll actually nest cleanly without the need for any loopbacks, and
  `overlay` actually won't work.

Signed-off-by: Alex Suraci <[email protected]>

@cirocosta cirocosta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm! 😁

@vito
vito merged commit 0b9e4f9 into master Feb 5, 2019
@vito
vito deleted the houdini-linux branch February 5, 2019 15:32
@vito vito added the release/documented Documentation and release notes have been updated. label Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/documented Documentation and release notes have been updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants