Running Arista cEOS in GitHub Codespaces

Yesterday, I explained how you can run netlab examples in GitHub codespaces and mentioned that they work best with vendors who understand the value of frictionless downloads. But what if you’d like to use a device from one of the good guys who provide the container images but require a registration?

It turns out the solution is trivial:

  • Download the image (for example, Arista cEOS) to your laptop
  • Drag-and-drop the image from a local file folder to the Explore tab of a web page of a running codespace.
  • Wait for the upload to complete; the image will probably be waiting in the top directory.
  • Install the container image.
  • Have fun.

Is there a way to get the image (for example, an Arista cEOS container image) into a codespace without the trip through the laptop? Roman Dodin published a whole hackathon exercise using JavaScript to get it done; it turns out there’s a slightly simpler workaround:

  • Navigate to the vendor download page and copy the download link.
  • Open a new web browser window and make sure the URL is about:blank (so you won’t get extra requests)
  • Open the developer pane (right-click + Inspect in my version of Chrome) and select the Network tab.
  • Paste the download link and start the download. The last request in the Network tab will be the actual download.
  • Right-click that request and select “Copy as cURL”
  • Paste whatever is on the clipboard into the codespaces terminal pane, adding --output some-file-name.tar.xz
  • Wait for the download to complete, and install the container image with the docker image import command.

Now, wouldn’t it be brilliant if Arista’s website developers could do that for you? All they’d have to do is add the Copy curl command to the existing Copy URL button that appears next to the image name, and our lives would be much simpler without Arista losing control over who is downloading the image.

1 comments:

  1. Use eos-downloader to simplify the whole process.

    https://github.com/titom73/eos-downloader

    I’ve used it for sometime containerlab even in codespaces.

Add comment
Sidebar