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.
- Log in to the Connect server using the
ashley/ashleyuser name and password combination. - In the “Content” tab, click on the “Publish” button, and select “Import From Git”
- In the dialog box, enter the following Git repository URL:
https://github.com/fmichonneau/storm-map - Select the ‘main’ branch, click “Next”, and choose a title for this deployment (for instance “Storm Map”).
- Click “Deploy Content” to start the deployment.
- 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.
- At the command line, install the version of R required by the content (4.4.0).
- Edit Connect’s configuration file to add this version of R.
- Change the Quarto version matching setting to use
nearestmatching. - Restart Connect.
- 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. - Click on “Settings”, and click on the “Current Bundle” tab.
- Click on “View all bundles”
- 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.
- 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 thelibudunits2-devsystem package. - At the command line, install the
libudunits2-devsystem package. - Go back to the Connect web interface, and repeat the steps above to re-activate the bundle.
- 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.
- After about 2 minutes, the deployment should complete successfully, and you should be able to see the generated output.