Create Environment
This document explains in more details the create environment job, which enables users to create new jobs which create environments inside an organization in Codex.
Table of Contents
Overview
Creating a new environment means that all the data of the base environment you choose will be replicated to the new environment (this excludes the data from Webhooks, Integrations, Entry Versions and Jobs). This allows you to test different scenarios and configurations without affecting the original environment.
To create a new environment, you need to create a new job that specifies the name, type, base environment, and display name of the new environment. A job is a task that runs on the server and performs a specific action. In this case, the action is creating a new environment.
Usage
To create a new job, you need to fill out the Create New Job form. When you choose the Create Environment job type, it shows its necessary form fields, which includes: Name, Type, Select Base Environment, Alias and Display Name.
Name
The Name field is a text input field that requires you to enter a name for the new job. The name should be descriptive and meaningful, as it will be displayed in the listing of the Jobs tab. For example, you can use Job for new test environment
as the name of the job that creates an environment based on a choosen base environment (e.g. codex-exp
).
Type
The Type field is a dropdown menu that allows you to select the type of the job. The type determines what kind of action the job will perform. To create an environment in your organization, the Create Environment type should be choosen.
Select Base Environment
The Select Base Environment field is a dropdown menu that allows you to select the base environment for the new environment. The base environment is the source of data and settings that will be copied to the new environment. You can choose from any existing environment in your organization.
Alias
The Alias field is a unique value which should be in lowercase, without white spaces, not starting with numbers, and not containing any special character. It will be used as a suffix to the base environment id. This combination is used as a unique identifier your new environment. E.g. if you base environment current id is codex-exp-env
and if you choose the new environment alias to be staging
, then the id for your environment will be codex-exp-env-staging
.
Display Name
The Display Name field is a text input field that allows you to enter a display name for the new environment. The display name is how the new environment will appear in the user interface. The display name should be clear and distinguishable from other environments, as it will help you and other users to recognize and access the new environment.
Job Details
After creating a new job, you will be redirected to the Job Details page. This page shows you more information about your job and its progress.
You can manually run only a single environment job (Create/Sync) at a time, in a Codex organization.
When you create a new environment, Webhooks, Integrations, Entry Versions, Presets and Jobs are not cloned into your new environment.
Job Run Summary
The top section of the page is a summary of your job run. It shows you:
- Status: The status of this job.
- Total Logs: The total number of logs of the chosen job task.
- Total Errors: The total number of errors that occurred during the execution of the chosen job task.
- Total Warnings: The total number of warnings that occurred during the execution of the chosen job task.
- Elapsed Time: The time that has elapsed since the start of this job.
- Created By: The user that has created the job.
Job Tasks
The bottom section of the page is a list of your job tasks. A job task is a sub-task that performs a specific operation within your job. For example, cloning database data or cloning indexed data are two different tasks within creating an environment.
Each task has its own logs which show you more details about its progress or errors that occurr during the process. You can see:
Clone Database Data Task**
- Database data clone progress: x%: The current progress of the job task, as percentage.
- Replication completed successfully.: Indicates that the job task has completed.
Clone Indexed Data Task
- Creating snapshot: x%: The current progress of snapshot creation.
- Restoring snapshot: x%: The current progress of snapshot restoration.
- Indexed data cloned successfully.: Indicates that the job task has completed.
You can click on each task to expand or collapse its logs. Logs are shown in real time if the job is currently being executed.
When you create a new environment, you have to wait for the job to complete. After it completes successfully, you have to refresh the Codex Admin for your environment to get listed in the environments list.