Lab 2: Troubleshooting Git-backed Deployments

Lab Exercise

For this lab, you are going to use the Git-backed publishing method to deploy a Quarto document on your server. In the process, you are going to troubleshoot some issues that might arise. Specifically, for this lab, you will: install a required version of R, change the quarto version matching strategy, and install a system dependency required by an R package.

  1. Log in to the Connect server using the ashley/ashley user name and password combination.
  2. In the “Content” tab, click on the “Publish” button, and select “Import From Git”
  3. In the dialog box, enter the following Git repository URL: https://github.com/fmichonneau/storm-map
  4. Select the ‘main’ branch, click “Next”, and choose a title for this deployment (for instance “Storm Map”).
  5. Click “Deploy Content” to start the deployment.
  6. After a few seconds, you should see an error message that indicates that you are missing the R and Quarto versions required for this content.
  7. At the command line, install the version of R required by the content (4.4.0).
  8. Edit Connect’s configuration file to add this version of R.
  9. Change the Quarto version matching setting to use nearest matching.
  10. Restart Connect.
  11. Go back to the Connect web interface, and in the “Content” tab, type ‘not:published’ in the search box to see your “Storm Map” deployment.
  12. Click on “Settings”, and click on the “Current Bundle” tab.
  13. Click on “View all bundles”
  14. Click on date/time of the bundle, and click on “Activate” to trigger the redeployment of the content. This time, the deployment should start as the required version of R is now available, and the Quarto version matching is more flexible.
  15. After about 2 minutes, you should see another error message indicating that an R package cannot be installed due to a missing system dependency. The package that cannot be installed is called {units}. It depends on the libudunits2-dev system package.
  16. At the command line, install the libudunits2-dev system package.
  17. Go back to the Connect web interface, and repeat the steps above to re-activate the bundle.
  18. In the logs, you will notice that the R packages that were already installed during the previous deployment are cached, and do not need to be reinstalled.
  19. After about 2 minutes, the deployment should complete successfully, and you should be able to see the generated output.