-
Notifications
You must be signed in to change notification settings - Fork 11
Automated testing for Katacoda scenarios with Docker #49
Comments
@jorgeorpinel I'm currently building the Docker based scenarios under my account: https://katacoda.com/iex/courses/get-started-dockerized/versioning Currently these Docker containers are stored in Docker hub under my name: https://hub.docker.com/repository/docker/emresult/dvc-gs-versioning And their This repository will also contain all assets and project files for each of the scenarios.
|
Looks great! Quick ask - let's add something at the very beginning, like please wait for a minute while we are initializing the environment. Otherwise it's not even clear for people not familiar with Docker what's going on there. Also, is there a way to cache something on the Katacoda end? or even on our end (S3) to make download faster?
can we reuse/pull from the existing projects (like the example-get-started one?) - it can become hard to maintain, update multiple repos with code/assets
we should move them in katacoda repo? and probably enable CI/CD to upload the new image as we change these Dockerfiles, or when DVC version is being updated, etc - how are we going to detect such changes? how and when are we going to update/rebuild images?
Yep, I'll invite you to the org. |
Thank you.
Yes, I'll put that. Overall, I think it's faster than manually preparing the environment and the user will have an option to run the command on their own container after a I don't think we can make the downloads faster without paid subscription to Katacoda, the speed is most likely determined by the Katacoda's download speed. While writing this, I just had an idea to base the containers on When the minimum requirements change, we'll only update the base container and test all the scenarios and documentation against this.
As we'll have common projects across all the documentation, all containers will use the same code base, by cloning from Github. Current setup is just to convert the scenarios to Dockerized versions. We need custom code for Katacoda for now, but I agree that it becomes a burden to have multiple example projects.
I think we can have a I envision an automated setup, like when you update the project in This can be integrated to CI/CD as well. It probably will take a long time to test all the commands in the documentation, so a weekly setup may be preferable but automation is a major goal. We can also store Thank you @shcheklein |
I changed the way
RUN git clone \
https://github.com/iterative/example-get-started \
--branch 7-ml-pipeline \
&& git -C /root/example-get-started \
checkout -b katacoda-project and modifies the data with RUN dvc pull \
&& head -n 12000 data/data.xml > data/data.xml.1 \
&& mv data/data.xml.1 data/data.xml \
&& dvc add data/data.xml \
&& git add . \
&& git commit -m "Modified for Katacoda Params Scenario" \
&& dvc gc -f --workspace For the general |
The experiments scenario also works on Docker locally, but there is a bug in DVC 2.0.6 installed by default using You can play with the current containers like
A web server ( You can compare dockerized versions of scenarios and former scenarios. There are no content changes. The Dockerfile repository is here: https://github.com/iesahin/dvc-examples-docker All Docker images are built and pushed using https://github.com/iesahin/dvc-examples-docker/blob/master/build-all.zsh I'm beginning to write automated testing script for the scenarios. |
I have completed the initial version for Markdown Code Runner here: https://github.com/iterative/markdown-code-runner If you clone, run |
It's possible to use Docker images for each scenario to test the scenario commands.
We can create a
dvc-base
image like in https://hub.docker.com/repository/docker/emresult/dvc-baseFor each of the scenarios, create an image, e.g.,
dvc-gs-versioning
that will have all the artifacts / requirements to run the scenario. These can be linked in GS / UC / Tutorial pages for users to try the commands on their own machine.We can have a script to extract shell commands from
.md
files. Rundoc may be suitable or we can find another tool, like an MD parser to send these commands to the Docker instance. (v2: It can also fill the parts in.md
files with the output of the commands.)Katacoda scenarios, tutorials, and the GS pages will have the same datasets, scripts, commands, etc.
Update - 2021-04-06
I have completed to write a tool that runs the commands in Markdown documents. It can be found here
It runs commands in Dockerized scenarios in the containers.
This is related with iterative/dvc.org#2318 and iterative/dvc.org#2354
This issue can be closed after merging the dockerized versions.
TODO
{{execute}}
blocks to containers viadocker exec
and get the resultsThe text was updated successfully, but these errors were encountered: