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

Add Dockerfile for pfcp-kitchen-sink #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tariromukute
Copy link

The Changes:

  • Created a Dockerfile to build an image for the pfcp-kitchen-sink tool.
  • Integrated pfcp-kitchen-sink into an existing OAI UPF Docker Compose setup.

The Why:

  • Simplifies the integration of pfcp-kitchen-sink into environments using OAI UPF's Docker Compose configuration.
  • Enhances ease of use and testing with pfcp-kitchen-sink in containerised settings.

How to Test:

  • Build the pfcp-kitchen-sink image using the provided Dockerfile.
  • Update your OAI UPF docker-compose.yml file to include the pfcp-kitchen-sink container (see sample below).
  • Start the Docker Compose environment
  • In the tc-gtpu container create setup a dummy interface for UE ./tc-gtpu -g eth0 -i uegtp -s 192.168.70.130 -d 192.168.70.134 -u 12.1.1.2 --ul-teid 1234 --dl-teid 1234 -q 9 -n 1 -f /home/tu-gtpu.pcap -vvv and the send traffic ping -I uegtp0 8.8.8.8 -c 5
version: '3.8'
services:
    pfcp-kitchen-sink:
        container_name: "pfcp-kitchen-sink"
        image: tariromukute/pfcp-kitchen-sink:latest
        volumes:
            - ./sessions-oai-upf.yaml:/app/sessions.yaml
        command: ./pfcpclient -r 192.168.70.134:8805 -s sessions.yaml
        depends_on:
            - oai-upf
        networks:
            public_net:
                ipv4_address: 192.168.70.131
    tc-gtpu:
        container_name: "tc-gtpu"
        image: tariromukute/tc-gtpu:latest
        command: tail -f /dev/null
        volumes:
            - /sys/kernel/debug/:/sys/kernel/debug/
        devices:
            - /dev/net/tun:/dev/net/tun
        cap_add:
            - NET_ADMIN
            - SYS_ADMIN
        depends_on:
            - oai-upf
            - pfcp-kitchen-sink
        networks:
            public_net:
                ipv4_address: 192.168.70.130
    oai-upf:
        container_name: "oai-upf"
        image: oaisoftwarealliance/oai-upf:develop
        volumes:
            - ./basic_config.yaml:/openair-upf/etc/config.yaml
        environment:
            - TZ=Europe/Paris
        cap_add:
            - NET_ADMIN
            - SYS_ADMIN
        cap_drop:
            - ALL
        privileged: true
        networks:
            public_net:
                ipv4_address: 192.168.70.134
            n6_net:
                ipv4_address: 192.168.72.134
    oai-ext-dn:
        privileged: true
        init: true
        container_name: "oai-ext-dn"
        image: oaisoftwarealliance/trf-gen-cn5g:latest
        entrypoint: /bin/bash -c \
              "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
              "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; ip route; sleep infinity"
        command: ["/bin/bash", "-c", "trap : SIGTERM SIGINT; sleep infinity & wait"]
        healthcheck:
            test: /bin/bash -c "iptables -L -t nat | grep MASQUERADE"
            interval: 10s
            timeout: 5s
            retries: 5
        networks:
            public_net:
                ipv4_address: 192.168.70.135
            n6_net:
                ipv4_address: 192.168.72.135
networks:
    public_net:
        driver: bridge
        name: demo-oai-public-net
        ipam:
            config:
                - subnet: 192.168.70.128/26
        driver_opts:
            com.docker.network.bridge.name: "demo-oai"
    n6_net:
        driver: bridge
        name: demo-oai-n6-net
        ipam:
            config:
                - subnet: 192.168.72.128/26
        driver_opts:
            com.docker.network.bridge.name: "demo-n6"

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.

1 participant