4. Managing Sources and Repositories


In this section, you will learn:


In this section, you will walk through configuring Posit Package Manager. We will provide you with a clean install of Package Manager on a virtual machine that you will set up and configure. It won’t be feasible to cover all possible configurations in this workshop, but we will try to cover some of the most common patterns.

User requirements

Before you begin configuring Package Manager, you should consider the following:

  • What are the requirements of your end-users.
  • What are your requirements IT/security perspective.
Exercise - Document Package Manager requirements

Assume that Package Manager must meet the following requirements:

End user requirements

  • Access to all packages available on CRAN, including new releases and updates as they come out.
  • Access to all packages available on PyPI, including new releases and updates as they come out.
  • Access to internally developed R packages that can be used by other team members and for apps running in production.

IT/security requirements

  • End users can install only approved packages in production environments.

Your task is to diagram the requirements of your team’s Package Manager. Think about:

  • How many repos do you need?
  • What kind of repos do you need?
  • How many sources do you need?
  • What kind of sources do you need?

Refer to the Packaging 101 page for a refresher on the different repos and sources.

Below is an example of a diagram that meets end user and IT/security requirements. This diagram is an example of one configuration that would work. There is no one correct answer. Other configurations could also work.

A diagram describing the planned deployment.

Interactive exercise

Lab 2

🚀 Launch the exercise environment!

In the exercise environment, you will get experience:

  • setting up R and Python repositories
  • setting up a repo for “in-house” R packages
  • setting up a repo for a curated list of CRAN packages

Go to: 5. End User Usage

Back to top