diff --git a/.github/workflows/build-probe.yml b/.github/workflows/build-probe.yml new file mode 100644 index 0000000..6af1737 --- /dev/null +++ b/.github/workflows/build-probe.yml @@ -0,0 +1,29 @@ +name: Build and push probe image to docker hub +on: + push: + branches: [ "main" ] + paths: + # To-do may want to change this depending on how frequently we're pushing changes + - 'Probe/**' + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Log in to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push probe image with latest tag + uses: docker/build-push-action@v7 + with: + context: . + file: Probe/Dockerfile + push: true + tags: ${{ secrets.DOCKERHUB_USER }}/aquila:probe-latest diff --git a/.gitignore b/.gitignore index a62c0ff..11c4362 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ /.idea /bin -Containerlab/clab-Aquila -Containerlab/utils/venv -ssh-keys/ - *bak -Diagrams/*.bkp \ No newline at end of file +Diagrams/*.bkp + +# Containerlab related +Containerlab/clab-aquila/.tls/ +Containerlab/clab-aquila/*leaf*/ +Containerlab/clab-aquila/*.json +Containerlab/clab-aquila/authorized_keys diff --git a/Containerlab/aquila.clab.yml b/Containerlab/aquila.clab.yml index c581e2d..c254d75 100644 --- a/Containerlab/aquila.clab.yml +++ b/Containerlab/aquila.clab.yml @@ -9,39 +9,70 @@ topology: juniper_vjunosrouter: image: vrnetlab/juniper_vjunos-router:25.4R1.12 linux: - image: ubuntu:24.04 + image: rubydelusion/aquila:probe-latest nodes: # Leaves leaf1: kind: juniper_vjunosrouter mgmt-ipv4: 192.168.10.254 + group: site1 leaf2: kind: juniper_vjunosrouter mgmt-ipv4: 192.168.10.253 + group: site2 + leaf3: + kind: juniper_vjunosrouter + mgmt-ipv4: 192.168.10.252 + group: site3 + leaf4: + kind: juniper_vjunosrouter + mgmt-ipv4: 192.168.10.251 + group: site4 # Probes probe-leaf1: kind: linux mgmt-ipv4: 192.168.10.5 + group: site1 probe-leaf2: kind: linux mgmt-ipv4: 192.168.10.6 + group: site2 + probe-leaf3: + kind: linux + mgmt-ipv4: 192.168.10.7 + group: site3 + probe-leaf4: + kind: linux + mgmt-ipv4: 192.168.10.8 + group: site4 # Orchestrator orchestrator: kind: linux mgmt-ipv4: 192.168.10.4 + group: servers links: # Inter-Leaf links - - endpoints: ["leaf1:eth9", "leaf2:eth9"] - - endpoints: ["leaf1:eth10", "leaf2:eth10"] + - endpoints: [ "leaf1:eth9", "leaf2:eth9" ] + - endpoints: [ "leaf1:eth10", "leaf2:eth10" ] + - endpoints: [ "leaf1:eth11", "leaf3:eth11" ] + - endpoints: [ "leaf1:eth12", "leaf3:eth12" ] + - endpoints: [ "leaf2:eth11", "leaf4:eth11" ] + - endpoints: [ "leaf2:eth12", "leaf4:eth12" ] + - endpoints: [ "leaf3:eth9", "leaf4:eth9" ] + - endpoints: [ "leaf3:eth10", "leaf4:eth10" ] # Leaf-Probe links - - endpoints: ["probe-leaf1:eth2", "leaf1:eth1"] - - endpoints: ["probe-leaf2:eth2", "leaf2:eth1"] + - endpoints: [ "probe-leaf1:eth2", "leaf1:eth1" ] + - endpoints: [ "probe-leaf2:eth2", "leaf2:eth1" ] + - endpoints: [ "probe-leaf3:eth2", "leaf3:eth1" ] + - endpoints: [ "probe-leaf4:eth2", "leaf4:eth1" ] # Orchestrator-Probe links - - endpoints: ["orchestrator:eth1", "probe-leaf1:eth1"] - - endpoints: ["orchestrator:eth2", "probe-leaf2:eth1"] + - endpoints: [ "orchestrator:eth1", "probe-leaf1:eth1" ] + - endpoints: [ "orchestrator:eth2", "probe-leaf2:eth1" ] + - endpoints: [ "orchestrator:eth3", "probe-leaf3:eth1" ] + - endpoints: [ "orchestrator:eth4", "probe-leaf4:eth1" ] diff --git a/Containerlab/aquila.clab.yml.annotations.json b/Containerlab/aquila.clab.yml.annotations.json new file mode 100644 index 0000000..320ed5d --- /dev/null +++ b/Containerlab/aquila.clab.yml.annotations.json @@ -0,0 +1,79 @@ +{ + "freeTextAnnotations": [], + "freeShapeAnnotations": [], + "trafficRateAnnotations": [], + "groupStyleAnnotations": [], + "networkNodeAnnotations": [], + "nodeAnnotations": [ + { + "id": "leaf1", + "position": { + "x": 280, + "y": 80 + } + }, + { + "id": "leaf2", + "position": { + "x": 440, + "y": 80 + } + }, + { + "id": "leaf3", + "position": { + "x": 280, + "y": 200 + } + }, + { + "id": "leaf4", + "position": { + "x": 440, + "y": 200 + } + }, + { + "id": "probe-leaf1", + "position": { + "x": 200, + "y": 0 + }, + "icon": "server" + }, + { + "id": "probe-leaf2", + "position": { + "x": 520, + "y": 0 + }, + "icon": "server" + }, + { + "id": "probe-leaf3", + "position": { + "x": 200, + "y": 280 + }, + "icon": "server" + }, + { + "id": "probe-leaf4", + "position": { + "x": 520, + "y": 280 + }, + "icon": "server" + }, + { + "id": "orchestrator", + "position": { + "x": 360, + "y": 0 + } + } + ], + "edgeAnnotations": [], + "aliasEndpointAnnotations": [], + "viewerSettings": {} +} \ No newline at end of file diff --git a/Diagrams/hld.drawio b/Diagrams/hld.drawio index d8fecd4..99d80e7 100644 --- a/Diagrams/hld.drawio +++ b/Diagrams/hld.drawio @@ -1,128 +1,254 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Diagrams/hld.drawio.png b/Diagrams/hld.drawio.png index f79c07a..eff7aaf 100644 Binary files a/Diagrams/hld.drawio.png and b/Diagrams/hld.drawio.png differ diff --git a/Probe/Dockerfile b/Probe/Dockerfile new file mode 100644 index 0000000..0590618 --- /dev/null +++ b/Probe/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:24.04 as base +LABEL authors="alex" + +RUN apt-get update && \ + apt-get install -y openssh-server sudo && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir /var/run/sshd + +# To-do change this to some kind of ssh-key based auth that will work with ansible +RUN useradd -rm -d /home/admin -s /bin/bash -g root -G sudo admin && \ + echo 'admin:admin' | chpasswd + +EXPOSE 22 + +CMD ["/usr/sbin/sshd", "-D"] \ No newline at end of file