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 SFX by proxy—uses the concept of change set deployments to move from sandbox to production, Skuid NLX deployments follow a different process, as outlined below:
- Take note of or download the follow configurations from the source site.
- Retrieve Skuid data locally from the sandbox site using the skuid CLI.
- Deploy Skuid data to the target site using the
skuid
CLI. - Re-enter or upload credentials and users.
Prerequisites¶
- Before beginning any deployment work, you’ll first need two separate Skuid NLX 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).
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 [[]]¶
Open the
Terminal
Mac application. You can do this by typing terminal in Spotlight.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
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 [[]]¶
Open your terminal application of choice.
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
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.
Users¶
- Note which users you will need to manually recreate in the target site.
- For sites with a large number of users, consider researching user provisioning through single sign-on.
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.
- Open the Terminal application. (When you do this, you’ll likely be in your user folder
/Users/your-name
.) - 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
- After completing the information in Step 2, copy and paste the content into the Terminal window.
- Press Enter.
Create a File Folder¶
With credentials set, create a space to store Skuid data on your computer.
(Optional) If you’d prefer to store Skuid data in a different folder, navigate to that folder by typing
cd
.cd Documents
Create a folder specifically for Skuid data using
mkdir
, then navigate into the new folder by using thecd
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 what they are by reading the Skuid Object Strucutre section of our 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.
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
After entering your own credentials in Step 2, copy and paste the content into your Terminal window.
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, any Skuid metadata in your retrieved folder will now exist in the target site.
For more information about the types of metadata the CLI retrieves
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.
Recreate any users that will be accessing the production site.
- Again, consider setting up user provisioning through single sign-on to better facilitate user registration.
- Encourage users to re-enter any of their data source credentials.
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.