Skuid Platform: Sandbox Deployments

When working on any application, it is best practice to have a testing location—or sandbox—where you develop and tweak features before deploying them to end users. Once these updates have been sufficiently tested within a sandbox, rolling out those features to users typically involves transplanting data, metadata, and other configurations from the sandbox area to a production area, hence the phrase “deploy to production.”

While Salesforce—and Skuid on Salesforce by proxy—uses the concept of change set deployments to move from sandbox to production, Skuid Platform deployments follow a different process, as outlined below:

  1. Take note of or download the follow configurations from the source site
  2. Retrieve Skuid data locally from the sandbox site using the skuid CLI.
  3. Deploy Skuid data to the target site using the skuid CLI.
  4. Re-enter or upload credentials, themes, and users

Prerequisites

  • Before beginning any deployment work, you’ll first need two separate Skuid Platform sites, one to use a sandbox site and one to use as a production site. Register for these sites as you normally would, contacting your Skuid business representative to note one as a sandbox site.
  • Because you’re working with two separate sites, it’s helpful to have credentials for both easily accessible.
  • You must download and install the skuid command line interface (skuid CLI).
    • The skuid CLI cannot currently deploy from Windows machines. You can follow the instructions below as a checklist, but you will need to manually transfer any Skuid pages and manually recreate any Skuid configurations on your target site.

Installing skuid CLI

While this is a developer-centric tool, this document uses simpler commands to illustrate this process, including its installation. If you are a developer, you can find more detailed information within the skuid CLI documentation.

Follow the instructions for your operating system below:

macOS [[]]

  1. Open the Terminal Mac application. You can do this by typing terminal in Spotlight.

  2. Copy and paste the following commands into the Terminal window and press enter:

    # Download the skuid application
    wget https://github.com/skuid/skuid/releases/download/0.2.0/skuid_darwin_amd64 -O skuid
    # Give the skuid application the permissions it needs to run
    chmod +x skuid
    # Move the skuid application to a folder where it can be used easily
    mv skuid /usr/local/bin/skuid
    
  3. To test that the application installed correctly, type skuid --help in the terminal.

If you see the application’s help information, you’re all set!

Linux [[]]

  1. Open your terminal application of choice.

  2. Copy and paste the following commands into the Terminal window and press enter:

    # Download the skuid application
    wget https://github.com/skuid/skuid/releases/download/0.2.0/skuid_linux_amd64 -O skuid
    # Give the skuid application the permissions it needs to run
    chmod +x skuid
    # Move the skuid application to a folder where it can be used easily
    # Enter your computer account password if prompted
    sudo mv skuid /usr/local/bin/skuid
    
  3. To test that the application installed correctly, type skuid --help in the terminal.

If you see the application’s help information, you’re all set!

Manual Deployment Steps

While the skuid CLI application does most of the work in a sandbox deployment, there are several things within a Skuid site that will not be transferred and must be manually recreated.

Authentication provider credentials and data source credentials

Warning

You data sources will not work in your target site unless you complete the following steps.

skuid will recreate authentication providers and data sources using most of the same metadata as a sandbox site, but essential credential information is not transferred for security reasons.

For both authentication and data sources that require credentials (client IDs, client secrets, usernames, passwords), ensure that you have the necessary information available to re-enter on the target site. This may mean accessing configuration screens within your data system to obtain (or create) new credentials.

If utilizing OAuth authentication, which is very common for Skuid data sources, you must enter the appropriate callback URLs for your target site within any external data systems you’ll be using. This involves opening each data system’s app configuration page—for example Salesforce connected apps—and entering your additional callback URLs.

Themes

Export any custom themes you have created:

  1. Click Theme in the navigation bar of the Skuid UI.
  2. Click the Themes tab.
  3. Locate the theme you would like to move and click Export Theme fa-file-excel-o in the column beside the theme’s name.
  4. Save the compressed theme file to a location you can find on your computer.

Note

Skuid on Salesforce

If you encounter issues exporting your theme in Salesforce Lightning, try doing so in Salesforce Classic.

Users

With those steps out of the way, you’re ready to retrieve your Skuid data.

Retrieving Skuid Data

Set Credentials

First, set credentials so you can access the source Skuid site.

  1. Open the Terminal application. (When you do this, you’ll likely be in your user folder /Users/your-name.)
  2. Set your source Skuid site credentials by copying the following lines into a text editor and adding the appropriate information:
export SKUID_UN=username
export SKUID_PW=password
export SKUID_HOST=https://example.skuidsite.com
  1. After completing the information in Step 2, copy and paste the content into the Terminal window.
  2. Press Enter.

Create a File Folder

With credentials set, create a space to store Skuid data on your computer.

  1. (Optional) If you’d prefer to store Skuid data in a different folder, navigate to that folder by typing cd.

    cd Documents
    
  2. Create a folder specifically for Skuid data using mkdir, then navigate into the new folder by using the cd command with the new directory’s name.

    If the folder’s name contains spaces or other special characters, surround it with quotation marks. For the sake of simplicity, consider using hyphens instead of spaces:

    mkdir my-skuid-site
    cd my-skuid-site
    

Retrieval

Now time to run the magic command:

skuid retrieve

It may take some time to download everything (depending on the size of your site). Once complete, you’ll see the source site’s Skuid data in the folder you’re working within.

While you won’t need to do anything to these files, you can learn more information about how they are stored by reading the the skuid CLI documentation.

Deploying Skuid Data

Once you have successfully retrieved Skuid data, a single command is used to deploy it.

Note

You must use the username, password, and host flags to set credentials matching the information for the target site.

  1. Set the target Skuid site credentials by copying the following lines into a text editor and adding the appropriate information:

    skuid deploy --username productionUsername --password productionPassword  --host https://production-sandbox.skuidsite.com
    
  2. After entering your own credentials in Step 2, copy and paste the content into your Terminal window.

  3. Press Enter.

The skuid CLI will begin uploading the Skuid data to your target site. This may take some time (depending on the size of your site).

After the deployment is complete, the following will exist in the target site:

Final settings

  • While authentication providers, data sources, and data source objects have been recreated in the target site, you must manually re-enter your credentials on each authentication provider and/or data source within Configure > Data Sources.

    • For each authentication provider, re-enter any shared credentials as well as any client secrets.
    • For each data source, re-enter any shared credentials.
  • Import any custom themes you have saved.

      1. Click Theme in the navigation bar of the Skuid UI.
      2. Click the Themes tab.
      3. Click fa-caret-down the down arrow beside fa-picture-o Create New Theme to open its sub-menu.
      4. Click fa-sign-in Import Theme to open the Upload a Theme popup.
      5. Click fa-cloud-upload Upload (Skuid Platform) or fa-cloud-upload Theme File (Skuid on Salesforce) and then navigate to the appropriate theme file—look for the .zip or .sktheme extension.
      6. Confirm your selection.

      Note

      If you already have a theme of the same name, Skuid will prompt you to either update the name or to cancel the upload.

      Note

      Skuid on Salesforce

      If you encounter issues importing your theme in Salesforce Lightning, try doing so in Salesforce Classic.

  • Recreate any users that will be accessing the production site.

Troubleshooting

When working with two different sites, it’s possible to incorrectly set a flag or encounter other errors. See the skuid CLI troubleshooting section for a list of possible error messages and potential solutions.