Develop code using Posit Workbench (including RStudio Pro)

Before you begin

Before you begin using Cloud Workstations, be sure that you have the required permissions and that you complete these required setup steps:

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  5. Make sure that billing is enabled for your Google Cloud project.

  6. Enable the Cloud Workstations API.

    Enable the API

  7. If you are an administrator, make sure that you have a Cloud Workstations Admin IAM role on the project so that you can create workstation configurations.

    If you are a developer and you don't have workstation configurations available in the Google Cloud console, ask your organization's Cloud Workstations Admin to create a workstation configuration for you, or make sure that you have a Cloud Workstations Admin IAM role on the project so that you can create these resources yourself. To check your IAM roles, go to the IAM page in the Google Cloud console:

    Go to IAM

Create the workstation configuration

To use Posit Workbench (including RStudio Pro) the you must create a workstation configuration for the developers in your organization:

  1. Find your Posit Workbench license key and keep it nearby because you need it in a subsequent step. If you need a Posit Workbench license key, contact your Posit Customer Success representative or email sales@posit.co.

  2. Follow the instructions to create a workstation configuration.

    1. When you get to the Environment customization step, select Code editors on base images.

    2. From the Code editors menu, select 'Posit Workbench (including RStudio Pro) Third-party provided'.

    3. Click the arrow_drop_downexpander arrow in the Advanced container options section.

      1. Go to the Environment variables section, and then click Add variable.

      2. Enter RSW_LICENSE in the Key field and paste your Posit Workbench license key into the Value field.

      3. Click Continue.

    4. When you get to the Add users step, give your developers Cloud Workstations IAM access permissions to the workstation configuration.

    5. To create your workstation configuration and add these users to it, click Create.

      If you also elected to create a new cluster, cluster creation can take up to 20 minutes.

    Developers in your team should now be able to create workstations with Posit Workbench.

Set up your workstation

To create a workstation, follow these steps:

  1. In the Google Cloud console, navigate to the Cloud Workstations > Workstations page.

    Go to Workstations

  2. Click add_boxCreate.

    The Create link might be disabled if there aren't any configurations in the project or if you don't have permissions to view them. Ask your organization's Cloud Workstations Admin to create a workstation configuration for you.

  3. Enter your workstation Name.

    Follow the Compute Engine resource naming conventions and choose a name that is unique within the workstation cluster.

  4. Click the arrow_drop_downexpander arrow in the Configuration field and select the Posit Workbench (Third-party) workstation configuration.

  5. Click Create to create your workstation.

Launch your workstation

Now that you have created your workstation, you can start it and then launch it to begin development:

  1. Click Workstations.
  2. Find the workstation that you created in the list of available workstations, select the checkbox beside it, and then click Start. This starts your workstation, and matches it to the parent workstation configuration.
  3. If prompted to start your workstation, click Start to confirm. The status changes to Starting and the status icon refreshspins while the start operation is in progress. It might take a few minutes to start your workstation.
  4. When your workstation is ready, the status changes to Running and the status icon changes to a check_circle checkmark.
  5. Click Launch.

Launch a Posit Workbench RStudio Pro session

  1. The following example shows the welcome page for the Posit Workbench. Your page might look different, depending on how your organization defines your workstation configuration:

  2. Click New Session.

  3. Select RStudio Pro as the IDE and leave Cluster set to Local.

    For more information about Posit Workbench and the IDEs that it supports, such as Jupyter Notebook, JupyterLab, and VS Code, see the Posit documentation.

  4. Click Start Session.

  5. Wait for the session to start up and then begin coding!

Upload files to your workstation

  1. To upload files from your local machine to your workstation, click Upload.

  2. Select the Target directory where you want to store files on your workstation.

  3. Click Choose File to select the file to upload.

  4. To begin the upload, click OK.

To upload multiple files or a directory, create a ZIP file. The ZIP file is expanded after upload.

Import files from your workstation

  1. To import files from your workstation, click Import dataset and select the type of dataset.

  2. Navigate to and select the dataset to import from your workstation.

    The Posit Workbench IDE has dependencies on various R packages for different pieces of features. For example, if you are uploading an Excel file, certain packages need to be installed. If prompted to install required packages, click Yes.

  3. To begin the import, click Import.

Get support for Posit Workbench issues

If you encounter issues with Posit Workbench or with the Posit Workbench container image, report them to Posit at support@posit.co.

What's next