Within Internal, you can create multiple environments in which to build and deploy your tools. Each environment is separate, allowing you to update and deploy tools in one environment without impacting the tools in another environment. This is often used to create a separate “development”, “testing” or “staging” environment from a “production” environment; so that users can use the final versions of tools in production while updates or development continues in another environment.
Access the Data & Functions tab within Company Settings.
Click the “Manage Environments” button.
Initially, you’ll find a single default environment, which is named “Default”. Any credentials you’ve already added are in the default environment. When Internal connects to your data sources and auto-generates functions for use (and during future syncs), it uses the default environment, and does not use any other environment.
You can choose to rename your default environment, or click “+Add New” / “-” to add or remove a new environment.
Once you’ve created a new environment and click “Save”, you’ll want to add data source credentials for that environment.
Go to the Data & Functions tab and click on a data source. In the environments tab, you can add a new set of credentials for your environment.
Take extra caution if you change the default environment’s credentials. Since the credentials of your default environment determine the functions that are available in Internal, if your new credentials don’t provide the same level of access (or if some tables/fields are missing), some Spaces may break.
Let’s say you initially only used a single (default) environment, and used the credentials for your database with sample data. You’ve created a few tools in this environment, and now you want to create a production environment so that these tools can be used with the actual production data.
You can create a new development environment, and swap in the credentials for the old default environment (that pointed to the sample database). You then update the default environment’s credentials to point to the database with production data.
If the new credentials (for production data), have more limited permissions than the credentials used to develop the tools, you may run into issues. For example, the new credentials may not have access to certain functions that the initial set did, which may break tools utilizing these functions. Or the new credentials do not have access to certain data fields, which may also break any tools that interact with those data fields.
Once your environments and associated data sources are set up, you’ll be able to publish to different environments. You’ll need to publish your existing Spaces to your new environment to use them there. Users with permission to edit a Space also have permission to view and publish to the environments available.
Click “Publish” and use the publishing options to select the environment that they want to publish to.
Anyone who has permission to edit the Space can also change the environment when using that Space. Click the dropdown (top-left) in the header to select your desired environment.