CiscoDevNet / clus_workshop_base

Base image for CLUS workshops
3 stars 5 forks source link

More description of full markdown and sandbox integrated examples #1

Open tiswanso opened 2 years ago

tiswanso commented 2 years ago

I have a good taste of what the capability of the devnet demo integration is from the Meraki Python SDK example from the LL2.0 video sent out and the content of the directory in this repo, however, it seems like there's a lot of details missing. The following are questions I currently have:

  1. Is there a complete example with the Dockerfile for the meraki python SDK demo example or something simpler with both markdown content and an app?
  2. Is there documentation for the json config for the devnet environment, e.g. https://github.com/CiscoDevNet/clus_workshop_base/blob/main/meraki-python-sdk-lab-example/config.json? It seems different than what I see here https://github.com/CiscoDevNet/devnet-writing-guidelines
  3. Any complete markdown integrated and devnet config.json example with container builds from the base images used in the other examples? (probably this is redundant if question 1 has an example)
    • what consumes the config.json?
    • do we just throw config.json into a directory and the base images' entrypoint scripts will use it?
      1. re: the "IDE"/editor part of the Meraki python SDK demo
    • is this a feature of the Meraki stuff or the devnet devenv stuff? I'm assuming it's a general devnet devenv piece.
    • how does the src for the meraki-code get mapped into the env? I'm assuming the directory for the example in this repo is incomplete OR the Dockerfile or some part of the container entrypoint script chain is cloning a src repo to a directory that the devnet "IDE" expects.
dstaudt commented 2 years ago

A few details, as I understand them:

1

* The devenv base image Docker repo: https://wwwin-github.cisco.com/DevNet/Eng_DevEnv_Docker
* The project-specific Docker repo (based on above): https://wwwin-github.cisco.com/DevNet/Eng_Workshop_Image
* In each of these repos, images flavors are tracked in different branches, e.g.:  `Eng_DevEnv_Docker:devenv-base` appears to be the parent of most LL2 projects, and `Eng_Workshop_Image:devenv-dne-meraki` I assume is the Meraki image

2 Neelesh pointed me to this wiki for LL2 authoring details, including config.json schema

3 Not sure about the first part of your question...

* config.json is consumed by PubHub/LL2 during the build process AFAIK - i.e. when you do a commit/sync and the content view is built/updated viewed in PH
* AFAIK LL2 at final render time displays the markdown content, reads the devenv image name (originally from config.json, but probably put into a DB somewhere as part of the build step mentioned above), and spins up the container.  The container itself renders the filebrowser/terminal HTML/JS UI into a `<div>` in the lab page.

4

* This is a feature of LL2; as mentioned above, the code that renders the terminal/IDE is added to the devenv Docker image when its build (see `Eng_DevEnv_Docker`, the stuff in the `config/` directory)
* This is done in the project specific branch Dockerfile (i.e. in `Eng_Workshop_Image`, with the project-specific code residing in the repo/branch, e.g.: https://wwwin-github.cisco.com/DevNet/Eng_Workshop_Image/tree/devenv-dne-meraki/devenv-dne-meraki/src
tiswanso commented 2 years ago

thanks for the info! I'm able to get to the wiki but don't seem to have permission to get to the repos-- https://wwwin-github.cisco.com/DevNet/Eng_Workshop_Image or https://wwwin-github.cisco.com/DevNet/Eng_DevEnv_Docker

I think I see the point... I was thinking the LL2.0 stuff--the markdown & apps/tools/etc for the devenv--could be packaged in stand-alone container form based on the base image, where it executed a markdown rendering webserver with "IDE" stuff based on the config.json. Looks like that markdown webserver stuff is the pubhub LL2.0 platform stuff and possibly not able to be made into a stand-alone container.