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

Docker Diet: shrink images 80% and CI runtimes 50% #140

Merged
merged 55 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4746311
Build sai-thrift server (not working yet). New dockerfile.
chrispsommers Jun 25, 2022
9617024
Removed extraneous step.
chrispsommers Jun 25, 2022
efea557
README
chrispsommers Jun 25, 2022
5aa8cd6
Move Dockerfile under dockerfiles/
chrispsommers Jun 25, 2022
3bde5d7
Pass flags to saithrift-build, expecting https://github.com/opencompu…
chrispsommers Jun 25, 2022
59eab6f
Fix CI files for new location of Docekrfile.bmv2, add CI for dash-sai…
chrispsommers Jun 25, 2022
f654cc7
Fix CI workflow for new dockerfiles.
chrispsommers Jun 25, 2022
7070c85
Add line to trigger CI.
chrispsommers Jun 25, 2022
992309b
Restore CI filename, try to get it to trigger.
chrispsommers Jun 25, 2022
c31cfa1
Rename CI file; modify DOckerfile to trigger; add docker targets to M…
chrispsommers Jun 25, 2022
a9ed085
Modify dockerfiles to trigger CI.
chrispsommers Jun 25, 2022
01203db
Fix make target names in CI and Makefile
chrispsommers Jun 25, 2022
d3f3b3f
Update CI to trigger on CI file changes itself.
chrispsommers Jun 25, 2022
82e744b
Trigger on CI file change.
chrispsommers Jun 25, 2022
058761d
Merge remote-tracking branch 'upstream/main' into chris-saithrift3
chrispsommers Jun 25, 2022
d67ba61
Remove thrift source from dash-saithrift-bldr docker image. New tag 2…
chrispsommers Jun 25, 2022
6702c8d
Enhance saithrift docker to handle dash sai header generation and lib…
chrispsommers Jun 26, 2022
2f40019
Remove thrift source and source tarball from docker image; copy pytho…
chrispsommers Jun 26, 2022
eabc2ac
Merge remote-tracking branch 'diana/main' into chris-saithrift4
chrispsommers Jun 28, 2022
d450320
Experimenting with reduced Dockerfiles.
chrispsommers Jun 29, 2022
44262e6
Makefile: p4 source dependencies. dash_pipeline.p4: egress_spec=ingre…
chrispsommers Jun 30, 2022
ae1c872
Merge remote-tracking branch 'upstream/main' into chris-saithrift4
chrispsommers Jul 1, 2022
5f899c4
Fix stray merge conflict.
chrispsommers Jul 1, 2022
bc7ea6e
Fix merge conflict in CI file.
chrispsommers Jul 1, 2022
71b1486
Optimized docker build and run images by creating a dedicated gRPC li…
chrispsommers Jul 1, 2022
431b39f
FIx CI, Makefile for new docker images.
chrispsommers Jul 1, 2022
9ab9cc3
Optimize dockerfiles, reduced to 3 images totalling ~2.7G, down from …
chrispsommers Jul 2, 2022
d497889
Fix CI files, add Make targets; cleanup.
chrispsommers Jul 2, 2022
cfc2431
CI files, badge
chrispsommers Jul 2, 2022
311600c
CI files.
chrispsommers Jul 2, 2022
62338c4
Merge remote-tracking branch 'upstream/main' into chris-saithrift4
chrispsommers Jul 2, 2022
ee47799
Split up READMEs into smaller files. Diagram.
chrispsommers Jul 2, 2022
155aa76
READMEs, diagram, SHA version of p4c
chrispsommers Jul 3, 2022
a9629cf
Add missing CI workflow (p4c); update main CI workflow to trigger on …
chrispsommers Jul 3, 2022
76932cd
Fix make command in CI file.
chrispsommers Jul 3, 2022
fcec473
Pin the SHA version of p4lang/behavioral-model:latest.
chrispsommers Jul 3, 2022
c390b75
Ping SHA versions of Ubuntu used in base images.
chrispsommers Jul 3, 2022
b766dc6
READMEs - workflows etc.
chrispsommers Jul 4, 2022
7f6a0c2
README typos, clarifications.
chrispsommers Jul 4, 2022
1b8c284
README
chrispsommers Jul 6, 2022
6be1367
Use dev fork of SAI which passes flags to gensairpc.pl per https://gi…
chrispsommers Jul 6, 2022
309fba4
Use fork of SAI with fixes for sairpcgen Make flags, and sairpcgen te…
chrispsommers Jul 6, 2022
662c2b1
Add placeholder code for SAI fixed functions, -fpermissive to avoid e…
chrispsommers Jul 7, 2022
b44955a
Created init_switch test program and make target to initialize bmv2 m…
chrispsommers Jul 9, 2022
90313ee
Remove dependency to avoid rebuilding files while running test in CI.…
chrispsommers Jul 9, 2022
aea869d
README
chrispsommers Jul 9, 2022
6135411
Merge remote-tracking branch 'upstream/main' into chris-saithrift4
chrispsommers Jul 14, 2022
4a50d82
Restore dash_pipeline.p4 to same as upstream. Had temporary changes (…
chrispsommers Jul 14, 2022
c569e9e
Merge remote-tracking branch 'upstream/main' into chris-saithrift4
chrispsommers Jul 15, 2022
499d55f
Merge remote-tracking branch 'upstream/main' into chris-saithrift4
chrispsommers Jul 20, 2022
a7aa311
Add CI triggers for all .py, .sh, .yml and requirements.txt. under te…
chrispsommers Jul 16, 2022
6fb9728
Update to snappi-0.7.38 for fix https://github.com/Azure/DASH/issues/153
chrispsommers Jul 16, 2022
ad1c0ae
Temporary workaround for container permissions issues per https://git…
chrispsommers Jul 17, 2022
6c99c6a
Merge remote-tracking branch 'upstream/main' into chris-saithrift4
chrispsommers Jul 20, 2022
e734681
Delete obxolete README, comment out WIP sai-thrift server make targets
chrispsommers Jul 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/dash-bmv2-bldr-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: DASH-docker-bmv2-bldr-build-image


on:
push:
branches: [ "**" ]
paths:
- '.github/workflows/dash-bmv2-bldr-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.bmv2-bldr'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/dash-bmv2-bldr-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.bmv2-bldr'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
workflow_dispatch:

jobs:
build:
name: Build docker dash-bmv2-bldr image
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Build dash-bmv2-bldr docker image
run: make docker-bmv2-bldr
- name: Publish dash-bmv2 docker image
run: make docker-publish-bmv2-bldr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DASH-CI
name: DASH-BMV2-CI

on:
push:
Expand All @@ -10,7 +10,7 @@ on:
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/Dockerfile'
- '!dash-pipeline/docker files/Dockerfile.*'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
- '!dash-pipeline/**.svg'
Expand All @@ -25,7 +25,7 @@ on:
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/Dockerfile'
- '!dash-pipeline/docker files/Dockerfile.*'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
- '!dash-pipeline/**.svg'
Expand All @@ -46,15 +46,17 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Pull docker p4c image
run: make docker-pull-p4c
run: make docker-pull-dash-p4c
- name: Build P4 software switch (bmv2) and P4Info
run: DOCKER_FLAGS=$docker_fg_flags make p4
- name: Install SAI submodule
run: git submodule update --init
- name: Pull docker bmv2 image
run: make docker-pull-bmv2
- name: Pull docker saithrift-bldr image
run: make docker-pull-saithrift-bldr
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai
- name: Pull docker bmv2-bldr image
run: make docker-pull-bmv2-bldr
- name: Build libsai c++ tests
run: DOCKER_FLAGS=$docker_fg_flags make test
- name: Prepare network
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/dash-dev-docker.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/dash-grpc1.43.2-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: DASH-docker-grpc1.43.2-build-image


on:
push:
branches: [ "**" ]
paths:
- '.github/workflows/dash-grpc1.43.2-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.grpc1.43.2'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/dash-grpc1.43.2-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.grpc1.43.2'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
workflow_dispatch:

jobs:
build:
name: Build docker dash-grpc1.43.2 image
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Build dash-grpc1.43.2 docker image
run: make docker-dash-grpc
- name: Publish dash-bmv2 docker image
run: make docker-publish-dash-grpc
33 changes: 33 additions & 0 deletions .github/workflows/dash-p4c-bmv2-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: DASH-docker-p4c-bmv2-build-image


on:
push:
branches: [ "**" ]
paths:
- '.github/workflows/dash-p4c-bmv2-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.p4c-bmv2'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/dash-p4c-bmv2-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.p4c-bmv2'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
workflow_dispatch:

jobs:
build:
name: Build docker dash-p4c-bmv2 image
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Build dash-p4c-bmv2 docker image
run: make docker-dash-p4c
- name: Publish dash-p4c-bmv2 docker image
run: make docker-publish-dash-p4c
32 changes: 32 additions & 0 deletions .github/workflows/dash-saithrift-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: DASH-docker-saithrift-build-image

on:
push:
branches: [ "**" ]
paths:
- '.github/workflows/dash-saithrift-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.saithrift'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/dash-saithrift-docker.yml'
- 'dash-pipeline/dockerfiles/Dockerfile.saithrift'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
workflow_dispatch:

jobs:
build:
name: Build docker dash-saithrift image
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Build dash-saithrift docker image
run: make docker-saithrift-bldr
- name: Publish dash-saithrift docker image
run: make docker-publish-saithrift-bldr
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "SAI"]
path = dash-pipeline/SAI/SAI
url = https://github.com/opencomputeproject/SAI.git
branch = master
url = https://github.com/chrispsommers/SAI.git
branch = add-gensairpc-flags
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![DASH-model-CI](https://github.com/dgalan-xxia/DASH/workflows/Sirius-CI/badge.svg?branch=main)](https://github.com/dgalan-xxia/DASH/actions/workflows/sirius-ci.yml)
[![DASH-bmv2-CI](https://github.com/Azure/DASH/workflows/DASH-BMV2-CI/badge.svg?branch=main)](https://github.com/Azure/DASH/actions/workflows/dash-bmv2-ci.yml)

# SONiC-DASH - Disaggregated API for SONiC Hosts - DRAFT/Work in Progress

Expand Down
8 changes: 1 addition & 7 deletions dash-pipeline/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
bmv2
images
SAI
tests
*.md
Makefile
*.p4
*
Loading