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 deploying the application #15

Merged
merged 16 commits into from
Dec 4, 2024

Conversation

jekabs-karklins
Copy link
Contributor

@jekabs-karklins jekabs-karklins commented Nov 19, 2024

This commit adds a gitlab-ci, which builds daqlite binaries and publishes them as tar archive and as a docker container.

The Dockerfile sets up a Ubuntu 22.04 environment with necessary packages such as tightvncserver, xfce4, qtcreator, and vim-tiny. The Dockerfile_entrypoint.sh script is included to configure the VNC server and startup script.

Tagging a commit will produce docker image with the tag e.g. "2.0" or "2.1.beta"

This commit adds a Dockerfile for deploying the application. The Dockerfile sets up a Ubuntu 22.04 environment with necessary packages such as tightvncserver, xfce4, qtcreator, and vim-tiny. It also creates directories and copies application files. The Dockerfile_entrypoint.sh script is included to configure the VNC server and startup script. The container is started with the entrypoint.sh script.
Dockerfile.deploy Outdated Show resolved Hide resolved
Dockerfile.deploy Outdated Show resolved Hide resolved
Dockerfile.deploy Outdated Show resolved Hide resolved
Dockerfile.deploy Outdated Show resolved Hide resolved
@jekabs-karklins
Copy link
Contributor Author

@tbukovics I have added the
x11-xserver-utils

But unfortunately I still get an error
RandR extension missing
When trying to change resolution after the boot.

I have added an optional parameter to for the container
VNC_RESOLUTION
that we can add in the docker compose
e.g.
environment:
- DAQLITE_BROKER=-b kafka2:9092
- DAQLITE_PRODUCTION=true
- VNC_PASSWORD=<vnc_password>
- VNC_RESOLUTION=1920x1200 # Increase resolution for better view

Copy link
Contributor

@tbukovics tbukovics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I corrected the entrypoint, there was an necessary RUN.

Please add a ci pipeline for gitlab do build daqlite and if it's good then create and deploy container as latest

@jekabs-karklins jekabs-karklins marked this pull request as draft November 25, 2024 11:11
@jekabs-karklins jekabs-karklins marked this pull request as ready for review November 26, 2024 12:46
@jekabs-karklins
Copy link
Contributor Author

@tbukovics
I have modified Dockerfile to also do the actual build of the binaries
And added gitlab-ci that invokes the dockerfile and publishes once done.

It is quiet slow (~10 min), and could be optimized by splitting into two images with one that does not change often. but that can be done in a separate task if needed.

I have also setup the synchronization to GitLab. So once this is merged the same flow as we have for EFU should work.

Copy link
Contributor

@tbukovics tbukovics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly what I expected to have, you build daqlite product when you create the docker file, and we would like to have a simplified pipeline in gitlab which:

  • builds the daqlite binary on ubuntu
  • if build success, then:
    • publish tar file for ubuntu
    • create and publish docker container

Please also do not forget the scripts and config folders from the container

@jekabs-karklins
Copy link
Contributor Author

We have something like this now

image

@tbukovics tbukovics merged commit 5f2329d into main Dec 4, 2024
2 checks passed
@tbukovics tbukovics deleted the ECDC-4352-daqlite-docker-container branch December 4, 2024 07:59
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.

2 participants