-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from grycap/links
properly handling links and including the usecases in the documentation
- Loading branch information
Showing
9 changed files
with
318 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# minicon - Minimization of filesystems for containers | ||
# https://github.com/grycap/minicon | ||
# | ||
# Copyright (C) GRyCAP - I3M - UPV | ||
# Developed by Carlos A. caralla@upv.es | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
UC=1 | ||
UCFOLDER=usecases/uc${UC} | ||
CURDIR=$(dirname $0) | ||
MINICONDIR=$(readlink -f $CURDIR/../..) | ||
|
||
set -x | ||
docker images ubuntu:latest | ||
docker run --rm -it -v $MINICONDIR:/tmp/minicon ubuntu:latest /tmp/minicon/minicon -t /tmp/minicon/$UCFOLDER/uc${UC}.tar bash ls mkdir less cat find | ||
docker import $MINICONDIR/$UCFOLDER/uc${UC}.tar minicon:uc${UC} | ||
docker images minicon:uc${UC} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM ubuntu | ||
RUN apt-get update && apt-get install -y ssh iproute2 iputils-ping wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# minicon - Minimization of filesystems for containers | ||
# https://github.com/grycap/minicon | ||
# | ||
# Copyright (C) GRyCAP - I3M - UPV | ||
# Developed by Carlos A. caralla@upv.es | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
UC=2 | ||
UCFOLDER=usecases/uc${UC} | ||
REFIMAGE=minicon:uc${UC}fat | ||
MINICONIMAGE=minicon:uc${UC} | ||
|
||
CURDIR=$(dirname $0) | ||
MINICONDIR=$(readlink -f $CURDIR/../..) | ||
|
||
docker build $UCFOLDER -t $REFIMAGE | ||
|
||
cat > $UCFOLDER/execfile-cmd <<\EOF | ||
ssh localhost | ||
/usr/bin/ssh localhost | ||
/bin/ping -c 1 www.google.es | ||
EOF | ||
|
||
set -x | ||
docker images $REFIMAGE | ||
docker run --privileged --rm -it -v $MINICONDIR:/tmp/minicon $REFIMAGE bash -c "apt-get install -y strace && /tmp/minicon/minicon -t /tmp/minicon/$UCFOLDER/uc${UC}.tar -l --plugin=strace:execfile=/tmp/minicon/$UCFOLDER/execfile-cmd bash ssh ip id cat ls mkdir ping wget" | ||
docker import $MINICONDIR/$UCFOLDER/uc${UC}.tar $MINICONIMAGE | ||
docker images $MINICONIMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:latest | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# Install app dependencies | ||
COPY miniapp/package.json /usr/src/app/ | ||
RUN npm install | ||
|
||
# Bundle app source | ||
COPY miniapp /usr/src/app | ||
|
||
EXPOSE 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# | ||
# minicon - Minimization of filesystems for containers | ||
# https://github.com/grycap/minicon | ||
# | ||
# Copyright (C) GRyCAP - I3M - UPV | ||
# Developed by Carlos A. caralla@upv.es | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
UC=3 | ||
UCFOLDER=usecases/uc${UC} | ||
REFIMAGE=minicon:uc${UC}fat | ||
MINICONIMAGE=minicon:uc${UC} | ||
|
||
CURDIR=$(dirname $0) | ||
MINICONDIR=$(readlink -f $CURDIR/../..) | ||
|
||
set -x | ||
express -f ./usecases/uc3/miniapp | ||
docker build $UCFOLDER -t $REFIMAGE | ||
docker images $REFIMAGE | ||
docker run --rm -it -v $MINICONDIR:/tmp/minicon $REFIMAGE /tmp/minicon/minicon -l -t /tmp/minicon/$UCFOLDER/uc${UC}.tar node /usr/src/app | ||
docker import $MINICONDIR/$UCFOLDER/uc${UC}.tar $MINICONIMAGE | ||
docker images $MINICONIMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM ubuntu | ||
RUN apt-get update && apt-get install -y ffmpeg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
# | ||
# minicon - Minimization of filesystems for containers | ||
# https://github.com/grycap/minicon | ||
# | ||
# Copyright (C) GRyCAP - I3M - UPV | ||
# Developed by Carlos A. caralla@upv.es | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
UC=4 | ||
UCFOLDER=usecases/uc${UC} | ||
REFIMAGE=minicon:uc${UC}fat | ||
MINICONIMAGE=minicon:uc${UC} | ||
|
||
CURDIR=$(dirname $0) | ||
MINICONDIR=$(readlink -f $CURDIR/../..) | ||
|
||
set -x | ||
docker build $UCFOLDER -t $REFIMAGE | ||
docker images $REFIMAGE | ||
docker run --rm -it -v $MINICONDIR:/tmp/minicon $REFIMAGE /tmp/minicon/minicon -l -t /tmp/minicon/$UCFOLDER/uc${UC}.tar ffmpeg | ||
docker import $MINICONDIR/$UCFOLDER/uc${UC}.tar $MINICONIMAGE | ||
docker images $MINICONIMAGE |