Skip to content

Commit

Permalink
Revert "Fix building of custom container images (#24)"
Browse files Browse the repository at this point in the history
This reverts commit a0cf8a7.
  • Loading branch information
stano45 authored Aug 22, 2024
1 parent a0cf8a7 commit e2e8fa0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For more information about the project, please refer to the [final report](REPOR
- [Prerequisites](#prerequisites)
- [Install Python Dependencies](#install-python-dependencies)
- [Installing PI](#installing-pi)
- [Build Custom Podman Images](#build-custom-podman-images)
- [Running examples](#running-examples)


Expand Down Expand Up @@ -45,6 +46,18 @@ The p4 library files in your `.venv` will be owned by the root user. Make sure t
sudo chown -R $USER .venv
```

### Build Custom Podman Images
```bash
make images
```
This will build the following images:
- `tcp-client`: A simple TCP client that sends a message to a server (this will run in h1-pod)
- `tcp-server`: A simple TCP server that listens for a message from a client (this will run in all other pods)

You can configure the target IP of the client and the port of the server in the [tcp/Containerfile.server](tcp/Containerfile.server) and [tcp/Containerfile.client](tcp/Containerfile.client) files respectively.

Furthermore, you can specify which image to run in the hosts by changing the `IMG` and `ARGS` variables in [scripts/switch_container/build.sh](scripts/switch_container/build.sh).

## Running examples
There are three examples in the `examples` directory:
- [process_migration](examples/process_migration): Process migration demo using network namespaces
Expand Down
2 changes: 1 addition & 1 deletion examples/host_containers/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../utils/Makefile

all: images compile build controller
all: compile build controller

terminals: h1 h2 h3 h4

Expand Down
2 changes: 1 addition & 1 deletion examples/switch_container/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../utils/Makefile

all: images compile build controller
all: compile build controller

terminals: h1 h2 h3 h4

Expand Down

0 comments on commit e2e8fa0

Please sign in to comment.