Resources
View Resource List
Resources belong to an environment, and you can view the list of resources in the environment view.
- Click on
Applications
in the left navigation bar. - By default, you will enter the view of the first environment. You can switch to view resources under different projects or environments through the top-level breadcrumb. You can also set the default environment to enter through the breadcrumb.
- In the
Resources
tab, you can view the list of resources under this environment.
View Resource Details
- Navigate to the
Resources
tab in the environment view. - Find the resource you need to view and click its name to enter the detail page.
Create Resource
- Navigate to the
Resources
tab in the environment view. - Click
New Resource
. - Select the resource type. If you want to create from template, enable the
Use Template
option, then select the template and version. For more information about resource types, please refer to Resource Definition. - Enter the
Name
,Description
, andLabels
. The name should be unique under the same environment. - Fill in the configuration form, configuration items depends on the template or resource type you selected.
- Click the
Save and Deploy
button.
Create Resource Draft
You can create a resource as draft.
- Navigate to the
Resources
tab in the environment view. - Click
New Resource
. - Select the resource type. If you want to create from template, enable the
Use Template
option, then select the template and version. - Enter the
Name
,Description
, andLabels
. The name should be unique under the same environment. - Fill in the configuration form, configuration items depends on the template or resource type you selected.
- Click the downward arrow to the right of the
Save and Deploy
button. - Click
Save Draft
.
Edit Resource
- Navigate to the
Resources
tab in the environment view. - Find the resource you need to edit, click
Edit
. - Modify the configuration as needed, then click the
Save and Deploy
button. The resource will be deployed once after editing.
Resource Dependency
Resources can depend on each other by using output references. The referenced entity will be deployed before and deleted after the dependent entities.
For example, if a container service depends on a MySQL resource, the container service can reference the MySQL endpoint in its environment variable as ${res.my-db-name.address}
.
The output reference is in the following format: ${res.<Resource Name>.<Resource Output Name>}
.
Rollback Resource
- Navigate to the
Resources
tab in the environment view. - Find the resource you need to rollback.
- Click on the operation drop-down button, select
Rollback
.
- Choose the historic version you need to roll back to.
- Confirm the configuration changes for the rollback operation, click the
Rollback
button to complete the rollback operation.
Clone Resources
- Navigate to the
Resources
tab in the environment view. - Select the resources you need to clone, click the
Clone
button.
- Select the target environment of the clone.
- If you need to adjust configuration of cloned resources, click the block you want to modify, modify the configuration in the pop-up window, and click the
Confirm
button. - Click the
Save and Deploy
button to complete the clone.
Delete Resource
Delete resource will delete resource configuration in Walrus, and remove all components of the resource.
- Navigate to the
Resources
tab in the environment view. - Find the resource you need to delete.
- Make sure no other resources depend on it. Click the
Delete
button. - In the pop-up window, you can choose whether to cleanup the components. If you uncheck
Clean up all components
, the components of the resource will be retained, but will no longer be managed by Walrus. - Click the
Confirm
button to complete the deletion.
Start Resource
Start operation will start all components of the resource, used to restore stopped resources or deploy draft resources to the environment.
- Navigate to the
Resources
tab in the environment view. - Locate
Stopped
orUndeployed
resource you need to start. - Click the
Start
button.
Stop Resource
Stop operation will stop all components of the resource, unlike delete operation, stop operation will not delete the resource configuration in Walrus.
- Navigate to the
Resources
tab in the environment view. - Locate
Ready
resource you need to stop.
- Click the
Stop
button,then click theConfirm
button in the pop-up window to complete the stop operation.
Caution: Whether a resource can be stopped depends on the resource's labels. If the resource's labels contain
walrus.seal.io/stoppable: "true"
, the resource can be stopped. By default, resources in development or staging environments will automatically add this label when created. You can actively declare this label when creating resources so that resources can be stopped in production environments.
Components
Components are the entities generated by the resource deployment. In the resource list or detail page, you can view its components, including component name, type, status, create time, etc. You can operate components as needed, such as viewing logs, connecting to the terminal, etc.
View Component List
View the component list in the resource list page:
- Enter the
Resources
tab of the environment view. - Find the resource you need to view the component list, click the arrow besides the resource name to expand the component list.
View the component list in the resource detail page:
- Enter the
Resources
tab of the environment view. - Find the resource you need to view the component list, click the resource name to enter the detail page.
- Click the
Components
tab to view the component list.
View Component Logs
Note: The operation to view logs is available for specific component types.
- View the component list.
- Find the component whose logs you need to view and click the
Logs
operation.
Connect to the Component via Terminal
Note: The terminal operation is available for specific component types.
- View the component list.
- Find the component you need to connect to the terminal and click the
Terminal
operation.
View Components' Dependency Graph
- Enter the resource detail page.
- Click the
Components
tab to view the component list. - Switch to the graph view to see dependency graph under the current resource.
For more details on dependency graphs, please refer to Dependency Graph.