Skip to content

Commit

Permalink
Add tarred busybox rootfs for groot
Browse files Browse the repository at this point in the history
[#137336783]

Signed-off-by: Petar Petrov <[email protected]>
  • Loading branch information
georgethebeatle authored and pppepito86 committed Jan 10, 2017
1 parent ec43bc5 commit 55c1381
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions jobs/garden/spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ packages:
- runc
- shadow
- busybox
- busybox-tar
- tar

properties:
Expand Down
5 changes: 3 additions & 2 deletions manifests/garden-groot-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ director_uuid: <%= `bosh target lite > /dev/null 2>&1 && bosh status --uuid` %>
releases:
- name: garden-runc
version: latest
- name: grootfs
- name: grootfs-release
version: latest

jobs:
- name: garden
instances: 1
templates:
- name: grootfs
release: grootfs
release: grootfs-release
- name: garden
release: garden-runc
resource_pool: garden
networks:
- name: garden
properties:
garden:
default_container_rootfs: /var/vcap/packages/busybox-tar/busybox.tar
graph_cleanup_threshold_in_mb: 1024
listen_network: tcp
listen_address: 0.0.0.0:7777
Expand Down
21 changes: 21 additions & 0 deletions packages/busybox-tar/packaging
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
set -e -x

# to generate a new busybox tarball:
#
# docker run -i -t -cidfile=busybox.cid busybox echo foo
# docker export $(cat busybox.cid) > busybox.tar.gz
#
# to add it to the release:
#
# cd garden-runc-release
# bosh add blob busybox.tar.gz busybox
# bosh upload blobs

mkdir ${BOSH_INSTALL_TARGET}/busybox
tar zxf busybox/busybox.tar.gz -C ${BOSH_INSTALL_TARGET}/busybox
pushd ${BOSH_INSTALL_TARGET}/busybox
tar cf busybox.tar *
popd
mv ${BOSH_INSTALL_TARGET}/busybox/busybox.tar ${BOSH_INSTALL_TARGET}/busybox.tar
rm -rf ${BOSH_INSTALL_TARGET}/busybox

5 changes: 5 additions & 0 deletions packages/busybox-tar/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: busybox-tar

files:
- busybox/busybox.tar.gz

0 comments on commit 55c1381

Please sign in to comment.