Docker and Flist Seamless Integration #97

Open
opened 2024-09-10 21:37:37 +00:00 by mik-tf · 4 comments
Owner

Goal

  • Have something as easy to use with the same basic commands as docker, to offer easy "migration" from docker to flist for docker users

UX

  • With this, any docker user could work on Dockerfiles, and create flists directly
    • the tool convert the Dockerfile to docker to flist

Situation

  • We have flist technology that is amazing and docker technology that is very mature.
  • We need some manual steps to pass from one to the other:
  • Docker has basic inline commands to build docker images and send to hub with hub.docker.com
  • Flist has something similar with hub.grid.tf

Proposition

  • We propose to have CLI commands to use directly from Dockerfile to docker image to flist

Example

  • You work on a Dockerfile, it's done. Then you want to build it and push to the docker hub.
  • Instead of running:
docker build -t image_name:tag . # build a docker image
docker login # log in to hub.docker.com
docker push dockerhub_registry/image_name:tag
  • We would do the following to push to the flist hub
flist build -t image_name:tag . # build a docker image then turn into flist
flist login # log in to hub.grid.tf
flist push tfhub_registry/image_name:tag # push to TF Hub

Avenues

  • It can be done in many ways, even with hero perhaps as hero flist build -t ...

Future

  • The greater vision is to have the same functionalities and flexibility as with docker + dockerfile + docker compose + kubernetes, but with something like flist + tfcmd/tfrobot
    • you can deploy on the grid from command lines, by building Dockerfiles.
    • from a UX perspective, it means they have no learning curve from Docker + Kubernetes to deploying on the grid.
## Goal - Have something as easy to use with the same basic commands as docker, to offer easy "migration" from docker to flist for docker users ## UX - With this, any docker user could work on Dockerfiles, and create flists directly - the tool convert the Dockerfile to docker to flist ## Situation - We have flist technology that is amazing and docker technology that is very mature. - We need some manual steps to pass from one to the other: - e.g. docker hub and flist hub - This can easily be implemented in a script, e.g. @scott made some script around this, see here: https://gist.github.com/scottyeager/2c5826e0aa952ddc7a05080b60efdbbe - Docker has basic inline commands to build docker images and send to hub with hub.docker.com - Flist has something similar with hub.grid.tf ## Proposition - We propose to have CLI commands to use directly from Dockerfile to docker image to flist ## Example - You work on a Dockerfile, it's done. Then you want to build it and push to the docker hub. - Instead of running: ``` docker build -t image_name:tag . # build a docker image docker login # log in to hub.docker.com docker push dockerhub_registry/image_name:tag ``` - We would do the following to push to the flist hub ``` flist build -t image_name:tag . # build a docker image then turn into flist flist login # log in to hub.grid.tf flist push tfhub_registry/image_name:tag # push to TF Hub ``` ## Avenues - It can be done in many ways, even with hero perhaps as `hero flist build -t ...` ## Future - The greater vision is to have the same functionalities and flexibility as with docker + dockerfile + docker compose + kubernetes, but with something like flist + tfcmd/tfrobot - you can deploy on the grid from command lines, by building Dockerfiles. - from a UX perspective, it means they have no learning curve from Docker + Kubernetes to deploying on the grid.
mik-tf added the
Story
label 2024-09-10 21:37:37 +00:00
Author
Owner

Update

Starting from Scott's work, we can take the script with a symlink and use it as seamlessly as using docker, e.g.

  • flist image_name:tag_name
    • it builds a docker image, push it to docker hub, then convert the docker image into an flist and push to tf hub

Expand the Concept

  • We can take this and use function to query the flist API and more, e.g.
    • flist delete image:tag --> delete imagine on flist hub
    • flist image:tag or flist push image:tat --> as explained above
# Update Starting from Scott's work, we can take the script with a symlink and use it as seamlessly as using docker, e.g. - flist image_name:tag_name - it builds a docker image, push it to docker hub, then convert the docker image into an flist and push to tf hub # Expand the Concept - We can take this and use function to query the flist API and more, e.g. - flist delete image:tag --> delete imagine on flist hub - flist image:tag or flist push image:tat --> as explained above
Author
Owner

Update

The basic tool is done and revised by Scott Yeager: https://github.com/Mik-TF/flist_cli

Now the question would be: where do we migrate this repo?

  • github threefoldfoundation
  • github threefoldtech
  • git.ourworld.tf
# Update The basic tool is done and revised by Scott Yeager: https://github.com/Mik-TF/flist_cli Now the question would be: where do we migrate this repo? - github threefoldfoundation - github threefoldtech - git.ourworld.tf
Author
Owner
moved here: https://git.ourworld.tf/tfgrid/flist_cli
Author
Owner

Status

  • It works for Ubuntu
  • Did a lot of different testing
    • It works very well, the goal is reached but only for this OS
  • We will test further if needed and write here if we get issues

What's Next

  • We can check how to make this available for all OS.
    • Ideas
      • Migrate from bash script to python or vlang app

References

@scott any ideas? We can discuss and do some R&D. Then we can document here and in the flist_cli repo.

# Status - It works for Ubuntu - Did a lot of different testing - It works very well, the goal is reached but only for this OS - We will test further if needed and write here if we get issues # What's Next - We can check how to make this available for all OS. - Ideas - Migrate from bash script to python or vlang app # References @scott any ideas? We can discuss and do some R&D. Then we can document here and in the flist_cli repo.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tfgrid/circle_engineering#97
No description provided.