Environments
Last updated
Last updated
This is the official documentation of the agent_ruby
Ruby agent.
Once your project successfully installed, a local Development environment is created for you, with a temporary pre-deploy-to-production
branch (more on branches later).
Your first objective should be to deploy to Production.
Forest Admin is meant to help you manage your operations: this can only happen if your team operates on your Production data. To do so, you need to create your Production Environment.
Click "Deploy to production" on the top banner or in the "Environments" tab of your Project settings.
Deploy your Agent
In the first step, you need to input your Agent's URL. This is the URL of the server onto which you have deployed (or will soon deploy) your Agent's codebase:
If you need help deploying your Agent's codebase, here are step-by-step guides showing how it can be done on AWS, on Heroku, on Google Cloud Platform or on a standard Ubuntu server.
Note that for security reasons, your agent must use the HTTPS protocol.
The URL must not end with a trailing /
.
Connect to your database
In the next step, you need to fill out your Production database credentials:
Your database credentials never leave your browser and are solely used to generate environment variables on the next step, so they are never exposed.
Set your environment variables
The final step requires that you add environment variables to your server. Follow the on-screen instructions:
Once your server is successfully detected and running with the indicated environment variables, a "Finish" button will appear. Click on it to finalize the creation of your Production Environment.
Now that your admin panel is live in production, you might want to add an extra step for testing purposes. Forest Admin allows you to create Remote Environments (for test, qa, staging, pre-production,... purposes).
To create a new Remote Environment, go to your Project settings (1):
Then from the "Environments" Tab, click on "Add a new environment" (2).
You can choose to deploy to a Remote Environment before going to production (see below), it's up to you.
Choose your Environment name
You'll first be asked to input the name of the Remote Environment you wish to create:
Enter your Agent's URL for that Environment
Deploy your Agent server in this specific environment, then input its URL:
Connect to your database
You need a separate database for this new environment: if you're creating a Staging, then it must be your staging data, so your staging database.
Your database credentials never leave your browser and are solely used to generate environment variables on the next step, so they are never exposed.
Set your environment variables
The final step requires that you add environment variables to your server. Follow the on-screen instructions:
Once your server is successfully detected and running with the indicated environment variables, a Finish button will appear. Click on it to finalize the creation of your new Remote Environment.
You can change the origins of your Environments to create complex workflows, for instance, dev > staging > preprod > production
. All the layouts of an environment will be generated based on its parent's layout.
To do so, click on the Environment you wish to change the origin of, and from its details page, select the desired origin in the "Set Origin" section.
All child Environments will be refreshed based on the new hierarchy.
A standard project usually has a production and at least a staging Environment, but you may be using other Remote Environments. At some point, you may feel the need to set another Environment as your Production Environment (also known as "reference").
To set as production an Environment it should have the actual reference as origin.
To do so, click on the Environment you wish to set as production, and from its details page, click "Set as production".
The actual reference will take the new production as the origin. All children layouts will be refreshed. Any layout change that is not applicable will be ignored.
You may also delete an Environment. Be very careful as there is no going back!