whole-tale / repo2docker_wholetale

Repo2docker plugin for Whole Tale
Other
0 stars 1 forks source link

Allow to configure Rocker base image and RStudio download url. Fixes #12 #13

Closed Xarthisius closed 4 years ago

Xarthisius commented 4 years ago

How to test

  1. Checkout this branch and deploy locally (pip install -e .)
  2. mkdir -p /tmp/blah && cd /tmp/blah
  3. Run:
    cat <<- EOF > /tmp/blah/environment.json
    {
        "config": {
            "buildpack": "RockerBuildPack",
            "command": "/start.sh",
            "environment": [
                "CSP_HOSTS=https://dashboard.wholetale.org",
                "PASSWORD=password"
            ],
            "memLimit": "2048m",
            "port": 8787,
            "targetMount": "/WholeTale/",
            "urlPath": "",
            "user": "rstudio"
        },
        "icon": "https://www.rstudio.com/wp-content/uploads/2014/06/RStudio-Ball.png",
        "iframe": true,
        "name": "RStudio",
        "public": true,
        "tags": [
            "latest"
        ]
    }
    EOF
  4. repo2docker --config <path_to>/whole-tale/repo2docker_wholetale/repo2docker_config.py --user-name rstudio --user-id 1000 --no-run . which will output image name e.g. Successfully tagged r2d-2e1600880746:latest
  5. Using the image from previous step run docker run -p 8787:8787 -ti -e PASSWORD=password r2d-2e1600880746:latest /start.sh
  6. Go to http://localhost:8787/ and make sure that:
    • it runs R 3.5.1 (blurb in the left panel)
    • it runs RStudio 1.2.679 (Help > About RStudio)
    • File pane has WT icon in breadcrumbs
  7. Stop your container
  8. Modify environment.json by adding:
          "WT_ROCKER_VER=4.0.2",
          "WT_RSTUDIO_URL=http://use.yt/upload/dbda6b23",
          "WT_RSTUDIO_MD5=805e9a4657b294300f8d427e144c3c6d",

    to the config.environment section (be mindful that the last entry in JSON array cannot end with ,)

  9. Repeat 4. and 5. (use new image in 5.)
  10. Go to http://localhost:8787/ and make sure that:
    • it runs R 4.0.2 (blurb in the left panel)
    • it runs RStudio 1.3.1093 (Help > About RStudio)
    • File pane has WT icon in breadcrumbs
Xarthisius commented 4 years ago

This looks good. How would you feel about finding another place to host the rstudio images than use.yt?

I'd feel great. Anything in particular?