1. Create a slice with the custom docker image

Create a slice with the custom docker image

Home Forums FABRIC General Questions and Discussion Create a slice with the custom docker image

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1527
    Xusheng Ai
    Participant

      Hello,

      I have a question that if we could create a node with our customize docker image on Fabric. We have a image file called ndn-dpdk-builder, and we want to create a node using this image. I saw Fabric has a docker repository that allows to build and publish the images to the FABRIC Testbed Docker Hub. I was wondering if we publish our image file to the FABRIC Testbed Docker Hub, then we would have the ndn-dpdk-builder image as a option when we create nodes. If not, is there a possibility that we could achieve this?

      Thanks,
      Xusheng

      #1528
      Paul Ruth
      Keymaster

        We are working on a way to streamline deployment of docker images into VMs on FABRIC. Watch for some coming updates to the FABLib library.

        The way to do this is to boot a VM then pull the docker image from somewhere like DockerHub.  You can do this yourself right now.

        In fablib you can do something like:


        node1.execute("sudo apt-get -y install docker.io")
        node1.execute("docker pull <docker hub image name>")
        node1.ececute("docker run .... ")

        Note that on IPv6 site you will need specify the IPv6 docker hub registry like this:

        docker pull registry.ipv6.docker.com/<image name>

        More info on DockerHub and IPv6 is here: https://www.docker.com/blog/beta-ipv6-support-on-docker-hub-registry/

        #1530
        Xusheng Ai
        Participant

          Hello Paul,

          Thanks for the information. I’m able to run command docker pull registry.ipv6.docker.com/<image name> on the node I created. So one possible way is that I could run docker run <my image> to get the VM on that node?

          In addition, I was wondering if we could set node_name = 'Node1' image = '<my image>' when we configure Experiment Parameters of a slice.

          Thanks,
          Xusheng

          • This reply was modified 2 years, 9 months ago by Xusheng Ai.
          #1532
          Paul Ruth
          Keymaster

            You won’t be able to say image=<my_docker_image>. The lowest level abstraction needs to be a VM.

            We are working on a feature for fablib where you will be able to say something like (this is not ready yet):

            node1 = slice.add_node(name='Node1', image='default_ubuntu_20', docker='<docker_hub_image_name>')

            This would create a VM with the default unbuntu 20 image then automatically run a docker container in the VM using that docker image.  In general, the philosophy is that VMs are good for multiplexing hardware and containers are good for packaging software.

            #1534
            Xusheng Ai
            Participant

              Thanks so much for the clarification.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.