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

[CI/CD] Improve Docker development #18

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

mxsph
Copy link
Member

@mxsph mxsph commented Sep 1, 2021

Improves the deployment of the Docker Container as follows:

  • The Docker container is additionally deployed in the Github Container registry. As this offers a couple of advantages and is better linked to the repo.
  • The Docker build is now cached which should improve the speed of CI/CD builds.
  • Furthermore, the PR also changes which tag the Docker container is pushed with. A build on the master branch will create a container with the tag master. If a Relase (git tag) is created it will be created with the tags latest and the name of the Relase (e.g. v1.0.0). @snicki13 what do you think about this?

resolves #17

@snicki13
Copy link
Member

snicki13 commented Sep 2, 2021

Looks good to me.
The first release tag will be within a week from now :)
Thanks!

@snicki13
Copy link
Member

snicki13 commented Sep 2, 2021

You mentioned, that the build is now cached. Is buildx providing some sort of cache? I understood, that the multi-staged build process within Dockerfile provides a cache. Is it lost when built with Github Actions without buildx?

@snicki13 snicki13 merged commit 6530566 into master Sep 2, 2021
@snicki13 snicki13 deleted the i17-CI/CD-Improve-Docker-development branch September 2, 2021 10:00
@mxsph
Copy link
Member Author

mxsph commented Sep 2, 2021

You mentioned, that the build is now cached. Is buildx providing some sort of cache? I understood, that the multi-staged build process within Dockerfile provides a cache. Is it lost when built with Github Actions without buildx?

No, but buildx allows to import/export the cache.

The problem is that each execution of the Github action (here the build process) is done in a separate container. Docker itself caches the created stages during the build, but since the container that executed this build process is "destroyed" again and the next time a new one is spanned, it no longer has the cache of the previous container and rebuilds everything.

To solve this "problem" Github offers the possibility to save the caching data (Github Actions Cache service API).

This is enabled with these two options of the build-push-action:

cache-from: type=gha
cache-to: type=gha,mode=max

snicki13 added a commit that referenced this pull request Sep 3, 2021
* .gitignore and additional parameter

* experiment with angular

* Native HTTPS

* https keystore

* Update parameters

* Added self-signed certificates + docker-compose for image usage.

* Update documentation

* Update documentation

* image-based docker-compose for deployment

* Refactoring

* move docker-compose

* Refactoring

* Initial RSocket connection!

* Client Rsocket with composite metadata!

* Remove legacy event system

* Begin RSocket Security!

* Successfully authenticated user via JWT & RSocket

* Removed LinkedHashSet as order-keeping collection for tickets. Sorting of tickets will be done in the client.
Introduced interface "ClassroomDependent" for objects logically depending on an instance of DigitalClassroom.

* Overhauled exceptions

* Prepare event system

* Rebuild downstream API.
Clearer separation of responsibilites.
Improved reactivity through Mono / Flux + clearer code.

* RSocket experiments.

* Eventsystem over RSocket in place. some refactoring in frontend.

* JWT refactoring

* removed unnecessary dependencies.

* cleanup

* Fixed api "/create" idempotency.

* Updated notes.

* published functions.

* Minor changes

* Removed internalMeetingId.
Simplified model classes.

* Backend Classroom API -> RSocket.
Ticket init implemented.
SetOnceProperty for "lateinit val" workaround.
Tickets have ticketId from classroom exclusive sequence.

* RSocketService general purpose interface.

* Minor changes + classroom information.

* cleanup web-gui

* Ticket Service in place and refactoring of web-gui

* UserEvent system + ticket fixes.

* Display username in header.

* beautify

* Detect disconnects!

* minor

* typed UserRole in Client.

* Dynamic websocket endpoint

* simplified ngIfs and removed leave button, since JS cannot close windows it did not spawn.

* Fixed Ticket assignment and double display of current user in user list.

* use map to ensure uniqueness in user list. Map, because we only want to consider userId when checking for equality.

* finalize instead of map to reduce publishing

* Prepare for conference handling. Refactoring.

* Implemented conference system.

* Conference joining works.

* [CI/CD][Docker] added Caching & push image to ghcr.io (#18)

* Invitations - not functional!

* Fixed invitation sending in caller.

* Fixed invitations.

* .gitignore and additional parameter

* experiment with angular

* Update parameters

* Added self-signed certificates + docker-compose for image usage.

* image-based docker-compose for deployment

* move docker-compose

* Refactoring

* Initial RSocket connection!

* Client Rsocket with composite metadata!

* Remove legacy event system

* Begin RSocket Security!

* Successfully authenticated user via JWT & RSocket

* Removed LinkedHashSet as order-keeping collection for tickets. Sorting of tickets will be done in the client.
Introduced interface "ClassroomDependent" for objects logically depending on an instance of DigitalClassroom.

* Overhauled exceptions

* Prepare event system

* Rebuild downstream API.
Clearer separation of responsibilites.
Improved reactivity through Mono / Flux + clearer code.

* RSocket experiments.

* Eventsystem over RSocket in place. some refactoring in frontend.

* JWT refactoring

* removed unnecessary dependencies.

* cleanup

* Fixed api "/create" idempotency.

* Updated notes.

* published functions.

* Minor changes

* Removed internalMeetingId.
Simplified model classes.

* Backend Classroom API -> RSocket.
Ticket init implemented.
SetOnceProperty for "lateinit val" workaround.
Tickets have ticketId from classroom exclusive sequence.

* RSocketService general purpose interface.

* Minor changes + classroom information.

* cleanup web-gui

* Ticket Service in place and refactoring of web-gui

* UserEvent system + ticket fixes.

* Display username in header.

* beautify

* Detect disconnects!

* minor

* typed UserRole in Client.

* Dynamic websocket endpoint

* simplified ngIfs and removed leave button, since JS cannot close windows it did not spawn.

* Fixed Ticket assignment and double display of current user in user list.

* use map to ensure uniqueness in user list. Map, because we only want to consider userId when checking for equality.

* finalize instead of map to reduce publishing

* Prepare for conference handling. Refactoring.

* Implemented conference system.

* Conference joining works.

* Invitations - not functional!

* Fixed invitation sending in caller.

* Fixed invitations.

Co-authored-by: Max Stephan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI/CD] Improve Docker development
2 participants