Skip to content

Commit

Permalink
move docker to folders
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Oct 10, 2022
1 parent 3c609b9 commit 521027c
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 39 deletions.
18 changes: 17 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ updates:
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
directory: "/dhcp-server"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/dhcp-client"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/sztp-server"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/sztp-agent"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/sztp-simulator"
schedule:
interval: "weekly"
17 changes: 0 additions & 17 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@ jobs:
# with:
# args: './*.md'

docker-lint-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- agent
- client
- dhcp
- bootstrap
steps:
- uses: actions/checkout@v3
- uses: hadolint/hadolint-action@v2.1.0
with:
recursive: true
ignore: DL3041,DL3008
dockerfile: Dockerfile.${{ matrix.package }}

docker-lint:
runs-on: ubuntu-latest
steps:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/sztp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
fail-fast: false
matrix:
package:
- agent
- client
- dhcp
- bootstrap
- dhcp-client
- dhcp-server
- sztp-agent
- sztp-server
- sztp-simulator
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
Expand All @@ -46,13 +47,13 @@ jobs:
id: meta
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/opi-sztp-${{ matrix.package }}
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/opi-${{ matrix.package }}

- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
with:
file: Dockerfile.${{ matrix.package }}
context: ${{ matrix.package }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ See [CONTRIBUTING](https://github.com/opiproject/opi/blob/main/CONTRIBUTING.md)

## sZTP Diagram

![xPU sZTP provisioning participants](./architecture/sZTP-components.png)
![xPU sZTP provisioning participants](./doc/sZTP-components.png)

## sZTP on DPU Diagram

![xPU sZTP provisioning block](./architecture/sZTP-provisioning-blocks.png)
![xPU sZTP provisioning block](./doc/sZTP-provisioning-blocks.png)

## Run sZTP

Expand Down
6 changes: 3 additions & 3 deletions ZTP.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Secure Zero Touch Provisioning (SZTP) adds a bootstrap server to DHCP-based ZTP

## Components of ZTP deployment

![sZTP components](architecture/sZTP-components.png)
![sZTP components](doc/sZTP-components.png)

- DPU or IPU device: new shipped device that is physically connected and powered but missing config and needs provisioning. Runs sZTP agent/client and uses DHCP client for deployment.
- DHCP server (optional): allocates a temporary IP address, default gateway, DNS server address, and bootstrap server IP or URL to the device to be deployed using sZTP. Some customers don't use DHCP, so either mDNS or static IP address allocation is applied.
Expand Down Expand Up @@ -89,7 +89,7 @@ Those steps will also help to understand the sZTP process from the network/syste

## sZTP process

![Provisioning Sequence](architecture/sZTP-sequence.png)
![Provisioning Sequence](doc/sZTP-sequence.png)

### Discovery

Expand Down Expand Up @@ -153,7 +153,7 @@ Note: "DPU/IPU Validation" is done using [IEEE 802.1AR - Secure Device Identity]
- Question: using what certificates?
- Question: what about QUIC?
- For environments that are predominately IPv6 based, we'll need a solution that supports SLAAC.
- More info is here <https://github.com/opiproject/opi-prov-life/blob/main/architecture/Zero-Touch-Provisioning%E2%80%94Approaches-to-Network-Layer-Onboarding.pdf>
- More info is here <https://github.com/opiproject/opi-prov-life/blob/main/doc/Zero-Touch-Provisioning%E2%80%94Approaches-to-Network-Layer-Onboarding.pdf>
- Device sends a request to a "Bootstrap Server" to join the network by providing its IDevID.
- "Bootstrap Server" decides to accept debvice to the network or reject
- Needs trust anchor of IDevID
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
16 changes: 6 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ services:
bootstrap:
image: ghcr.io/opiproject/opi-sztp-bootstrap:main
build:
context: .
dockerfile: Dockerfile.bootstrap
context: sztp-server
environment:
SZTPD_INIT_PORT: 1080
SZTPD_SBI_PORT: 9090
Expand All @@ -27,8 +26,7 @@ services:
dhcp:
image: ghcr.io/opiproject/opi-sztp-dhcp:main
build:
context: .
dockerfile: Dockerfile.dhcp
context: dhcp-server
environment:
NODE_IP_SUBNET: 10.127.127.0
NODE_IP_NETMASK: 255.255.255.0
Expand All @@ -51,16 +49,15 @@ services:
web:
image: python:3.10.6-slim
volumes:
- ./config/my-boot-image.img:/var/lib/misc/my-boot-image.img:Z,ro
- ./sztp-server/config/my-boot-image.img:/var/lib/misc/my-boot-image.img:Z,ro
networks:
- opi
command: python3 -m http.server 8082

client:
image: ghcr.io/opiproject/opi-sztp-client:main
build:
context: .
dockerfile: Dockerfile.client
context: dhcp-client
cap_add:
- CAP_NET_RAW
networks:
Expand All @@ -70,10 +67,9 @@ services:
agent:
image: ghcr.io/opiproject/opi-sztp-agent:main
build:
context: .
dockerfile: Dockerfile.agent
context: sztp-simulator
volumes:
- ./config/input.json:/tmp/input.json:Z,ro
- ./sztp-server/config/input.json:/tmp/input.json:Z,ro
networks:
- opi
command: ['/bin/sh', '-c', 'sleep infinity']
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions sztp-simulator/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
File renamed without changes.

0 comments on commit 521027c

Please sign in to comment.